SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
traci::TraCIServer Class Reference

TraCI server used to control sumo by a remote TraCI client. More...

#include <TraCIServer.h>

Inheritance diagram for traci::TraCIServer:
MSNet::VehicleStateListener

Data Structures

class  Subscription
 Representation of a subscription. More...
 

Public Types

typedef bool(* CmdExecutor )(traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Definition of a method to be called for serving an associated commandID. More...
 

Public Member Functions

void collectObjectsInRange (int domain, const PositionVector &shape, SUMOReal range, std::set< std::string > &into)
 
SUMOTime getTargetTime ()
 
const std::map
< MSNet::VehicleState,
std::vector< std::string > > & 
getVehicleStateChanges () const
 
void postProcessVTD ()
 
void setVTDControlled (MSVehicle *v, MSLane *l, SUMOReal pos, int edgeOffset, MSEdgeVector route)
 
void vehicleStateChanged (const SUMOVehicle *const vehicle, MSNet::VehicleState to)
 Called if a vehicle changes its state. More...
 
bool vtdDebug () const
 
void writeResponseWithLength (tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
 
Writing Status Messages
void writeStatusCmd (int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
 Writes a status command to the given storage. More...
 
void writeStatusCmd (int commandId, int status, const std::string &description)
 Writes a status command to myOutputStorage. More...
 
bool writeErrorStatusCmd (int commandId, const std::string &description, tcpip::Storage &outputStorage)
 Writes a status command to the given storage with status = RTYPE_ERR. More...
 
Helpers for reading and checking values
bool readTypeCheckingInt (tcpip::Storage &inputStorage, int &into)
 Reads the value type and an int, verifying the type. More...
 
bool readTypeCheckingDouble (tcpip::Storage &inputStorage, double &into)
 Reads the value type and a double, verifying the type. More...
 
bool readTypeCheckingString (tcpip::Storage &inputStorage, std::string &into)
 Reads the value type and a string, verifying the type. More...
 
bool readTypeCheckingStringList (tcpip::Storage &inputStorage, std::vector< std::string > &into)
 Reads the value type and a string list, verifying the type. More...
 
bool readTypeCheckingColor (tcpip::Storage &inputStorage, RGBColor &into)
 Reads the value type and a color, verifying the type. More...
 
bool readTypeCheckingPosition2D (tcpip::Storage &inputStorage, Position &into)
 Reads the value type and a 2D position, verifying the type. More...
 
bool readTypeCheckingBoundary (tcpip::Storage &inputStorage, Boundary &into)
 Reads the value type and a 2D bounding box, verifying the type. More...
 
bool readTypeCheckingByte (tcpip::Storage &inputStorage, int &into)
 Reads the value type and a byte, verifying the type. More...
 
bool readTypeCheckingUnsignedByte (tcpip::Storage &inputStorage, int &into)
 Reads the value type and an unsigned byte, verifying the type. More...
 
bool readTypeCheckingPolygon (tcpip::Storage &inputStorage, PositionVector &into)
 Reads the value type and a polygon, verifying the type. More...
 

Static Public Member Functions

static TraCIServergetInstance ()
 
static void processCommandsUntilSimStep (SUMOTime step)
 process all commands until a simulation step is wanted More...
 
Initialisation and Shutdown
static void openSocket (const std::map< int, CmdExecutor > &execs)
 Initialises the server. More...
 
static void close ()
 request termination of connection More...
 
static bool wasClosed ()
 check whether close was requested More...
 

Private Member Functions

bool addObjectContextSubscription (int commandId)
 
bool addObjectVariableSubscription (int commandId)
 
int dispatchCommand ()
 
bool findObjectShape (int domain, const std::string &id, PositionVector &shape)
 
void initialiseSubscription (const Subscription &s)
 
TraCIServeroperator= (const TraCIServer &s)
 Invalidated assignment operator. More...
 
bool processSingleSubscription (const TraCIServer::Subscription &s, tcpip::Storage &writeInto, std::string &errors)
 
void removeSubscription (int commandId, const std::string &identity, int domain)
 
 TraCIServer (int port=0)
 Constructor. More...
 
virtual ~TraCIServer ()
 Destructor. More...
 
Server-internal command handling
bool commandGetVersion ()
 Returns the TraCI-version. More...
 
bool commandCloseConnection ()
 Indicates the connection as being closed. More...
 
void postProcessSimulationStep2 ()
 Handles subscriptions to send after a simstep2 command. More...
 
bool commandAddVehicle ()
 Adds a vehicle. More...
 

Private Attributes

const bool myAmEmbedded
 Whether the server runs in embedded mode. More...
 
bool myDoingSimStep
 Whether a step is currently done. More...
 
std::map< int, CmdExecutormyExecutors
 Map of commandIds -> their executors; applicable if the executor applies to the method footprint. More...
 
bool myHaveWarnedDeprecation
 Whether the usage of deprecated methods was already reported. More...
 
tcpip::Storage myInputStorage
 The storage to read from. More...
 
std::map< int, TraCIRTree * > myObjects
 A storage of objects. More...
 
tcpip::Storage myOutputStorage
 The storage to writeto. More...
 
tcpip::SocketmySocket
 The socket on which server is listening on. More...
 
std::vector< SubscriptionmySubscriptions
 The list of known, still valid subscriptions. More...
 
SUMOTime myTargetTime
 The time step to reach until processing the next commands. More...
 
std::map< MSNet::VehicleState,
std::vector< std::string > > 
myVehicleStateChanges
 Changes in the states of simulated vehicles. More...
 
std::map< std::string,
MSVehicle * > 
myVTDControlledVehicles
 

Static Private Attributes

static bool myDoCloseConnection = false
 Whether the connection was set to be to close. More...
 
static TraCIServermyInstance = 0
 Singleton instance of the server. More...
 

Detailed Description

TraCI server used to control sumo by a remote TraCI client.

Definition at line 76 of file TraCIServer.h.

Member Typedef Documentation

typedef bool(* traci::TraCIServer::CmdExecutor)(traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)

Definition of a method to be called for serving an associated commandID.

Definition at line 79 of file TraCIServer.h.

Constructor & Destructor Documentation

traci::TraCIServer::TraCIServer ( int  port = 0)
private

Constructor.

Parameters
[in]portThe port to listen to (to open)

Definition at line 110 of file TraCIServer.cpp.

References tcpip::Socket::accept(), MSNet::addVehicleStateListener(), CMD_GET_EDGE_VARIABLE, CMD_GET_INDUCTIONLOOP_VARIABLE, CMD_GET_JUNCTION_VARIABLE, CMD_GET_LANE_VARIABLE, CMD_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE, CMD_GET_POI_VARIABLE, CMD_GET_POLYGON_VARIABLE, CMD_GET_ROUTE_VARIABLE, CMD_GET_SIM_VARIABLE, CMD_GET_TL_VARIABLE, CMD_GET_VEHICLE_VARIABLE, CMD_GET_VEHICLETYPE_VARIABLE, CMD_SET_EDGE_VARIABLE, CMD_SET_LANE_VARIABLE, CMD_SET_POI_VARIABLE, CMD_SET_POLYGON_VARIABLE, CMD_SET_ROUTE_VARIABLE, CMD_SET_TL_VARIABLE, CMD_SET_VEHICLE_VARIABLE, CMD_SET_VEHICLETYPE_VARIABLE, MSNet::getInstance(), MsgHandler::getWarningInstance(), MSGlobals::gUsingInternalLanes, MsgHandler::inform(), myAmEmbedded, myDoCloseConnection, myExecutors, mySocket, myVehicleStateChanges, TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Route::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_Polygon::processGet(), TraCIServerAPI_VehicleType::processGet(), TraCIServerAPI_Junction::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_MeMeDetector::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Simulation::processGet(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_Route::processSet(), TraCIServerAPI_Lane::processSet(), TraCIServerAPI_POI::processSet(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_VehicleType::processSet(), toString(), MSNet::VEHICLE_STATE_ARRIVED, MSNet::VEHICLE_STATE_BUILT, MSNet::VEHICLE_STATE_DEPARTED, MSNet::VEHICLE_STATE_ENDING_TELEPORT, MSNet::VEHICLE_STATE_NEWROUTE, MSNet::VEHICLE_STATE_STARTING_TELEPORT, tcpip::SocketException::what(), WRITE_MESSAGE, and WRITE_WARNING.

traci::TraCIServer::~TraCIServer ( )
privatevirtual

Member Function Documentation

bool traci::TraCIServer::addObjectContextSubscription ( int  commandId)
private
bool traci::TraCIServer::addObjectVariableSubscription ( int  commandId)
private
void traci::TraCIServer::close ( )
static

request termination of connection

Definition at line 191 of file TraCIServer.cpp.

References myDoCloseConnection, and myInstance.

Referenced by MSNet::closeSimulation().

bool traci::TraCIServer::commandCloseConnection ( )
private

Indicates the connection as being closed.

Returns
Always true

Definition at line 500 of file TraCIServer.cpp.

References CMD_CLOSE, myDoCloseConnection, RTYPE_OK, and writeStatusCmd().

Referenced by dispatchCommand().

bool traci::TraCIServer::commandGetVersion ( )
private
int traci::TraCIServer::dispatchCommand ( )
private

Definition at line 387 of file TraCIServer.cpp.

References addObjectContextSubscription(), addObjectVariableSubscription(), CMD_ADDVEHICLE, CMD_CLOSE, CMD_GETVERSION, CMD_SIMSTEP2, CMD_SUBSCRIBE_EDGE_CONTEXT, CMD_SUBSCRIBE_EDGE_VARIABLE, CMD_SUBSCRIBE_GUI_CONTEXT, CMD_SUBSCRIBE_GUI_VARIABLE, CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT, CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE, CMD_SUBSCRIBE_JUNCTION_CONTEXT, CMD_SUBSCRIBE_JUNCTION_VARIABLE, CMD_SUBSCRIBE_LANE_CONTEXT, CMD_SUBSCRIBE_LANE_VARIABLE, CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_CONTEXT, CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE, CMD_SUBSCRIBE_POI_CONTEXT, CMD_SUBSCRIBE_POI_VARIABLE, CMD_SUBSCRIBE_POLYGON_CONTEXT, CMD_SUBSCRIBE_POLYGON_VARIABLE, CMD_SUBSCRIBE_ROUTE_CONTEXT, CMD_SUBSCRIBE_ROUTE_VARIABLE, CMD_SUBSCRIBE_SIM_CONTEXT, CMD_SUBSCRIBE_SIM_VARIABLE, CMD_SUBSCRIBE_TL_CONTEXT, CMD_SUBSCRIBE_TL_VARIABLE, CMD_SUBSCRIBE_VEHICLE_CONTEXT, CMD_SUBSCRIBE_VEHICLE_VARIABLE, CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT, CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE, commandAddVehicle(), commandCloseConnection(), commandGetVersion(), DELTA_T, MSNet::getInstance(), myAmEmbedded, myDoCloseConnection, myExecutors, myHaveWarnedDeprecation, myInputStorage, myOutputStorage, myTargetTime, tcpip::Storage::position(), postProcessSimulationStep2(), tcpip::Storage::readChar(), tcpip::Storage::readInt(), tcpip::Storage::readUnsignedByte(), RTYPE_ERR, RTYPE_NOTIMPLEMENTED, MSNet::simulationStep(), tcpip::Storage::valid_pos(), WRITE_WARNING, and writeStatusCmd().

Referenced by processCommandsUntilSimStep().

static TraCIServer* traci::TraCIServer::getInstance ( void  )
inlinestatic

Definition at line 85 of file TraCIServer.h.

References myInstance.

Referenced by MSNet::simulationStep().

SUMOTime traci::TraCIServer::getTargetTime ( )
inline

Definition at line 82 of file TraCIServer.h.

References myTargetTime.

Referenced by MSNet::simulationStep().

const std::map<MSNet::VehicleState, std::vector<std::string> >& traci::TraCIServer::getVehicleStateChanges ( ) const
inline

Definition at line 162 of file TraCIServer.h.

References myVehicleStateChanges.

Referenced by TraCIServerAPI_Simulation::processGet().

void traci::TraCIServer::openSocket ( const std::map< int, CmdExecutor > &  execs)
static

Initialises the server.

Parameters
[in]execsThe (additional) command executors to use

Definition at line 178 of file TraCIServer.cpp.

References OptionsCont::getOptions(), myDoCloseConnection, myExecutors, and myInstance.

Referenced by GUIApplicationWindow::handleEvent_SimulationLoaded().

TraCIServer& traci::TraCIServer::operator= ( const TraCIServer s)
private

Invalidated assignment operator.

void traci::TraCIServer::postProcessVTD ( )
bool traci::TraCIServer::readTypeCheckingBoundary ( tcpip::Storage inputStorage,
Boundary into 
)

Reads the value type and a 2D bounding box, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether a 2D bounding box was given (by data type)

Definition at line 1087 of file TraCIServer.cpp.

References tcpip::Storage::readDouble(), tcpip::Storage::readUnsignedByte(), Boundary::set(), SUMOReal, and TYPE_BOUNDINGBOX.

bool traci::TraCIServer::readTypeCheckingByte ( tcpip::Storage inputStorage,
int into 
)

Reads the value type and a byte, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether a byte was given (by data type)

Definition at line 1101 of file TraCIServer.cpp.

References tcpip::Storage::readByte(), tcpip::Storage::readUnsignedByte(), and TYPE_BYTE.

Referenced by TraCIServerAPI_Vehicle::processSet().

bool traci::TraCIServer::readTypeCheckingColor ( tcpip::Storage inputStorage,
RGBColor into 
)

Reads the value type and a color, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether a color was given (by data type)

Definition at line 1061 of file TraCIServer.cpp.

References tcpip::Storage::readUnsignedByte(), RGBColor::set(), and TYPE_COLOR.

Referenced by TraCIServerAPI_POI::processSet(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_Vehicle::processSet(), and TraCIServerAPI_VehicleType::setVariable().

bool traci::TraCIServer::readTypeCheckingDouble ( tcpip::Storage inputStorage,
double &  into 
)

Reads the value type and a double, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether a double value was given (by data type)

Definition at line 1031 of file TraCIServer.cpp.

References tcpip::Storage::readDouble(), tcpip::Storage::readUnsignedByte(), and TYPE_DOUBLE.

Referenced by TraCIServerAPI_Edge::processSet(), TraCIServerAPI_Lane::processSet(), TraCIServerAPI_Vehicle::processSet(), and TraCIServerAPI_VehicleType::setVariable().

bool traci::TraCIServer::readTypeCheckingInt ( tcpip::Storage inputStorage,
int into 
)

Reads the value type and an int, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether an integer value was given (by data type)

Definition at line 1021 of file TraCIServer.cpp.

References tcpip::Storage::readInt(), tcpip::Storage::readUnsignedByte(), and TYPE_INTEGER.

Referenced by TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_POI::processSet(), and TraCIServerAPI_Vehicle::processSet().

bool traci::TraCIServer::readTypeCheckingPolygon ( tcpip::Storage inputStorage,
PositionVector into 
)

Reads the value type and a polygon, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether an unsigned byte was given (by data type)

Definition at line 1121 of file TraCIServer.cpp.

References PositionVector::push_back(), tcpip::Storage::readDouble(), tcpip::Storage::readUnsignedByte(), SUMOReal, and TYPE_POLYGON.

Referenced by TraCIServerAPI_Polygon::processSet().

bool traci::TraCIServer::readTypeCheckingPosition2D ( tcpip::Storage inputStorage,
Position into 
)

Reads the value type and a 2D position, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether a 2D position was given (by data type)

Definition at line 1075 of file TraCIServer.cpp.

References POSITION_2D, tcpip::Storage::readDouble(), tcpip::Storage::readUnsignedByte(), Position::set(), and SUMOReal.

Referenced by TraCIServerAPI_POI::processSet().

bool traci::TraCIServer::readTypeCheckingString ( tcpip::Storage inputStorage,
std::string &  into 
)

Reads the value type and a string, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether a string value was given (by data type)

Definition at line 1041 of file TraCIServer.cpp.

References tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), and TYPE_STRING.

Referenced by TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Simulation::processGet(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_POI::processSet(), TraCIServerAPI_Vehicle::processSet(), and TraCIServerAPI_VehicleType::setVariable().

bool traci::TraCIServer::readTypeCheckingStringList ( tcpip::Storage inputStorage,
std::vector< std::string > &  into 
)

Reads the value type and a string list, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether a double value was given (by data type)

Definition at line 1051 of file TraCIServer.cpp.

References tcpip::Storage::readStringList(), tcpip::Storage::readUnsignedByte(), and TYPE_STRINGLIST.

Referenced by TraCIServerAPI_Edge::processSet(), TraCIServerAPI_Lane::processSet(), TraCIServerAPI_Route::processSet(), and TraCIServerAPI_Vehicle::processSet().

bool traci::TraCIServer::readTypeCheckingUnsignedByte ( tcpip::Storage inputStorage,
int into 
)

Reads the value type and an unsigned byte, verifying the type.

Parameters
in,changed]inputStorage The storage to read from
[out]intoHolder of the read value
Returns
Whether an unsigned byte was given (by data type)

Definition at line 1111 of file TraCIServer.cpp.

References tcpip::Storage::readUnsignedByte(), and TYPE_UBYTE.

Referenced by TraCIServerAPI_Simulation::commandPositionConversion(), and TraCIServerAPI_Polygon::processSet().

void traci::TraCIServer::removeSubscription ( int  commandId,
const std::string &  identity,
int  domain 
)
private
void traci::TraCIServer::setVTDControlled ( MSVehicle v,
MSLane l,
SUMOReal  pos,
int  edgeOffset,
MSEdgeVector  route 
)
void traci::TraCIServer::vehicleStateChanged ( const SUMOVehicle *const  vehicle,
MSNet::VehicleState  to 
)
virtual

Called if a vehicle changes its state.

Parameters
[in]vehicleThe vehicle which changed its state
[in]toThe state the vehicle has changed to

Implements MSNet::VehicleStateListener.

Definition at line 235 of file TraCIServer.cpp.

References SUMOVehicle::getID(), OptionsCont::getOptions(), myDoCloseConnection, and myVehicleStateChanges.

bool traci::TraCIServer::vtdDebug ( ) const

Definition at line 226 of file TraCIServer.cpp.

Referenced by TraCIServerAPI_Vehicle::processSet().

bool traci::TraCIServer::wasClosed ( )
static

check whether close was requested

Returns
Whether the connection was closed

Definition at line 201 of file TraCIServer.cpp.

References myDoCloseConnection.

Referenced by GUIRunThread::makeStep(), MSNet::simulate(), and MSNet::simulationState().

void traci::TraCIServer::writeStatusCmd ( int  commandId,
int  status,
const std::string &  description,
tcpip::Storage outputStorage 
)

Writes a status command to the given storage.

Parameters
[in]commandIdThe id of the command to respond to
[in]statusThe status to send
[in]descriptionThe status description (error message, for example)
in,filled]outputStorage The storage to write the status into

Definition at line 626 of file TraCIServer.cpp.

References RTYPE_ERR, RTYPE_NOTIMPLEMENTED, toString(), WRITE_ERROR, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().

Referenced by commandAddVehicle(), commandCloseConnection(), TraCIServerAPI_Simulation::commandDistanceRequest(), commandGetVersion(), TraCIServerAPI_Simulation::commandPositionConversion(), dispatchCommand(), initialiseSubscription(), postProcessSimulationStep2(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_MeMeDetector::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_Polygon::processGet(), TraCIServerAPI_Route::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_VehicleType::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Junction::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Simulation::processGet(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Route::processSet(), TraCIServerAPI_Lane::processSet(), TraCIServerAPI_POI::processSet(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_VehicleType::processSet(), processSingleSubscription(), removeSubscription(), writeErrorStatusCmd(), and writeStatusCmd().

void traci::TraCIServer::writeStatusCmd ( int  commandId,
int  status,
const std::string &  description 
)

Writes a status command to myOutputStorage.

Parameters
[in]commandIdThe id of the command to respond to
[in]statusThe status to send
[in]descriptionThe status description (error message, for example)

Definition at line 620 of file TraCIServer.cpp.

References myOutputStorage, and writeStatusCmd().

Field Documentation

const bool traci::TraCIServer::myAmEmbedded
private

Whether the server runs in embedded mode.

Definition at line 340 of file TraCIServer.h.

Referenced by dispatchCommand(), processCommandsUntilSimStep(), and TraCIServer().

bool traci::TraCIServer::myDoCloseConnection = false
staticprivate

Whether the connection was set to be to close.

Definition at line 318 of file TraCIServer.h.

Referenced by close(), commandCloseConnection(), dispatchCommand(), openSocket(), processCommandsUntilSimStep(), TraCIServer(), vehicleStateChanged(), and wasClosed().

bool traci::TraCIServer::myDoingSimStep
private

Whether a step is currently done.

Todo:
: What is this for?

Definition at line 334 of file TraCIServer.h.

Referenced by processCommandsUntilSimStep().

std::map<int, CmdExecutor> traci::TraCIServer::myExecutors
private

Map of commandIds -> their executors; applicable if the executor applies to the method footprint.

Definition at line 343 of file TraCIServer.h.

Referenced by dispatchCommand(), openSocket(), processSingleSubscription(), and TraCIServer().

bool traci::TraCIServer::myHaveWarnedDeprecation
private

Whether the usage of deprecated methods was already reported.

Definition at line 337 of file TraCIServer.h.

Referenced by dispatchCommand().

tcpip::Storage traci::TraCIServer::myInputStorage
private
TraCIServer * traci::TraCIServer::myInstance = 0
staticprivate

Singleton instance of the server.

Definition at line 315 of file TraCIServer.h.

Referenced by close(), getInstance(), openSocket(), and processCommandsUntilSimStep().

std::map<int, TraCIRTree*> traci::TraCIServer::myObjects
private

A storage of objects.

Definition at line 394 of file TraCIServer.h.

Referenced by collectObjectsInRange(), and ~TraCIServer().

tcpip::Storage traci::TraCIServer::myOutputStorage
private
tcpip::Socket* traci::TraCIServer::mySocket
private

The socket on which server is listening on.

Definition at line 321 of file TraCIServer.h.

Referenced by processCommandsUntilSimStep(), TraCIServer(), and ~TraCIServer().

std::vector<Subscription> traci::TraCIServer::mySubscriptions
private

The list of known, still valid subscriptions.

Definition at line 388 of file TraCIServer.h.

Referenced by initialiseSubscription(), postProcessSimulationStep2(), and removeSubscription().

SUMOTime traci::TraCIServer::myTargetTime
private

The time step to reach until processing the next commands.

Definition at line 324 of file TraCIServer.h.

Referenced by dispatchCommand(), getTargetTime(), and processCommandsUntilSimStep().

std::map<MSNet::VehicleState, std::vector<std::string> > traci::TraCIServer::myVehicleStateChanges
private

Changes in the states of simulated vehicles.

Definition at line 391 of file TraCIServer.h.

Referenced by getVehicleStateChanges(), postProcessSimulationStep2(), processCommandsUntilSimStep(), TraCIServer(), and vehicleStateChanged().

std::map<std::string, MSVehicle*> traci::TraCIServer::myVTDControlledVehicles
private

Definition at line 345 of file TraCIServer.h.

Referenced by postProcessVTD(), and setVTDControlled().


The documentation for this class was generated from the following files: