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

Revision:
15:79a78f997f18
Child:
17:cce0eada6d82
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ordre.h	Tue Feb 28 13:40:13 2017 +0000
@@ -0,0 +1,29 @@
+#ifndef __ORDRE_H
+#define __ORDRE_H
+
+#include "mbed.h"
+#include "pompe.h"
+#include "niveau.h"
+
+#define TAILLE_TRAME_ORDRE 3 //octets
+
+class Ordre {
+  private:
+    char idEmetteur; // 1 octet
+    char idRecepteur; //1 octet
+    char niveauCuve;  //5 bits
+    char trame[TAILLE_TRAME_ORDRE];
+  
+  public:
+    Ordre(char id, char idR, char niveau);
+    Ordre(char* trameRecu);
+    char* creerTrame();
+    void mettreAJourNiveauCuve();
+    //Voir si on peut faire un thread TODO
+    void executerOrdre(Pompe p, Niveau n);
+    char getIdEmetteur();
+    char getIdRecepteur();
+    char getNiveauCuve();
+};
+
+#endif // __ORDRE_H
\ No newline at end of file