routeur done
Dependencies: mbed
Fork of APP4 by
trame.hpp@4:aac38b016952, 2014-02-24 (annotated)
- Committer:
- RufflesAllD
- Date:
- Mon Feb 24 19:06:11 2014 +0000
- Revision:
- 4:aac38b016952
- Parent:
- 3:350f07072089
l
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 | |
joGenie | 2:7515831bb5f5 | 8 | class Trame |
joGenie | 2:7515831bb5f5 | 9 | { |
joGenie | 2:7515831bb5f5 | 10 | public: |
joGenie | 2:7515831bb5f5 | 11 | // Constructeur |
joGenie | 2:7515831bb5f5 | 12 | Trame(PinName _tx, PinName _rx); |
joGenie | 2:7515831bb5f5 | 13 | |
joGenie | 3:350f07072089 | 14 | // Envoie une trame pour une commande AT |
joGenie | 3:350f07072089 | 15 | void sendATCommand(const char* command, const char* data, int length); |
joGenie | 2:7515831bb5f5 | 16 | |
joGenie | 3:350f07072089 | 17 | // Envoie une trame pour une requete transmition |
joGenie | 3:350f07072089 | 18 | void sendTransmitRequest(const char* destination, const char* data, int length); |
joGenie | 3:350f07072089 | 19 | |
joGenie | 3:350f07072089 | 20 | //Effectue le checksum d'un AT command |
joGenie | 3:350f07072089 | 21 | unsigned char crc8(const char* data, int length); |
joGenie | 3:350f07072089 | 22 | |
joGenie | 2:7515831bb5f5 | 23 | private: |
joGenie | 2:7515831bb5f5 | 24 | PinName tx, rx; |
joGenie | 2:7515831bb5f5 | 25 | }; |
joGenie | 2:7515831bb5f5 | 26 | |
joGenie | 2:7515831bb5f5 | 27 | #endif |