- Adjust `Disabled` logic for water meters in `SequenceBase` allowing conditional enabling of channels based on serial number. - Introduce `EnableShowChanels` property in `GenesisSmartReader` and integrate into `FlyingStartMassCollectionSeq`. - Modify `StartupFlushMs` to derive configuration dynamically. - Update `GenesisCfgCtrl` with a checkbox for enabling channels and input for flush timing. - Increment assembly version to `3.9.3054.1`.
75 lines
2.8 KiB
C#
75 lines
2.8 KiB
C#
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using Common;
|
|
using Config.Entities;
|
|
using TBF.Rig.Generic;
|
|
using TBF.Rig.RegisterReaders.GenesisRegReader.implementations;
|
|
|
|
|
|
namespace TBF.Rig.RegisterReaders.GenesisRegReader
|
|
{
|
|
public class GenesisCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(GenesisCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
public IComponentCfgCtrl GetControl(IList<Component> cmpntEntities)
|
|
{
|
|
return new GenesisCfgCtrl();
|
|
}
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public bool UseTcpIP;
|
|
public string OptoIPAddress;
|
|
public ushort OptoTcpipPortNr;
|
|
public int HeadCommunicationComPortNr;
|
|
public int OptoComPortNr;
|
|
public int RfidComPortNr; /// 0 = use MuxBoardNr
|
|
public int MuxBoardNr; /// 0 = use RfidComPort(Nr), otherwise mux. board nr. 1 .. 4
|
|
public int Group; /// Number written to QuidoRS to connct the watermeter to RfidComPort, 1 .. 10
|
|
public CommunicationInterface CommunicationInterface; /// Communication Interface: RFID or NFC
|
|
public bool EnableShowChanels;
|
|
public int IBeginDataFlush;
|
|
|
|
|
|
|
|
/// <summary> Procedure parameters </summary>
|
|
[XmlIgnore]
|
|
public ProcParams ProcParams;
|
|
public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
|
|
public override IParamsProvider CreateProcParamsProvider() { return new ProcParams(true); }
|
|
|
|
[XmlIgnore]
|
|
public MeterType MeterType { get { return (ProcParams != null) ? ProcParams.MeterType : MeterType.AutoDetect; } }
|
|
|
|
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
GenesisCfg()
|
|
{
|
|
Name = "Genesis";
|
|
ParentName = string.Empty;
|
|
OptoComPortNr = 10;
|
|
RfidComPortNr = 0; /// = use mux. board
|
|
MuxBoardNr = 1;
|
|
ProcParams = CreateProcParamsProvider() as ProcParams;
|
|
CommunicationInterface = CommunicationInterface.RFID;
|
|
HeadCommunicationComPortNr = 0;
|
|
EnableShowChanels = false;
|
|
IBeginDataFlush = 2000;
|
|
}
|
|
|
|
public GenesisCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return $"{Name} Group1 (mux#)={MuxBoardNr}, Group2={Group}, Opto=Com{OptoComPortNr}, {CommunicationInterface}=Com{RfidComPortNr}, EnableShowChanels={EnableShowChanels}, IBeginDataFlush={IBeginDataFlush}";
|
|
}
|
|
}
|
|
} |