The ZBTxRequest class causes the module to send data as an RF packet to the specified destination. More...
#include <zbtxrequest.h>
Public Member Functions | |
ZBTxRequest (QObject *parent=0) | |
void | assemblePacket () |
Assembles the packet to be able to send it. More... | |
void | setBroadcastRadius (int rad) |
void | setTransmitOptions (unsigned to) |
void | setDestAddr64 (QByteArray da64) |
void | setDestAddr16 (QByteArray da16) |
void | setData (QByteArray d) |
QByteArray | destAddr64 () const |
QByteArray | destAddr16 () const |
unsigned | broadcastRadius () const |
unsigned | transmitOptions () const |
QByteArray | getData () const |
Public Member Functions inherited from QtXBee::XBeePacket | |
XBeePacket (QObject *parent=0) | |
XBeePacket's constructor. More... | |
void | setStartDelimiter (unsigned sd) |
Sets the frame's start delimiter. By default the start delemiter is set to 0x7E. More... | |
void | setLength (unsigned length) |
Sets the frame's length. More... | |
void | setFrameType (ApiId type) |
Sets the frame's type. More... | |
void | setFrameId (quint8 id) |
Sets the frame's id. More... | |
void | setChecksum (unsigned cs) |
Sets the checksum. More... | |
bool | setPacket (const QByteArray &packet) |
Sets the packet's raw data. More... | |
QByteArray | packet () const |
Returns the frame's packet (raw data) More... | |
unsigned | startDelimiter () const |
Returns the frame's start delimiter. More... | |
quint16 | length () const |
Returns the frame-specific data length (Number of bytes between the length and the checksum) More... | |
ApiId | frameType () const |
Returns the frame's type. More... | |
quint8 | frameId () const |
Returns the frame's id. More... | |
unsigned | checksum () const |
Returns the packet's checksum. More... | |
virtual void | clear () |
Clears the packet by reseting all attributes to their default value. More... | |
virtual QString | toString () |
Returns a debug string containing all packet's informations. More... | |
void | escapePacket () |
bool | unescapePacket () |
Additional Inherited Members | |
Public Types inherited from QtXBee::XBeePacket | |
enum | ApiId { TxRequest64Id = 0x00, TxRequest16Id = 0x01, ATCommandId = 0x08, ATCommandQueueId = 0x09, ZBTxRequestId = 0x10, ZBExplicitTxRequestId = 0x11, RemoteATCommandRequestId = 0x17, CreateSourceRouteId = 0x21, ZBRegisterJoiningDeviceId = 0x24, Rx64ResponseId = 0x80, Rx16ResponseId = 0x81, Rx64IOResponseId = 0x82, Rx16IOResponseId = 0x83, ATCommandResponseId = 0x88, TxStatusResponseId = 0x89, ModemStatusResponseId = 0x8A, ZBTxStatusResponseId = 0x8B, ZBRxResponseId = 0x90, ZBExplicitRxResponseId = 0x91, ZBIOSampleResponseId = 0x92, XBeeSensorReadIndicatorId = 0x94, ZBIONodeIdentificationId = 0x95, RemoteATCommandResponseId = 0x97, OverTheAirFirmwareUpdateId = 0xA0, RouteRecordIndicatorId = 0xA1, DeviceAuthenticatedIndicatorId = 0xA2, ManyToOneRouteRequestId = 0xA3, RegisterJoiningDeviceStatusId = 0xA4, JoinNotificationStatusId = 0xA5, UndefinedId = 0xFF } |
The ApiId enum identifies sent/received frame's type. More... | |
enum | SpecialByte { StartDelimiter = 0x7E, Escape = 0x7D, XON = 0x11, XOFF = 0x13 } |
The SpecialByte enum defines the special bytes. More... | |
Static Public Member Functions inherited from QtXBee::XBeePacket | |
static QString | frameTypeToString (const ApiId type) |
Returns the given frame type ApiId into a human readable string. More... | |
Protected Member Functions inherited from QtXBee::XBeePacket | |
virtual bool | parseApiSpecificData (const QByteArray &data) |
Parses the packet API specific data. More... | |
void | createChecksum (QByteArray array) |
Computes the checksum of the given QByteArray, and set it. More... | |
Protected Attributes inherited from QtXBee::XBeePacket | |
QByteArray | m_packet |
Detailed Description
The ZBTxRequest class causes the module to send data as an RF packet to the specified destination.
The 64-bit destination address should be set to 0x000000000000FFFF for a broadcast transmission (to all devices). The coordinator can be addressed by either setting the 64-bit address to all 0x00s and the 16-bit address to 0xFFFE, OR by setting the 64-bit address to the coordinator's 64-bit address and the 16-bit address to 0x0000. For all other transmissions, setting the 16-bit address to the correct 16-bit address can help improve performance when transmitting to multiple destinations. If a 16-bit address is not known, this field should be set to 0xFFFE (unknown). The Transmit Status frame (0x8B) will indicate the discovered 16-bit address, if successful. The broadcast radius can be set from 0 up to NH. If set to 0, the value of NH specifies the broadcast radius (recommended). This parameter is only used for broadcast transmissions. The maximum number of payload bytes can be read with the NP command.
- Note
- if source routing is used, the RF payload will be reduced by two bytes per intermediate hop in the source route.
- See Also
- TransmitStatus
Member Function Documentation
|
virtual |
Assembles the packet to be able to send it.
This function is called by the XBee class, when the packet in being sent.
- Note
- Overload this function to create your own packet.
Reimplemented from QtXBee::XBeePacket.
The documentation for this class was generated from the following files:
- /home/thomas/Projects/QtXBee/src/qtxb/zigbee/zbtxrequest.h
- /home/thomas/Projects/QtXBee/src/qtxb/zigbee/zbtxrequest.cpp