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

Revision:
0:837e6c48e90d
Child:
6:5f31ddc17239
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Indicator/XBeeRx64Indicator.cpp	Thu Oct 22 12:28:26 2015 +0000
@@ -0,0 +1,55 @@
+#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);
+}
+