scenario_simulator_v2 C++ API
controller.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_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__CONTROLLER_HPP_
17 
20 #include <pugixml.hpp>
21 
23 {
24 inline namespace syntax
25 {
26 /* ---- Controller -------------------------------------------------------------
27  *
28  * Defines a controller type and parameters for the controller.
29  *
30  * Used in:
31  * AssignControllerAction,
32  * Catalog
33  * ControllerDistributionEntry,
34  * ObjectController,
35  *
36  * <xsd:complexType name="Controller">
37  * <xsd:all>
38  * <xsd:element name="ParameterDeclarations" type="ParameterDeclarations" minOccurs="0"/>
39  * <xsd:element name="Properties" type="Properties"/>
40  * </xsd:all>
41  * <xsd:attribute name="name" type="String" use="required"/>
42  * </xsd:complexType>
43  *
44  * -------------------------------------------------------------------------- */
45 struct Controller : public Scope
46 {
47  const ParameterDeclarations parameter_declarations; // Definition of additional parameters.
48 
49  /*
50  NOTE: The term "controller" in OpenSCENARIO is a concept equivalent to
51  "the person driving the car". Here, Autoware is considered
52  anthropomorphic. In other words, the sensor performance of Autoware in a
53  simulation is described in
54  ScenarioObject.ObjectController.Controller.Properties as "characteristics
55  of the person driving the car".
56  */
57  Properties properties; // Describing properties for the controller.
58 
59  explicit Controller(const pugi::xml_node &, Scope &);
60 
61  auto isAutoware() const & -> bool;
62 };
63 } // namespace syntax
64 } // namespace openscenario_interpreter
65 
66 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__CONTROLLER_HPP_
Definition: scope.hpp:154
Definition: escape_sequence.hpp:22
Definition: controller.hpp:46
Controller(const pugi::xml_node &, Scope &)
Definition: controller.cpp:25
Properties properties
Definition: controller.hpp:57
const ParameterDeclarations parameter_declarations
Definition: controller.hpp:47
auto isAutoware() const &-> bool
Definition: controller.cpp:33
Definition: parameter_declarations.hpp:36