not running

Dependencies:   TextLCD MQTT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AccCar.h Source File

AccCar.h

00001 #ifndef _ACC_CAR_H_
00002 #define _ACC_CAR_H_
00003 
00004 #include "mbed.h"
00005 #include "Car.h"
00006 #include "Road.h"
00007 #include "Communication.h"
00008 
00009 class Road;
00010 class Car;
00011 
00012 class AccCar {
00013 public:
00014 // Inherited from class Car
00015     int position;
00016     int speed;
00017     int flag;
00018     
00019     AccCar(int id, Road* road, int flag, Communication* c);
00020     void set_forward_car(AccCar* car);
00021     void update();
00022     void reset(int speed);
00023     void stop();
00024     
00025 public:
00026     int id;
00027     int target_speed;
00028     AccCar* forward_car;
00029     
00030     Road* road;
00031     Thread* thread;
00032     Communication *comm;
00033     
00034     char* topic_position;
00035     char* topic_control;
00036      
00037 protected:
00038     int cycle;
00039 };
00040 #endif