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-08
Revision:
44:0862bc49ffa7
Parent:
39:558cd5780490
Child:
50:48e8da5fc1ae

File content as of revision 44:0862bc49ffa7:

#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;
        
        void EnvoyerDonnees(char data[], int messageSize);
        void Envoyer(char array[], int size);
        void SetPanId(short panId);
};