48 const std::string
id = inputStorage.
readString();
51 if (!libsumo::Lane::handleVariable(
id, variable, &server, &inputStorage)) {
55 const std::vector<libsumo::TraCIConnection> links = libsumo::Lane::getLinks(
id);
59 tempContent.
writeInt((
int) links.size());
61 for (std::vector<libsumo::TraCIConnection>::const_iterator i = links.begin(); i != links.end(); ++i) {
120 std::string warning =
"";
138 libsumo::Lane::setMaxSpeed(
id, value);
143 libsumo::Lane::setFriction(
id, value);
148 libsumo::Lane::setLength(
id, value);
152 const std::vector<std::string> classes =
StoHelp::readTypedStringList(inputStorage,
"Allowed vehicle classes must be given as a list of strings.");
153 libsumo::Lane::setAllowed(
id, classes);
157 const std::vector<std::string> classes =
StoHelp::readTypedStringList(inputStorage,
"Not allowed vehicle classes must be given as a list of strings.");
158 libsumo::Lane::setDisallowed(
id, classes);
162 StoHelp::readCompound(inputStorage, 2,
"A compound object of size 2 is needed for setting lane change permissions.");
163 const std::vector<std::string> classes =
StoHelp::readTypedStringList(inputStorage,
"Vehicle classes allowed to change lane must be given as a list of strings.");
164 const int direction =
StoHelp::readTypedByte(inputStorage,
"The lane change direction must be given as an integer.");
165 libsumo::Lane::setChangePermissions(
id, classes, direction);
169 StoHelp::readCompound(inputStorage, 2,
"A compound object of size 2 is needed for setting a parameter.");
170 const std::string name =
StoHelp::readTypedString(inputStorage,
"The name of the parameter must be given as a string.");
171 const std::string value =
StoHelp::readTypedString(inputStorage,
"The value of the parameter must be given as a string.");
172 libsumo::Lane::setParameter(
id, name, value);
std::string toHex(const T i, std::streamsize numDigits=0)
Representation of a lane in the micro simulation.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa3: Get Lane Variable)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc3: Change Lane State)
TraCI server used to control sumo by a remote TraCI client.
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
tcpip::Storage & getWrapperStorage()
void initWrapper(const int domainID, const int variable, const std::string &objID)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
static int readTypedByte(tcpip::Storage &ret, const std::string &error="")
static int readCompound(tcpip::Storage &ret, int expectedSize=-1, const std::string &error="")
static std::vector< std::string > readTypedStringList(tcpip::Storage &ret, const std::string &error="")
static std::string readTypedString(tcpip::Storage &ret, const std::string &error="")
static void writeTypedStringList(tcpip::Storage &content, const std::vector< std::string > &value)
static double readTypedDouble(tcpip::Storage &ret, const std::string &error="")
An error which allows to continue.
virtual std::string readString()
virtual void writeString(const std::string &s)
virtual void writeInt(int)
virtual void writeDouble(double)
virtual int readUnsignedByte()
virtual void writeUnsignedByte(int)
virtual void writeStorage(tcpip::Storage &store)
TRACI_CONST int LANE_LINKS
TRACI_CONST int LANE_CHANGES
TRACI_CONST int TYPE_COMPOUND
TRACI_CONST int TYPE_UBYTE
TRACI_CONST int VAR_MAXSPEED
TRACI_CONST int TYPE_INTEGER
TRACI_CONST int VAR_LENGTH
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int RESPONSE_GET_LANE_VARIABLE
TRACI_CONST int CMD_SET_LANE_VARIABLE
TRACI_CONST int CMD_GET_LANE_VARIABLE
TRACI_CONST int LANE_DISALLOWED
TRACI_CONST int VAR_FRICTION
TRACI_CONST int TYPE_DOUBLE
TRACI_CONST int LANE_ALLOWED
TRACI_CONST int TYPE_STRING