Exemplo n.º 1
0
        public PumpController(ControlCenter center, PumpDevice device, Pump pump) : base(center, device)
        {
            if (pump == null)
            {
                //CustomErrorEvent(new CustomException($"pump{PumpCultivation.PumpId} 的时间表排期为空", this.GetType().FullName, ExceptionPriority.Unrecoverable));
                return;
            }

            PumpCultivation = CultivationFactory.GetCultivation(pump);
            PumpCultivation.CalcSchedules();

            LogFactory.Create().Info($"pump{PumpCultivation.Device.DeviceId} {PumpCultivation.Device.ProcessMode} startTime is {PumpCultivation.Device.StartTime:yyyy-MM-dd HH:mm:ss}");
        }
Exemplo n.º 2
0
 public GasController(ControlCenter center, GasDevice device, Gas gas) : base(center, device)
 {
     Gas = gas;
 }
Exemplo n.º 3
0
 public TemperatureController(ControlCenter center, TemperatureDevice device, TemperatureGauge temperature) : base(center, device)
 {
     TemperatureGauge = temperature;
 }
Exemplo n.º 4
0
 public RockerController(ControlCenter center, RockerDevice device, Rocker rocker) : base(center, device)
 {
     Rocker = rocker;
 }
Exemplo n.º 5
0
 protected ControllerBase(ControlCenter center, DeviceBase device)
 {
     SetStatus(DeviceStatusEnum.Idle);
     Device = device;
     Center = center;
 }