XBee API operation library for mbed
Embed:
(wiki syntax)
Show/hide line numbers
ZigBeeRxIndicator.cpp
00001 #include "ZigBeeRxIndicator.h" 00002 00003 ZigBeeRxIndicator::ZigBeeRxIndicator(APIFrame * frame) 00004 : RxBase(frame) 00005 { } 00006 00007 unsigned char * ZigBeeRxIndicator::getReceivedData() 00008 { 00009 if (getReceivedDataLength() <= 0) 00010 return NULL; 00011 00012 return data + 12; 00013 } 00014 00015 int ZigBeeRxIndicator::getReceivedDataOffset() 00016 { 00017 return 12; 00018 } 00019 00020 char ZigBeeRxIndicator::getReceivedData(int index) 00021 { 00022 return data[12 + index]; 00023 } 00024 00025 int ZigBeeRxIndicator::getReceivedDataLength() 00026 { 00027 return getPosition() - 12; 00028 } 00029 00030 int ZigBeeRxIndicator::getReceiveStatus() 00031 { 00032 return data[11]; 00033 } 00034 00035 Address ZigBeeRxIndicator::getRemoteDevice() 00036 { 00037 return Address(data + 1); 00038 } 00039 00040 int ZigBeeRxIndicator::getRSSI() 00041 { 00042 return 0; 00043 } 00044 00045 bool ZigBeeRxIndicator::convert(APIFrame * frame) 00046 { 00047 if (frame == NULL) 00048 return false; 00049 00050 if (frame->getFrameType() != APIFrame::ZigBee_Receive_Packet) 00051 return false; 00052 00053 return APIFrame::convert(frame); 00054 }
Generated on Tue Jul 12 2022 11:17:05 by 1.7.2