Example #1
0
 public HotWater(IStateService stateService, ISerialCommunicationService serialCommunicationService, OilBurner oilBurner)
 {
     StateService = stateService;
     SerialCommunicationService = serialCommunicationService;
     OilBurner = oilBurner;
     InitFsm();
 }
Example #2
0
 public HeatingCircuit(IStateService stateService, ISerialCommunicationService serialCommunicationService, OilBurner oilBurner)
 {
     SerialCommunicationService = serialCommunicationService;
     OilBurner    = oilBurner;
     StateService = stateService;
     InitFsm();
 }
Example #3
0
 private bool IsBoilerToHeatByBurner()
 {
     if (!OilBurner.IsReady())
     {
         return(false);
     }
     return(StateService.GetSensor(ItemEnum.BoilerTop).Value <= BOILER_COLD);
 }
Example #4
0
 private (bool, string) IsntBoilerToHeatByBurner()
 {
     if (OilBurner.IsHeatedToReady().Item1)
     {
         return(false, "OilBurner is ready");
     }
     return(true, "Oilburner is too cold");
 }
Example #5
0
        private (bool, string) IsAllResidualHeatUsed()
        {
            if (OilBurner.IsBurnerNeededByHotWater)
            {
                return(true, "No use of residual heat, because burner is used by HotWater");
            }
            var(isOilBurnerCooled, message) = OilBurner.IsCooledToReady();
            var temperature = StateService.GetSensor(SensorName.HmoLivingroomFirstFloor).Value;

            return(isOilBurnerCooled, $"IsAllResidualHeatUsed: LivingRoom: {temperature}, {message}");
        }
Example #6
0
        private (bool, string) IsBoilerToHeatByBurner()
        {
            if (!OilBurner.IsHeatedToReady().Item1)
            {
                return(false, "OilBurner isn't ready");
            }
            var temperature = StateService.GetSensor(SensorName.BoilerTop).Value;

            if (temperature <= BOILER_COLD)
            {
                return(true, $"Boiler is to heat by burner: {temperature}");
            }
            return(false, "");
        }
Example #7
0
 public bool IsCooledDown() => OilBurner.IsCooledDown();
Example #8
0
 private bool IsBurnerTooHot() => OilBurner.IsTooHot();
Example #9
0
 public bool IsBurnerCold() => OilBurner.IsCold();
Example #10
0
 private bool IsBurnerReady() => OilBurner.IsReady();
Example #11
0
 public bool IsntBurnerToCool() => OilBurner.IsCooledDown();
Example #12
0
 private (bool, string) IsBurnerReady() => OilBurner.IsHeatedToReady();
Example #13
0
 public (bool, string) IsCooledDown() => OilBurner.IsCooledToHot();
Example #14
0
 private (bool, string) IsBurnerTooHot() => OilBurner.IsHeatedToTooHot();
Example #15
0
 public (bool, string) IsBurnerCold() => OilBurner.IsCooledToCold();
Example #16
0
 public (bool, string) IsntBurnerToCool() => OilBurner.IsCooledToHot();