setInternalDataPackaging
Description
setInternalDataPackaging(
sets the data packaging setting slMap
,pkgSetting
)pkgSetting
, which configures the default
packaging for internal data stores, signals, and states in the generated code for an AUTOSAR
component model.
Default packaging options differ depending on whether the component model instantiates an AUTOSAR software component once or multiple times. Multi-instance software components can generate reentrant, reusable functions. See Multi-Instance Components for more information.
Valid settings for internal data packaging are:
For single-instance models:
Default
— Accept the default internal data packaging provided by the software. UseDefault
for submodels referenced from AUTOSAR component models.PrivateGlobal
— Package internal variable data without astruct
object and make it private (visible only to
).model
.cPrivateStructure
— Package internal variable data in astruct
object and make it private (visible only to
).model
.cPublicGlobal
— Package internal variable data without astruct
object and make it public (extern
declaration in
).model
.hPublicStructure
— Package internal variable data in astruct
object and make it public (extern
declaration in
).model
.h
For multi-instance models:
Default
— Accept the default internal data packaging provided by the software. UseDefault
for submodels referenced from AUTOSAR component models.CTypedPerInstanceMemory
— Package internal variable data for each instance of an AUTOSAR software component to use C-typed per-instance memory in astruct
object and make it public (declaration in
).model
.hArTypedPerInstanceMemory
— Package internal variable data for each instance of an AUTOSAR software component to use AUTOSAR-typed per-instance memory in astruct
object and make it public (declaration inRte_Type.h
). SettingArTypedPerInstanceMemory
is not supported for models that contain model references.
When the data packaging setting is ArTypedPerInstanceMemory
, code
generation does not support bitfield optimizations. If you configure
ArTypedPerInstanceMemory
, configuration parameters
BooleansAsBitfields
, StateBitsets
, and
DataBitsets
must be disabled.
If the data packaging setting is PrivateGlobal
or
PrivateStructure
, building the model generates the header file
, even when the model
configuration parameter File packaging format (Embedded Coder) is set to
model
_private.hCompact
.
If the model configuration option Generate separate internal data per entry-point function (Embedded Coder) is set for the AUTOSAR model, task-based internal data grouping overrides the AUTOSAR internal data packaging setting. However, the AUTOSAR setting determines the public or private visibility of the generated task-based internal data groups.