HAHA
Dependencies: WebSocketClient mbed
trame.hpp@6:f1e9dc6b24c7, 2014-04-07 (annotated)
- Committer:
- RufflesAllD
- Date:
- Mon Apr 07 15:43:16 2014 +0000
- Revision:
- 6:f1e9dc6b24c7
- Parent:
- 5:daf08fff7abb
mn
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joGenie | 2:7515831bb5f5 | 1 | #ifndef TRAME_HPP |
joGenie | 2:7515831bb5f5 | 2 | #define TRAME_HPP |
joGenie | 2:7515831bb5f5 | 3 | |
joGenie | 2:7515831bb5f5 | 4 | #include "mbed.h" |
joGenie | 2:7515831bb5f5 | 5 | |
joGenie | 2:7515831bb5f5 | 6 | using namespace std; |
joGenie | 2:7515831bb5f5 | 7 | |
RufflesAllD | 5:daf08fff7abb | 8 | /* Description de la classe Trame |
RufflesAllD | 5:daf08fff7abb | 9 | * |
RufflesAllD | 5:daf08fff7abb | 10 | * La classe trame construit et envoie les trames |
RufflesAllD | 5:daf08fff7abb | 11 | * |
RufflesAllD | 5:daf08fff7abb | 12 | */ |
joGenie | 2:7515831bb5f5 | 13 | class Trame |
joGenie | 2:7515831bb5f5 | 14 | { |
joGenie | 2:7515831bb5f5 | 15 | public: |
joGenie | 2:7515831bb5f5 | 16 | // Constructeur |
joGenie | 2:7515831bb5f5 | 17 | Trame(PinName _tx, PinName _rx); |
joGenie | 2:7515831bb5f5 | 18 | |
joGenie | 3:350f07072089 | 19 | // Envoie une trame pour une commande AT |
joGenie | 3:350f07072089 | 20 | void sendATCommand(const char* command, const char* data, int length); |
joGenie | 2:7515831bb5f5 | 21 | |
joGenie | 3:350f07072089 | 22 | // Envoie une trame pour une requete transmition |
joGenie | 3:350f07072089 | 23 | void sendTransmitRequest(const char* destination, const char* data, int length); |
joGenie | 3:350f07072089 | 24 | |
RufflesAllD | 5:daf08fff7abb | 25 | // Effectue le checksum d'un AT command |
joGenie | 3:350f07072089 | 26 | unsigned char crc8(const char* data, int length); |
joGenie | 3:350f07072089 | 27 | |
RufflesAllD | 5:daf08fff7abb | 28 | // Fonction de débuggage (affiche les informations des trames reçues par le coordinateur dans un terminal) |
RufflesAllD | 5:daf08fff7abb | 29 | void checkTrame(char *data, char check, int length); |
RufflesAllD | 5:daf08fff7abb | 30 | |
joGenie | 2:7515831bb5f5 | 31 | private: |
joGenie | 2:7515831bb5f5 | 32 | PinName tx, rx; |
joGenie | 2:7515831bb5f5 | 33 | }; |
joGenie | 2:7515831bb5f5 | 34 | |
joGenie | 2:7515831bb5f5 | 35 | #endif |