XBee API operation library for mbed
Embed:
(wiki syntax)
Show/hide line numbers
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 }
Generated on Tue Jul 12 2022 11:17:04 by 1.7.2