XBee and XBee-PRO ZigBee RF modules provide cost-effective wireless connectivity to electronic devices. They are interoperable with other ZigBee PRO feature set devices, including devices from other vendors.
APIFrame Class Reference
An API frame is the structured data sent and received through the serial interface of the radio module when it is configured in API or API escaped operating modes. API frames are used to communicate with the module or with other modules in the network. More...
#include <APIFrame.h>
Inherited by RxBase, and TxBase.
Public Member Functions | |
unsigned char | getFrameType () |
Get the API frame type. | |
void | set (unsigned char value) |
Write 8-bit data into current posiston and increase by 1. | |
void | sets (const unsigned char *value, unsigned long offset, unsigned long length) |
Write array of data into current posiston, and increase by the lenght. | |
void | set (unsigned long position, unsigned char value) |
Write 8-bit data into specific posiston and deos not affect the current position. | |
void | sets (unsigned long position, const unsigned char *value, unsigned long offset, unsigned long length) |
Write array of data into specific posiston and deos not affect the current position. | |
char | getCheckSum () |
Get checksum. | |
void | setCheckSum (unsigned char value) |
Set checksum. | |
bool | verifyChecksum () |
Check is the API frame's checksum is verified. | |
void | calculateChecksum () |
Calculate the checksum value. |
Detailed Description
An API frame is the structured data sent and received through the serial interface of the radio module when it is configured in API or API escaped operating modes. API frames are used to communicate with the module or with other modules in the network.
Definition at line 7 of file APIFrame.h.
Member Function Documentation
void calculateChecksum | ( | ) |
Calculate the checksum value.
Definition at line 101 of file APIFrame.cpp.
char getCheckSum | ( | ) |
unsigned char getFrameType | ( | ) |
Get the API frame type.
- Returns:
- Tx64_Request =0x00, Tx16_Request =0x01, AT_Command = 0x08, AT_Command_Queue_Parameter_Value = 0x09, ZigBee_Transmit_Request = 0x10, Explicit_Addressing_ZigBee_Command_Frame = 0x11, Remote_Command_Request = 0x17, Create_Source_Route = 0x21, Register_Joining_Device = 0x24, Rx64_Receive_Packet = 0x80, Rx16_Receive_Packet = 0x81, Rx64_IO_Data_Sample_Rx_Indicator = 0x82, Rx16_IO_Data_Sample_Rx_Indicator = 0x83, AT_Command_Response = 0x88, XBee_Transmit_Status = 0x89, Modem_Status = 0x8A, ZigBee_Transmit_Status = 0x8B, ZigBee_Receive_Packet = 0x90, ZigBee_Explicit_Rx_Indicator = 0x91, ZigBee_IO_Data_Sample_Rx_Indicator = 0x92, XBee_Sensor_Read_Indicato = 0x94, Node_Identification_Indicator = 0x95, Remote_Command_Response = 0x97, Over_the_Air_Firmware_Update_Status = 0xA0, Route_Record_Indicator = 0xA1, Device_Authenticated_Indicator = 0xA2, Many_to_One_Route_Request_Indicator = 0xA3,
Definition at line 16 of file APIFrame.cpp.
void set | ( | unsigned long | position, |
unsigned char | value | ||
) |
Write 8-bit data into specific posiston and deos not affect the current position.
- Parameters:
-
position where to write value sigle byte
Definition at line 63 of file APIFrame.cpp.
void set | ( | unsigned char | value ) |
Write 8-bit data into current posiston and increase by 1.
- Parameters:
-
value sigle byte
Definition at line 51 of file APIFrame.cpp.
void setCheckSum | ( | unsigned char | value ) |
void sets | ( | unsigned long | position, |
const unsigned char * | value, | ||
unsigned long | offset, | ||
unsigned long | length | ||
) |
Write array of data into specific posiston and deos not affect the current position.
- Parameters:
-
position where to write value array of byte offset start point of the data length length to write
Definition at line 69 of file APIFrame.cpp.
void sets | ( | const unsigned char * | value, |
unsigned long | offset, | ||
unsigned long | length | ||
) |
Write array of data into current posiston, and increase by the lenght.
- Parameters:
-
value array of byte offset start point of the data length length to write
Definition at line 57 of file APIFrame.cpp.
bool verifyChecksum | ( | ) |
Check is the API frame's checksum is verified.
- Returns:
- true checksum match, false checksum not match
Definition at line 85 of file APIFrame.cpp.
Generated on Tue Jul 12 2022 18:56:10 by 1.7.2