![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with traffic lights. More...
#include <TraCIAPI.h>
Public Member Functions | |
std::vector< libsumo::TraCILogic > | getCompleteRedYellowGreenDefinition (const std::string &tlsID) const |
std::vector< std::string > | getControlledLanes (const std::string &tlsID) const |
std::vector< std::vector< libsumo::TraCILink > > | getControlledLinks (const std::string &tlsID) const |
std::vector< std::string > | getIDList () const |
int | getNextSwitch (const std::string &tlsID) const |
int | getPhase (const std::string &tlsID) const |
std::string | getProgram (const std::string &tlsID) const |
std::string | getRedYellowGreenState (const std::string &tlsID) const |
void | setCompleteRedYellowGreenDefinition (const std::string &tlsID, const libsumo::TraCILogic &logic) const |
void | setPhase (const std::string &tlsID, int index) const |
void | setPhaseDuration (const std::string &tlsID, int phaseDuration) const |
void | setProgram (const std::string &tlsID, const std::string &programID) const |
void | setRedYellowGreenState (const std::string &tlsID, const std::string &state) const |
TrafficLightScope (TraCIAPI &parent) | |
virtual | ~TrafficLightScope () |
Protected Attributes | |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
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 520 of file TraCIAPI.h.
|
inline |
Definition at line 522 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 523 of file TraCIAPI.h.
References TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
std::vector< TraCILogic > TraCIAPI::TrafficLightScope::getCompleteRedYellowGreenDefinition | ( | const std::string & | tlsID | ) | const |
Definition at line 1625 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, libsumo::TraCILogic::phases, tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), TL_COMPLETE_DEFINITION_RYG, and TYPE_COMPOUND.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::TrafficLightScope::getControlledLanes | ( | const std::string & | tlsID | ) | const |
Definition at line 1664 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_CONTROLLED_LANES.
Referenced by TraCITestClient::testAPI().
std::vector< std::vector< TraCILink > > TraCIAPI::TrafficLightScope::getControlledLinks | ( | const std::string & | tlsID | ) | const |
Definition at line 1669 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().
std::vector< std::string > TraCIAPI::TrafficLightScope::getIDList | ( | ) | const |
Definition at line 1615 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and ID_LIST.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::TrafficLightScope::getNextSwitch | ( | const std::string & | tlsID | ) | const |
Definition at line 1707 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_NEXT_SWITCH.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::TrafficLightScope::getPhase | ( | const std::string & | tlsID | ) | const |
Definition at line 1702 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_CURRENT_PHASE.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::TrafficLightScope::getProgram | ( | const std::string & | tlsID | ) | const |
Definition at line 1697 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 1620 of file TraCIAPI.cpp.
References CMD_GET_TL_VARIABLE, and TL_RED_YELLOW_GREEN_STATE.
Referenced by TraCITestClient::testAPI().
|
private |
invalidated assignment operator
void TraCIAPI::TrafficLightScope::setCompleteRedYellowGreenDefinition | ( | const std::string & | tlsID, |
const libsumo::TraCILogic & | logic | ||
) | const |
Definition at line 1753 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, libsumo::TraCILogic::currentPhaseIndex, libsumo::TraCILogic::phases, libsumo::TraCILogic::subID, TL_COMPLETE_PROGRAM_RYG, libsumo::TraCILogic::type, TYPE_COMPOUND, TYPE_INTEGER, TYPE_STRING, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::TrafficLightScope::setPhase | ( | const std::string & | tlsID, |
int | index | ||
) | const |
Definition at line 1723 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, |
int | phaseDuration | ||
) | const |
Definition at line 1743 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, TL_PHASE_DURATION, TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::TrafficLightScope::setProgram | ( | const std::string & | tlsID, |
const std::string & | programID | ||
) | const |
Definition at line 1733 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 1713 of file TraCIAPI.cpp.
References CMD_SET_TL_VARIABLE, TL_RED_YELLOW_GREEN_STATE, TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 129 of file TraCIAPI.h.