41 #ifdef CHECK_MEMORY_LEAKS 43 #endif // CHECK_MEMORY_LEAKS 71 std::vector<std::string> ids;
76 std::vector<std::string> ids;
120 tempContent.
writeInt((
int) vd.size());
122 for (
int i = 0; i < (int)vd.size(); ++i) {
178 for (std::map<std::string, MSDetectorFileOutput*>::const_iterator i = dets.begin(); i != dets.end(); ++i) {
181 const float cmin[2] = {(float) p.
x(), (float) p.
y()};
182 const float cmax[2] = {(float) p.
x(), (float) p.
y()};
183 t->
Insert(cmin, cmax, il);
#define LAST_STEP_MEAN_SPEED
void Insert(const float a_min[2], const float a_max[2], Named *const &a_data)
Insert entry.
const MSLane * getLane() const
Returns the lane the reminder works on.
SUMOReal getTimestepsSinceLastDetection() const
Returns the time since the last vehicle left the detector.
SUMOReal getPosition() const
Returns the position of the detector on the lane.
#define CMD_GET_INDUCTIONLOOP_VARIABLE
#define LAST_STEP_VEHICLE_DATA
std::vector< std::string > getCurrentVehicleIDs() const
Returns the ids of vehicles that have passed the detector.
T get(const std::string &id) const
Retrieves an item.
A RT-tree for efficient storing of SUMO's Named objects.
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
const PositionVector & getShape() const
Returns this lane's shape.
SUMOReal getCurrentOccupancy() const
Returns the current occupancy.
const std::string & getID() const
Returns the id.
virtual void writeUnsignedByte(int)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
void insertIDs(std::vector< std::string > &into) const
virtual void writeInt(int)
SUMOReal lengthM
Length of the vehicle.
virtual int readUnsignedByte()
static bool getPosition(const std::string &id, Position &p)
Returns the named inductive loop's position.
#define LAST_STEP_TIME_SINCE_DETECTION
SUMOReal leaveTimeM
Leave-time of the vehicle in [s].
SUMOReal entryTimeM
Entry-time of the vehicle in [s].
A point in 2D or 3D with translation and scaling methods.
const IDMap & getMyMap() const
virtual void writeStringList(const std::vector< std::string > &s)
SUMOReal x() const
Returns the x-position.
virtual std::string readString()
std::string idM
The id of the vehicle.
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa0: Get Induction Loop Variable)
TraCI server used to control sumo by a remote TraCI client.
MSDetectorControl & getDetectorControl()
Returns the detector control.
#define RESPONSE_GET_INDUCTIONLOOP_VARIABLE
virtual void writeStorage(tcpip::Storage &store)
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
#define LAST_STEP_VEHICLE_NUMBER
int getCurrentPassedNumber() const
Returns the number of vehicles that have passed the detector.
virtual void writeString(const std::string &s)
#define LAST_STEP_VEHICLE_ID_LIST
Struct to store the data of the counted vehicle internally.
std::string toHex(const T i, std::streamsize numDigits=0)
static NamedRTree * getTree()
Returns a tree filled with inductive loop instances.
virtual void writeDouble(double)
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
virtual std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t, bool leaveTime=false) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
#define LAST_STEP_OCCUPANCY
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
SUMOReal getCurrentSpeed() const
Returns the speed of the vehicle on the detector.
SUMOReal y() const
Returns the y-position.
SUMOReal getCurrentLength() const
Returns the length of the vehicle on the detector.
std::string typeIDM
Type of the vehicle in.
An unextended detector measuring at a fixed position on a fixed lane.