SwDataDefProps - Attributes and Use Cases

Micael Coutinho,autosarapplicationarxml

Data definition properties can be added to data types and data prototypes, to complement their description with various attributes. They play a vital role in the meta-model, providing an enormous amount of information in each meta-class the SwDataDefProps are aggregated. Therefore, understanding each attribute, applicability for the respective meta-classes and precedence will allow you to tame this small beast and take advantage of the Autosar meta-model.

SwDataDefProps Meta-Class and its Attributes

SwDataDefProps specify the structure of elements for calibration, implementation aspects for elements, define the access policy for measurement and calibration (MCD), semantics of data elements and the code generation policy.

The attributes englobed by the SwDataDefProps meta-class are defined below:

Use Cases and Precedence of SwDataDefProps Attributes

Different attributes may be required, optional, ignored or not even defined within one of the classes that aggregates SwDataDefProps, and upstream attributes can be either overwritten or added to the definition of sub-classes, according to different priority settings.

As you will see, SwDataDefProps can be defined for a type, prototype, instantiation, data access and calibration support. The normal use case in terms of precedence, the ones closer to the implementation will overwrite the previous elements. Some exceptions apply, as you have seen, but this is the conclusion.

The precedence chain, from lowest to highest is ApplicationDataType, ImplementationDataType, DataPrototype, InstantiationDataDefProps, ParameterAccess, FlatInstanceDescriptor and McDataInstance.

These relations are outlined in the table below, where the properties not mentioned for the meta-classes that aggregate SwDataDefProps are considered not applicable:

AttributeApplicability on Different Meta-Classes
additionalNativeTypeQualifierDefined on ImplementationDataTypes and SwServiceArgs independently of other definitions. Self-contained definition for McDataInstances. DataPrototypes inherit the definition from ImplementationDataTypes.
annotationDefined by ApplicationDataTypes, SwServiceArgs and SwSystemConsts independently from other definitions. ImplementationDataTypes, DataPrototypes, InstantiatonDataDefProps, ParameterAcceses, McDataInstances and ComSpec.NetworkRepresentation add to the definitions of the preceding elements and ApplicationDataTypes.
baseTypeDefined by ImplementationDataTypes, SwServiceArgs and ComSpec.NetworkRepresentation independently from other definitions. Self-contained definition for McDataInstances. DataPrototypes, InstantiationDataDefProps and ParameterAccess inherit the definition from ImplementationDataTypes and their preceding elements. Attribute is ignored for SwSystemConsts.
compuMethodDefined for ApplicationDataTypes, SwSystemConsts and ComSpec.networkRepresentations independently from other definitions. Self-contained definition for McDataInstances. DataPrototypes, InstantiationDataDefProps and SwServiceArgs inherit their definitions from their preceding elements. ImplementationDataTypes and FlatInstanceDescriptors inherit the properties from preceding elements (if applicable) and its definition adds additional information.
dataConstrDefined for ApplicationDataTypes, DataPrototypes, InstantiationDataDefProps, SwServiceArgs and SwSystemConsts independently from other definitions. ParameterAccesses inherit the element from preceding elements. ImplementationDataTypes using this definition constrain their sub-elements. Self-contained definition for McDataInstances.
displayFormatApplicationDataTypes, ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps, SwServiceArgs and SwSystemConsts define the element independently from other definitions. ParameterAccess inherits the definition from preceding elements. Self-contained definition for McDataInstances.
displayPresentationDefined for ApplicationDataTypes, ImplementationDataTypes, DataPrototypes and InstantiationDataDefProps independently from other definitions. Self-contained definition for McDataInstances.
implementationDataTypeImplementationDataTypes and SwServiceArgs define the element independently from other definitions. DataPrototypes, InstantiationDataDefProps and ParameterAccesses inherit their definition from preceding elements.
invalidValueApplicationDataTypes, ImplementationDataTypes and ComSpec.networkRepresentation define the element independently from other definitions. DataPrototypes and InstantiationDataDefProps inherit their definition from preceding elements. Self-contained definition for McDataInstances.
stepSizeApplicationDataTypes, ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps, ParameterAccesses and FlatInstanceDescriptors define the element independently from other definitions. Self-contained definition for McDataInstances.
swAddrMethodApplicationDataTypes, ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps, FlatInstanceDescriptors and PerInstanceMemories define the element independently from other definitions.
swAlignmentDefined for ImplementationDataTypes, DataPrototypes and InstantiationDataDefProps independently from other elements.
swBitRepresentationDefined for McDataInstances independently from other elements.
swCalibrationAccessDefined for ApplicationDataTypes, ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps, SwServiceArgs, FlatInstanceDescriptors and SwSystemConsts independently from other elements. Self-contained definition for McDataInstances.
swCalPrmAxisSetDefined for ApplicationDataTypes independently from other element definitions (except for the sub-elements swCalprmAxis, swAxisGrouped.swCalprmRef, swCalprmAxisSet.swCalprmAxis and SwAxisIndividual.swVariableRef, which are not defined). Inherited from preceding elements for DataPrototypes, InstantiationDataDefProps and ParameterAccesses. The sub-elements swCalprmAxis, swAxisGrouped.swCalprmRef, swCalprmAxisSet.swCalprmAxis and SwAxisIndividual.swVariableRef are defined for InstantiationDataDefProps and ParameterAccess independently from other definitions. Self-contained definition for McDataInstances.
swComparisonVariableDefined for ParameterAccess independently from other elements. Self-contained definition for McDataInstances.
swDataDependencyDefined for DataPrototypes and InstantiationDataDefProps independently from other elements. Self-contained definition for McDataInstances.
swHostVariableDefined for McDataInstances independently from other elements.
swImplPolicyDefined for ApplicationDataTypes, ImplementationDataTypes, DataPrototypes and SwServiceArgs independently from other elements.
swIntendedResolutionDefined for ApplicationDataTypes independently from other elements, but only in early stages of development, as a reference to the development of CompuMethods.
swInterpolationMethodDefined for ApplicationDataTypes, DataPrototypes, InstantiationDataDefProps and ParameterAccesses independently from other elements. Definition inherited from preceding elements for ImplementationDataDefProps. Self-contained definition for McDataInstances.
swIsVirtualDefined for DataPrototypes and InstantiationDataDefProps independently from other elements. Self-contained definition for McDataInstances.
swPointerTargetPropsDefined for ImplementationDataTypes and SwServiceArgs independently from other elements. Definition inherited from preceding elements for DataPrototypes.
swRecordLayoutDefined for ApplicationDataTypes independently from other elements. Definition inherited from preceding elements for DataPrototypes, InstantiationDataDefProps and ParameterAccesses. Self-contained definition for McDataInstances.
swRefreshTimingDefined for ApplicationDataTypes, ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps, SwServiceArgs, FlatInstanceDescriptors and McDataInstances independently from other elements.
swTextPropsDefined for ApplicationDataTypes independently from other elements. Definition inherited for ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps and ParameterAccesses from preceding elements. Self-contained definition for McDataInstances.
swValueBlockSizeDefined for ApplicationDataTypes independently from other elements. Definition inherited for ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps and ParameterAccesses from preceding elements. Self-contained definition for McDataInstances.
swValueBlockSizeMultDefined for ApplicationDataTypes independently from other elements. Definition inherited for ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps and ParameterAccesses from preceding elements. Self-contained definition for McDataInstances.
UnitDefined for ApplicationDataTypes independently from other elements. Definition inherited for ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps and ParameterAccesses from preceding elements. Self-contained definition for McDataInstances.
valueAxisDataTypeDefined for ApplicationDataTypes independently from other elements. Definition inherited for ImplementationDataTypes, DataPrototypes, InstantiationDataDefProps and SwServiceArgs from preceding elements. Self-contained definition for McDataInstances.

Closing Notes

I know, this article hsa been heavy on meta-classes and attributes, which is not always easy to accompany. But in the case of such an important meta-class, such as SwDataDefProps, which contains (in my opinion, too many) attributes that do not apply to all the meta-classes that aggregate it, things can become confusing. Nonetheless, do not underestimate its potential and keep these rules close by when creating and analysing ARXML models, you will thank me for it.

If you fancy more content of the same kind, have a look into our website. This is an ever-growing library for Autosar. Soon, an eBook will be added into the mix, where much more content like this will take part. Make sure to place yourself on the waiting list!

Author: Micael Coutinho (opens in a new tab)

References:

© AutosarToday —@LinkedIn