#include "SprinklerDevice.h" #include "ProtocolDefs.h" #include #include "SprinklerMgr.h" CSprinklerDevice::CSprinklerDevice(int Address, CAbstractNetworkCommIF *NetworkInterface, CSprinklerMgr *SprinklerMgr): CNetworkDevice(ID_SPRINKLER_DEVICE,Address,NetworkInterface) { mSprinklerMgr = SprinklerMgr; } CSprinklerDevice::~CSprinklerDevice() { } int CSprinklerDevice::NewDeviceFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data) { Q_UNUSED(DeviceID) Q_UNUSED(DeviceAddress) Q_UNUSED(DataSize) Q_UNUSED(Data) return RET_OK; switch(MessageID) { case SPRINKLER_DEVICE_STATUS_RESPONSE: { break; } case SPRINKLER_DEVICE_ACK: { break; } case SPRINKLER_DEVICE_SET_SPRINKLER_STATE_ACK: { break; } case SPRINKLER_DEVICE_GET_SPRINKLER_STATE_RESPONSE: { break; } case SPRINKLER_DEVICE_GET_WATER_FLOW_RESPONSE: { break; } case SPRINKLER_DEVICE_GET_MOISTURE_RESPONSE: { break; } case SPRINKLER_DEVICE_SET_PROGRAM_ACK: { break; } case SPRINKLER_DEVICE_GET_PROGRAM_RESPONSE: { break; } case SPRINKLER_DEVICE_SET_PARAMETERS_ACK: { break; } case SPRINKLER_DEVICE_GET_PARAMETERS_RESPONSE: { break; } case SPRINKLER_DEVICE_SET_SPRINKLER_STATE_REQUEST: case SPRINKLER_DEVICE_GET_SPRINKLER_STATE_REQUEST: case SPRINKLER_DEVICE_GET_WATER_FLOW_REQUEST: case SPRINKLER_DEVICE_GET_MOISTURE_REQUEST: case SPRINKLER_DEVICE_SET_PROGRAM_REQUEST: case SPRINKLER_DEVICE_GET_PROGRAM_REQUEST: case SPRINKLER_DEVICE_SET_PARAMETERS_REQUEST: case SPRINKLER_DEVICE_GET_PARAMETERS_REQUEST: case SPRINKLER_DEVICE_STATUS_REQUEST: default: { qDebug("Received invalid msg from Sprinkler Device"); break; } } return 0; }