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