Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of APP4 by
coordinateur.hpp
00001 #ifndef COORDINATEUR_HPP 00002 #define COORDINATEUR_HPP 00003 00004 #include <string> 00005 #include "trame.hpp" 00006 00007 using namespace std; 00008 00009 /* Description de la classe Coordinateur 00010 * 00011 * La classe Coordinateur configure le coordinateur, reçoit les trames du routeurs et envoie les informations à un site web 00012 * 00013 */ 00014 class Coordinateur 00015 { 00016 public: 00017 // Enum pour la machine d'état qui reconstruit les trames reçues 00018 enum Etat { Start, Length, Length2, Data }; 00019 00020 // Constructeur 00021 Coordinateur(PinName _tx, PinName _rx); 00022 // Destructeur 00023 ~Coordinateur(); 00024 00025 // Set le réseau du coordinateur 00026 void setPanID(string _pan); 00027 // Attend de recevoir les trames 00028 void getBytes(); 00029 00030 private: 00031 // Machine à état qui reçoit les trames 00032 void etatTrame(char c); 00033 00034 Trame trame; 00035 Serial xbee; 00036 Etat etat; 00037 char length[2]; 00038 int length_int; 00039 int counter; 00040 char *data; 00041 }; 00042 00043 #endif
Generated on Fri Jul 15 2022 02:34:23 by
1.7.2
