public void SetTimerValue(BTTimerID timerID, decimal value) { var timerStatus = new GenericDecimal { Value = value, ByteCount = 4 }; ProcessBTCommand(BTCommand.SetTimerValue, timerStatus, new List<int> { (int)timerID }); }
private BTUnits GetUnitsFromBoilTemp() { Debug.Assert(Version.ComSchema == 0, "Version.ComSchema == 0"); var boilTemp = new GenericDecimal { ByteCount = 1, ScaleFactor = 1, HasUnits = true }; ProcessBTCommand(BTCommand.GetBoilTemp, boilTemp, null); return boilTemp.Units; }
/// <summary> Set the GrainTemp in the BrewTroller </summary> /// public void SetGrainTemp(decimal temp) { if (!BTConfig.ValidateGrainTemp(temp)) throw new ArgumentOutOfRangeException("temp"); var grainTemp = new GenericDecimal { ByteCount = 1, ScaleFactor = 1, Value = temp }; ProcessBTCommand(BTCommand.SetGrainTemp, grainTemp, null); }
public void SetSetpoint(BTHeatOutputID heatOutputID, decimal value) { var setpoint = new GenericDecimal { Value = value, ByteCount = 1 }; ProcessBTCommand(BTCommand.SetAutoValve, setpoint, new List<int> { (int)heatOutputID }); }
/// <summary> Set the Cycle Start Delay Time </summary> /// public void SetDelayTime(decimal time) { if (!BTConfig.ValidateDelayTime(time)) throw new ArgumentOutOfRangeException("time"); var delayTime = new GenericDecimal { ByteCount = 2, ScaleFactor = 1, Value = time }; ProcessBTCommand(BTCommand.SetDelayTime, delayTime, null); }
/// <summary> Set BrewTroller Evaporation Rate </summary> /// public void SetEvapRate(decimal rate) { if (!BTConfig.ValidateEvapRate(rate)) throw new ArgumentOutOfRangeException("rate"); var evapRate = new GenericDecimal { ByteCount = 1, ScaleFactor = 1, Value = rate }; ProcessBTCommand(BTCommand.SetEvapRate, evapRate, null); }
/// <summary> Set the active AutoValve Modes </summary> /// public void SetAutoValve(BTAutoValveMode value) { var avMode = new GenericDecimal { Value = (int)value, ByteCount = 2 }; ProcessBTCommand(BTCommand.SetAutoValve, avMode, null); }
/// <summary> Set BrewTroller Boil Power </summary> /// public void SetBoilPower(decimal power) { if (!BTConfig.ValidateBoilPower(power)) throw new ArgumentOutOfRangeException("power"); var evapRate = new GenericDecimal { ByteCount = 1, ScaleFactor = 1, Value = power }; ProcessBTCommand(BTCommand.SetBoilPower, evapRate, null); }
/// <summary> Get BrewTroller Starting Grain Temp </summary> /// public decimal GetGrainTemp() { var grainTemp = new GenericDecimal { ByteCount = 1, ScaleFactor = 1 }; ProcessBTCommand(BTCommand.GetGrainTemp, grainTemp, null); return grainTemp.Value; }
/// <summary> Get BrewTroller Evaporation Rate </summary> /// public decimal GetEvapRate() { var evapRate = new GenericDecimal { ByteCount = 1, ScaleFactor = 1 }; ProcessBTCommand(BTCommand.GetEvapRate, evapRate, null); //. ToDo Decide if rate should be 2% or .02 //. Make SetEvapRate and to string match //. return evapRate.Value; //. / 100; }
/// <summary> Get BrewTroller Cycle Start Delay Time </summary> /// public decimal GetDelayTime() { var delayTime = new GenericDecimal { ByteCount = 2, ScaleFactor = 1 }; ProcessBTCommand(BTCommand.GetDelayTime, delayTime, null); return delayTime.Value; }
/// <summary> Get BrewTroller Boil Information </summary> /// public decimal GetBoilTemp() { var boilTemp = new GenericDecimal { ByteCount = 1, ScaleFactor = 1, HasUnits = Version.IsAsciiSchema0 }; ProcessBTCommand(BTCommand.GetBoilTemp, boilTemp, null); return boilTemp.Value; }
/// <summary> Get BrewTroller Boil Information </summary> /// public decimal GetBoilPower() { var boilPower = new GenericDecimal { ByteCount = 1, ScaleFactor = 1 }; ProcessBTCommand(BTCommand.GetBoilPower, boilPower, null); return boilPower.Value; }