This commit introduces the `RegValveLowRegulTimeSaturation` module, including core components such as `RegValve`, `ChangeRegValvePositionOp`, `Factory`, `Handlers`, and configuration classes (`RegValveCfg`, `RegValveCfgCtrl`). It integrates `log4net` for logging and adheres to the established modular design architecture.
37 lines
903 B
C#
37 lines
903 B
C#
///
|
|
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using log4net;
|
|
|
|
namespace TBF.Rig.Uni.RegValveLowRegulTimeSaturation
|
|
{
|
|
static class Handlers
|
|
{
|
|
static readonly ILog log = LogManager.GetLogger(typeof(Handlers));
|
|
|
|
static Handlers()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Called from the state machine when a procedure is selected and UI needs to be updated.
|
|
/// </summary>
|
|
public static void OnAdcChanged(object sender, CmdResponseArgs data)
|
|
{
|
|
if (AdcChangedHandler == null)
|
|
return;
|
|
|
|
try
|
|
{
|
|
AdcChangedHandler(sender, data);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
log.Error("AdcChangedHandler(...) failed", e);
|
|
}
|
|
}
|
|
public static event EventHandler<CmdResponseArgs> AdcChangedHandler;
|
|
}
|
|
}
|