67 lines
1.9 KiB
C#
67 lines
1.9 KiB
C#
///
|
|
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Net;
|
|
using System.Net.Sockets;
|
|
using System.Xml.Serialization;
|
|
using Config.Entities;
|
|
using TBF.Rig.Generic;
|
|
using TBF.Resources;
|
|
|
|
namespace TBF.Rig.TestMethods.GenesisCommunication.GenesisHead
|
|
{
|
|
public class GenesisHeadCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(GenesisHeadCfg) })[0];
|
|
protected override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new GenesisHeadCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int SlotNr; /// Number written to QuidoRS to connct the watermeter to RfidComPort, 1 .. 10
|
|
|
|
/// <summary> Procedure parameters </summary>
|
|
[XmlIgnore]
|
|
public ProcParams ProcParams;
|
|
public override IParamsProvider GetProcedureParams() { return ProcParams; }
|
|
public override IParamsProvider CreateProcedureParams(Procedure procedure)
|
|
{
|
|
ProcParams procParams = new ProcParams(true);
|
|
procParams.UpdateProcedureParams(Name, procedure);
|
|
return procParams;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
public MeterType MeterType { get { return (ProcParams != null) ? ProcParams.MeterType : MeterType.AutoDetect; } }
|
|
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
GenesisHeadCfg()
|
|
{
|
|
Name = "Genesis";
|
|
ParentName = string.Empty;
|
|
SlotNr = 0;
|
|
ProcParams = new ProcParams(true);
|
|
}
|
|
|
|
public GenesisHeadCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("{0} SlotNr={1}",
|
|
Name,
|
|
SlotNr
|
|
);
|
|
}
|
|
}
|
|
}
|