61 lines
1.6 KiB
C#
61 lines
1.6 KiB
C#
///
|
|
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
|
/// Author: Milan Hanajik
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Elde.TempMeterInternal
|
|
{
|
|
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int Idx0; /// 0..7
|
|
public int CoefsIdx0; /// 0..7
|
|
public float A1;
|
|
public float A2;
|
|
public float A3;
|
|
public float A4;
|
|
public float A5;
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
TempMeterCfg()
|
|
{
|
|
Name = "T";
|
|
ParentName = "CB";
|
|
Idx0 = 0;
|
|
CoefsIdx0 = 2;
|
|
A1 = 0;
|
|
A2 = 0;
|
|
A3 = 0;
|
|
A4 = 0;
|
|
A5 = 0;
|
|
}
|
|
|
|
public TempMeterCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Parent={1}, Idx0={2}, CoefsIdx0={3}, A1={4}, A2={5}, A3={6}, A4={7}, A5={8}",
|
|
Name,
|
|
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
|
|
Idx0, CoefsIdx0,
|
|
A1, A2, A3, A4, A5);
|
|
}
|
|
}
|
|
}
|