![]() |
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 | 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 | 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 537 of file TraCIAPI.h.
|
inline |
Definition at line 539 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 540 of file TraCIAPI.h.
References TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
|
inherited |
Definition at line 3313 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3297 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3281 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
std::vector< libsumo::TraCILogic > TraCIAPI::TrafficLightScope::getCompleteRedYellowGreenDefinition | ( | const std::string & | tlsID | ) | const |
Definition at line 1661 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, libsumo::TraCILogic::phases, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readStringList(), tcpip::Storage::readUnsignedByte(), libsumo::TraCILogic::subParameter, TL_COMPLETE_DEFINITION_RYG, and TYPE_COMPOUND.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3303 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 1708 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_CONTROLLED_LANES.
Referenced by TraCITestClient::testAPI().
std::vector< std::vector< libsumo::TraCILink > > TraCIAPI::TrafficLightScope::getControlledLinks | ( | const std::string & | tlsID | ) | const |
Definition at line 1713 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), TL_CONTROLLED_LINKS, and TYPE_COMPOUND.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::TrafficLightScope::getIDCount | ( | ) | const |
Definition at line 1651 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::TrafficLightScope::getIDList | ( | ) | const |
Definition at line 1646 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3326 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3320 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
double TraCIAPI::TrafficLightScope::getNextSwitch | ( | const std::string & | tlsID | ) | const |
Definition at line 1756 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_NEXT_SWITCH.
Referenced by TraCITestClient::testAPI().
|
inherited |
retrieve generic paramter
Definition at line 3235 of file TraCIAPI.cpp.
References TYPE_STRING, 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 1746 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_CURRENT_PHASE.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::TrafficLightScope::getPhaseDuration | ( | const std::string & | tlsID | ) | const |
Definition at line 1751 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_PHASE_DURATION.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::TrafficLightScope::getProgram | ( | const std::string & | tlsID | ) | const |
Definition at line 1741 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_CURRENT_PROGRAM.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::TrafficLightScope::getRedYellowGreenState | ( | const std::string & | tlsID | ) | const |
Definition at line 1656 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_RED_YELLOW_GREEN_STATE.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3287 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 1802 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, libsumo::TraCILogic::currentPhaseIndex, libsumo::TraCIPhase::duration, libsumo::TraCIPhase::maxDur, libsumo::TraCIPhase::minDur, libsumo::TraCIPhase::next, libsumo::TraCILogic::phases, libsumo::TraCILogic::programID, libsumo::TraCIPhase::state, libsumo::TraCILogic::subParameter, TL_COMPLETE_PROGRAM_RYG, libsumo::TraCILogic::type, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, 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 3244 of file TraCIAPI.cpp.
References TYPE_COMPOUND, TYPE_STRING, 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 1772 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, TL_PHASE_INDEX, TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::TrafficLightScope::setPhaseDuration | ( | const std::string & | tlsID, |
double | phaseDuration | ||
) | const |
Definition at line 1792 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, TL_PHASE_DURATION, TYPE_DOUBLE, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::TrafficLightScope::setProgram | ( | const std::string & | tlsID, |
const std::string & | programID | ||
) | const |
Definition at line 1782 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, TL_PROGRAM, 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 1762 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, TL_RED_YELLOW_GREEN_STATE, TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3259 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3271 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.