public DAQControl(bool usingGui) { gui = usingGui; gControl = this; applog = NC.App.Loggers.Logger(LMLoggers.AppSection.App); collog = NC.App.Loggers.Logger(LMLoggers.AppSection.Collect); ctrllog = NC.App.Loggers.Logger(LMLoggers.AppSection.Control); datalog = NC.App.Loggers.Logger(LMLoggers.AppSection.Data); // The state was set on cmd line prior to exec here, and it still is, so must upcast to an Assay instance NC.App.Opstate = new AssayState(NC.App.Opstate); LMMMComm = LMMMComm ?? new TalkToLMMMM(collog); // a singleton, modern syntax just for fun CurState.SOH = NCC.OperatingState.Starting; }
public static string SuccinctDAQProcessingStatus(object o) { string s = String.Empty; if (o != null) { string ss = string.Empty; if (o is DAQControl) { DAQControl d = (DAQControl)o; ss = d.SuccinctInstrStatusString(Instruments.Active.FirstActive()); } else if (o is Measurement) { Measurement m = (Measurement)o; ss = DAQControl.MeasStatusString(m); } s += ss; } return(s); }
public static string LoggableDAQProcessingStatus(EventType EH, LMLoggers.LognLM log, LogLevels lvl, object o) { string s = String.Empty; if (o != null) { string ss = string.Empty; if (o is DAQControl) { DAQControl d = (DAQControl)o; ss = d.InstrStatusString(Instruments.Active.FirstActive(), true); } else if (o is Measurement) { Measurement m = (Measurement)o; ss = DAQControl.MeasStatusString(m); } s += ss; } log.TraceEvent(lvl, DAQControl.logid[EH], s); return(s); // just in case it could be of further use }
public HVControl(DAQControl control) { this.control = control; ctrllog = NC.App.Loggers.Logger(LMLoggers.AppSection.Control); }