You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the OSC XML standard the class ParameterAssignment has an attribute 'value' of type 'string' so that it can hold any data type (see here).
This works, if the value is hardcoded. But when trying to set the value through a parameter of type 'double', the OSC API will return an error upon parsing:
Value '231.100000' cannot be converted to type 'string' (30,71)
Interestingly when setting the parameter value to an integer number (e.g. 231.0 but still with parameterType double) in the ParameterDeclaration, the OSC API will not return an error upon parsing.
To Reproduce
Here is the scenario and catalog I used for reproducing the error: type_conversion.zip
Expected behavior
No error by OSC API when parsing double parameters into attributes of type string.
Further info
Probably the problem originates from here:
The double value must be basically an integer, otherwise the "if" clause will not evaluate to true.
In v1_0 when there was still the parameter resolver instead of the expression resolver, everything could be converted to a string, while now there is a constraint:
Describe the bug
In the OSC XML standard the class ParameterAssignment has an attribute 'value' of type 'string' so that it can hold any data type (see here).
This works, if the value is hardcoded. But when trying to set the value through a parameter of type 'double', the OSC API will return an error upon parsing:
Interestingly when setting the parameter value to an integer number (e.g. 231.0 but still with parameterType double) in the ParameterDeclaration, the OSC API will not return an error upon parsing.
To Reproduce
Here is the scenario and catalog I used for reproducing the error:
type_conversion.zip
Expected behavior
No error by OSC API when parsing double parameters into attributes of type string.
Further info
Probably the problem originates from here:
openscenario.api.test/cpp/expressionsLib/src/ExprValue.cpp
Line 433 in 62058bf
The double value must be basically an integer, otherwise the "if" clause will not evaluate to true.
In v1_0 when there was still the parameter resolver instead of the expression resolver, everything could be converted to a string, while now there is a constraint:
openscenario.api.test/cpp/openScenarioLib/src/v1_0/parameter/ParameterResolverV1_0.cpp
Line 43 in 62058bf
The text was updated successfully, but these errors were encountered: