# xbpackets.cpp

Go to the documentation of this file.

    00001 /*
    00002  * SmartHome server: Plug-in xbee
    00003  *
    00004  * Copyright (C) 2010 Daniel Pisi <dan.pisi@gmail.com>
    00005  *
    00006  * This program is free software; you can redistribute it and/or modify it
    00007  * under the terms of version 2 of the GNU General Public License
    00008  * as published by the Free Software Foundation.
    00009  *
    00010  */
    00011
    00018 #include "xbpackets.h"
    00019
    00020 // -----------------------------------------------------------------------------
    00021
    00022 XbLocalCommand::XbLocalCommand() : XbPacket(0x08)
    00023 {
    00024     mItems.append(newFrameIdItem());
    00025     mItems.append(newCommandItem());
    00026     mItems.append(newCmdParamItem());
    00027 }
    00028 // -----------------------------------------------------------------------------
    00029
    00030 XbLocalCommandResponse::XbLocalCommandResponse() : XbPacket(0x88)
    00031 {
    00032     mItems.append(newFrameIdItem());
    00033     mItems.append(newCommandItem());
    00034     mItems.append(newCmdStatusItem());
    00035     mItems.append(newCmdParamItem());
    00036 }
    00037 // -----------------------------------------------------------------------------
    00038
    00039 XbTransmitRequest::XbTransmitRequest() : XbPacket(0x10)
    00040 {
    00041     mItems.append(newFrameIdItem());
    00042     mItems.append(newAddressItem());
    00043     mItems.append(newBcRadiusItem());
    00044     mItems.append(newOptionsItem());
    00045     mItems.append(newRfDataItem());
    00046 }
    00047 // -----------------------------------------------------------------------------
    00048
    00049 XbTransmitStatus::XbTransmitStatus() : XbPacket(0x8B)
    00050 {
    00051     mItems.append(newFrameIdItem());
    00052     mItems.append(newAddr16Item());
    00053     mItems.append(newTxRetryCntItem());
    00054     mItems.append(newDeliveryStatusItem());
    00055     mItems.append(newDiscoveryStatusItem());
    00056 }
    00057 // -----------------------------------------------------------------------------
    00058
    00059 XbRemoteCommand::XbRemoteCommand() : XbPacket(0x17)
    00060 {
    00061     mItems.append(newFrameIdItem());
    00062     mItems.append(newAddressItem());
    00063     mItems.append(newOptionsItem());
    00064     mItems.append(newCommandItem());
    00065     mItems.append(newCmdParamItem());
    00066 }
    00067 // -----------------------------------------------------------------------------
    00068
    00069 XbRemoteCommandResponse::XbRemoteCommandResponse() : XbPacket(0x97)
    00070 {
    00071     mItems.append(newFrameIdItem());
    00072     mItems.append(newAddressItem());
    00073     mItems.append(newCommandItem());
    00074     mItems.append(newCmdStatusItem());
    00075     mItems.append(newCmdParamItem());
    00076 }
    00077 // -----------------------------------------------------------------------------
    00078
    00079 XbReceivedData::XbReceivedData() : XbPacket(0x90)
    00080 {
    00081     mItems.append(newAddressItem());
    00082     mItems.append(newOptionsItem());
    00083     mItems.append(newRfDataItem());
    00084 }
    00085 // -----------------------------------------------------------------------------
    00086
    00087 XbIoSample::XbIoSample() : XbPacket(0x92)
    00088 {
    00089     mItems.append(newAddressItem());
    00090     mItems.append(newOptionsItem());
    00091     mItems.append(newIoSamplesItem());
    00092 }
    00093 // -----------------------------------------------------------------------------

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends