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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ordre.h Source File

ordre.h

00001 #ifndef __ORDRE_H
00002 #define __ORDRE_H
00003 
00004 #include "mbed.h"
00005 #include "pompe.h"
00006 #include "niveau.h"
00007 
00008 #define TAILLE_TRAME_ORDRE 3 //octets
00009 
00010 //Representation d'un ordre (format de trame)
00011 class Ordre {
00012   private:
00013     char idEmetteur; // 1 octet
00014     char idRecepteur; //1 octet
00015     char niveauCuve;  //5 bits
00016     char ordreAFaire; // 1 bit
00017     char trame[TAILLE_TRAME_ORDRE];
00018   
00019   public:
00020     Ordre(char* trameRecu);
00021     //Voir si on peut faire un thread TODO
00022     void executerOrdre(Pompe p, Niveau n, char niveauCible);
00023     char getIdEmetteur();
00024     char getIdRecepteur();
00025     char getNiveauCuve();
00026     char getOrdreAFaire();
00027 };
00028 
00029 #endif // __ORDRE_H