XBee‐PRO®900HP/XBee‐PRO®XSCRFModules
©2014DigiInternationalInc. 61
Supporting the API
Applications that support the API should make provisions to deal with new API frames that may be introduced
in future releases. For example, a section of code on a host microprocessor that handles received serial API
frames (sent out the module's DOUT pin) might look like this:
XBee-PORO 900HP Frame Descriptions
The following sections illustrate the types of frames encountered while using the API.
AT Command
Frame Type: 0x08
Used to query or set module parameters on the local device. This API command applies changes after
executing the command. (Changes made to module parameters take effect once changes are applied.) The
API example below illustrates an API frame when modifying the NH parameter value of the module
void XBee
HandleRxAPIFrame
apiFrameUnion
papiFrame
{
switch(papiFrame->api_id){
case RX_RF_DATA_FRAME:
//process received RF data frame
break;
case RX_IO_SAMPLE_FRAME:
//process IO sample frame
break;
case NODE_IDENTIFICATION_FRAME:
//process node identification frame
break;
default:
//Discard any other API frame types that are not being used
break;
}