refactor xbee complet

Dependencies:   mbed-rtos mbed

Fork of Repo_Noeud_Mobile by Projet_S5

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Xbee.h Source File

Xbee.h

00001 #include "mbed.h"
00002 #include "rtos.h"
00003 #include "Structure.h"
00004 
00005 class Xbee
00006 {
00007     public :
00008         Xbee();
00009         Xbee(short panId, PinName pinTx, PinName pinRx);
00010         ~Xbee();
00011         
00012         void GetData(); //remplace recevoir();
00013         void OutputData();
00014         void ReceivePacket(data* trame);
00015         void EnvoyerStructure(Mobile_Vers_Fixe mvf);
00016         Mail<Fixe_Vers_Mobile,100> fvm_mailbox;
00017        
00018     private:
00019 
00020         short PanId;
00021         char HexToAscii[16];
00022         Mail<data,100> mailbox;
00023         
00024         void SendData(char data[], int messageSize);
00025         void SendXBee(char array[], int size);
00026         void SetPanId(short panId);
00027         void BuildHexToAsciiTable();
00028 };