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/ATCommandIndicator.cpp	Thu Oct 22 12:28:26 2015 +0000
@@ -0,0 +1,55 @@
+#include "ATCommandIndicator.h"
+
+ATCommandIndicator::ATCommandIndicator(APIFrame *frame)
+    : RxBase(frame)
+{ }
+
+int ATCommandIndicator::getFrameID()
+{
+    return data[1];
+}
+
+char * ATCommandIndicator::getRequestCommand()
+{
+    return data + 2;
+}
+
+int ATCommandIndicator::getCommandStatus()
+{
+    return data[4];
+}
+
+char * ATCommandIndicator::getParameter()
+{
+    if (getParameterLength() <= 0)
+        return NULL;
+
+    return data + 5;
+}
+
+char ATCommandIndicator::getParameter(int index)
+{
+    return data[5 + index];
+}
+
+int ATCommandIndicator::getParameterLength()
+{
+    return getPosition() - 5;
+}
+
+int ATCommandIndicator::getParameterOffset()
+{
+    return 5;
+}
+
+bool ATCommandIndicator::convert(APIFrame * frame)
+{
+    if (frame == NULL)
+        return false;
+
+    if (frame->getFrameType() != APIFrame::AT_Command_Response)
+        return false;
+
+    return APIFrame::convert(frame);
+}
+