116 tempContent.
writeInt((
int) vd.size());
118 for (
int i = 0; i < (int)vd.size(); ++i) {
168 for (std::map<std::string, MSDetectorFileOutput*>::const_iterator i = dets.begin(); i != dets.end(); ++i) {
171 const float cmin[2] = {(float) p.
x(), (float) p.
y()};
172 const float cmax[2] = {(float) p.
x(), (float) p.
y()};
173 t->
Insert(cmin, cmax, il);
static double getLastStepMeanSpeed(const std::string &detID)
#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.
alternative tag for e1 detector
double length
Length of the vehicle.
#define CMD_GET_INDUCTIONLOOP_VARIABLE
double leaveTime
Leave-time of the vehicle in [s].
#define LAST_STEP_VEHICLE_DATA
double y() const
Returns the y-position.
T get(const std::string &id) const
Retrieves an item.
A RT-tree for efficient storing of SUMO's Named objects.
double x() const
Returns the x-position.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
const PositionVector & getShape() const
Returns this lane's shape.
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.
static double getLastStepMeanLength(const std::string &detID)
virtual void writeInt(int)
virtual int readUnsignedByte()
static bool getPosition(const std::string &id, Position &p)
Returns the named inductive loop's position.
static std::vector< std::string > getIDList()
static std::vector< std::string > getLastStepVehicleIDs(const std::string &detID)
#define LAST_STEP_TIME_SINCE_DETECTION
std::string id
The id of the vehicle.
A point in 2D or 3D with translation and scaling methods.
const IDMap & getMyMap() const
double getPosition() const
Returns the position of the detector on the lane.
virtual void writeStringList(const std::vector< std::string > &s)
virtual std::string readString()
static int getLastStepVehicleNumber(const std::string &detID)
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)
static std::string getLaneID(const std::string &detID)
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
#define LAST_STEP_VEHICLE_NUMBER
virtual void writeString(const std::string &s)
#define LAST_STEP_VEHICLE_ID_LIST
std::string toHex(const T i, std::streamsize numDigits=0)
std::string typeID
Type of the vehicle in.
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.
static double getLastStepOccupancy(const std::string &detID)
#define LAST_STEP_OCCUPANCY
static double getTimeSinceDetection(const std::string &detID)
static double getPosition(const std::string &detID)
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
double entryTime
Entry-time of the vehicle in [s].
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
static std::vector< TraCIVehicleData > getVehicleData(const std::string &detID)
An unextended detector measuring at a fixed position on a fixed lane.