Path: blob/main/src/traci-server/TraCIServerAPI_Vehicle.h
169666 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file TraCIServerAPI_Vehicle.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date 07.05.200917///18// APIs for getting/setting vehicle values via TraCI19/****************************************************************************/20#pragma once21#include <config.h>2223#include <microsim/MSEdgeWeightsStorage.h>24#include "TraCIServer.h"25#include <foreign/tcpip/storage.h>262728// ===========================================================================29// class definitions30// ===========================================================================31/**32* @class TraCIServerAPI_Vehicle33* @brief APIs for getting/setting vehicle values via TraCI34*/35class TraCIServerAPI_Vehicle {36public:37/** @brief Processes a get value command (Command 0xa4: Get Vehicle Variable)38*39* @param[in] server The TraCI-server-instance which schedules this request40* @param[in] inputStorage The storage to read the command from41* @param[out] outputStorage The storage to write the result to42*/43static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage,44tcpip::Storage& outputStorage);454647/** @brief Processes a set value command (Command 0xc4: Change Vehicle State)48*49* @param[in] server The TraCI-server-instance which schedules this request50* @param[in] inputStorage The storage to read the command from51* @param[out] outputStorage The storage to write the result to52*/53static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage,54tcpip::Storage& outputStorage);5556private:57static bool insertReplaceStop(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, const std::string& id, bool replace);5859private:60/// @brief invalidated copy constructor61TraCIServerAPI_Vehicle(const TraCIServerAPI_Vehicle& s);6263/// @brief invalidated assignment operator64TraCIServerAPI_Vehicle& operator=(const TraCIServerAPI_Vehicle& s);656667};686970