DataContainer components clean-up.

This commit is contained in:
Milan Hanajik
2021-04-02 20:25:31 +02:00
parent 1bc3e5d6eb
commit ce0b8af4a0
6 changed files with 42 additions and 38 deletions
@@ -13,14 +13,10 @@ namespace TBF.Rig.DataContainer.Evaporation
public class Component : ComponentBase, IEvaporation, GenericDevices.IHasCalendarEvents
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString()
{
return string.Format("{0}({1})", this.GetType().Namespace.Substring(8), Cfg.ToString(1));
}
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly EvaporationCfg myCfg;
/// <summary>
/// For a given temperature in [°C] returns an evaporation rate in [kg/s]
/// </summary>
@@ -30,9 +26,7 @@ namespace TBF.Rig.DataContainer.Evaporation
}
public Component()
{
}
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
@@ -41,6 +35,7 @@ namespace TBF.Rig.DataContainer.Evaporation
log.Warn(this.ToString());
}
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
{
DateTime calibrationDue = myCfg.CalibValidDate;