/// /// Copyright (c) 2015-2019 Sensus Metering Systems /// Author: Milan Hanajík /// using System; namespace TBF.BenchControl.TestMethods.iPerlCommunication { public class CommCompletedEventArgs : EventArgs { public int ThreadId; public int WMNr0; /// 0-based water meter position public iPerlHead.IperlHead Ihead; public Results.Entities.WaterMeter Wm; public string CommMessage; public CommErr CommErr; public CommCompletedEventArgs(int threadId, int wmNr0, iPerlHead.IperlHead ihead, Results.Entities.WaterMeter wm, string commMessage, CommErr commErr) { this.ThreadId = threadId; this.WMNr0 = wmNr0; this.Ihead = ihead; this.Wm = wm; this.CommMessage = commMessage; this.CommErr = commErr; } public override string ToString() { return string.Format("Thread={0} WMNr0={1} IHead={2} WM={3} CommMsg={4} CommErr={5}", ThreadId, WMNr0, (Ihead != null) ? Ihead.Name : "null", Wm.WMPosition, (CommMessage != null) ? CommMessage : "null", CommErr); } } }