XBee-mbed library http://mbed.org/users/okini3939/notebook/xbee-mbed/
Dependents: device_server_udp led_sender_post XBee_API_ex1 XBee_API_ex2 ... more
IPv4TransmitRequest Class Reference
Represents a Wi-Fi TX packet that corresponds to Api Id: IPv4_TRANSMIT_REQUEST. More...
#include <XBeeWiFi.h>
Inherits PayloadRequest.
Public Member Functions | |
IPv4TransmitRequest (IpAddr &dstAddr, uint16_t dstPort, uint16_t srcPort, uint8_t protocol, uint8_t option, uint8_t *data, uint16_t dataLength, uint8_t frameId) | |
Creates a unicast IPv4TransmitRequest with the DEFAULT_FRAME_ID. | |
IPv4TransmitRequest () | |
Creates a default instance of this class. | |
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. | |
Protected Member Functions | |
virtual uint8_t | getFrameData (uint16_t pos) |
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 () |
Returns the size of the api frame (not including frame id or api id or checksum). |
Detailed Description
Represents a Wi-Fi TX packet that corresponds to Api Id: IPv4_TRANSMIT_REQUEST.
Definition at line 144 of file XBeeWiFi.h.
Constructor & Destructor Documentation
IPv4TransmitRequest | ( | IpAddr & | dstAddr, |
uint16_t | dstPort, | ||
uint16_t | srcPort, | ||
uint8_t | protocol, | ||
uint8_t | option, | ||
uint8_t * | data, | ||
uint16_t | dataLength, | ||
uint8_t | frameId | ||
) |
Creates a unicast IPv4TransmitRequest with the DEFAULT_FRAME_ID.
Definition at line 464 of file XBeeWiFi.cpp.
Creates a default instance of this class.
At a minimum you must specify a payload, payload length and a destination address before sending this request.
Definition at line 461 of file XBeeWiFi.cpp.
Member Function Documentation
uint8_t getFrameData | ( | uint16_t | pos ) | [protected, virtual] |
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.
Implements XBeeRequest.
Definition at line 480 of file XBeeWiFi.cpp.
uint16_t getFrameDataLength | ( | ) | [protected, virtual] |
Returns the size of the api frame (not including frame id or api id or checksum).
Implements XBeeRequest.
Definition at line 506 of file XBeeWiFi.cpp.
uint8_t * getPayload | ( | ) | [inherited] |
uint16_t getPayloadLength | ( | ) | [inherited] |
void setFrameId | ( | uint8_t | frameId ) | [inherited] |
void setPayload | ( | uint8_t * | payloadPtr ) | [inherited] |
void setPayloadLength | ( | uint16_t | payloadLength ) | [inherited] |
Generated on Tue Jul 12 2022 18:07:39 by 1.7.2