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.

Dependencies:   BufferedArray

Dependents:   MBEDminiproject

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers RouteRecordIndicator.cpp Source File

RouteRecordIndicator.cpp

00001 #include "RouteRecordIndicator.h"
00002 
00003 RouteRecordIndicator::RouteRecordIndicator(APIFrame * frame)
00004     : RxBase(frame)
00005 {  }
00006 
00007 Address RouteRecordIndicator::getRemoteDevice()
00008 {
00009     return Address(data + 1);
00010 }
00011 
00012 int RouteRecordIndicator::getReceiveStatus()
00013 {
00014     return data[11];
00015 }
00016 
00017 int RouteRecordIndicator::getNumberOfAddresses()
00018 {
00019     return data[12];
00020 }
00021 
00022 int RouteRecordIndicator::getAddresses(int index)
00023 {
00024     if (index >= getNumberOfAddresses())
00025         return -1;
00026 
00027     return (data[13 + (index << 2)] << 8) | data[13 + (index << 2) + 1];
00028 }
00029 
00030 bool  RouteRecordIndicator::convert(APIFrame * frame)
00031 {
00032     if (frame == NULL)
00033         return false;
00034 
00035     if (frame->getFrameType() != APIFrame::Route_Record_Indicator)
00036         return false;
00037 
00038     return APIFrame::convert(frame);
00039 }