Projet_S5 / Mbed 2 deprecated Repo_Noeud_Mobile_refactor

Dependencies:   mbed-rtos mbed

Fork of Repo_Noeud_Mobile by Projet_S5

Revision:
9:b8503f5ad3bd
Child:
18:7b187bef18d8
Child:
19:19adf49351b0
Child:
20:96280625532c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Communication/Xbee.h	Thu Mar 05 21:20:23 2015 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+#include "rtos.h"
+
+typedef char GantsID;
+
+typedef struct {
+    GantsID     gants;
+    char     xyz[6];    // donnée accéléromètre.
+    char       majeur;  //Might actually be booleans (to discuss)
+    char       index;
+    char       annulaire;
+} Mobile_Vers_Fixe;
+
+struct message {
+    Mobile_Vers_Fixe donnees;
+};
+
+class Xbee
+{
+    public :
+        Xbee();
+        Xbee(short panId, PinName pinTx, PinName pinRx);
+        ~Xbee();
+        
+        Mail<message,32> Mailbox;
+    
+        void Envoyer(char array[], int size);
+        void Recevoir();
+    private:
+        Serial* XbeePin;
+        short PanId;
+    
+        void SetPanId(short panId);
+};
\ No newline at end of file