scenario_simulator_v2 C++ API
traffic_signal_controller_condition.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_CONDITION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__TRAFFIC_SIGNAL_CONTROLLER_CONDITION_HPP_
17 
21 #include <pugixml.hpp>
22 
24 {
25 inline namespace syntax
26 {
27 /* ---- TrafficSignalControllerCondition ---------------------------------------
28  *
29  * Condition becomes true if the referenced signal controller reaches the
30  * indicated state.
31  *
32  * <xsd:complexType name="TrafficSignalControllerCondition">
33  * <xsd:attribute name="trafficSignalControllerRef" type="String" use="required"/>
34  * <xsd:attribute name="phase" type="String" use="required"/>
35  * </xsd:complexType>
36  *
37  * -------------------------------------------------------------------------- */
39 {
40  // Name of the phase of the signal controller to be reached for the condition to become true. The available phases are defined in type RoadNetwork under the property trafficSignalControllers.
41  const String phase;
42 
43  // ID of the referenced signal controller in a road network.
45 
47 
49 
51 
52  explicit TrafficSignalControllerCondition(const pugi::xml_node &, const Scope &);
53 
54  auto description() const -> String;
55 
56  auto evaluate() -> Object;
57 };
58 } // namespace syntax
59 } // namespace openscenario_interpreter
60 
61 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__TRAFFIC_SIGNAL_CONTROLLER_CONDITION_HPP_
Definition: scope.hpp:154
std::string String
Definition: string.hpp:24
Definition: hypot.hpp:22
Definition: traffic_signal_controller_condition.hpp:39
auto description() const -> String
Definition: traffic_signal_controller_condition.cpp:30
const String traffic_signal_controller_ref
Definition: traffic_signal_controller_condition.hpp:44
TrafficSignalControllerCondition(const pugi::xml_node &, const Scope &)
Definition: traffic_signal_controller_condition.cpp:22
Scope scope
Definition: traffic_signal_controller_condition.hpp:50
const String phase
Definition: traffic_signal_controller_condition.hpp:41
String current_phase_name
Definition: traffic_signal_controller_condition.hpp:46
auto evaluate() -> Object
Definition: traffic_signal_controller_condition.cpp:43
Double current_phase_since
Definition: traffic_signal_controller_condition.hpp:48