 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
96 tempMsg.
writeInt(v !=
nullptr ? 1 : 0);
131 std::string warning =
"";
141 const std::string
id = inputStorage.
readString();
155 p.
set(off.
x(), off.
y(), 0);
167 p.
set(tp.
x, tp.
y, 0);
193 int parameterCount = inputStorage.
readInt();
194 if (parameterCount != 3) {
197 std::string filename;
201 int width = 0, height = 0;
221 if (veh ==
nullptr) {
224 if (v->
getTrackedID() != static_cast<GUIVehicle*>(veh)->getGlID()) {
225 v->
startTrack(static_cast<GUIVehicle*>(veh)->getGlID());
Boundary getVisibleBoundary() const
get visible boundary
TRACI_CONST int VAR_VIEW_SCHEMA
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
std::string name
The name of this setting.
virtual void setViewportFromToRot(const Position &lookFrom, const Position &lookAt, double rotation)
applies the given viewport settings
TRACI_CONST int CMD_SET_GUI_VARIABLE
virtual void stopTrack()
stop track
TRACI_CONST int VAR_HAS_VIEW
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xcc: Change GUI State)
double ymin() const
Returns minimum y-coordinate.
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xac: Get GUI Variable)
virtual bool setColorScheme(const std::string &)
set color scheme
virtual void writeUnsignedByte(int)
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
Representation of a vehicle.
double xmax() const
Returns maximum x-coordinate.
void addSnapshot(SUMOTime time, const std::string &file, const int w=-1, const int h=-1)
Sets the snapshot time to file map.
std::vector< std::string > getViewIDs() const
virtual double getRotation() const =0
Returns the rotation of the canvas stored in this changer.
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
virtual void writeByte(int)
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
virtual int readUnsignedByte()
virtual void writeInt(int)
SUMOVehicle * getVehicle(const std::string &id) const
Returns the vehicle with the given id.
bool readTypeCheckingPolygon(tcpip::Storage &inputStorage, PositionVector &into)
Reads the value type and a polygon, verifying the type.
static const GUIGlID INVALID_ID
TRACI_CONST int TYPE_DOUBLE
TRACI_CONST int TYPE_POLYGON
static GUIMainWindow * getInstance()
virtual std::string readString()
TRACI_CONST int VAR_VIEW_ZOOM
double xmin() const
Returns minimum x-coordinate.
TRACI_CONST int TYPE_INTEGER
GUIVisualizationSettings * getVisualisationSettings() const
get visualitation settings
void set(double x, double y)
set positions x and y
A MSVehicle extended by some values for usage within the gui.
virtual void writeStringList(const std::vector< std::string > &s)
GUIGlChildWindow * getViewByID(const std::string &id) const
A class that stores a 2D geometrical boundary.
std::string toHex(const T i, std::streamsize numDigits=0)
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
virtual double getZoom() const =0
Returns the zoom factor computed stored in this changer.
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int RESPONSE_GET_GUI_VARIABLE
virtual void startTrack(int)
star track
TRACI_CONST int TYPE_STRINGLIST
virtual void writeString(const std::string &s)
void unblockObject(GUIGlID id)
Marks an object as unblocked.
TRACI_CONST int CMD_GET_GUI_VARIABLE
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double y() const
Returns the y-position.
GUIPerspectiveChanger & getChanger() const
get changer
TRACI_CONST int POSITION_2D
virtual double zoom2ZPos(double zoom) const =0
Returns the camera height at which the given zoom level is reached.
TRACI_CONST int TYPE_STRING
TRACI_CONST int VAR_TRACK_VEHICLE
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
static GUISUMOAbstractView * getNamedView(const std::string &id)
Returns the named view.
const std::string & getID() const
Returns the name of the vehicle.
TRACI_CONST int VAR_VIEW_OFFSET
virtual void writeDouble(double)
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
TRACI_CONST int VAR_VIEW_BOUNDARY
TraCI server used to control sumo by a remote TraCI client.
bool readTypeCheckingPosition2D(tcpip::Storage &inputStorage, libsumo::TraCIPosition &into)
Reads the value type and a 2D position, verifying the type.
TRACI_CONST int VAR_SCREENSHOT
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
virtual GUIGlID getTrackedID() const
get tracked id
GUISUMOAbstractView * getView() const
return GUISUMOAbstractView
double ymax() const
Returns maximum y-coordinate.
TRACI_CONST int TYPE_COMPOUND
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.