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.
Indicator/XBeeRx64Indicator.cpp
- Committer:
- yangcq88517
- Date:
- 2015-10-22
- Revision:
- 0:837e6c48e90d
- Child:
- 6:5f31ddc17239
File content as of revision 0:837e6c48e90d:
#include "XBeeRx64Indicator.h" XBeeRx64Indicator::XBeeRx64Indicator(APIFrame * frame) : RxBase(frame) { } char * XBeeRx64Indicator::getReceivedData() { if (getReceivedDataLength() <= 0) return NULL; return data + 11; } int XBeeRx64Indicator::getReceivedDataOffset() { return 11; } char XBeeRx64Indicator::getReceivedData(int index) { return data[11 + index]; } int XBeeRx64Indicator::getReceivedDataLength() { return getPosition() - 11; } int XBeeRx64Indicator::getRSSI() { return data[9] * -1; } int XBeeRx64Indicator::getReceiveStatus() { return data[10]; } Address XBeeRx64Indicator::getRemoteDevice() { return Address(data + 1, NULL); } bool XBeeRx64Indicator::convert(APIFrame * frame) { if (frame == NULL) return false; if (frame->getFrameType() != APIFrame::Rx64_Receive_Packet) return false; return APIFrame::convert(frame); }