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 Semtech

Committer:
chevamax
Date:
Sat Apr 01 12:29:59 2017 +0000
Revision:
17:cce0eada6d82
Parent:
15:79a78f997f18
Version finale

Who changed what in which revision?

UserRevisionLine numberNew 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 17:cce0eada6d82 10 //Representation d'un ordre (format de trame)
chevamax 15:79a78f997f18 11 class Ordre {
chevamax 15:79a78f997f18 12 private:
chevamax 15:79a78f997f18 13 char idEmetteur; // 1 octet
chevamax 15:79a78f997f18 14 char idRecepteur; //1 octet
chevamax 15:79a78f997f18 15 char niveauCuve; //5 bits
chevamax 17:cce0eada6d82 16 char ordreAFaire; // 1 bit
chevamax 15:79a78f997f18 17 char trame[TAILLE_TRAME_ORDRE];
chevamax 15:79a78f997f18 18
chevamax 15:79a78f997f18 19 public:
chevamax 15:79a78f997f18 20 Ordre(char* trameRecu);
chevamax 15:79a78f997f18 21 //Voir si on peut faire un thread TODO
chevamax 17:cce0eada6d82 22 void executerOrdre(Pompe p, Niveau n, char niveauCible);
chevamax 15:79a78f997f18 23 char getIdEmetteur();
chevamax 15:79a78f997f18 24 char getIdRecepteur();
chevamax 15:79a78f997f18 25 char getNiveauCuve();
chevamax 17:cce0eada6d82 26 char getOrdreAFaire();
chevamax 15:79a78f997f18 27 };
chevamax 15:79a78f997f18 28
chevamax 15:79a78f997f18 29 #endif // __ORDRE_H