Polytech school project. RICM4 students, see http://air.imag.fr/index.php/Projets-2016-2017-Station_de_pompage_connect%C3%A9e for more information
Dependencies: SX1272Lib mbed WakeUp
Fork of SX1272PingPong by
ordre.h@15:79a78f997f18, 2017-02-28 (annotated)
- Committer:
- chevamax
- Date:
- Tue Feb 28 13:40:13 2017 +0000
- Revision:
- 15:79a78f997f18
- Child:
- 17:cce0eada6d82
Application de test.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chevamax | 15:79a78f997f18 | 1 | #ifndef __ORDRE_H |
chevamax | 15:79a78f997f18 | 2 | #define __ORDRE_H |
chevamax | 15:79a78f997f18 | 3 | |
chevamax | 15:79a78f997f18 | 4 | #include "mbed.h" |
chevamax | 15:79a78f997f18 | 5 | #include "pompe.h" |
chevamax | 15:79a78f997f18 | 6 | #include "niveau.h" |
chevamax | 15:79a78f997f18 | 7 | |
chevamax | 15:79a78f997f18 | 8 | #define TAILLE_TRAME_ORDRE 3 //octets |
chevamax | 15:79a78f997f18 | 9 | |
chevamax | 15:79a78f997f18 | 10 | class Ordre { |
chevamax | 15:79a78f997f18 | 11 | private: |
chevamax | 15:79a78f997f18 | 12 | char idEmetteur; // 1 octet |
chevamax | 15:79a78f997f18 | 13 | char idRecepteur; //1 octet |
chevamax | 15:79a78f997f18 | 14 | char niveauCuve; //5 bits |
chevamax | 15:79a78f997f18 | 15 | char trame[TAILLE_TRAME_ORDRE]; |
chevamax | 15:79a78f997f18 | 16 | |
chevamax | 15:79a78f997f18 | 17 | public: |
chevamax | 15:79a78f997f18 | 18 | Ordre(char id, char idR, char niveau); |
chevamax | 15:79a78f997f18 | 19 | Ordre(char* trameRecu); |
chevamax | 15:79a78f997f18 | 20 | char* creerTrame(); |
chevamax | 15:79a78f997f18 | 21 | void mettreAJourNiveauCuve(); |
chevamax | 15:79a78f997f18 | 22 | //Voir si on peut faire un thread TODO |
chevamax | 15:79a78f997f18 | 23 | void executerOrdre(Pompe p, Niveau n); |
chevamax | 15:79a78f997f18 | 24 | char getIdEmetteur(); |
chevamax | 15:79a78f997f18 | 25 | char getIdRecepteur(); |
chevamax | 15:79a78f997f18 | 26 | char getNiveauCuve(); |
chevamax | 15:79a78f997f18 | 27 | }; |
chevamax | 15:79a78f997f18 | 28 | |
chevamax | 15:79a78f997f18 | 29 | #endif // __ORDRE_H |