Example #1
0
 /// <summary> Get Profile for a BrewTroller AutoValve </summary>
 /// <param name="profileID">ID of AutoValve Profile</param>
 public BTValveProfile GetValveProfile(BTProfileID profileID)
 {
     BTValveProfile profile = new BTValveProfile();
     ProcessBTCommand(BTCommand.GetValveProfile, profile, new List<int> { (int)profileID });
     return profile;
 }
Example #2
0
 /// <summary> Set the AutoValve profile for a brew state </summary>
 /// 
 public void SetValveProfile(BTValveProfile btValveProfile)
 {
     ProcessBTCommand(BTCommand.SetValveProfile, btValveProfile, null);
 }
        public void ValveProfile(BTProfileID profileID, UInt64 mask)
        {
            // Current version of the BT only support 32-bit profiles

            var saveProfile = _btCom.GetValveProfile(profileID);

            var setProfile = new BTValveProfile { ID = profileID, Mask = mask };
            _btCom.SetValveProfile(setProfile);

            var getProfile = _btCom.GetValveProfile(profileID);
            Assert.AreEqual(setProfile, getProfile, "Get ValveProfile does not match Set ValveProfile");

            var restoreProfile = _btCom.GetValveProfile(profileID);
            Assert.AreEqual(restoreProfile, saveProfile, "Save ValveProfile does not match Restore ValveProfile");
        }