Why do I get an error about evaluating an expression with the MATLAB built-in data type functions like 'uint8' when importing ARXML for an AUTOSAR 4.0 software component?

9 views (last 30 days)
Why do I get an error about evaluating an expression with the MATLAB built-in data type functions like 'uint8' when importing ARXML for an AUTOSAR 4.0 software component? For example:
Error using autosar.mm.mm2sl.SLModelBuilder.set_paramExpression 'uint8(1)' for block 'myModel/block' returns aSimulink.AliasType object that has property values that need to be evaluated. This object should be instantiated in a workspace andreferenced by name in Simulink

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Sep 2021
Edited: MathWorks Support Team on 27 Sep 2021

Simulink imports AUTOSAR data types from the ARXML according to the rules mentioned here:https://www.mathworks.com/help/autosar/ug/data-types.html#btdawtt

If you use an application data type name that matches a Simulink built-in data type (
double, single, int8, uint8, int16, uint16, int32, uint32, boolean) the imported Simulink.AliasType now shadows the built-in MATLAB functions that might be used to configure the Simulink model created for the imported AUTOSAR software component. In general, application data type names should abstract away from implementation details such as signedness or size, and typically have physically relevant names like EngSpeed.
If you know you want to use a data type that directly maps to a Simulink type (or really any other standard platform type), reference an implementation type/platform type rather than an application type.

More Answers (0)

Categories

Find more on AUTOSAR Blockset in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!