HAHA

Dependencies:   WebSocketClient mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers trame.hpp Source File

trame.hpp

00001 #ifndef TRAME_HPP
00002 #define TRAME_HPP
00003 
00004 #include "mbed.h"
00005 
00006 using namespace std;
00007 
00008 /* Description de la classe Trame
00009 *
00010 *  La classe trame construit et envoie les trames
00011 *
00012 */ 
00013 class Trame
00014 {
00015 public:
00016     // Constructeur
00017     Trame(PinName _tx, PinName _rx);
00018     
00019     // Envoie une trame pour une commande AT
00020     void sendATCommand(const char* command, const char* data, int length);
00021     
00022     // Envoie une trame pour une requete transmition
00023     void sendTransmitRequest(const char* destination, const char* data, int length);
00024     
00025     // Effectue le checksum d'un AT command
00026     unsigned char crc8(const char* data, int length);
00027     
00028     // Fonction de débuggage (affiche les informations des trames reçues par le coordinateur dans un terminal)
00029     void checkTrame(char *data, char check, int length);
00030     
00031 private:
00032     PinName tx, rx;
00033 };
00034 
00035 #endif