The RemoteATCommandResponse class represents the response to a RemoteATCommandRequest. More...
#include <remoteatcommandresponse.h>
Public Member Functions | |
RemoteATCommandResponse (QObject *parent=0) | |
RemoteATCommandResponse (const QByteArray &packet, QObject *parent=0) | |
virtual QString | toString () |
Returns a debug string containing all packet's informations. More... | |
virtual void | clear () |
Clears the packet by reseting all attributes to their default value. More... | |
void | setSourceAddress64 (const quint64 addr) |
Sets the 64-bit address of the source device. More... | |
void | setSourceAddress16 (const quint32 addr) |
Sets the 16-bit address of the source device. More... | |
quint64 | sourceAddress64 () const |
Returns the 64-bits address of the source device. More... | |
quint16 | sourceAddress16 () const |
Returns the 16-bits address of the source device. More... | |
Public Member Functions inherited from QtXBee::ATCommandResponse | |
ATCommandResponse (QObject *parent=0) | |
ATCommandResponse (const QByteArray &packet, QObject *parent=0) | |
void | setATCommand (ATCommand::ATCommandType at) |
Sets the response's AT Command. More... | |
void | setATCommand (const QByteArray &at) |
Sets the response's AT Command. More... | |
void | setStatus (const Status status) |
Sets the command status. More... | |
ATCommand::ATCommandType | atCommand () const |
Returns the response's AT Command. More... | |
Status | status () const |
Returns the command' status. More... | |
QString | statusToString () const |
Returns the ATCommandResponse::Status as a human readable string. More... | |
Public Member Functions inherited from QtXBee::XBeeResponse | |
XBeeResponse (QObject *parent=0) | |
XBeeResponse's constructor. More... | |
~XBeeResponse () | |
XBeeResponse's destructor. | |
void | setData (const QByteArray &data) |
Sets the response's data. More... | |
QByteArray | data () const |
Returns the response's data. More... | |
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 | assemblePacket () |
Assembles the packet to be able to send it. More... | |
void | escapePacket () |
bool | unescapePacket () |
Protected Member Functions | |
virtual bool | parseApiSpecificData (const QByteArray &data) |
Parses the packet API specific data. More... | |
Additional Inherited Members | |
Public Types inherited from QtXBee::ATCommandResponse | |
enum | Status { Ok = 0, Error = 1, InvalidCommand = 2, InvalidParameter = 3, TxFailure = 4 } |
The CommandStatus enum. More... | |
Static Public Member Functions inherited from QtXBee::ATCommandResponse | |
static QString | statusToString (const ATCommandResponse::Status status) |
Returns the given ATCommandResponse::Status as a human readable string. More... | |
Protected Attributes inherited from QtXBee::ATCommandResponse | |
ATCommand::ATCommandType | m_atCommand |
Status | m_status |
Detailed Description
The RemoteATCommandResponse class represents the response to a RemoteATCommandRequest.
If a module receives a remote command response RF data frame in response to a RemoteATCommandRequest, the module will send a RemoteCommandResponse message out the UART. Some commands may send back multiple frames–for example, Node Discover (ND) command.
API identifier value: 0x97
- See Also
- RemoteATCommandRequest
Member Function Documentation
|
virtual |
Clears the packet by reseting all attributes to their default value.
- Note
- All subclass should reimplement this method.
Reimplemented from QtXBee::ATCommandResponse.
|
protectedvirtual |
Parses the packet API specific data.
Are conciderated as packet specific data, the data between API frame Id and checksum.
For example, the AT command response frame:
The specific part is bytes [6 - (length() -1)] (AT command, Status, Value)
- Parameters
-
data
- Returns
- true if succeeded; false otherwise.
- Note
- All subclasses must reimplement this method, which is called by XBeePacket::setPacket()
Reimplemented from QtXBee::ATCommandResponse.
void QtXBee::RemoteATCommandResponse::setSourceAddress16 | ( | const quint32 | addr | ) |
Sets the 16-bit address of the source device.
- Parameters
-
addr
void QtXBee::RemoteATCommandResponse::setSourceAddress64 | ( | const quint64 | addr | ) |
Sets the 64-bit address of the source device.
- Parameters
-
addr
quint16 QtXBee::RemoteATCommandResponse::sourceAddress16 | ( | ) | const |
Returns the 16-bits address of the source device.
- Returns
- the 16-bits address of the source device
quint64 QtXBee::RemoteATCommandResponse::sourceAddress64 | ( | ) | const |
Returns the 64-bits address of the source device.
- Returns
- the 64-bits address of the source device
|
virtual |
Returns a debug string containing all packet's informations.
- Returns
- a debug string containing all packet's informations.
Reimplemented from QtXBee::ATCommandResponse.
The documentation for this class was generated from the following files:
- /home/thomas/Projects/QtXBee/src/qtxb/remoteatcommandresponse.h
- /home/thomas/Projects/QtXBee/src/qtxb/remoteatcommandresponse.cpp