SUMO - Simulation of Urban MObility

TraCIServerAPI_Simulation Class Reference

APIs for getting/setting simulation values via TraCI. More...

#include <TraCIServerAPI_Simulation.h>

Static Public Member Functions

static bool commandDistanceRequest (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, int commandId)
static bool commandPositionConversion (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, int commandId)
static std::pair< MSLane
*, SUMOReal > 
convertCartesianToRoadMap (Position pos)
static const MSLane * getLaneChecking (std::string roadID, int laneIndex, SUMOReal pos)
static bool processGet (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a get value command (Command 0xaa: Get Edge Variable)

Private Member Functions

TraCIServerAPI_Simulation & operator= (const TraCIServerAPI_Simulation &s)
 invalidated assignment operator
 TraCIServerAPI_Simulation (const TraCIServerAPI_Simulation &s)
 invalidated copy constructor

Detailed Description

APIs for getting/setting simulation values via TraCI.

Definition at line 49 of file TraCIServerAPI_Simulation.h.


Constructor & Destructor Documentation

TraCIServerAPI_Simulation::TraCIServerAPI_Simulation ( const TraCIServerAPI_Simulation &  s) [private]

invalidated copy constructor


Member Function Documentation

bool TraCIServerAPI_Simulation::commandPositionConversion ( traci::TraCIServer &  server,
tcpip::Storage &  inputStorage,
tcpip::Storage &  outputStorage,
int  commandId 
) [static]
std::pair< MSLane *, SUMOReal > TraCIServerAPI_Simulation::convertCartesianToRoadMap ( Position  pos) [static]

Converts a cartesian position to the closest road map position

Parameters:
poscartesian position that is to be converted
Returns:
the closest road map position to the cartesian position

Definition at line 208 of file TraCIServerAPI_Simulation.cpp.

References MSEdge::dictionary(), MSNet::getEdgeControl(), MSEdgeControl::getEdgeNames(), MSNet::getInstance(), max, and SUMOReal.

Referenced by TraCIServerAPI_Vehicle::commandDistanceRequest().

const MSLane * TraCIServerAPI_Simulation::getLaneChecking ( std::string  roadID,
int  laneIndex,
SUMOReal  pos 
) [static]

Converts a road map position to a cartesian position

Parameters:
posroad map position that is to be convertes
Returns:
closest 2D position

Definition at line 230 of file TraCIServerAPI_Simulation.cpp.

References MSEdge::dictionary(), MSEdge::getLanes(), and MSLane::getLength().

Referenced by TraCIServerAPI_Vehicle::commandDistanceRequest().

TraCIServerAPI_Simulation& TraCIServerAPI_Simulation::operator= ( const TraCIServerAPI_Simulation &  s) [private]

invalidated assignment operator

bool TraCIServerAPI_Simulation::processGet ( traci::TraCIServer &  server,
tcpip::Storage &  inputStorage,
tcpip::Storage &  outputStorage 
) [static]

The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines