![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Scope for interaction with traffic lights. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | clearSubscriptionResults () |
const libsumo::ContextSubscriptionResults | getAllContextSubscriptionResults () const |
const libsumo::SubscriptionResults | getAllSubscriptionResults () const |
std::vector< libsumo::TraCILogic > | getCompleteRedYellowGreenDefinition (const std::string &tlsID) const |
const libsumo::SubscriptionResults | getContextSubscriptionResults (const std::string &objID) const |
std::vector< std::string > | getControlledLanes (const std::string &tlsID) const |
std::vector< std::vector< libsumo::TraCILink > > | getControlledLinks (const std::string &tlsID) const |
int | getIDCount () const |
std::vector< std::string > | getIDList () const |
libsumo::SubscriptionResults & | getModifiableContextSubscriptionResults (const std::string &objID) |
libsumo::SubscriptionResults & | getModifiableSubscriptionResults () |
double | getNextSwitch (const std::string &tlsID) const |
std::string | getParameter (const std::string &objectID, const std::string &key) const |
retrieve generic paramter More... | |
int | getPhase (const std::string &tlsID) const |
double | getPhaseDuration (const std::string &tlsID) const |
std::string | getPhaseName (const std::string &tlsID) const |
std::string | getProgram (const std::string &tlsID) const |
std::string | getRedYellowGreenState (const std::string &tlsID) const |
const libsumo::TraCIResults | getSubscriptionResults (const std::string &objID) const |
void | setCompleteRedYellowGreenDefinition (const std::string &tlsID, const libsumo::TraCILogic &logic) const |
void | setParameter (const std::string &objectID, const std::string &key, const std::string &value) const |
set generic paramter More... | |
void | setPhase (const std::string &tlsID, int index) const |
void | setPhaseDuration (const std::string &tlsID, double phaseDuration) const |
void | setPhaseName (const std::string &tlsID, const std::string &name) const |
void | setProgram (const std::string &tlsID, const std::string &programID) const |
void | setRedYellowGreenState (const std::string &tlsID, const std::string &state) const |
void | subscribe (const std::string &objID, const std::vector< int > &vars, double beginTime, double endTime) const |
void | subscribeContext (const std::string &objID, int domain, double range, const std::vector< int > &vars, double beginTime, double endTime) const |
TrafficLightScope (TraCIAPI &parent) | |
virtual | ~TrafficLightScope () |
Protected Attributes | |
int | myCmdGetID |
int | myCmdSetID |
int | myContextSubscribeID |
libsumo::ContextSubscriptionResults | myContextSubscriptionResults |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
int | mySubscribeID |
libsumo::SubscriptionResults | mySubscriptionResults |
Private Member Functions | |
TrafficLightScope & | operator= (const TrafficLightScope &src) |
invalidated assignment operator More... | |
TrafficLightScope (const TrafficLightScope &src) | |
invalidated copy constructor More... | |
Scope for interaction with traffic lights.
Definition at line 556 of file TraCIAPI.h.
|
inline |
Definition at line 558 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 559 of file TraCIAPI.h.
References TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
|
inherited |
Definition at line 3667 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3651 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3635 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
std::vector< libsumo::TraCILogic > TraCIAPI::TrafficLightScope::getCompleteRedYellowGreenDefinition | ( | const std::string & | tlsID | ) | const |
Definition at line 1863 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, libsumo::TraCILogic::phases, libsumo::TraCILogic::subParameter, libsumo::TL_COMPLETE_DEFINITION_RYG, and libsumo::TYPE_COMPOUND.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3657 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
std::vector< std::string > TraCIAPI::TrafficLightScope::getControlledLanes | ( | const std::string & | tlsID | ) | const |
Definition at line 1916 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::TL_CONTROLLED_LANES.
Referenced by TraCITestClient::testAPI().
std::vector< std::vector< libsumo::TraCILink > > TraCIAPI::TrafficLightScope::getControlledLinks | ( | const std::string & | tlsID | ) | const |
Definition at line 1921 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, libsumo::TL_CONTROLLED_LINKS, and libsumo::TYPE_COMPOUND.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::TrafficLightScope::getIDCount | ( | ) | const |
Definition at line 1853 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::TrafficLightScope::getIDList | ( | ) | const |
Definition at line 1848 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3680 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3674 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
double TraCIAPI::TrafficLightScope::getNextSwitch | ( | const std::string & | tlsID | ) | const |
Definition at line 1969 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::TL_NEXT_SWITCH.
Referenced by TraCITestClient::testAPI().
|
inherited |
retrieve generic paramter
Definition at line 3590 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
int TraCIAPI::TrafficLightScope::getPhase | ( | const std::string & | tlsID | ) | const |
Definition at line 1954 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::TL_CURRENT_PHASE.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::TrafficLightScope::getPhaseDuration | ( | const std::string & | tlsID | ) | const |
Definition at line 1964 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::TL_PHASE_DURATION.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::TrafficLightScope::getPhaseName | ( | const std::string & | tlsID | ) | const |
Definition at line 1959 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::VAR_NAME.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::TrafficLightScope::getProgram | ( | const std::string & | tlsID | ) | const |
Definition at line 1949 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::TL_CURRENT_PROGRAM.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::TrafficLightScope::getRedYellowGreenState | ( | const std::string & | tlsID | ) | const |
Definition at line 1858 of file TraCIAPI.cpp.
References libsumo::CMD_GET_TL_VARIABLE, and libsumo::TL_RED_YELLOW_GREEN_STATE.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3641 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
private |
invalidated assignment operator
void TraCIAPI::TrafficLightScope::setCompleteRedYellowGreenDefinition | ( | const std::string & | tlsID, |
const libsumo::TraCILogic & | logic | ||
) | const |
Definition at line 2020 of file TraCIAPI.cpp.
References libsumo::CMD_SET_TL_VARIABLE, libsumo::TraCILogic::currentPhaseIndex, libsumo::TraCIPhase::duration, libsumo::TraCIPhase::maxDur, libsumo::TraCIPhase::minDur, libsumo::TraCIPhase::name, libsumo::TraCIPhase::next, libsumo::TraCILogic::phases, libsumo::TraCILogic::programID, libsumo::TraCIPhase::state, libsumo::TraCILogic::subParameter, libsumo::TL_COMPLETE_PROGRAM_RYG, libsumo::TraCILogic::type, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_STRING, libsumo::TYPE_STRINGLIST, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3599 of file TraCIAPI.cpp.
References libsumo::TYPE_COMPOUND, libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
void TraCIAPI::TrafficLightScope::setPhase | ( | const std::string & | tlsID, |
int | index | ||
) | const |
Definition at line 1984 of file TraCIAPI.cpp.
References libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_PHASE_INDEX, libsumo::TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::TrafficLightScope::setPhaseDuration | ( | const std::string & | tlsID, |
double | phaseDuration | ||
) | const |
Definition at line 2011 of file TraCIAPI.cpp.
References libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_PHASE_DURATION, libsumo::TYPE_DOUBLE, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::TrafficLightScope::setPhaseName | ( | const std::string & | tlsID, |
const std::string & | name | ||
) | const |
Definition at line 1993 of file TraCIAPI.cpp.
References libsumo::CMD_SET_TL_VARIABLE, libsumo::TYPE_STRING, libsumo::VAR_NAME, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::TrafficLightScope::setProgram | ( | const std::string & | tlsID, |
const std::string & | programID | ||
) | const |
Definition at line 2002 of file TraCIAPI.cpp.
References libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_PROGRAM, libsumo::TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::TrafficLightScope::setRedYellowGreenState | ( | const std::string & | tlsID, |
const std::string & | state | ||
) | const |
Definition at line 1975 of file TraCIAPI.cpp.
References libsumo::CMD_SET_TL_VARIABLE, libsumo::TL_RED_YELLOW_GREEN_STATE, libsumo::TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3613 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3625 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
protectedinherited |
Definition at line 146 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 147 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 149 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 151 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 145 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 148 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 150 of file TraCIAPI.h.