#include <MSDevice.h>

The MSDevice-interface brings the following interfaces to a vehicle that may be overwritten by real devices:
Definition at line 61 of file MSDevice.h.
Public Member Functions | |
| MSVehicle & | getHolder () const throw () |
| Returns the vehicle that holds this device. | |
| const std::string & | getID () throw () |
| Returns the id of this device. | |
| MSDevice (MSVehicle &holder, const std::string &id) throw () | |
| Constructor. | |
| virtual void | tripInfoOutput (OutputDevice &os) const throw (IOError) |
| Called on writing tripinfo output. | |
| virtual | ~MSDevice () throw () |
| Destructor. | |
Methods called on vehicle movement / state change | |
| virtual void | enterLaneAtEmit (MSLane *enteredLane, const MSVehicle::State &state) |
| Update of members if vehicle enters a new lane in the emit step. | |
| virtual void | enterLaneAtLaneChange (MSLane *enteredLane) |
| Update of members if vehicle enters a new lane in the laneChange step. | |
| virtual void | enterLaneAtMove (MSLane *enteredLane, SUMOReal driven) |
| Update if vehicle enters a new lane in the move step. | |
| virtual void | leaveLane () |
| Update of members if vehicle leaves a new lane in the lane change step. | |
| virtual void | leaveLaneAtMove (SUMOReal driven) |
| Update of members if vehicle leaves a new lane in the move step. | |
| virtual void | onRemovalFromNet () |
| Called when the vehicle leaves the lane. | |
| virtual void | onTryEmit () |
| Called when the vehicle tries to get into the net. | |
Protected Attributes | |
| MSVehicle & | myHolder |
| The vehicle that stores the device. | |
Private Member Functions | |
| MSDevice (const MSDevice &) | |
| Invalidated copy constructor. | |
| MSDevice & | operator= (const MSDevice &) |
| Invalidated assignment operator. | |
Private Attributes | |
| std::string | myID |
| The built device id. | |
| MSDevice::MSDevice | ( | MSVehicle & | holder, | |
| const std::string & | id | |||
| ) | throw () [inline] |
Constructor.
| [in] | holder | The vehicle that holds this device |
| [in] | id | The ID of the device |
Definition at line 68 of file MSDevice.h.
| virtual MSDevice::~MSDevice | ( | ) | throw () [inline, virtual] |
| MSDevice::MSDevice | ( | const MSDevice & | ) | [private] |
Invalidated copy constructor.
| virtual void MSDevice::enterLaneAtEmit | ( | MSLane * | enteredLane, | |
| const MSVehicle::State & | state | |||
| ) | [inline, virtual] |
Update of members if vehicle enters a new lane in the emit step.
| [in] | enteredLane | The lane the vehicle enters |
| [in] | state | The vehicle's state during the emission |
Reimplemented in MSDevice_HBEFA, and MSDevice_Routing.
Definition at line 114 of file MSDevice.h.
| virtual void MSDevice::enterLaneAtLaneChange | ( | MSLane * | enteredLane | ) | [inline, virtual] |
Update of members if vehicle enters a new lane in the laneChange step.
| [in] | enteredLane | The lane the vehicle enters |
Definition at line 121 of file MSDevice.h.
| virtual void MSDevice::enterLaneAtMove | ( | MSLane * | enteredLane, | |
| SUMOReal | driven | |||
| ) | [inline, virtual] |
Update if vehicle enters a new lane in the move step.
| [in] | enteredLane | The lane the vehicle enters |
| [in] | driven | The distance driven by the vehicle within this time step |
Definition at line 106 of file MSDevice.h.
| MSVehicle& MSDevice::getHolder | ( | ) | const throw () [inline] |
Returns the vehicle that holds this device.
Definition at line 81 of file MSDevice.h.
References myHolder.
Referenced by MSDevice_HBEFA::wrappedComputeCommandExecute().
00081 { 00082 return myHolder; 00083 }
| const std::string& MSDevice::getID | ( | ) | throw () [inline] |
Returns the id of this device.
Definition at line 89 of file MSDevice.h.
References myID.
00089 { 00090 return myID; 00091 }
| virtual void MSDevice::leaveLane | ( | ) | [inline, virtual] |
Update of members if vehicle leaves a new lane in the lane change step.
Definition at line 132 of file MSDevice.h.
| virtual void MSDevice::leaveLaneAtMove | ( | SUMOReal | driven | ) | [inline, virtual] |
Update of members if vehicle leaves a new lane in the move step.
| [in] | driven | The distance driven by the vehicle within this time step |
Definition at line 128 of file MSDevice.h.
| virtual void MSDevice::onRemovalFromNet | ( | ) | [inline, virtual] |
| virtual void MSDevice::onTryEmit | ( | ) | [inline, virtual] |
Called when the vehicle tries to get into the net.
Reimplemented in MSDevice_Routing.
Definition at line 98 of file MSDevice.h.
| virtual void MSDevice::tripInfoOutput | ( | OutputDevice & | os | ) | const throw (IOError) [inline, virtual] |
Called on writing tripinfo output.
The device may write some statistics into the tripinfo output. It is assumed that the written information is a valid xml-snipplet, which will be embedded within the vehicle's information.
The device should use the openTag / closeTag methods of the OutputDevice for correct indentation.
| [in] | os | The stream to write the information into |
| IOError | not yet implemented |
Reimplemented in MSDevice_HBEFA.
Definition at line 152 of file MSDevice.h.
MSVehicle& MSDevice::myHolder [protected] |
The vehicle that stores the device.
Definition at line 158 of file MSDevice.h.
Referenced by MSDevice_Routing::enterLaneAtEmit(), getHolder(), MSDevice_Routing::onTryEmit(), and MSDevice_Routing::wrappedRerouteCommandExecute().
std::string MSDevice::myID [private] |
1.5.6