David Dollar / XBee

Dependents:   MachineCloud

Fork of XBee by Suga koubou

Embed: (wiki syntax)

« Back to documentation index

PayloadRequest Class Reference

PayloadRequest Class Reference

All TX packets that support payloads extend this class. More...

#include <XBee.h>

Inherits XBeeRequest.

Inherited by Tx16Request, Tx64Request, and ZBTxRequest.

Public Member Functions

uint8_t * getPayload ()
 Returns the payload of the packet, if not null.
void setPayload (uint8_t *payloadPtr)
 Sets the payload array.
uint16_t getPayloadLength ()
 Returns the length of the payload array, as specified by the user.
void setPayloadLength (uint16_t payloadLength)
 Sets the length of the payload to include in the request.
void setFrameId (uint8_t frameId)
 Sets the frame id.
uint8_t getFrameId ()
 Returns the frame id.
uint8_t getApiId ()
 Returns the API id.
virtual uint8_t getFrameData (uint16_t pos)=0
 Starting after the frame id (pos = 0) and up to but not including the checksum Note: Unlike Digi's definition of the frame data, this does not start with the API ID.
virtual uint16_t getFrameDataLength ()=0
 Returns the size of the api frame (not including frame id or api id or checksum).

Detailed Description

All TX packets that support payloads extend this class.

Definition at line 755 of file XBee.h.


Member Function Documentation

uint8_t getApiId (  ) [inherited]

Returns the API id.

Definition at line 965 of file XBee.cpp.

virtual uint8_t getFrameData ( uint16_t  pos ) [pure virtual, inherited]

Starting after the frame id (pos = 0) and up to but not including the checksum Note: Unlike Digi's definition of the frame data, this does not start with the API ID.

The reason for this is the API ID and Frame ID are common to all requests, whereas my definition of frame data is only the API specific data.

Implemented in Tx16Request, Tx64Request, ZBTxRequest, AtCommandRequest, and RemoteAtCommandRequest.

virtual uint16_t getFrameDataLength (  ) [pure virtual, inherited]

Returns the size of the api frame (not including frame id or api id or checksum).

Implemented in Tx16Request, Tx64Request, ZBTxRequest, AtCommandRequest, and RemoteAtCommandRequest.

uint8_t getFrameId (  ) [inherited]

Returns the frame id.

Definition at line 961 of file XBee.cpp.

uint8_t * getPayload (  )

Returns the payload of the packet, if not null.

Definition at line 991 of file XBee.cpp.

uint16_t getPayloadLength (  )

Returns the length of the payload array, as specified by the user.

Definition at line 999 of file XBee.cpp.

void setFrameId ( uint8_t  frameId ) [inherited]

Sets the frame id.

Must be between 1 and 255 inclusive to get a TX status response.

Definition at line 957 of file XBee.cpp.

void setPayload ( uint8_t *  payloadPtr )

Sets the payload array.

Definition at line 995 of file XBee.cpp.

void setPayloadLength ( uint16_t  payloadLength )

Sets the length of the payload to include in the request.

For example if the payload array is 50 bytes and you only want the first 10 to be included in the packet, set the length to 10. Length must be <= to the array length.

Definition at line 1003 of file XBee.cpp.