35 std::shared_ptr<tcpip::Storage> result = std::make_shared<tcpip::Storage>();
40 result->writeUnsignedByte(v.
getType());
50 result->writeInt(((
const TraCIInt&)v).value);
53 result->writeByte(((
const TraCIInt&)v).value);
56 result->writeUnsignedByte(((
const TraCIInt&)v).value);
75 const bool tisb = pl.size() == 2 && pl[0].first !=
"";
76 writeCompound(*result, pl.size() == 2 && !tisb ? 2 : (int)pl.size() + 1);
80 }
else if (pl.size() == 2) {
89 }
else if (pl.size() == 3) {
94 }
else if (pl.size() == 4) {
194 const int size = ret.
readInt();
208 for (
int i = 0; i < size; ++i) {
213 poly.
value.emplace_back(p);
253 for (
int i = 0; i < n; ++i) {
260 result.emplace_back(vd);
284 while (numPhases-- > 0) {
292 while (numNext-- > 0) {
296 logic.
phases.emplace_back(phase);
299 while (numParams-- > 0) {
307 for (
int i = 0; i < n; ++i) {
318 for (
int j = 0; j < (int)paramItems.size(); j += 2) {
319 c.
param[paramItems[j]] = paramItems[j + 1];
321 result.emplace_back(c);
327 for (
int i = 0; i < n; ++i) {
328 std::vector<libsumo::TraCILink> controlledLinks;
330 while (numLinks-- > 0) {
332 controlledLinks.emplace_back(link[0], link[2], link[1]);
334 result.emplace_back(controlledLinks);
341 for (
int i = 0; i < n; ++i) {
349 result.emplace_back(info);
355 while (numCollisions-- > 0) {
366 result.emplace_back(c);
372 for (
int i = 0; i < n; ++i) {
383 result.emplace_back(info);
389 for (
int i = 0; i < n; ++i) {
407 result.emplace_back(s);
413 for (
int i = 0; i < n; ++i) {
419 result.emplace_back(tls);
461 if (shape.
value.size() <= 255) {
500 std::vector<std::string> paramItems;
501 for (
const auto& item : c.
param) {
502 paramItems.push_back(item.first);
503 paramItems.push_back(item.second);
libsumo::StorageHelper StoHelp
std::string toHex(const T i, std::streamsize numDigits=0)
static int readTypedUnsignedByte(tcpip::Storage &ret, const std::string &error="")
static int readTypedByte(tcpip::Storage &ret, const std::string &error="")
static void writeConstraint(tcpip::Storage &content, const libsumo::TraCISignalConstraint &c)
static void readJunctionFoeVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCIJunctionFoe > &result, const std::string &error="")
static void writeTypedDouble(tcpip::Storage &content, double value)
static int readCompound(tcpip::Storage &ret, int expectedSize=-1, const std::string &error="")
static bool readBool(tcpip::Storage &ret, const std::string &error="")
static void readLogic(tcpip::Storage &inputStorage, libsumo::TraCILogic &logic, const std::string &error="")
static void readConnection(tcpip::Storage &inputStorage, libsumo::TraCIConnection &connection, const std::string &error="")
static void writePolygon(tcpip::Storage &content, const libsumo::TraCIPositionVector &shape)
static void readVehicleDataVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCIVehicleData > &result, const std::string &error="")
static void readReservation(tcpip::Storage &inputStorage, libsumo::TraCIReservation &result, const std::string &error="")
static std::vector< std::string > readTypedStringList(tcpip::Storage &ret, const std::string &error="")
static void writeStage(tcpip::Storage &content, const libsumo::TraCIStage &stage)
static std::shared_ptr< tcpip::Storage > toStorage(const TraCIResult &v)
static void writeTypedUnsignedByte(tcpip::Storage &content, int value)
static void readConstraintVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCISignalConstraint > &result, const std::string &error="")
static void readStopVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCINextStopData > &result, const std::string &error="")
static int readTypedInt(tcpip::Storage &ret, const std::string &error="")
static void writeCompound(tcpip::Storage &content, int size)
static std::vector< double > readTypedDoubleList(tcpip::Storage &ret, const std::string &error="")
static void readBestLanesVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCIBestLanesData > &result, const std::string &error="")
static std::string readTypedString(tcpip::Storage &ret, const std::string &error="")
static void writeTypedInt(tcpip::Storage &content, int value)
static void writeTypedStringList(tcpip::Storage &content, const std::vector< std::string > &value)
static const libsumo::TraCIPosition readTypedPosition2D(tcpip::Storage &ret, const std::string &error="")
static const libsumo::TraCIPositionVector readTypedPolygon(tcpip::Storage &ret, const std::string &error="")
static void readCollisionVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCICollision > &result, const std::string &error="")
static void writeTypedByte(tcpip::Storage &content, int value)
static const libsumo::TraCIColor readTypedColor(tcpip::Storage &ret, const std::string &error="")
static void readPolygon(tcpip::Storage &ret, libsumo::TraCIPositionVector &poly)
static void writeTypedString(tcpip::Storage &content, const std::string &value)
static void readStage(tcpip::Storage &inputStorage, libsumo::TraCIStage &stage, const std::string &error="")
static void readTLSDataVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCINextTLSData > &result, const std::string &error="")
static double readTypedDouble(tcpip::Storage &ret, const std::string &error="")
static void readLinkVectorVector(tcpip::Storage &inputStorage, std::vector< std::vector< libsumo::TraCILink > > &result, 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 writeStringList(const std::vector< std::string > &s)
virtual void writeUnsignedByte(int)
virtual void writeByte(int)
virtual std::vector< std::string > readStringList()
virtual double readDouble()
virtual std::vector< double > readDoubleList()
TRACI_CONST int TYPE_COLOR
TRACI_CONST int POSITION_3D
TRACI_CONST int POSITION_ROADMAP
TRACI_CONST int TYPE_COMPOUND
TRACI_CONST int TYPE_UBYTE
TRACI_CONST int POSITION_2D
TRACI_CONST int TYPE_POLYGON
TRACI_CONST int TYPE_STRINGLIST
TRACI_CONST int TYPE_INTEGER
TRACI_CONST int REQUEST_DRIVINGDIST
TRACI_CONST int TYPE_DOUBLELIST
TRACI_CONST int TYPE_DOUBLE
TRACI_CONST int TYPE_BYTE
TRACI_CONST int TYPE_STRING
double length
The length than can be driven from that lane without lane change.
double occupation
The traffic density along length.
bool allowsContinuation
Whether this lane allows continuing the route.
int bestLaneOffset
The offset of this lane from the best lane.
std::vector< std::string > continuationLanes
The sequence of lanes that best allows continuing the route without lane change.
std::string laneID
The id of the lane.
std::string lane
The lane where the collision happended.
std::string type
The type of collision.
std::string collider
The ids of the participating vehicles and persons.
double pos
The position of the collision along the lane.
std::string approachedLane
std::string approachedInternal
int getType() const override
std::string foeId
the id of the vehicle with intersecting trajectory
std::map< std::string, std::string > subParameter
std::vector< std::shared_ptr< libsumo::TraCIPhase > > phases
std::string stoppingPlaceID
Id assigned to the stop.
std::string lane
The lane to stop at.
std::string actType
additional information for this stop
std::string tripId
id of the trip within a cyclical public transport route
double startPos
The stopping position start.
double arrival
The actual arrival time (only for past stops)
double depart
The time at which this stop was ended.
std::string join
the id of the vehicle (train portion) to which this vehicle shall be joined
double speed
the speed at which this stop counts as reached (waypoint mode)
double intendedArrival
The intended arrival time.
double endPos
The stopping position end.
std::string split
the id of the vehicle (train portion) that splits of upon reaching this stop
std::string line
the new line id of the trip within a cyclical public transport route
double duration
The intended (minimum) stopping duration.
double until
The time at which the vehicle may continue its journey.
double dist
The distance to the tls.
int tlIndex
The tls index of the controlled link.
std::string id
The id of the next tls.
char state
The current state of the tls.
A 2D or 3D-position, for 2D positions z == INVALID_DOUBLE_VALUE.
std::vector< TraCIPosition > value
double departPos
pickup position on the origin edge
double reservationTime
time when the reservation was made
double arrivalPos
drop-off position on the destination edge
std::vector< std::string > persons
The persons ids that are part of this reservation.
int state
the state of this reservation
std::string fromEdge
The origin edge id.
std::string group
The group id of this reservation.
std::string id
The id of the taxi reservation (usable for traci.vehicle.dispatchTaxi)
std::string toEdge
The destination edge id.
virtual std::string getString() const
virtual int getType() const
An edgeId, position and laneIndex.
std::string foeId
the tripId or vehicle id of the train that must pass first
std::string tripId
the tripId or vehicle id of the train that is constrained
std::string foeSignal
the tlsID of the rail signla that the foe must pass first
std::string signalId
the idea of the rail signal where this constraint is active
std::map< std::string, std::string > param
additional parameters
bool active
whether this constraint is active
int type
the type of constraint (predecessor:0, insertionPredecessor:1)
bool mustWait
whether tripId must still wait for foeId to pass foeSignal
int limit
the number of trains that must be recorded at the foeSignal
std::string intended
id of the intended vehicle for public transport ride
int type
The type of stage (walking, driving, ...)
std::string destStop
The id of the destination stop.
double travelTime
duration of the stage in seconds
double departPos
position on the lane when starting the stage
std::string description
arbitrary description string
std::string line
The line or the id of the vehicle type.
double depart
intended depart time for public transport ride or INVALID_DOUBLE_VALUE
std::vector< std::string > edges
The sequence of edges to travel.
double arrivalPos
position on the lane when ending the stage
std::string vType
The vehicle type when using a private car or bike.
mirrors MSInductLoop::VehicleData
std::string id
The id of the vehicle.
double entryTime
Entry-time of the vehicle in [s].
std::string typeID
Type of the vehicle in.
double length
Length of the vehicle.
double leaveTime
Leave-time of the vehicle in [s].