HAHA
Dependencies: WebSocketClient mbed
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
Generated on Sat Jul 16 2022 02:42:16 by 1.7.2