46 #ifdef CHECK_MEMORY_LEAKS
48 #endif // CHECK_MEMORY_LEAKS
54 using namespace traci;
64 int variable = inputStorage.readUnsignedByte();
65 std::string
id = inputStorage.readString();
69 return server.writeErrorStatusCmd(
CMD_GET_GUI_VARIABLE,
"Get GUI Variable: unsupported variable specified", outputStorage);
79 std::vector<std::string> ids = getMainWindow()->getViewIDs();
85 return server.writeErrorStatusCmd(
CMD_GET_GUI_VARIABLE,
"View '" +
id +
"' is not known", outputStorage);
100 tempMsg.
writeString((std::string)c.getItem(c.getCurrentItem()).text());
117 server.writeResponseWithLength(outputStorage, tempMsg);
125 std::string warning =
"";
127 int variable = inputStorage.readUnsignedByte();
131 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"Change GUI State: unsupported variable specified", outputStorage);
134 std::string
id = inputStorage.readString();
137 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"View '" +
id +
"' is not known", outputStorage);
144 if (!server.readTypeCheckingDouble(inputStorage, zoom)) {
145 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"The zoom must be given as a double.", outputStorage);
153 if (!server.readTypeCheckingPosition2D(inputStorage, off)) {
154 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"The view port must be given as a position.", outputStorage);
162 if (!server.readTypeCheckingString(inputStorage, schema)) {
163 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"The scheme must be specified by a string.", outputStorage);
166 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"The scheme is not known.", outputStorage);
172 if (!server.readTypeCheckingBoundary(inputStorage, b)) {
173 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"The boundary must be specified by a bounding box.", outputStorage);
179 std::string filename;
180 if (!server.readTypeCheckingString(inputStorage, filename)) {
181 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"Making a snapshot requires a file name.", outputStorage);
191 if (!server.readTypeCheckingString(inputStorage,
id)) {
192 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"Tracking requires a string vehicle ID.", outputStorage);
199 return server.writeErrorStatusCmd(
CMD_SET_GUI_VARIABLE,
"Could not find vehicle '" +
id +
"'.", outputStorage);
202 v->
startTrack(static_cast<GUIVehicle*>(veh)->getGlID());
217 FXWindow* w = FXApp::instance()->getRootWindow()->getFirst();
218 while (w != 0 && dynamic_cast<GUIMainWindow*>(w) == 0) {