SUMO - Simulation of Urban MObility
TraCIServerAPI_Simulation.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // APIs for getting/setting edge values via TraCI
17 /****************************************************************************/
18 #ifndef TraCIServerAPI_Simulation_h
19 #define TraCIServerAPI_Simulation_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <map>
29 #include <vector>
30 #include "TraCIServer.h"
31 #include <foreign/tcpip/storage.h>
32 
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
42 public:
49  static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage,
50  tcpip::Storage& outputStorage);
51 
58  static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage,
59  tcpip::Storage& outputStorage);
60 
61 
69  static bool commandPositionConversion(TraCIServer& server, tcpip::Storage& inputStorage,
70  tcpip::Storage& outputStorage, int commandId);
71 
72  static bool commandDistanceRequest(TraCIServer& server, tcpip::Storage& inputStorage,
73  tcpip::Storage& outputStorage, int commandId);
74 
75 private:
76  static void writeVehicleStateNumber(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state);
77  static void writeVehicleStateIDs(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state);
78  static void writeStage(tcpip::Storage& outputStorage, const libsumo::TraCIStage& stage);
79 
80 
81 private:
84 
87 
88 
89 };
90 
91 
92 #endif
93 
94 /****************************************************************************/
95 
static void writeVehicleStateIDs(TraCIServer &server, tcpip::Storage &outputStorage, MSNet::VehicleState state)
static void writeStage(tcpip::Storage &outputStorage, const libsumo::TraCIStage &stage)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xab: Get Simulation Variable)
TraCIServerAPI_Simulation(const TraCIServerAPI_Simulation &s)
invalidated copy constructor
static void writeVehicleStateNumber(TraCIServer &server, tcpip::Storage &outputStorage, MSNet::VehicleState state)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xcb: Set Simulation Variable)
APIs for getting/setting simulation values via TraCI.
static bool commandPositionConversion(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, int commandId)
TraCI server used to control sumo by a remote TraCI client.
Definition: TraCIServer.h:62
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:494
static bool commandDistanceRequest(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, int commandId)
TraCIServerAPI_Simulation & operator=(const TraCIServerAPI_Simulation &s)
invalidated assignment operator