tbf/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfg.cs

48 lines
1.9 KiB
C#

///
/// Copyright (c) 2017 Sensus Metering Systems
///
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Modbus.TankSelector
{
public class TankSelectorCfg : ComponentCfgBase, Generic.IChildComponentCfg
{
public IComponentCfgCtrl GetControl() { return new TankSelectorCfgCtrl(); }
///
/// Serialized parameters
///
public string HotWaterHeating; /// Name of the component communicating with the temperature controller
public string HotWaterCooling; /// Name of the component communicating with the temperature controller
public string WarmWaterHeating; /// Name of the component communicating with the temperature controller
public string WarmWaterCooling; /// Name of the component communicating with the temperature controller
public string ColdWaterCooling; /// Name of the component communicating with the temperature controller
/// Private parameterless constructor invoked by all other (public) constructors
TankSelectorCfg()
{
Name = "TankSelector";
ParentName = "QuidoRS";
}
public TankSelectorCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, DigOut={1}, Hot heating={2}, Hot cooling={3}, Warm heating={4}, Warm cooling={5}, Cold cooling={6}",
Name,
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
(string.IsNullOrEmpty(HotWaterHeating) ? "-" : HotWaterHeating),
(string.IsNullOrEmpty(HotWaterCooling) ? "-" : HotWaterCooling),
(string.IsNullOrEmpty(WarmWaterHeating) ? "-" : WarmWaterHeating),
(string.IsNullOrEmpty(WarmWaterCooling) ? "-" : WarmWaterCooling),
(string.IsNullOrEmpty(ColdWaterCooling) ? "-" : ColdWaterCooling));
}
}
}