Moved sources to subdirs in project
Add sprinkler device
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
#include "DeadboltDevice.h"
|
||||
#include "ProtocolDefs.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
CDeadboltDevice::CDeadboltDevice(int Address, CAbstractNetworkCommIF *NetworkInterface):
|
||||
CNetworkDevice(ID_DEADBOLT_DEVICE,Address,NetworkInterface)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CDeadboltDevice::~CDeadboltDevice()
|
||||
{
|
||||
}
|
||||
|
||||
int CDeadboltDevice::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 DEADBOLT_DEVICE_STATUS_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_ACK:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_GET_LOCKED_STATE_REQUEST:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_GOTO_LOCKED_ACK:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_GOTO_UNLOCKED_ACK:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_GET_PASSWORDS_RESPONSE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_SET_PASSWORDS_ACK:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_LOCK_EVENT:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case DEADBOLT_DEVICE_STATUS_REQUEST:
|
||||
case DEADBOLT_DEVICE_LOCKED_STATE_RESPONSE:
|
||||
case DEADBOLT_DEVICE_GOTO_LOCKED_REQUEST:
|
||||
case DEADBOLT_DEVICE_SET_PASSWORDS_REQUEST:
|
||||
case DEADBOLT_DEVICE_GET_PASSWORDS_REQUEST:
|
||||
case DEADBOLT_DEVICE_GOTO_UNLOCKED_REQUEST:
|
||||
default:
|
||||
{
|
||||
qDebug("Received invalid msg from Deadbolt Device");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef DEADBOLTDEVICE_H
|
||||
#define DEADBOLTDEVICE_H
|
||||
|
||||
#include "GlobalDefine.h"
|
||||
#include "232NetworkCommIF.h"
|
||||
#include "NetworkDevice.h"
|
||||
|
||||
|
||||
class CDeadboltDevice: public QObject, public CNetworkDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CDeadboltDevice(int Address, CAbstractNetworkCommIF *NetworkInterface);
|
||||
virtual ~CDeadboltDevice();
|
||||
|
||||
virtual int NewDeviceFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data);
|
||||
|
||||
};
|
||||
|
||||
#endif // DEADBOLTDEVICE_H
|
||||
Reference in New Issue
Block a user