Closed Mombox closed 5 years ago
@ilazrak Could you please provide minimal example of such arxml file?
Okay I accidentally reproduced the same issue with own ARXML :-) @ebroecker, there is some signed/unsigned guessing based on BASE-TYPE
name. Instead, as described in https://www.autosar.org/fileadmin/user_upload/standards/adaptive/17-10/AUTOSAR_SWS_AdaptivePlatformTypes.pdf, we shall check for <BASE-TYPE-ENCODING>
value:
NONE
for unsigned integers2C
for signed integers "two's complement"IEEE754
for float32/float64BOOLEAN
have you already some progress, or shall I try to fix it? I might find some time to do it.
@Funth0mas You are probably right... Well - you are welcome - if you find time - to fix this
@ilazrak please does the linear scale used in you example file make sense? There are
<COMPU-NUMERATOR>
<V>0</V>
<V>1</V>
</COMPU-NUMERATOR>
<COMPU-DENOMINATOR>
<V>0</V>
<V>1</V>
If I understand correctly that is a polynomial (0 + 1x)/(0 + 1x) = 1, that means constant one... unfortunately this also leads to divide-by-zero in canmatrix because it expects such function to be expressed simply as (1 + 0x)/(1 + 0x) => offset=1/1=1, scale=0/1=0.
@iartez could you please try branch iss385?
Thanks
fixed in development now. Please reopen or open new issue if still not working as expected
@ilazrak please does the linear scale used in you example file make sense? There are
<COMPU-NUMERATOR> <V>0</V> <V>1</V> </COMPU-NUMERATOR> <COMPU-DENOMINATOR> <V>0</V> <V>1</V>
If I understand correctly that is a polynomial (0 + 1_x)/(0 + 1_x) = 1, that means constant one... unfortunately this also leads to divide-by-zero in canmatrix because it expects such function to be expressed simply as (1 + 0_x)/(1 + 0_x) => offset=1/1=1, scale=0/1=0.
Could you please elaborate and explain the calculation of offset and scale value? It's a little confusing due to 1 and 0 values. Thanks in advance :) hope you will take some time to rectify this minuscule query of mine!
@Prabhu6296 you can find more information in https://www.autosar.org/fileadmin/user_upload/standards/classic/4-2/AUTOSAR_TPS_SoftwareComponentTemplate.pdf , section "5.5.1.1 Category Values in the context of a CompuMethod". Than search for CompuNominatorDenominator
.
The offset and scale is expressed as a 2nd order polynomial.
@ebroecker
'unsigned signals' in arxml become 'signed signals' after conversion to dbc, which also affects the Min and Max values of the obtained signals...