SUMO - Simulation of Urban MObility
TraCIServerAPI_InductionLoop Class Reference

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

#include <TraCIServerAPI_InductionLoop.h>

Collaboration diagram for TraCIServerAPI_InductionLoop:
Collaboration graph

Static Public Member Functions

static bool getPosition (const std::string &id, Position &p)
 Returns the named inductive loop's position. More...
 
static bool processGet (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 46 of file TraCIServerAPI_InductionLoop.h.

Constructor & Destructor Documentation

◆ TraCIServerAPI_InductionLoop()

TraCIServerAPI_InductionLoop::TraCIServerAPI_InductionLoop ( const TraCIServerAPI_InductionLoop s)
private

invalidated copy constructor

Member Function Documentation

◆ getPosition()

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 152 of file TraCIServerAPI_InductionLoop.cpp.

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

Referenced by TraCIServer::findObjectShape().

◆ operator=()

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

invalidated assignment operator

◆ processGet()

bool TraCIServerAPI_InductionLoop::processGet ( 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 46 of file TraCIServerAPI_InductionLoop.cpp.

References CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::TraCIVehicleData::entryTime, libsumo::InductionLoop::getIDCount(), libsumo::InductionLoop::getIDList(), libsumo::InductionLoop::getLaneID(), libsumo::InductionLoop::getLastStepMeanLength(), libsumo::InductionLoop::getLastStepMeanSpeed(), libsumo::InductionLoop::getLastStepOccupancy(), libsumo::InductionLoop::getLastStepVehicleIDs(), libsumo::InductionLoop::getLastStepVehicleNumber(), libsumo::InductionLoop::getPosition(), libsumo::InductionLoop::getTimeSinceDetection(), libsumo::InductionLoop::getVehicleData(), libsumo::TraCIVehicleData::id, ID_COUNT, ID_LIST, 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, libsumo::TraCIVehicleData::leaveTime, libsumo::TraCIVehicleData::length, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RESPONSE_GET_INDUCTIONLOOP_VARIABLE, RTYPE_OK, toHex(), TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, libsumo::TraCIVehicleData::typeID, VAR_LANE_ID, VAR_POSITION, tcpip::Storage::writeDouble(), TraCIServer::writeErrorStatusCmd(), tcpip::Storage::writeInt(), TraCIServer::writeResponseWithLength(), TraCIServer::writeStatusCmd(), tcpip::Storage::writeStorage(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().

Referenced by TraCIServer::TraCIServer().


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