#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;
}


