
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
trame.h
00001 #ifndef __TRAME_H 00002 #define __TRAME_H 00003 00004 #include "mbed.h" 00005 #define TAILLE_TRAME_DATA 5 //octets 4+1 for null char 00006 00007 /** 00008 * Represente une trame de donnée 00009 **/ 00010 00011 class TrameData { 00012 private: 00013 char idEmetteur; // 1 octet 00014 char idStation; //1 octet 00015 char etatPompe; //1 bit 00016 char nombreNiveau; //5 bits 00017 char niveauCuve; //5 bits 00018 char niveauBatterie; //4bits 00019 char trame[TAILLE_TRAME_DATA]; 00020 00021 public: 00022 //Creer un objet trame a partir de parametres 00023 TrameData(char idE, char idS, int nbNiveau, char etatP, char niveau, char batterie); 00024 //Creer un objet trame a partir d'un tableau de caracteres (ici le buffer) 00025 char* creerTrame(); 00026 00027 //Mise a jour des differents champs 00028 void mettreAJourEtatPompe(char etatP); 00029 void mettreAJourNiveauCuve(char niveau); 00030 void mettreAJourNiveauBatterie(char niveau); 00031 }; 00032 00033 #endif // __TRAME_H
Generated on Thu Jul 14 2022 10:55:31 by
