private static void testTurnOffPoolAndSpaDevice(byte deviceCode, PoolAndSpaDevice device) { using (var scenario = new SerialPortScenario()) { scenario.SetupSendStandardCommandReceiveAck(0x51, deviceCode); var test = buildObjectForTest(scenario.Playback()); Assert.IsTrue(test.TurnOffDevice(device)); } }
/// <summary> /// Commands the pool/spa control to turn on the given /// device. "All" is not a valid option. /// </summary> /// <returns>True if the device responds with an ACK</returns> public bool TurnOnDevice(PoolAndSpaDevice device) { return TurnOnDevice((byte)device); }
private static void testTurnOnPoolAndSpaDevice(byte deviceCode, PoolAndSpaDevice device) { using (var scenario = new SerialPortScenario()) { scenario.SetupSendStandardCommandReceiveAck(0x50, deviceCode); var test = buildObjectForTest(scenario.Playback()); Assert.IsTrue(test.TurnOnDevice(device)); } }
/// <summary> /// Commands the pool/spa control to turn off the given /// device. /// </summary> /// <returns>True if the device responds with an ACK</returns> public bool TurnOffDevice(PoolAndSpaDevice device) { return(TurnOffDevice((byte)device)); }