RegisterReader simplified, ReadRegisterOp( ) removed from IRegReader, ReadMoreRegistersOp removed.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2017-2021 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -9,7 +9,7 @@ using Config.Entities;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStart
|
||||
{
|
||||
public class Roi : ComponentBase, GenericDevices.IRegReaderStillCamera, IOperation
|
||||
public class Roi : ComponentBase, GenericDevices.IRegReaderStillCamera
|
||||
{
|
||||
/// TODO: Implement support for sharing one camera by multiple ROI-s
|
||||
|
||||
@@ -62,13 +62,10 @@ namespace TBF.Rig.Network.Camera.RoiForFixedStart
|
||||
|
||||
public int WMPulses { get { return (int)(WMVolume / LtrsPerPulse); } }
|
||||
|
||||
int wmRefPulses;
|
||||
public int WMRefPulses { get { return wmRefPulses; } }
|
||||
public int WMRefPulses { get { return StateMachine.ControlBoard.RefPulses; ; } }
|
||||
|
||||
|
||||
public Roi()
|
||||
{
|
||||
}
|
||||
public Roi() { }
|
||||
|
||||
public Roi(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -117,12 +114,6 @@ namespace TBF.Rig.Network.Camera.RoiForFixedStart
|
||||
log.DebugFormat("{0}:Clear()", Name);
|
||||
beginWMState = 0;
|
||||
endWMState = 0;
|
||||
wmRefPulses = 0;
|
||||
}
|
||||
|
||||
private void ReadPulses()
|
||||
{
|
||||
wmRefPulses = StateMachine.ControlBoard.RefPulses;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,34 +133,5 @@ namespace TBF.Rig.Network.Camera.RoiForFixedStart
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Events: Event.ReadRegisterDone
|
||||
/// </summary>
|
||||
/// <returns>ReadWaterMeter instance reference casted to IOperaton</returns>
|
||||
public IOperation ReadRegisterOp()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
ReadPulses();
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>eventDone</returns>
|
||||
public Event Run()
|
||||
{
|
||||
ReadPulses();
|
||||
return Event.ReadRegisterDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user