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

APIs for getting/setting induction loop values via TraCI. More...

#include <TraCIServerAPI_InductionLoop.h>

Static Public Member Functions

static bool getPosition (const std::string &id, Position &p)
 Returns the named inductive loop's position. More...
 
static TraCIRTreegetTree ()
 Returns a tree filled with inductive loop instances. More...
 
static bool processGet (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a get value command (Command 0xa0: Get Induction Loop Variable) More...
 

Private Member Functions

TraCIServerAPI_InductionLoopoperator= (const TraCIServerAPI_InductionLoop &s)
 invalidated assignment operator More...
 
 TraCIServerAPI_InductionLoop (const TraCIServerAPI_InductionLoop &s)
 invalidated copy constructor More...
 

Detailed Description

APIs for getting/setting induction loop values via TraCI.

Definition at line 48 of file TraCIServerAPI_InductionLoop.h.

Constructor & Destructor Documentation

TraCIServerAPI_InductionLoop::TraCIServerAPI_InductionLoop ( const TraCIServerAPI_InductionLoop s)
private

invalidated copy constructor

Member Function Documentation

bool TraCIServerAPI_InductionLoop::getPosition ( const std::string &  id,
Position p 
)
static

Returns the named inductive loop's position.

Parameters
[in]idThe id of the searched inductive loop
[out]pThe position, if the inductive loop is known
Returns
Whether the inductive loop is known (and on road)

Definition at line 172 of file TraCIServerAPI_InductionLoop.cpp.

References NamedObjectCont< T >::get(), MSNet::getDetectorControl(), MSNet::getInstance(), MSMoveReminder::getLane(), MSInductLoop::getPosition(), MSLane::getShape(), MSDetectorControl::getTypedDetectors(), PositionVector::positionAtLengthPosition(), and SUMO_TAG_INDUCTION_LOOP.

Referenced by traci::TraCIServer::findObjectShape().

TraCIServerAPI_InductionLoop& TraCIServerAPI_InductionLoop::operator= ( const TraCIServerAPI_InductionLoop s)
private

invalidated assignment operator

bool TraCIServerAPI_InductionLoop::processGet ( traci::TraCIServer server,
tcpip::Storage inputStorage,
tcpip::Storage outputStorage 
)
static

Processes a get value command (Command 0xa0: Get Induction Loop Variable)

Parameters
[in]serverThe TraCI-server-instance which schedules this request
[in]inputStorageThe storage to read the command from
[out]outputStorageThe storage to write the result to

Definition at line 56 of file TraCIServerAPI_InductionLoop.cpp.

References CMD_GET_INDUCTIONLOOP_VARIABLE, MSInductLoop::collectVehiclesOnDet(), DELTA_T, MSInductLoop::VehicleData::entryTimeM, NamedObjectCont< T >::get(), MSInductLoop::getCurrentLength(), MSInductLoop::getCurrentOccupancy(), MSInductLoop::getCurrentPassedNumber(), MSInductLoop::getCurrentSpeed(), MSInductLoop::getCurrentVehicleIDs(), MSNet::getDetectorControl(), Named::getID(), MSNet::getInstance(), MSMoveReminder::getLane(), MSInductLoop::getPosition(), MSInductLoop::getTimestepsSinceLastDetection(), MSDetectorControl::getTypedDetectors(), ID_COUNT, ID_LIST, MSInductLoop::VehicleData::idM, NamedObjectCont< T >::insertIDs(), LAST_STEP_LENGTH, LAST_STEP_MEAN_SPEED, LAST_STEP_OCCUPANCY, LAST_STEP_TIME_SINCE_DETECTION, LAST_STEP_VEHICLE_DATA, LAST_STEP_VEHICLE_ID_LIST, LAST_STEP_VEHICLE_NUMBER, MSInductLoop::VehicleData::leaveTimeM, MSInductLoop::VehicleData::lengthM, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RESPONSE_GET_INDUCTIONLOOP_VARIABLE, RTYPE_ERR, RTYPE_OK, SUMO_TAG_INDUCTION_LOOP, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, MSInductLoop::VehicleData::typeIDM, VAR_LANE_ID, VAR_POSITION, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), traci::TraCIServer::writeResponseWithLength(), traci::TraCIServer::writeStatusCmd(), tcpip::Storage::writeStorage(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().

Referenced by traci::TraCIServer::TraCIServer().


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