scenario_simulator_v2 C++ API
environment.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__ENVIRONMENT_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__ENVIRONMENT_HPP_
17 
23 #include <pugixml.hpp>
24 
26 {
27 inline namespace syntax
28 {
29 /*
30  Environment (OpenSCENARIO XML 1.3.1)
31 
32  Defines the environment conditions of a scenario, e.g. time of day, weather and road condition. If one of the conditions is missing it means that it doesn't change.
33 
34  <xsd:complexType name="Environment">
35  <xsd:all>
36  <xsd:element name="ParameterDeclarations" type="ParameterDeclarations" minOccurs="0"/>
37  <xsd:element name="TimeOfDay" type="TimeOfDay" minOccurs="0"/>
38  <xsd:element name="Weather" type="Weather" minOccurs="0"/>
39  <xsd:element name="RoadCondition" type="RoadCondition" minOccurs="0"/>
40  </xsd:all>
41  <xsd:attribute name="name" type="String" use="required"/>
42  </xsd:complexType>
43 */
44 struct Environment : public Scope
45 {
46  /*
47  * Warn: Model specification(ref) has following statement.
48  * > If one of the conditions is missing it means that it doesn't change.
49  * However, current implementation does not represent that condition is missing.
50  * Instead, conditions are filled with its default state (from default constructor).
51  * This difference may cause unspecified behavior.
52  * TODO: Follow the model specification as described above.
53  *
54  * ref:
55  * https://www.asam.net/static_downloads/ASAM_OpenSCENARIO_V1.2.0_Model_Documentation/modelDocumentation/content/Environment.html
56  */
57 
58  Environment() = default;
59 
60  explicit Environment(const pugi::xml_node &, Scope &);
61 
63 
65 
67 
69 };
70 
71 } // namespace syntax
72 } // namespace openscenario_interpreter
73 
74 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__ENVIRONMENT_HPP_
Definition: scope.hpp:158
Definition: hypot.hpp:22
Definition: environment.hpp:45
const RoadCondition road_condition
Definition: environment.hpp:68
const ParameterDeclarations parameter_declarations
Definition: environment.hpp:62
const Weather weather
Definition: environment.hpp:66
const TimeOfDay time_of_day
Definition: environment.hpp:64
Definition: parameter_declarations.hpp:36
Definition: road_condition.hpp:42
Definition: time_of_day.hpp:37