Projet S5 Info / Mbed 2 deprecated Projet-xbee-mbed_fixe

Dependencies:   mbed

Fork of APP4 by S5info_H14

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     // Effectue le checksum d'un AT command
00023     unsigned char crc8(const char* data, int length);
00024     
00025     // Fonction de débuggage (affiche les informations des trames reçues par le coordinateur dans un terminal)
00026     void checkTrame(char *data, char check, int length);
00027     
00028 private:
00029     PinName tx, rx;
00030 };
00031 
00032 #endif