scenario_simulator_v2 C++ API
traffic_signal_controller_action.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef OPENSCENARIO_INTERPRETER__SYNTAX__TRAFFIC_SIGNAL_CONTROLLER_ACTION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__TRAFFIC_SIGNAL_CONTROLLER_ACTION_HPP_
17 
20 #include <pugixml.hpp>
21 
23 {
24 inline namespace syntax
25 {
26 /* ---- NOTE -------------------------------------------------------------------
27  *
28  * Sets a specific phase of a traffic signal controller, typically affecting a
29  * collection of signals.
30  *
31  * <xsd:complexType name="TrafficSignalControllerAction">
32  * <xsd:attribute name="trafficSignalControllerRef" type="String" use="required"/>
33  * <xsd:attribute name="phase" type="String" use="required"/>
34  * </xsd:complexType>
35  *
36  * -------------------------------------------------------------------------- */
38 {
39  // ID of the signal controller in a road network.
41 
42  /*
43  Targeted phase of the signal controller. The available phases are defined
44  in type RoadNetwork under the property trafficSignalControllers.
45  */
46  const String phase;
47 
48  explicit TrafficSignalControllerAction(const pugi::xml_node &, const Scope &);
49 
50  static auto accomplished() noexcept -> bool;
51 
52  static auto endsImmediately() noexcept -> bool;
53 
54  static auto run() noexcept -> void;
55 
56  /* */ auto start() -> void;
57 };
58 } // namespace syntax
59 } // namespace openscenario_interpreter
60 
61 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__TRAFFIC_SIGNAL_CONTROLLER_ACTION_HPP_
Definition: scope.hpp:154
std::string String
Definition: string.hpp:24
Definition: hypot.hpp:22
Definition: traffic_signal_controller_action.hpp:38
auto start() -> void
Definition: traffic_signal_controller_action.cpp:37
const String phase
Definition: traffic_signal_controller_action.hpp:46
static auto accomplished() noexcept -> bool
Definition: traffic_signal_controller_action.cpp:31
const String traffic_signal_controller_ref
Definition: traffic_signal_controller_action.hpp:40
static auto run() noexcept -> void
Definition: traffic_signal_controller_action.cpp:35
TrafficSignalControllerAction(const pugi::xml_node &, const Scope &)
Definition: traffic_signal_controller_action.cpp:23
static auto endsImmediately() noexcept -> bool
Definition: traffic_signal_controller_action.cpp:33