Projet_S5 / Mbed 2 deprecated Repo_Noeud_Mobile_refactor

Dependencies:   mbed-rtos mbed

Fork of Repo_Noeud_Mobile by Projet_S5

Communication/Xbee.h

Committer:
Thierry19
Date:
2015-04-11
Revision:
50:48e8da5fc1ae
Parent:
44:0862bc49ffa7
Child:
56:6af8f2c9ddbe

File content as of revision 50:48e8da5fc1ae:

#include "mbed.h"
#include "rtos.h"
#include "Structure.h"

class Xbee
{
    public :
        Xbee();
        Xbee(short panId, PinName pinTx, PinName pinRx);
        ~Xbee();
        
        Mail<Fixe_Vers_Mobile, 8> mailbox_TypeDeJeu;
        void Recevoir();
        void EnvoyerStructure(Mobile_Vers_Fixe mvf);
        void EnvoyerStructure(Mobile_Vers_Fixe *mvf);
    private:
        Serial* XbeePin;
        short PanId;
        int frameID;
        
        void EnvoyerDonnees(char data[], int messageSize);
        void Envoyer(char array[], int size);
        void SetPanId(short panId);
};