xbee in api mode library

Fork of xbee_lib by Tristan Hughes

Files at this revision

API Documentation at this revision

Comitter:
noname77
Date:
Sun Jan 26 17:19:28 2014 +0000
Parent:
9:08ccd085662f
Commit message:
some working code

Changed in this revision

xbee.h Show annotated file Show diff for this revision Revisions of this file
xbeeFrame.cpp Show annotated file Show diff for this revision Revisions of this file
xbeeFrame.h Show annotated file Show diff for this revision Revisions of this file
diff -r 08ccd085662f -r 61e607fa8621 xbee.h
--- a/xbee.h	Sun Jan 26 15:00:52 2014 +0000
+++ b/xbee.h	Sun Jan 26 17:19:28 2014 +0000
@@ -17,14 +17,6 @@
  */
 #include "mbed.h"
 
-#define FRAME_SIZE      127
-#define STARTBYTE       0x7E
-#define MAX_DATA_LEN    70
-
-#define TX_STATUS       0x89
-#define TX_REQUEST_64   000
-#define RX_PACKET_64    0x80
-
 /** Xbee interface class for configuring, sending and recieving data using an Xbee */
 class xbee
 {
diff -r 08ccd085662f -r 61e607fa8621 xbeeFrame.cpp
--- a/xbeeFrame.cpp	Sun Jan 26 15:00:52 2014 +0000
+++ b/xbeeFrame.cpp	Sun Jan 26 17:19:28 2014 +0000
@@ -86,6 +86,16 @@
     return len;
 }
 
+int xbeeFrame::GetType(void)
+{
+    return _frameType;
+}
+
+int xbeeFrame::GetStatus(void)
+{
+    return _status;    
+}
+
 void xbeeFrame::SetDestination(unsigned char* dest)
 {
     char i;
diff -r 08ccd085662f -r 61e607fa8621 xbeeFrame.h
--- a/xbeeFrame.h	Sun Jan 26 15:00:52 2014 +0000
+++ b/xbeeFrame.h	Sun Jan 26 17:19:28 2014 +0000
@@ -1,3 +1,11 @@
+#define FRAME_SIZE      127
+#define STARTBYTE       0x7E
+#define MAX_DATA_LEN    70
+
+#define TX_STATUS       0x89
+#define TX_REQUEST_64   0x00
+#define RX_PACKET_64    0x80
+
 class xbeeFrame : public xbee
 {
 private:
@@ -44,6 +52,14 @@
       * @return Returns the length of the packet
       */
     int GetLength(void);
+    /** Get the type of the frame
+      * @return Returns the type of the packet
+      */
+    int GetType(void);
+    /** Get the status of the sent frame
+      * @return Returns the status of sent packet
+      */    
+    int GetStatus(void);
     /** Set the packet destination address 
       * @param dest_address Pointer to a array storing destination address
       */