41std::vector<std::string>
42VariableSpeedSign::getIDList() {
44 std::vector<std::string> ids;
46 ids.push_back(item.first);
52VariableSpeedSign::getIDCount() {
53 return (
int)getIDList().size();
56std::vector<std::string>
57VariableSpeedSign::getLanes(
const std::string& vssID) {
58 std::vector<std::string> result;
61 result.push_back(lane->getID());
67VariableSpeedSign::getParameter(
const std::string& ,
const std::string& ) {
74VariableSpeedSign::setParameter(
const std::string& ,
const std::string& ,
const std::string& ) {
84VariableSpeedSign::getVariableSpeedSign(
const std::string&
id) {
86 auto it = dict.find(
id);
87 if (it == dict.end()) {
88 throw TraCIException(
"VariableSpeedSign '" +
id +
"' is not known");
94std::shared_ptr<VariableWrapper>
95VariableSpeedSign::makeWrapper() {
96 return std::make_shared<Helper::SubscriptionWrapper>(handleVariable, mySubscriptionResults, myContextSubscriptionResults);
101VariableSpeedSign::handleVariable(
const std::string& objID,
const int variable, VariableWrapper* wrapper,
tcpip::Storage* paramData) {
104 return wrapper->wrapStringList(objID, variable, getIDList());
106 return wrapper->wrapInt(objID, variable, getIDCount());
108 return wrapper->wrapStringList(objID, variable, getLanes(objID));
111 return wrapper->wrapString(objID, variable, getParameter(objID, paramData->
readString()));
114 return wrapper->wrapStringPair(objID, variable, getParameterWithKey(objID, paramData->
readString()));
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOM)
#define LIBSUMO_GET_PARAMETER_WITH_KEY_IMPLEMENTATION(CLASS)
Representation of a lane in the micro simulation.
Changes the speed allowed on a set of lanes.
const std::vector< MSLane * > & getLanes()
static const std::map< std::string, MSLaneSpeedTrigger * > & getInstances()
return all MSLaneSpeedTrigger instances
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
C++ TraCI client API implementation.
virtual std::string readString()
virtual int readUnsignedByte()
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int VAR_LANES
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_PARAMETER_WITH_KEY