using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace XYLEM.Communication { /// /// Class to contain data for a exception /// public struct DeviceExceptionData { /// /// Special function has to be done when this com /// https://mjksvn.world.fluidtechnology.net:4443/svn/development/- MJK Standards/- Communication protocols/Modbus/Modbus Specifications.doc /// "2.2.1 MODBUS Exception Responses:" /// public enum SpecialType { DriverError = -1, WaitForReset = 14, // Wait x sec befor next tx WaitForFinishMax5s = 252, // Wait Exception OK (max 5s) OnlyAnInforead = 253, // Used internal to only make an info read about data to read / write (Not intentet for normal TX) WaitForFinishMax60s = 254, // Wait Exception OK (max 60s) WaitForFinishMax5Min = 255, // Wait Exception OK (max 5min) } /// /// Exception No. /// private int _ExcNo; /// /// Exception Info /// private string _Info; /// /// Preload All data.. used when init data array /// /// /// public DeviceExceptionData(int excNo, string info) { this._ExcNo = excNo; this._Info = info; } /// /// Exception code number /// public int ExcNo { get { return _ExcNo; } set { _ExcNo = value; } } /// /// Info text to exception no. /// public String Info { get { return _Info; } set { _Info = value; } } } }