![]() |
Eclipse SUMO - Simulation of Urban MObility
|
APIs for getting/setting simulation values via TraCI. More...
#include <TraCIServerAPI_Simulation.h>
Static Public Member Functions | |
| static bool | processGet (TraCIServer &server, tcpip::Storage &inputStorage, const std::string &objID, const int variable) |
| Processes a get value command (Command 0xab: Get Simulation Variable) | |
| static bool | processSet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
| Processes a set value command (Command 0xcb: Set Simulation Variable) | |
Private Member Functions | |
| TraCIServerAPI_Simulation & | operator= (const TraCIServerAPI_Simulation &s) |
| invalidated assignment operator | |
| TraCIServerAPI_Simulation (const TraCIServerAPI_Simulation &s) | |
| invalidated copy constructor | |
Static Private Member Functions | |
| static void | commandDistanceRequest (tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
| static void | commandPositionConversion (tcpip::Storage &inputStorage, const int compoundSize, tcpip::Storage &outputStorage) |
| static void | writeTransportableStateIDs (TraCIServer &server, tcpip::Storage &outputStorage, MSNet::TransportableState state) |
| static void | writeTransportableStateNumber (TraCIServer &server, tcpip::Storage &outputStorage, MSNet::TransportableState state) |
| static void | writeVehicleStateIDs (TraCIServer &server, tcpip::Storage &outputStorage, MSNet::VehicleState state) |
| static void | writeVehicleStateNumber (TraCIServer &server, tcpip::Storage &outputStorage, MSNet::VehicleState state) |
APIs for getting/setting simulation values via TraCI.
Definition at line 38 of file TraCIServerAPI_Simulation.h.
|
private |
invalidated copy constructor
|
staticprivate |
Definition at line 426 of file TraCIServerAPI_Simulation.cpp.
References libsumo::Helper::convertCartesianToRoadMap(), Position::distanceTo(), libsumo::Helper::getDrivingDistance(), GeoConvHelper::getFinal(), libsumo::Helper::getLaneChecking(), libsumo::POSITION_2D, libsumo::POSITION_3D, libsumo::POSITION_LON_LAT, libsumo::POSITION_LON_LAT_ALT, libsumo::POSITION_ROADMAP, tcpip::Storage::readDouble(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), libsumo::REQUEST_DRIVINGDIST, Position::set(), SVC_IGNORING, libsumo::StorageHelper::writeTypedDouble(), and GeoConvHelper::x2cartesian_const().
Referenced by processGet().
|
staticprivate |
Definition at line 335 of file TraCIServerAPI_Simulation.cpp.
References GeoConvHelper::cartesian2geo(), libsumo::Helper::convertCartesianToRoadMap(), MSLane::geometryPositionAtOffset(), GeoConvHelper::getFinal(), libsumo::Helper::getLaneChecking(), libsumo::POSITION_2D, libsumo::POSITION_3D, libsumo::POSITION_LON_LAT, libsumo::POSITION_LON_LAT_ALT, libsumo::POSITION_ROADMAP, tcpip::Storage::readDouble(), tcpip::Storage::readString(), libsumo::StorageHelper::readTypedUnsignedByte(), tcpip::Storage::readUnsignedByte(), Position::set(), SumoVehicleClassStrings, SVC_IGNORING, tcpip::Storage::writeDouble(), tcpip::Storage::writeString(), tcpip::Storage::writeUnsignedByte(), Position::x(), GeoConvHelper::x2cartesian_const(), Position::y(), and Position::z().
Referenced by processGet().
|
private |
invalidated assignment operator
|
static |
Processes a get value command (Command 0xab: Get Simulation Variable)
| [in] | server | The TraCI-server-instance which schedules this request |
| [in] | inputStorage | The storage to read the command from |
| [out] | outputStorage | The storage to write the result to |
Definition at line 47 of file TraCIServerAPI_Simulation.cpp.
References MSNet::ARRIVED, MSNet::BUILT, MSNet::COLLISION, commandDistanceRequest(), commandPositionConversion(), MSNet::DEPARTED, libsumo::DISTANCE_REQUEST, MSNet::EMERGENCYSTOP, MSNet::ENDING_PARKING, MSNet::ENDING_STOP, MSNet::ENDING_TELEPORT, libsumo::FIND_INTERMODAL_ROUTE, libsumo::FIND_ROUTE, TraCIServer::getWrapperStorage(), libsumo::INVALID_DOUBLE_VALUE, MSNet::MANEUVERING, MSNet::PERSON_ARRIVED, MSNet::PERSON_DEPARTED, libsumo::POSITION_CONVERSION, libsumo::StorageHelper::readCompound(), tcpip::Storage::readInt(), libsumo::StorageHelper::readTypedDouble(), libsumo::StorageHelper::readTypedInt(), libsumo::StorageHelper::readTypedString(), tcpip::Storage::readUnsignedByte(), MSNet::STARTING_PARKING, MSNet::STARTING_STOP, MSNet::STARTING_TELEPORT, toHex(), libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_POLYGON, libsumo::TYPE_STRING, libsumo::TraCIPositionVector::value, libsumo::VAR_ARRIVED_PERSONS_IDS, libsumo::VAR_ARRIVED_PERSONS_NUMBER, libsumo::VAR_ARRIVED_VEHICLES_IDS, libsumo::VAR_ARRIVED_VEHICLES_NUMBER, libsumo::VAR_COLLIDING_VEHICLES_IDS, libsumo::VAR_COLLIDING_VEHICLES_NUMBER, libsumo::VAR_COLLISIONS, libsumo::VAR_DEPARTED_PERSONS_IDS, libsumo::VAR_DEPARTED_PERSONS_NUMBER, libsumo::VAR_DEPARTED_VEHICLES_IDS, libsumo::VAR_DEPARTED_VEHICLES_NUMBER, libsumo::VAR_EMERGENCYSTOPPING_VEHICLES_IDS, libsumo::VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER, libsumo::VAR_LOADED_VEHICLES_IDS, libsumo::VAR_LOADED_VEHICLES_NUMBER, libsumo::VAR_NET_BOUNDING_BOX, libsumo::VAR_PARKING_ENDING_VEHICLES_IDS, libsumo::VAR_PARKING_ENDING_VEHICLES_NUMBER, libsumo::VAR_PARKING_MANEUVERING_VEHICLES_IDS, libsumo::VAR_PARKING_MANEUVERING_VEHICLES_NUMBER, libsumo::VAR_PARKING_STARTING_VEHICLES_IDS, libsumo::VAR_PARKING_STARTING_VEHICLES_NUMBER, libsumo::VAR_STOP_ENDING_VEHICLES_IDS, libsumo::VAR_STOP_ENDING_VEHICLES_NUMBER, libsumo::VAR_STOP_STARTING_VEHICLES_IDS, libsumo::VAR_STOP_STARTING_VEHICLES_NUMBER, libsumo::VAR_TELEPORT_ENDING_VEHICLES_IDS, libsumo::VAR_TELEPORT_ENDING_VEHICLES_NUMBER, libsumo::VAR_TELEPORT_STARTING_VEHICLES_IDS, libsumo::VAR_TELEPORT_STARTING_VEHICLES_NUMBER, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), libsumo::StorageHelper::writeStage(), tcpip::Storage::writeString(), writeTransportableStateIDs(), writeTransportableStateNumber(), tcpip::Storage::writeUnsignedByte(), writeVehicleStateIDs(), and writeVehicleStateNumber().
Referenced by TraCIServer::processGet().
|
static |
Processes a set value command (Command 0xcb: Set Simulation Variable)
| [in] | server | The TraCI-server-instance which schedules this request |
| [in] | inputStorage | The storage to read the command from |
| [out] | outputStorage | The storage to write the result to |
Definition at line 248 of file TraCIServerAPI_Simulation.cpp.
References libsumo::CMD_CLEAR_PENDING_VEHICLES, libsumo::CMD_LOAD_SIMSTATE, libsumo::CMD_MESSAGE, libsumo::CMD_SAVE_SIMSTATE, libsumo::CMD_SET_SIM_VARIABLE, TraCIServer::getInstance(), libsumo::StorageHelper::readCompound(), tcpip::Storage::readString(), libsumo::StorageHelper::readTypedDouble(), libsumo::StorageHelper::readTypedString(), tcpip::Storage::readUnsignedByte(), libsumo::RTYPE_OK, TraCIServer::stateLoaded(), TIME2STEPS, toHex(), libsumo::VAR_PARAMETER, libsumo::VAR_SCALE, TraCIServer::writeErrorStatusCmd(), and TraCIServer::writeStatusCmd().
Referenced by TraCIServer::TraCIServer().
|
staticprivate |
Definition at line 329 of file TraCIServerAPI_Simulation.cpp.
References TraCIServer::getTransportableStateChanges(), and libsumo::StorageHelper::writeTypedStringList().
Referenced by processGet().
|
staticprivate |
Definition at line 323 of file TraCIServerAPI_Simulation.cpp.
References TraCIServer::getTransportableStateChanges(), and libsumo::StorageHelper::writeTypedInt().
Referenced by processGet().
|
staticprivate |
Definition at line 317 of file TraCIServerAPI_Simulation.cpp.
References TraCIServer::getVehicleStateChanges(), and libsumo::StorageHelper::writeTypedStringList().
Referenced by processGet().
|
staticprivate |
Definition at line 311 of file TraCIServerAPI_Simulation.cpp.
References TraCIServer::getVehicleStateChanges(), and libsumo::StorageHelper::writeTypedInt().
Referenced by processGet().