41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
71 std::vector<std::string> ids;
76 std::vector<std::string> ids;
118 unsigned int cnt = 0;
120 tempContent.
writeInt((
int) vd.size());
122 for (
unsigned int i = 0; i < vd.size(); ++i) {
178 for (std::map<std::string, MSDetectorFileOutput*>::const_iterator i = dets.begin(); i != dets.end(); ++i) {
183 t->
Insert(cmin, cmax, il);
#define LAST_STEP_MEAN_SPEED
void Insert(const float a_min[2], const float a_max[2], Named *a_data)
Insert entry.
Position positionAtOffset(SUMOReal pos) const
Returns the position at the given length.
#define CMD_GET_INDUCTIONLOOP_VARIABLE
#define LAST_STEP_VEHICLE_DATA
A RT-tree for efficient storing of SUMO's Named objects.
SUMOReal getPosition() const
Returns the position of the detector on the lane.
virtual std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOReal getCurrentOccupancy() const
Returns the current occupancy.
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.
SUMOReal x() const
Returns the x-position.
const MSLane * getLane() const
Returns the lane the reminder works on.
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.
T get(const std::string &id) const
Retrieves an item.
std::vector< std::string > getCurrentVehicleIDs() const
Returns the ids of vehicles that have passed the detector.
const std::string & getID() const
Returns the id.
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
#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.
void insertIDs(std::vector< std::string > &into) const
virtual void writeStringList(const std::vector< std::string > &s)
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)
SUMOReal getCurrentSpeed() const
Returns the speed of the vehicle on the detector.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
unsigned int getCurrentPassedNumber() const
Returns the number of vehicles that have passed the detector.
const IDMap & getMyMap() const
#define LAST_STEP_VEHICLE_NUMBER
virtual void writeString(const std::string &s)
#define LAST_STEP_VEHICLE_ID_LIST
Struct to store the data of the counted vehicle internally.
SUMOReal y() const
Returns the y-position.
static NamedRTree * getTree()
Returns a tree filled with inductive loop instances.
virtual void writeDouble(double)
const PositionVector & getShape() const
Returns this lane's shape.
SUMOReal getTimestepsSinceLastDetection() const
Returns the time since the last vehicle left the detector.
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
#define LAST_STEP_OCCUPANCY
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.