internal override void WriteImpl(IAmpsCommunicator physical) { physical.WriteHeader(Command); physical.Write(value1, ","); physical.Write(value2, ","); physical.WriteEnd(); }
internal override void WriteImpl(IAmpsCommunicator physical) { //Table format: STBLDAT;<data>; physical.WriteHeader(Command); physical.Write(value, ";"); physical.WriteEnd(";"); }
/// <summary> /// /// </summary> public AmpsBox(IAmpsCommunicator communicator) { this.communicator = communicator ?? throw new ArgumentNullException(nameof(communicator)); this.communicator.Open(); var source = this.communicator.MessageSources; source.Where(x => x != "tblcmplt" && !x.Contains("ABORTED") && x != "tblrdy" && !string.IsNullOrEmpty(x) && x != "TableNotReady").Select(s => { this.responseQueue.Enqueue(s); return(s); }).Subscribe(); this.TableCompleteOrAborted = source .Where(x => x.Equals("tblcmplt", StringComparison.OrdinalIgnoreCase) || x.Contains("ABORTED")).Select(x => Unit.Default); this.TableCompleteOrAborted.Subscribe(unit => { System.Diagnostics.Trace.WriteLine($"{Environment.NewLine}complete{DateTime.Now}"); }); this.ModeReady = source.Where(x => x.Equals("tblcmplt", StringComparison.OrdinalIgnoreCase)).Select(x => Unit.Default); this.ModeReady.Subscribe(); ClockFrequency = 16000000; }
internal void WriteTo(IAmpsCommunicator physical) { WriteImpl(physical); }
//internal void SetSource(ResultProcessor resultProcessor, ResultBox resultBox) //{ // note order here reversed to prevent overload resolution errors // this.resultBox = resultBox; // this.resultProcessor = resultProcessor; //} //internal void SetSource<T>(ResultBox<T> resultBox, ResultProcessor<T> resultProcessor) //{ // this.resultBox = resultBox; // this.resultProcessor = resultProcessor; //} internal abstract void WriteImpl(IAmpsCommunicator physical);