Librairie xbee.

Dependents:   NerfUS-Coord NerfUSTarget

Fork of APP3_xbee by Team APP

Revision:
3:37ea92feece2
Parent:
0:8f5379c94a69
Child:
4:e97cfe6cc18c
--- a/xbee.h	Sat Feb 11 20:55:08 2017 +0000
+++ b/xbee.h	Sun Feb 12 20:31:46 2017 +0000
@@ -6,10 +6,23 @@
 #include "mbed.h"
 #include "rtos.h"
 
+//See xbee document page 99
+const char FRAME_TYPE_RECEIVE_PACKET = 0x90;
+const char FRAME_TYPE_TRANSMIT_STATUS = 0x8B;
+const char FRAME_TYPE_AT_COMMAND_RESPONSE = 0x88;
+
+const char TRANSMIT_STATUS_SUCCESS = 0x00;
+const char AT_COMMAND_RESPONSE_STATUS_OK = 0x00;
+
 void send_message_via_xbee(const char* message, const int length);
 vector<char> generate_transmit_request(const char* message, const int length);
 void read_frame();
-vector<char> parse_receive_packet(vector<char> transmitted_request);
+vector<char> parse_receive_packet(const vector<char>& frame);
+vector<char> parse_transmit_status(const vector<char>& frame);
+vector<char> parse_at_command_response(const vector<char>& frame);
 void handle_message();
 
+//Simplify the frame to only contain the frame type and the relevant data for our application
+vector<char> parse_frame(const vector<char>& frame);
+
 #endif
\ No newline at end of file