/// /// Copyright (c) 2021 Sensus Slovensko a.s. /// namespace TBF.Rig.ControlBoard.Uni { public class Const { public const byte STX = 0x10; public const int WMsCount = 20; /// water meters count public const int ADCsCount = 16; /// ADCs count: feedback from RV-s and diverters public const int RVsCount = 8; /// 0..7 public const int FlowmtrsCount = 7; /// ID=1..7, ID=0 ... flowmeters 1,2,3 parallel public const int DivertersCount = 5; /// 1..5 public const int DivTimeResolution = 2; /// [ms] public const double TimeResolution = 0.0002; /// [s] } public enum StatusP : ulong { /// byte 0 FlowmtrNrMask = 0x7, /// bits 0,1,2 TestInProgress = 0x8, /// bit 3 TestCompleted = 0x10, /// bit 4 ReadingCounters = 0x20, /// bit 5 WaitingForDiverter = 0x40, /// bit 6 TestWithDiverter = 0x80, /// bit 7 /// byte 1 TestWithRefFlowmtr = 0x100, /// bit 8 DirectionOfDiverer = 0x200, /// bit 9 SynchroMethod = 0x800, /// bit 11 WaterMeterCalib = 0x1000, /// bit 12 EmgcyStopActive = 0x2000, /// bit 13 GateOn = 0x4000, /// bit 14 TimeMeasurementEn = 0x8000, /// bit 15 /// byte 2 FrequencyMeasured = 0x80000, /// bit 19 CoaxRegValveBusy = 0x200000, /// bit 21 /// byte 3 ADCError = 0x80000000, /// bit 31 /// byte 4 TimeoutOccured = 0x100000000, /// bit 32 (after 40s without communication) MeretAddresses = 0x200000000, /// bit 33 ScopeBufferFull = 0x400000000, /// bit 34 /// byte 5 /// byte 6 Flowmtr1Active = 0x1000000000000, /// bit 48 Flowmtr2Active = 0x2000000000000, /// bit 49 Flowmtr3Active = 0x4000000000000, /// bit 50 } }