| | |
| | | /// <returns></returns> |
| | | public static void Send(CommandType_A commandType, Function function) |
| | | { |
| | | function.usageCount++; |
| | | function.refreshTime = DateTime.Now; |
| | | if (function.bus_Data!=null) |
| | | { |
| | | try |
| | |
| | | break; |
| | | } |
| | | break; |
| | | case FunctionCategory.AC: |
| | | var aC = function as AC; |
| | | ControlBytesSend(Command.SetACMode, subnetId, deviceId, new byte[] { aC.bus_Data.LoopID, (byte)aC.curTempType, 32, 32, 32, 32, 32, 0, aC.on_off == "on" ? (byte)1 : (byte)0, aC.curModeIndex, aC.curFanIndex, (byte)aC.curTemp, 0 }); |
| | | case FunctionCategory.Thermostat: |
| | | switch (function.functionType) |
| | | { |
| | | case FunctionType.AC: |
| | | var aC = function as AC; |
| | | ControlBytesSend(Command.SetACMode, subnetId, deviceId, new byte[] { aC.bus_Data.LoopID, (byte)aC.curTempType, 32, 32, 32, 32, 32, 0, aC.on_off == "on" ? (byte)1 : (byte)0, aC.curModeIndex, aC.curFanIndex, (byte)aC.curTemp, 0 }); |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | break; |
| | |
| | | break; |
| | | } |
| | | break; |
| | | case FunctionCategory.AC: |
| | | ControlBytesSend(Command.ReadACMode, subnetId, deviceId, new byte[] {function.bus_Data.LoopID }); |
| | | case FunctionCategory.Thermostat: |
| | | switch (function.functionType) |
| | | { |
| | | case FunctionType.AC: |
| | | ControlBytesSend(Command.ReadACMode, subnetId, deviceId, new byte[] { function.bus_Data.LoopID }); |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | break; |