 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef MSDevice_Example_h
18 #define MSDevice_Example_h
88 double newPos,
double newSpeed);
124 void setParameter(
const std::string& key,
const std::string& value);
143 double customValue2,
double customValue3);
Representation of a vehicle or person.
Representation of a lane in the micro simulation.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_Example-options.
double myCustomValue3
a value which is initialised based on a vType parameter
Representation of a vehicle.
double myCustomValue2
a value which is initialised based on a vehicle parameter
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key
A device which collects info on the vehicle trip (mainly on departure and arrival)
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
MSDevice_Example(SUMOVehicle &holder, const std::string &id, double customValue1, double customValue2, double customValue3)
Constructor.
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Saves departure info on insertion.
A storage for options typed value containers)
const std::string deviceName() const
return the name for this type of device
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Saves arrival info.
MSDevice_Example & operator=(const MSDevice_Example &)
Invalidated assignment operator.
~MSDevice_Example()
Destructor.
double myCustomValue1
a value which is initialised based on a commandline/configuration option
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks for waiting steps when the vehicle moves.
void generateOutput() const
Called on writing tripinfo output.
Notification
Definition of a vehicle state.
Abstract in-vehicle device.