Beispiel #1
0
 public void SetTimerValue(BTTimerID timerID, decimal value)
 {
     var timerStatus = new GenericDecimal { Value = value, ByteCount = 4 };
     ProcessBTCommand(BTCommand.SetTimerValue, timerStatus, new List<int> { (int)timerID });
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 /// <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);
 }
Beispiel #4
0
 public void SetSetpoint(BTHeatOutputID heatOutputID, decimal value)
 {
     var setpoint = new GenericDecimal { Value = value, ByteCount = 1 };
     ProcessBTCommand(BTCommand.SetAutoValve, setpoint, new List<int> { (int)heatOutputID });
 }
Beispiel #5
0
 /// <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);
 }
Beispiel #6
0
 /// <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);
 }
Beispiel #7
0
 /// <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);
 }
Beispiel #8
0
 /// <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);
 }
Beispiel #9
0
 /// <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;
 }
Beispiel #10
0
 /// <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;
 }
Beispiel #11
0
 /// <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;
 }
Beispiel #12
0
 /// <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;
 }
Beispiel #13
0
 /// <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;
 }