From 2e4295f79a8d2be0e7849e38da2b8eaf47e96759 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Mon, 27 Jul 2026 12:44:41 +0200 Subject: [PATCH] fix(v1_3): interpret a missing Orientation/@type as relative The UML model this generator consumes documents the interpretation, and it changed with OpenSCENARIO 1.3. For Orientation::type (EAID_5C58550C_F448_4d97_9367_081D3A5AD202): OpenSCENARIO_Ea_1.3.0.xmi: "Relative or absolute definition. Missing type value is interpreted as relative." OpenSCENARIO_Ea_1.2.0.xmi: "... Missing type value is interpreted as absolute." OpenSCENARIO_Ea_1.1.0.xmi: "... Missing type value is interpreted as absolute." In each the attribute carries an empty , and OpenSCENARIO.xsd declares no default either, so the only source of the emitted value is the generator's hand-maintained DefaultValues_*.json - which still says "absolute" for 1.3. Set it to "relative" for 1.3 only, and apply the resulting member initializer in the checked-in generated header so the tree stays consistent until the next generation run. v1_0-v1_2 keep ABSOLUTE, which their models call for. A v1.3 document that omits Orientation/@type therefore now reads back as RELATIVE. _isSetType stays false for an absent attribute, so callers that distinguish "absent" from "set" are unaffected. Signed-off-by: Carlo van Driesten --- cpp/openScenarioLib/generated/v1_3/impl/ApiClassImplV1_3.h | 2 +- .../src/main/resources/input/DefaultValues_1.3.0.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/openScenarioLib/generated/v1_3/impl/ApiClassImplV1_3.h b/cpp/openScenarioLib/generated/v1_3/impl/ApiClassImplV1_3.h index 762b1e5f..a616d737 100644 --- a/cpp/openScenarioLib/generated/v1_3/impl/ApiClassImplV1_3.h +++ b/cpp/openScenarioLib/generated/v1_3/impl/ApiClassImplV1_3.h @@ -14064,7 +14064,7 @@ namespace NET_ASAM_OPENSCENARIO bool _isSetR = false; double _r {0}; bool _isSetType = false; - ReferenceContext _type {ReferenceContext::ReferenceContextEnum::ABSOLUTE}; + ReferenceContext _type {ReferenceContext::ReferenceContextEnum::RELATIVE}; public: diff --git a/generator/de.rac.openscenario.generator/src/main/resources/input/DefaultValues_1.3.0.json b/generator/de.rac.openscenario.generator/src/main/resources/input/DefaultValues_1.3.0.json index c914d98d..57a2853c 100644 --- a/generator/de.rac.openscenario.generator/src/main/resources/input/DefaultValues_1.3.0.json +++ b/generator/de.rac.openscenario.generator/src/main/resources/input/DefaultValues_1.3.0.json @@ -271,7 +271,7 @@ "typeName": "double" }, "type": { - "default": "absolute", + "default": "relative", "typeName": "ReferenceContext" } },