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.
Communication.h
00001 #ifndef _COMMUNICATION_H_ 00002 #define _COMMUNICATION_H_ 00003 00004 #include <string.h> 00005 #include "mbed.h" 00006 #include "Road.h" 00007 #include "MQTTNetwork.h" 00008 #include "MQTTClient.h" 00009 #include "MQTTmbed.h" 00010 00011 class Communication { 00012 public: 00013 static int init(); 00014 static int publish_car_info(int id, int pos, int speed); 00015 static int publish_road_ready(); 00016 static void update_message_arrived(MQTT::MessageData& md); 00017 static void sync_message_arrived(MQTT::MessageData& md); 00018 static void disconnect(); 00019 static void yield(int time); 00020 00021 private: 00022 static MQTT::Client<MQTTNetwork, Countdown>* client(MQTT::Client<MQTTNetwork, Countdown>* client); 00023 static const char* mac_address(const char* new_add); 00024 00025 Communication(); 00026 static WiFiInterface* setup_wifi(); 00027 static MQTT::Client<MQTTNetwork, Countdown>* setup_mqtt(MQTTNetwork &network); 00028 00029 }; 00030 #endif
Generated on Wed Jul 13 2022 14:30:32 by
1.7.2