![]() |
Eclipse SUMO - Simulation of Urban MObility
|
A test execution class. More...
#include <TraCITestClient.h>
Public Member Functions | |
| std::pair< int, std::string > | getVersion () |
| return TraCI API and SUMO version | |
| void | load (const std::vector< std::string > &args) |
| Let sumo load a simulation using the given command line like options. | |
| int | run (std::string fileName, int port, std::string host="localhost") |
| Runs a test. | |
| void | simulationStep (double time=0) |
| Advances by one step (or up to the given time). | |
| TraCITestClient (std::string outputFileName="testclient_result.out") | |
| Constructor. | |
| ~TraCITestClient () | |
| Destructor. | |
Connection handling | |
| void | connect (const std::string &host, int port) |
| Connects to the specified SUMO server. | |
| void | setOrder (int order) |
| set priority (execution order) for the client | |
| void | close () |
| ends the simulation and closes the connection | |
Data Fields | |
| EdgeScope | edge |
| Scope for interaction with edges. | |
| GUIScope | gui |
| Scope for interaction with the gui. | |
| InductionLoopScope | inductionloop |
| Scope for interaction with inductive loops. | |
| JunctionScope | junction |
| Scope for interaction with junctions. | |
| LaneScope | lane |
| Scope for interaction with lanes. | |
| LaneAreaScope | lanearea |
| Scope for interaction with lanes. | |
| MeMeScope | multientryexit |
| Scope for interaction with multi-entry/-exit detectors. | |
| PersonScope | person |
| Scope for interaction with persons. | |
| POIScope | poi |
| Scope for interaction with POIs. | |
| PolygonScope | polygon |
| Scope for interaction with polygons. | |
| RerouterScope | rerouter |
| Scope for interaction with rerouters. | |
| RouteScope | route |
| Scope for interaction with routes. | |
| RouteProbeScope | routeprobe |
| Scope for interaction with route probes. | |
| SimulationScope | simulation |
| Scope for interaction with the simulation. | |
| TrafficLightScope | trafficlights |
| Scope for interaction with traffic lights. | |
| VehicleScope | vehicle |
| Scope for interaction with vehicles. | |
| VehicleTypeScope | vehicletype |
| Scope for interaction with vehicle types. | |
Protected Member Functions | |
| void | closeSocket () |
| Closes the connection. | |
| void | readContextSubscription (int cmdId, tcpip::Storage &inMsg) |
| void | readVariables (tcpip::Storage &inMsg, const std::string &objectID, int variableCount, libsumo::SubscriptionResults &into) |
| void | readVariableSubscription (int cmdId, tcpip::Storage &inMsg) |
Commands handling | |
| void | commandSimulationStep (double time) |
| Sends and validates a simulation step command. | |
| void | commandClose () |
| Sends and validates a Close command. | |
| void | commandSetOrder (int order) |
| Sends and validates a SetOrder command. | |
| void | commandGetVariable (int domID, int varID, const std::string &objID, tcpip::Storage *addData=0) |
| Sends and validates a GetVariable command. | |
| void | commandSetValue (int domID, int varID, const std::string &objID, std::ifstream &defFile) |
| Sends and validates a SetVariable command. | |
| void | commandSubscribeObjectVariable (int domID, const std::string &objID, double beginTime, double endTime, int varNo, std::ifstream &defFile) |
| Sends and validates a SubscribeVariable command. | |
| void | commandSubscribeContextVariable (int domID, const std::string &objID, double beginTime, double endTime, int domain, double range, int varNo, std::ifstream &defFile) |
| Sends and validates a SubscribeContext command. | |
Command sending methods | |
| void | send_commandSimulationStep (double time) const |
| Sends a SimulationStep command. | |
| void | send_commandClose () const |
| Sends a Close command. | |
| void | send_commandSetOrder (int order) const |
| Sends a SetOrder command. | |
| void | createCommand (int cmdID, int varID, const std::string &objID, tcpip::Storage *add=nullptr) const |
| Sends a GetVariable / SetVariable request if mySocket is connected. Otherwise writes to myOutput only. | |
| void | createFilterCommand (int cmdID, int varID, tcpip::Storage *add=nullptr) const |
| void | send_commandSubscribeObjectVariable (int domID, const std::string &objID, double beginTime, double endTime, const std::vector< int > &vars) const |
| Sends a SubscribeVariable request. | |
| void | send_commandSubscribeObjectContext (int domID, const std::string &objID, double beginTime, double endTime, int domain, double range, const std::vector< int > &vars) const |
| Sends a SubscribeContext request. | |
| void | check_resultState (tcpip::Storage &inMsg, int command, bool ignoreCommandId=false, std::string *acknowledgement=0) const |
| Validates the result state of a command. | |
| int | check_commandGetResult (tcpip::Storage &inMsg, int command, int expectedType=-1, bool ignoreCommandId=false) const |
| Validates the result state of a command. | |
| bool | processGet (int command, int expectedType, bool ignoreCommandId=false) |
| bool | processSet (int command) |
Static Protected Member Functions | |
| template<class T> | |
| static std::string | toString (const T &t, std::streamsize accuracy=PRECISION) |
Protected Attributes | |
| std::map< int, TraCIScopeWrapper * > | myDomains |
| tcpip::Storage | myInput |
| The reusable input storage. | |
| tcpip::Storage | myOutput |
| The reusable output storage. | |
| tcpip::Socket * | mySocket |
| The socket. | |
Private Member Functions | |
| std::string | joinToString (const std::map< std::string, std::string > &m) |
| std::string | joinToString (const std::vector< double > &v, const std::string &between) |
| std::string | joinToString (const std::vector< std::string > &s, const std::string &between) |
| void | testAPI () |
| call all API methods once | |
Report helper | |
| void | writeResult () |
| Writes the results file. | |
| void | errorMsg (std::stringstream &msg) |
| Writes an error message. | |
Results validation methods | |
| bool | validateSimulationStep2 (tcpip::Storage &inMsg) |
| Validates whether the given message is a valid answer to CMD_SIMSTEP. | |
| bool | validateSubscription (tcpip::Storage &inMsg) |
| Validates whether the given message is a valid subscription return message. | |
Conversion helper | |
| int | setValueTypeDependant (tcpip::Storage &into, std::ifstream &defFile, std::stringstream &msg) |
| Parses the next value type / value pair from the stream and inserts it into the storage. | |
| void | readAndReportTypeDependent (tcpip::Storage &inMsg, int valueDataType) |
| Reads a value of the given type from the given storage and reports it. | |
Private Attributes | |
| std::stringstream | answerLog |
| Stream containing the log. | |
| std::string | outputFileName |
| The name of the file to write the results log into. | |
A test execution class.
Reads a program file and executes the actions stored within it
Definition at line 42 of file TraCITestClient.h.
| TraCITestClient::TraCITestClient | ( | std::string | outputFileName = "testclient_result.out" | ) |
Constructor.
| [in] | outputFileName | The name of the file the outputs will be written into |
Definition at line 53 of file TraCITestClient.cpp.
References answerLog, and outputFileName.
| TraCITestClient::~TraCITestClient | ( | ) |
|
protectedinherited |
Validates the result state of a command.
Definition at line 304 of file TraCIAPI.cpp.
References tcpip::Storage::position(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), and toString().
Referenced by TraCITestClient::commandGetVariable(), processGet(), and simulationStep().
|
protectedinherited |
Validates the result state of a command.
| [in] | inMsg | The buffer to read the message from |
| [in] | command | The original command id |
| [in] | ignoreCommandId | Whether the returning command id shall be validated |
| [in] | acknowledgement | Pointer to an existing string into which the acknowledgement message shall be inserted |
Definition at line 265 of file TraCIAPI.cpp.
References mySocket, tcpip::Storage::position(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), libsumo::RTYPE_ERR, libsumo::RTYPE_NOTIMPLEMENTED, libsumo::RTYPE_OK, and toString().
Referenced by close(), TraCITestClient::commandClose(), TraCITestClient::commandGetVariable(), TraCITestClient::commandSetOrder(), TraCITestClient::commandSetValue(), TraCITestClient::commandSimulationStep(), TraCITestClient::commandSubscribeContextVariable(), TraCITestClient::commandSubscribeObjectVariable(), getVersion(), load(), processGet(), processSet(), setOrder(), and simulationStep().
|
inherited |
ends the simulation and closes the connection
Definition at line 101 of file TraCIAPI.cpp.
References check_resultState(), closeSocket(), libsumo::CMD_CLOSE, and send_commandClose().
|
protectedinherited |
Closes the connection.
Definition at line 111 of file TraCIAPI.cpp.
References mySocket.
Referenced by close(), and TraCITestClient::run().
|
protected |
Sends and validates a Close command.
Definition at line 196 of file TraCITestClient.cpp.
References answerLog, TraCIAPI::check_resultState(), libsumo::CMD_CLOSE, and TraCIAPI::send_commandClose().
Referenced by run().
|
protected |
Sends and validates a GetVariable command.
| [in] | domID | The ID of the domain the addressed object belongs to |
| [in] | varID | The ID of the variable one asks for |
| [in] | objID | The ID of the object a variable shall be retrieved from |
| [in] | addData | Storage to read additional data from, if needed |
Definition at line 226 of file TraCITestClient.cpp.
References answerLog, TraCIAPI::check_commandGetResult(), TraCIAPI::check_resultState(), TraCIAPI::createCommand(), errorMsg(), TraCIAPI::myOutput, TraCIAPI::mySocket, readAndReportTypeDependent(), tcpip::Storage::readString(), and tcpip::Storage::readUnsignedByte().
Referenced by run().
|
protected |
Sends and validates a SetOrder command.
Definition at line 211 of file TraCITestClient.cpp.
References answerLog, TraCIAPI::check_resultState(), libsumo::CMD_SETORDER, and TraCIAPI::send_commandSetOrder().
Referenced by run().
|
protected |
Sends and validates a SetVariable command.
| [in] | domID | The ID of the domain the addressed object belongs to |
| [in] | varID | The ID of the variable to set |
| [in] | objID | The ID of the object which shall be changed |
| [in] | defFile | Storage to read additional data from |
Definition at line 260 of file TraCITestClient.cpp.
References answerLog, TraCIAPI::check_resultState(), TraCIAPI::createCommand(), errorMsg(), TraCIAPI::myOutput, TraCIAPI::mySocket, and setValueTypeDependant().
Referenced by run().
|
protected |
Sends and validates a simulation step command.
| [in] | time | The time step to send |
Definition at line 180 of file TraCITestClient.cpp.
References answerLog, TraCIAPI::check_resultState(), libsumo::CMD_SIMSTEP, TraCIAPI::send_commandSimulationStep(), and validateSimulationStep2().
Referenced by run().
|
protected |
Sends and validates a SubscribeContext command.
| [in] | domID | The ID of the domain the addressed object belongs to |
| [in] | objID | The ID of the object a variable shall be subscribed from |
| [in] | beginTime | The time the subscription shall begin at |
| [in] | endTime | The time the subscription shall end at |
| [in] | domain | The domain of the objects which shall be reported |
| [in] | range | The range within which objects shall be for being reported |
| [in] | varNo | The number of subscribed variables |
| [in] | defFile | The stream to read variable values from |
Definition at line 308 of file TraCITestClient.cpp.
References answerLog, TraCIAPI::check_resultState(), TraCIAPI::send_commandSubscribeObjectContext(), and validateSubscription().
Referenced by run().
|
protected |
Sends and validates a SubscribeVariable command.
| [in] | domID | The ID of the domain the addressed object belongs to |
| [in] | objID | The ID of the object a variable shall be subscribed from |
| [in] | beginTime | The time the subscription shall begin at |
| [in] | endTime | The time the subscription shall end at |
| [in] | varNo | The number of subscribed variables |
| [in] | defFile | The stream to read variable values from |
Definition at line 284 of file TraCITestClient.cpp.
References answerLog, TraCIAPI::check_resultState(), TraCIAPI::send_commandSubscribeObjectVariable(), and validateSubscription().
Referenced by run().
|
inherited |
Connects to the specified SUMO server.
| [in] | host | The name of the host to connect to |
| [in] | port | The port to connect to |
| tcpip::SocketException | if the connection fails |
Definition at line 73 of file TraCIAPI.cpp.
References mySocket.
Referenced by TraCITestClient::joinToString(), TraCITestClient::joinToString(), TraCITestClient::joinToString(), and TraCITestClient::run().
|
protectedinherited |
Sends a GetVariable / SetVariable request if mySocket is connected. Otherwise writes to myOutput only.
| [in] | cmdID | The command and domain of the variable |
| [in] | varID | The variable to retrieve |
| [in] | objID | The object to retrieve the variable from |
| [in] | add | Optional additional parameter |
Definition at line 159 of file TraCIAPI.cpp.
References myOutput, and tcpip::Storage::size().
Referenced by TraCITestClient::commandGetVariable(), and TraCITestClient::commandSetValue().
|
protectedinherited |
Definition at line 183 of file TraCIAPI.cpp.
References myOutput, and tcpip::Storage::size().
|
private |
Writes an error message.
| [in] | msg | The message to write |
Definition at line 351 of file TraCITestClient.cpp.
References answerLog.
Referenced by commandGetVariable(), commandSetValue(), and run().
|
inherited |
return TraCI API and SUMO version
Definition at line 484 of file TraCIAPI.cpp.
References check_resultState(), libsumo::CMD_GETVERSION, mySocket, tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inlineprivate |
Definition at line 200 of file TraCITestClient.h.
References TraCIAPI::connect().
|
inlineprivate |
Definition at line 214 of file TraCITestClient.h.
References TraCIAPI::connect().
|
inlineprivate |
Definition at line 186 of file TraCITestClient.h.
References TraCIAPI::connect().
Referenced by testAPI().
|
inherited |
Let sumo load a simulation using the given command line like options.
Definition at line 466 of file TraCIAPI.cpp.
References check_resultState(), libsumo::CMD_LOAD, mySocket, libsumo::TYPE_STRINGLIST, tcpip::Storage::writeInt(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 328 of file TraCIAPI.cpp.
References check_commandGetResult(), check_resultState(), myInput, myOutput, and mySocket.
|
protectedinherited |
Definition at line 341 of file TraCIAPI.cpp.
References check_resultState(), myInput, myOutput, and mySocket.
|
private |
Reads a value of the given type from the given storage and reports it.
| [in] | inMsg | The storage to read the value from |
| [in] | valueDataType | The type of the expected value |
Definition at line 568 of file TraCITestClient.cpp.
References answerLog, libsumo::POSITION_2D, libsumo::POSITION_3D, libsumo::POSITION_ROADMAP, readAndReportTypeDependent(), tcpip::Storage::readByte(), tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readStringList(), tcpip::Storage::readUnsignedByte(), libsumo::TYPE_BYTE, libsumo::TYPE_COLOR, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_POLYGON, libsumo::TYPE_STRING, libsumo::TYPE_STRINGLIST, and libsumo::TYPE_UBYTE.
Referenced by commandGetVariable(), readAndReportTypeDependent(), and validateSubscription().
|
protectedinherited |
Definition at line 429 of file TraCIAPI.cpp.
References myDomains, tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), and readVariables().
Referenced by simulationStep().
|
protectedinherited |
Definition at line 353 of file TraCIAPI.cpp.
References n, libsumo::POSITION_2D, libsumo::POSITION_3D, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), libsumo::RTYPE_OK, toString(), libsumo::TYPE_COLOR, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_STRING, and libsumo::TYPE_STRINGLIST.
Referenced by readContextSubscription(), and readVariableSubscription().
|
protectedinherited |
Definition at line 421 of file TraCIAPI.cpp.
References myDomains, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), and readVariables().
Referenced by simulationStep().
| int TraCITestClient::run | ( | std::string | fileName, |
| int | port, | ||
| std::string | host = "localhost" ) |
Runs a test.
| [in] | fileName | The name of the file containing the test script |
| [in] | port | The server port to connect to |
| [in] | host | The server name to connect to |
Definition at line 67 of file TraCITestClient.cpp.
References TraCIAPI::closeSocket(), commandClose(), commandGetVariable(), commandSetOrder(), commandSetValue(), commandSimulationStep(), commandSubscribeContextVariable(), commandSubscribeObjectVariable(), TraCIAPI::connect(), errorMsg(), setValueTypeDependant(), and testAPI().
Referenced by main().
|
protectedinherited |
Sends a Close command.
Definition at line 135 of file TraCIAPI.cpp.
References libsumo::CMD_CLOSE, mySocket, and tcpip::Storage::writeUnsignedByte().
Referenced by close(), and TraCITestClient::commandClose().
|
protectedinherited |
Sends a SetOrder command.
Definition at line 146 of file TraCIAPI.cpp.
References libsumo::CMD_SETORDER, mySocket, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::commandSetOrder().
|
protectedinherited |
Sends a SimulationStep command.
Definition at line 122 of file TraCIAPI.cpp.
References libsumo::CMD_SIMSTEP, mySocket, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::commandSimulationStep(), and simulationStep().
|
protectedinherited |
Sends a SubscribeContext request.
| [in] | domID | The domain of the variable |
| [in] | objID | The object to subscribe the variables from |
| [in] | beginTime | The begin time step of subscriptions |
| [in] | endTime | The end time step of subscriptions |
| [in] | domain | The domain of the objects which values shall be returned |
| [in] | range | The range around the obj to investigate |
| [in] | vars | The variables to subscribe |
Definition at line 234 of file TraCIAPI.cpp.
References mySocket, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::commandSubscribeContextVariable().
|
protectedinherited |
Sends a SubscribeVariable request.
| [in] | domID | The domain of the variable |
| [in] | objID | The object to subscribe the variables from |
| [in] | beginTime | The begin time step of subscriptions |
| [in] | endTime | The end time step of subscriptions |
| [in] | vars | The variables to subscribe |
Definition at line 206 of file TraCIAPI.cpp.
References mySocket, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::commandSubscribeObjectVariable().
|
inherited |
set priority (execution order) for the client
Definition at line 86 of file TraCIAPI.cpp.
References check_resultState(), libsumo::CMD_SETORDER, mySocket, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
private |
Parses the next value type / value pair from the stream and inserts it into the storage.
| [out] | into | The storage to add the value type and the value into |
| [in] | defFile | The file to read the values from |
| [out] | msg | If any error occurs, this should be filled |
Definition at line 437 of file TraCITestClient.cpp.
References libsumo::POSITION_2D, libsumo::POSITION_3D, libsumo::POSITION_ROADMAP, libsumo::REQUEST_AIRDIST, libsumo::REQUEST_DRIVINGDIST, setValueTypeDependant(), libsumo::TYPE_BYTE, libsumo::TYPE_COLOR, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_POLYGON, libsumo::TYPE_STRING, libsumo::TYPE_STRINGLIST, libsumo::TYPE_UBYTE, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().
Referenced by commandSetValue(), run(), and setValueTypeDependant().
|
inherited |
Advances by one step (or up to the given time).
Definition at line 444 of file TraCIAPI.cpp.
References check_commandGetResult(), check_resultState(), libsumo::CMD_SIMSTEP, myDomains, readContextSubscription(), tcpip::Storage::readInt(), readVariableSubscription(), libsumo::RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE, libsumo::RESPONSE_SUBSCRIBE_PERSON_VARIABLE, and send_commandSimulationStep().
Referenced by TraCITestClient::testAPI().
|
private |
call all API methods once
Definition at line 646 of file TraCITestClient.cpp.
References libsumo::TraCIColor::a, answerLog, libsumo::TraCIConnection::approachedInternal, libsumo::TraCIConnection::approachedLane, libsumo::TraCIStage::arrivalPos, libsumo::TraCIColor::b, libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::TraCIConnection::direction, libsumo::TraCINextTLSData::dist, TraCIAPI::edge, libsumo::TraCIStage::edges, libsumo::TraCIVehicleData::entryTime, libsumo::TraCIColor::g, libsumo::TraCIPositionVector::getString(), TraCIAPI::getVersion(), TraCIAPI::gui, libsumo::TraCIConnection::hasFoe, libsumo::TraCIConnection::hasPrio, libsumo::TraCINextTLSData::id, libsumo::TraCIVehicleData::id, TraCIAPI::inductionloop, libsumo::TraCIConnection::isOpen, joinToString(), TraCIAPI::junction, TraCIAPI::lane, libsumo::TraCIVehicleData::leaveTime, libsumo::TraCIConnection::length, libsumo::TraCIVehicleData::length, TraCIAPI::load(), TraCIAPI::person, libsumo::TraCILogic::phases, TraCIAPI::poi, TraCIAPI::polygon, libsumo::TraCIColor::r, TraCIAPI::route, libsumo::ROUTING_MODE_AGGREGATED, TraCIAPI::setOrder(), TraCIAPI::VehicleScope::SIGNAL_FOGLIGHT, TraCIAPI::simulation, TraCIAPI::simulationStep(), libsumo::STAGE_WALKING, libsumo::TraCIConnection::state, libsumo::TraCINextTLSData::state, libsumo::TraCINextTLSData::tlIndex, TraCIAPI::trafficlights, libsumo::TraCIVehicleData::typeID, libsumo::TraCIPositionVector::value, libsumo::VAR_LANEPOSITION, libsumo::VAR_ROAD_ID, libsumo::VAR_SPEED, TraCIAPI::vehicle, and TraCIAPI::vehicletype.
Referenced by run().
|
inlinestaticprotectedinherited |
Definition at line 942 of file TraCIAPI.h.
References PRECISION.
Referenced by TraCIAPI::VehicleScope::add(), check_commandGetResult(), check_resultState(), and readVariables().
|
private |
Validates whether the given message is a valid answer to CMD_SIMSTEP.
| [in] | inMsg | The storage contain the message to validate |
Definition at line 362 of file TraCITestClient.cpp.
References answerLog, tcpip::Storage::readInt(), and validateSubscription().
Referenced by commandSimulationStep().
|
private |
Validates whether the given message is a valid subscription return message.
| [in] | inMsg | The storage contain the message to validate |
Definition at line 379 of file TraCITestClient.cpp.
References answerLog, readAndReportTypeDependent(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), libsumo::RESPONSE_SUBSCRIBE_GUI_CONTEXT, libsumo::RESPONSE_SUBSCRIBE_GUI_VARIABLE, libsumo::RESPONSE_SUBSCRIBE_INDUCTIONLOOP_CONTEXT, libsumo::RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE, and libsumo::RTYPE_OK.
Referenced by commandSubscribeContextVariable(), commandSubscribeObjectVariable(), and validateSimulationStep2().
|
private |
Writes the results file.
Definition at line 335 of file TraCITestClient.cpp.
References answerLog, and outputFileName.
Referenced by ~TraCITestClient().
|
private |
Stream containing the log.
Definition at line 233 of file TraCITestClient.h.
Referenced by commandClose(), commandGetVariable(), commandSetOrder(), commandSetValue(), commandSimulationStep(), commandSubscribeContextVariable(), commandSubscribeObjectVariable(), errorMsg(), readAndReportTypeDependent(), testAPI(), TraCITestClient(), validateSimulationStep2(), validateSubscription(), and writeResult().
|
inherited |
Scope for interaction with edges.
Definition at line 829 of file TraCIAPI.h.
Referenced by TraCIAPI::VehicleScope::getApparentDecel(), TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with the gui.
Definition at line 831 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with inductive loops.
Definition at line 833 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with junctions.
Definition at line 835 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with lanes.
Definition at line 837 of file TraCIAPI.h.
Referenced by TraCIAPI::VehicleScope::getApparentDecel(), TraCIAPI::VehicleScope::moveToXY(), TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with lanes.
Definition at line 839 of file TraCIAPI.h.
Referenced by TraCIAPI().
|
inherited |
Scope for interaction with multi-entry/-exit detectors.
Definition at line 841 of file TraCIAPI.h.
Referenced by TraCIAPI().
|
protectedinherited |
Definition at line 954 of file TraCIAPI.h.
Referenced by readContextSubscription(), readVariableSubscription(), simulationStep(), and TraCIAPI().
|
mutableprotectedinherited |
The reusable input storage.
Definition at line 960 of file TraCIAPI.h.
Referenced by processGet(), and processSet().
|
mutableprotectedinherited |
The reusable output storage.
Definition at line 958 of file TraCIAPI.h.
Referenced by TraCITestClient::commandGetVariable(), TraCITestClient::commandSetValue(), createCommand(), createFilterCommand(), processGet(), and processSet().
|
protectedinherited |
The socket.
Definition at line 956 of file TraCIAPI.h.
Referenced by check_resultState(), closeSocket(), TraCITestClient::commandGetVariable(), TraCITestClient::commandSetValue(), connect(), getVersion(), load(), processGet(), processSet(), send_commandClose(), send_commandSetOrder(), send_commandSimulationStep(), send_commandSubscribeObjectContext(), send_commandSubscribeObjectVariable(), setOrder(), TraCIAPI(), and ~TraCIAPI().
|
private |
The name of the file to write the results log into.
Definition at line 230 of file TraCITestClient.h.
Referenced by TraCITestClient(), and writeResult().
|
inherited |
Scope for interaction with persons.
Definition at line 843 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with POIs.
Definition at line 845 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with polygons.
Definition at line 847 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with rerouters.
Definition at line 849 of file TraCIAPI.h.
Referenced by TraCIAPI().
|
inherited |
Scope for interaction with routes.
Definition at line 851 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with route probes.
Definition at line 853 of file TraCIAPI.h.
Referenced by TraCIAPI().
|
inherited |
Scope for interaction with the simulation.
Definition at line 855 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with traffic lights.
Definition at line 857 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with vehicles.
Definition at line 859 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().
|
inherited |
Scope for interaction with vehicle types.
Definition at line 861 of file TraCIAPI.h.
Referenced by TraCITestClient::testAPI(), and TraCIAPI().