#include <TraCIServerAPIHelper.h>
Definition at line 43 of file TraCIServerAPIHelper.h.
Static Public Member Functions | |
| static void | writeStatusCmd (int commandId, int status, const std::string &description, tcpip::Storage &outputStorage) |
| Writes the status command. | |
Private Member Functions | |
| TraCIServerAPIHelper & | operator= (const TraCIServerAPIHelper &s) |
| invalidated assignment operator | |
| TraCIServerAPIHelper (const TraCIServerAPIHelper &s) | |
| invalidated copy constructor | |
| TraCIServerAPIHelper::TraCIServerAPIHelper | ( | const TraCIServerAPIHelper & | s | ) | [private] |
invalidated copy constructor
| TraCIServerAPIHelper& TraCIServerAPIHelper::operator= | ( | const TraCIServerAPIHelper & | s | ) | [private] |
invalidated assignment operator
| void TraCIServerAPIHelper::writeStatusCmd | ( | int | commandId, | |
| int | status, | |||
| const std::string & | description, | |||
| tcpip::Storage & | outputStorage | |||
| ) | [static] |
Writes the status command.
| [in] | commandId | The command id |
| [in] | status | The return status |
| [in] | description | The message |
| [out] | outputStorage | The storage to write the status to |
Definition at line 52 of file TraCIServerAPIHelper.cpp.
References MsgHandler::getErrorInstance(), MsgHandler::inform(), RTYPE_ERR, RTYPE_NOTIMPLEMENTED, toString(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCIServerAPI_VehicleType::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Simulation::processGet(), TraCIServerAPI_Route::processGet(), TraCIServerAPI_Polygon::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_MeMeDetector::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Junction::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_POI::processSet(), TraCIServerAPI_Lane::processSet(), TraCIServerAPI_Edge::processSet(), and traci::TraCIServer::processSingleSubscription().
00053 { 00054 if (status == RTYPE_ERR) { 00055 MsgHandler::getErrorInstance()->inform("Answered with error to command " + toString(commandId) + 00056 ": " + description); 00057 } else if (status == RTYPE_NOTIMPLEMENTED) { 00058 MsgHandler::getErrorInstance()->inform("Requested command not implemented (" + toString(commandId) + 00059 "): " + description); 00060 } 00061 // command length 00062 outputStorage.writeUnsignedByte(1 + 1 + 1 + 4 + static_cast<int>(description.length())); 00063 // command type 00064 outputStorage.writeUnsignedByte(commandId); 00065 // status 00066 outputStorage.writeUnsignedByte(status); 00067 // description 00068 outputStorage.writeString(description); 00069 return; 00070 }
1.5.6