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:
6:5f31ddc17239
Parent:
3:6b205ec8624b
--- a/Core/APIFrame.cpp	Thu Nov 05 23:03:42 2015 +0000
+++ b/Core/APIFrame.cpp	Sat Nov 14 16:42:36 2015 +0000
@@ -1,7 +1,7 @@
 #include "APIFrame.h"
 
-APIFrame::APIFrame(int payloadLength)
-    :BufferedArray(payloadLength)
+APIFrame::APIFrame(unsigned int payloadLength)
+    :BufferedArray(payloadLength, 10)
 {}
 
 APIFrame::APIFrame(APIFrame * frame)
@@ -13,17 +13,17 @@
     }
 }
 
-int APIFrame::getFrameType()
+unsigned char APIFrame::getFrameType()
 {
     return data[0];
 }
 
-void APIFrame::setFrameType(char identifier)
+void APIFrame::setFrameType(unsigned char identifier)
 {
     data[0] = identifier;
 }
 
-void APIFrame::allocate(int length)
+void APIFrame::allocate(unsigned long length)
 {
     BufferedArray::allocate(length);
     isVerify = false;
@@ -48,25 +48,25 @@
     return true;
 }
 
-void APIFrame::set(char value)
+void APIFrame::set(unsigned char value)
 {
     BufferedArray::set(value);
     isVerify = false;
 }
 
-void APIFrame::sets(const char * value, int offset, int length)
+void APIFrame::sets(const unsigned char * value, unsigned long offset, unsigned long length)
 {
     BufferedArray::sets(value, offset, length);
     isVerify = false;
 }
 
-void APIFrame::set(int position, char value)
+void APIFrame::set(unsigned long position, unsigned char value)
 {
     BufferedArray::set(position, value);
     isVerify = false;
 }
 
-void APIFrame::sets(int position, const char * value, int offset, int length)
+void APIFrame::sets(unsigned long position, const unsigned char * value, unsigned long offset, unsigned long length)
 {
     BufferedArray::sets(position, value, offset, length);
     isVerify = false;
@@ -77,7 +77,7 @@
     return checkSum;
 }
 
-void APIFrame::setCheckSum(char value)
+void APIFrame::setCheckSum(unsigned char value)
 {
     checkSum = value;
 }