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.
Road.h
00001 #ifndef _ROAD_H_ 00002 #define _ROAD_H_ 00003 00004 #include "mbed.h" 00005 #include "Car.h" 00006 #include "AccCar.h" 00007 #include "Intersection.h" 00008 #include "Communication.h" 00009 00010 class Car; 00011 class AccCar; 00012 class Intersection; 00013 00014 class Road { 00015 public: 00016 EventFlags go_flags; 00017 EventFlags done_flags; 00018 Intersection *intersection; 00019 00020 Road(Communication* c); 00021 void add_car(Car* car); 00022 void add_acc_car(AccCar* car, int id); 00023 void let_cars_update(); 00024 void wait_for_car_update(); 00025 00026 private: 00027 AccCar* car1; 00028 AccCar* car2; 00029 AccCar* car3; 00030 AccCar* car4; 00031 AccCar* car5; 00032 00033 int active_cars; 00034 char* topic_send; 00035 char* topic_receive; 00036 Communication* comm; 00037 00038 int n; // update number 00039 }; 00040 #endif
Generated on Fri Jul 22 2022 13:26:47 by
1.7.2