scenario_simulator_v2 C++ API
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__CONTROLLER_ACTION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__CONTROLLER_ACTION_HPP_
17 
21 #include <pugixml.hpp>
22 
24 {
25 inline namespace syntax
26 {
27 /* ---- ControllerAction (OSC 1.1) ---------------------------------------------
28  *
29  * Action that assigns a new controller or overrides an existing one.
30  *
31  * <xsd:complexType name="ControllerAction">
32  * <xsd:all>
33  * <xsd:element name="AssignControllerAction" type="AssignControllerAction" minOccurs="0"/>
34  * <xsd:element name="OverrideControllerValueAction" type="OverrideControllerValueAction" minOccurs="0"/>
35  * <xsd:element name="ActivateControllerAction" type="ActivateControllerAction" minOccurs="0"/>
36  * </xsd:all>
37  * </xsd:complexType>
38  *
39  * ------------------------------------------------------------------------ */
40 struct ControllerAction : private Scope
41 {
42  // Assign a controller to an entity.
44 
45  // Values for throttle, brake, clutch, parking brake, steering wheel or gear.
47 
48  explicit ControllerAction(const pugi::xml_node &, 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() const -> void;
57 };
58 } // namespace syntax
59 } // namespace openscenario_interpreter
60 
61 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__CONTROLLER_ACTION_HPP_
Definition: scope.hpp:154
Definition: escape_sequence.hpp:22
Definition: assign_controller_action.hpp:42
Definition: controller_action.hpp:41
static auto run() noexcept -> void
Definition: controller_action.cpp:41
static auto accomplished() noexcept -> bool
Definition: controller_action.cpp:31
const OverrideControllerValueAction override_controller_value_action
Definition: controller_action.hpp:46
static auto endsImmediately() noexcept -> bool
Definition: controller_action.cpp:36
const AssignControllerAction assign_controller_action
Definition: controller_action.hpp:43
ControllerAction(const pugi::xml_node &, Scope &)
Definition: controller_action.cpp:22
auto start() const -> void
Definition: controller_action.cpp:43
Definition: override_controller_value_action.hpp:42