Refactorization : BenchControl -> Rig
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace TBF.Rig.ControlBoard.Legacy
|
||||
{
|
||||
public enum Command
|
||||
{
|
||||
None = 0, /// Do nothing, just transfer data (route, etc.)
|
||||
Start = 1, /// Start the measurement
|
||||
Stop = 2, /// Stop the measurement
|
||||
ReadDivTransition = 4,
|
||||
ReadExtremasOfPulses = 6,
|
||||
ReadShapesOfPulses = 7,
|
||||
ResetShapesOfPulses = 8,
|
||||
EnduranceCycleParamsUpload = 11,
|
||||
EnduranceCycleStart = 12,
|
||||
EnduranceCycleStop = 13,
|
||||
}
|
||||
|
||||
#if FUZHOU_300 || IZRAEL_200 || TORINO_50 || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL || BADGER_VELKA_TRAT || PUCHONG_200 || SLM_50 || GENESIS || MALTA_WSD25 || SLM_END || WARSAW_END || BERLIN || GELSENWASSER || SLM_150 || PETERSBURG_50 || PETERSBURG_200 || DEWA_300 || ROMA_200 || KEMPNO_50 || BAHRAIN_50 || RUM_MOB || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || FILIPINY_50 || SENTEC || FUZHOU_100 || CEVAK_200 || IZRAEL_50 || ALZIR_25
|
||||
public enum StatusP : ulong
|
||||
{
|
||||
RefFlowMeterMask = 0x7, /// bits 0,1,2
|
||||
TestCompleted = 0x10, /// bit 4
|
||||
TestInProgress = 0x20, /// bit 5
|
||||
//DiverterError = 0x20,
|
||||
MsrmntWithDivrtr = 0x80, /// bit 7
|
||||
RefPulsesMsrmnt = 0x100, /// bit 8
|
||||
SynchroMethod = 0x800, /// bit 11
|
||||
WaterMeterCalib = 0x1000, /// bit 12
|
||||
EmgcyStopActive = 0x2000, /// bit 13
|
||||
MsrmntGateActive = 0x4000, /// bit 14
|
||||
TimeMeasurement = 0x8000, /// bit 15
|
||||
FrequencyMeasured = 0x80000, /// bit 19
|
||||
CoaxRegValveBusy = 0x200000, /// bit 21
|
||||
ADCError = 0x80000000, /// bit 31
|
||||
TimeoutOccured = 0x100000000, /// bit 32
|
||||
MeretAddresses = 0x200000000, /// bit 33
|
||||
SampleBuferFull = 0x400000000, /// bit 34
|
||||
ErrorTempMeter = 0x10000000000, /// bit 40
|
||||
ErrorPressMeter1 = 0x1000000000000, /// bit 48
|
||||
ErrorPressMeter2 = 0x2000000000000, /// bit 49
|
||||
ErrorPressMeter3 = 0x4000000000000, /// bit 50
|
||||
ErrorPressMeter4 = 0x8000000000000, /// bit 51
|
||||
EndurCycleRunning = 0x200000000000000, /// bit 57
|
||||
}
|
||||
#else // DN100 || MUNICH || FUZHOU_150 || TORUN_50 || CEVAK_40 || MURES_40 || FUZHOU_50
|
||||
public enum StatusP : ulong
|
||||
{
|
||||
RefFlowMeterMask = 0x7,
|
||||
TestInProgress = 0x8,
|
||||
TestCompleted = 0x10,
|
||||
DiverterError = 0x20,
|
||||
MsrmntWithDivrtr = 0x80,
|
||||
RefPulsesMsrmnt = 0x100,
|
||||
SynchroMethod = 0x800,
|
||||
WaterMeterCalib = 0x1000,
|
||||
EmgcyStopActive = 0x2000,
|
||||
MsrmntGateActive = 0x4000,
|
||||
TimeMeasurement = 0x8000,
|
||||
FrequencyMeasured = 0x80000,
|
||||
CoaxRegValveBusy = 0x200000, /// bit 21
|
||||
ADCError = 0x80000000,
|
||||
TimeoutOccured = 0x100000000,
|
||||
MeretAddresses = 0x200000000,
|
||||
SampleBuferFull = 0x400000000,
|
||||
ErrorTempMeter = 0x10000000000,
|
||||
ErrorPressMeter1 = 0x1000000000000,
|
||||
ErrorPressMeter2 = 0x2000000000000,
|
||||
ErrorPressMeter3 = 0x4000000000000,
|
||||
ErrorPressMeter4 = 0x8000000000000,
|
||||
EndurCycleRunning = 0x200000000000000, /// bit 57
|
||||
}
|
||||
#endif
|
||||
|
||||
public enum StopDevs
|
||||
{
|
||||
None = 0,
|
||||
Reference = 0x01, /// bit 0
|
||||
Diverter = 0x02, /// bit 1
|
||||
GatePulse = 0x08, /// bit 3
|
||||
TimeMeasurement = 0x10, /// bit 4
|
||||
BypassDevCoupled2Div = 0x20, /// bit 5
|
||||
RegValveRegulation = 0x80, /// bit 7
|
||||
All = 0xFF,
|
||||
}
|
||||
|
||||
public enum TestMethods
|
||||
{
|
||||
Diverter = 0x01, /// bit 0: 1=Mass method (diverters are used), 0=Volume method
|
||||
FixedStart = 0x02, /// bit 1: 1=fixed start method, 0=flying start method
|
||||
Synchro = 0x04, /// bit 2: 1=Synchro method, 0=Pulse counting
|
||||
MassAndContinue = 0x10, /// bit 4: 1=Method with mass measurement followed by a volume method
|
||||
}
|
||||
|
||||
public enum RegulValveMode : byte
|
||||
{
|
||||
None = 0,
|
||||
PulseWidth = 1, /// Pulse width 0.05 .. 2 sec.
|
||||
TargetPosition = 2, /// Low and high position (=DAC value) limits (0..100%) are specified
|
||||
TargetFrequency = 3, /// Low and high frequency limits (0..2000Hz,0..2200Hz) are specified
|
||||
Stop = 4, /// Stop regulation
|
||||
}
|
||||
|
||||
public enum RegulValveState
|
||||
{
|
||||
Idle = 0,
|
||||
PwOrFreqRegul = 2,
|
||||
DacValueRegul = 3,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user