API Documentation: autosar_data.abstraction.datatype¶
datatype ¶
ApplicationDataType
module-attribute
¶
ApplicationDataType: TypeAlias = Union[
ApplicationPrimitiveDataType,
ApplicationArrayDataType,
ApplicationRecordDataType,
]
AutosarDataType
module-attribute
¶
AutosarDataType: TypeAlias = Union[
ApplicationDataType, ImplementationDataType
]
DataPointerTarget
module-attribute
¶
DataPointerTarget: TypeAlias = Union[
ImplementationDataType, SwBaseType
]
ApplicationArrayDataType ¶
ApplicationArrayDataType(element: Element)
An application array data type
Use ArPackage.create_application_array_data_type to create a new application array data type.
ApplicationArrayElement ¶
ApplicationArrayElement(element: Element)
ApplicationArraySize ¶
ApplicationArraySize_VariableFullyFlexible ¶
ApplicationArraySize_VariableFullyFlexible(max_size: int)
Bases: ApplicationArraySize
ApplicationArraySize_VariableLinear ¶
ApplicationArraySize_VariableLinear(max_size: int)
Bases: ApplicationArraySize
ApplicationArraySize_VariableRectangular ¶
ApplicationArraySize_VariableRectangular(max_size: int)
Bases: ApplicationArraySize
ApplicationArraySize_VariableSquare ¶
ApplicationArraySize_VariableSquare()
Bases: ApplicationArraySize
ApplicationPrimitiveCategory ¶
The category of an application primitive data type
ApplicationPrimitiveDataType ¶
ApplicationPrimitiveDataType(element: Element)
An application primitive data type
Use [ArPackage::create_application_primitive_data_type
] to create a new application primitive data type.
category
instance-attribute
¶
category: ApplicationPrimitiveCategory
category of the primitive data type
compu_method
instance-attribute
¶
compu_method: CompuMethod
set the compu method of the primitive data type
data_constraint
instance-attribute
¶
data_constraint: DataConstr
data constraint of the primitive data type
ApplicationRecordDataType ¶
ApplicationRecordDataType(element: Element)
An application record data type
Use [ArPackage::create_application_record_data_type
] to create a new application record data type.
create_record_element ¶
create_record_element(
name: str, data_type: ApplicationDataType
) -> ApplicationRecordElement
create a new element in the record data type
record_elements ¶
record_elements() -> Iterator[ApplicationRecordElement]
get an iterator over the record elements of the record data type
ApplicationRecordElement ¶
ApplicationRecordElement(element: Element)
BaseTypeEncoding ¶
BaseTypeEncoding
describes the encoding of a basic data type.
BitfieldEntry ¶
BitfieldEntry(*, text: str, value: float, mask: int)
CompuMethod ¶
CompuMethod(element: Element)
A CompuMethod
describes the conversion between physical and internal values
Use [ArPackage::create_compu_method
] to create a new CompuMethod
create_compu_scale ¶
create_compu_scale(
direction: CompuScaleDirection,
/,
*,
lower_limit: Optional[float] = None,
upper_limit: Optional[float] = None,
) -> CompuScale
create a CompuScale
in the CompuMethod
int_to_phys_compu_scales ¶
int_to_phys_compu_scales() -> Iterator[CompuScale]
Create an iterator over the internal-to-physical CompuScales
phys_to_int_compu_scales ¶
phys_to_int_compu_scales() -> Iterator[CompuScale]
Create an iterator over the physical-to-internal CompuScales
set_content ¶
set_content(content: CompuMethodContent) -> None
set the content of the CompuMethod
Writing to this attribute removes any existing content
CompuMethodBitfieldTextTableContent ¶
CompuMethodCategory ¶
Category of a CompuMethod
CompuMethodContent ¶
Content of a CompuMethod
BitfieldTextTable
instance-attribute
¶
BitfieldTextTable: Type[
CompuMethodContent_BitfieldTextTable
]
ScaleLinearAndTextTable
instance-attribute
¶
ScaleLinearAndTextTable: Type[
CompuMethodContent_ScaleLinearAndTextTable
]
ScaleRationalAndTextTable
instance-attribute
¶
ScaleRationalAndTextTable: Type[
CompuMethodContent_ScaleRationalAndTextTable
]
TabNoInterpretation
instance-attribute
¶
TabNoInterpretation: Type[
CompuMethodContent_TabNoInterpretation
]
CompuMethodContent_BitfieldTextTable ¶
CompuMethodContent_BitfieldTextTable(
entries: List[BitfieldEntry],
)
Bases: CompuMethodContent
CompuMethodContent_Linear ¶
CompuMethodContent_Linear(
*,
direction: CompuScaleDirection,
divisor: float,
factor: float,
offset: float,
lower_limit: Optional[float] = None,
upper_limit: Optional[float] = None,
)
Bases: CompuMethodContent
CompuMethodContent_Rational ¶
CompuMethodContent_Rational(
*,
direction: CompuScaleDirection,
denominator: List[float],
numerator: List[float],
lower_limit: float,
upper_limit: float,
)
Bases: CompuMethodContent
CompuMethodContent_ScaleLinear ¶
CompuMethodContent_ScaleLinear(
*, scales: List[LinearConversionParameters]
)
Bases: CompuMethodContent
CompuMethodContent_ScaleLinearAndTextTable ¶
CompuMethodContent_ScaleLinearAndTextTable(
*,
scales: List[LinearConversionParameters],
texts: List[TextTableEntry],
)
Bases: CompuMethodContent
CompuMethodContent_ScaleRational ¶
CompuMethodContent_ScaleRational(
*, scales: List[RationalConversionParameters]
)
Bases: CompuMethodContent
CompuMethodContent_ScaleRationalAndTextTable ¶
CompuMethodContent_ScaleRationalAndTextTable(
*,
scales: List[RationalConversionParameters],
texts: List[TextTableEntry],
)
Bases: CompuMethodContent
CompuMethodContent_TabNoInterpretation ¶
CompuMethodContent_TabNoInterpretation(
*, entries: List[TabNoIntpEntry]
)
Bases: CompuMethodContent
CompuMethodContent_TextTable ¶
CompuMethodContent_TextTable(
*, texts: List[TextTableEntry]
)
Bases: CompuMethodContent
CompuMethodIdenticalContent ¶
Description of the content of a CompuMethod
whose category is Identical
.
This class is empty, as there are no additional attributes for the identical conversion.
CompuScale ¶
CompuScale(element: Element)
A CompuScale
describes the conversion between physical and internal values, as well as the limits of the scale
CompuScaleDirection ¶
CompuScaleRationalCoefficients ¶
CompuScaleRationalCoefficients(
*, numerator: List[float], denominator: List[float]
)
DataConstr ¶
DataConstr(element: Element)
DataConstr
represents a data constraint.
create_data_constr_rule ¶
create_data_constr_rule(
rule_type: DataConstrType,
/,
*,
lower_limit: Optional[float] = None,
upper_limit: Optional[float] = None,
) -> DataConstrRule
Create a data constraint rule
DataConstrType ¶
DataTypeMap ¶
DataTypeMap(element: Element)
A DataTypeMap
maps an ImplementationDataType
to an ApplicationDataType
DataTypeMappingSet ¶
DataTypeMappingSet(element: Element)
A [DataTypeMappingSet
] contains DataTypeMap
s
Use [ArPackage::create_data_type_mapping_set
] to create a new DataTypeMappingSet
create_data_type_map ¶
create_data_type_map(
implementation_data_type: ImplementationDataType,
application_data_type: ApplicationDataType,
) -> DataTypeMap
Create a new DataTypeMap
in the DataTypeMappingSet
data_type_maps ¶
data_type_maps() -> Iterator[DataTypeMap]
Get an iterator over the DataTypeMap
s in the DataTypeMappingSet
ImplementationDataCategory ¶
The category of an implementation data type
ImplementationDataType ¶
ImplementationDataType(element: Element)
An implementation data type; specifics are determined by the category
Use [ArPackage::create_implementation_data_type
] to create a new implementation data type
array_size
instance-attribute
¶
array_size: Optional[int]
array size of this implementation data type [category: ARRAY]
base_type
instance-attribute
¶
base_type: Optional[SwBaseType]
SwBaseType
of this implementation data type [category: VALUE]
category
instance-attribute
¶
category: Optional[ImplementationDataCategory]
category of this implementation data type
compu_method
instance-attribute
¶
compu_method: Optional[CompuMethod]
CompuMethod
of this implementation data type [category: VALUE, TYPE_REFERENCE
]
data_constraint
instance-attribute
¶
data_constraint: Optional[DataConstr]
DataConstr
of this implementation data type [category: VALUE, TYPE_REFERENCE
]
data_pointer_target
instance-attribute
¶
data_pointer_target: Optional[DataPointerTarget]
get the target type of the data pointer [category: DATA_REFERENCE]
referenced_type
instance-attribute
¶
referenced_type: Optional[ImplementationDataType]
get the referenced implementation data type [category: TYPE_REFERENCE
]
apply_settings ¶
apply_settings(
settings: ImplementationDataTypeSettings,
) -> None
apply the settings to this implementation data type
Calling this method completely replaces the existing settings of the implementation data type, deleting existing sub-elements and creating new ones according to the settings
settings ¶
settings() -> Optional[ImplementationDataTypeSettings]
get the settings of this implementation data type
sub_elements ¶
sub_elements() -> Iterator[ImplementationDataTypeElement]
create an iterator over the sub-elements of this implementation data type
ImplementationDataTypeElement ¶
ImplementationDataTypeElement(element: Element)
An element of an implementation data type
array_size
instance-attribute
¶
array_size: Optional[int]
array size of this implementation data type [category: ARRAY]
base_type
instance-attribute
¶
base_type: Optional[SwBaseType]
SwBaseType
of this implementation data type [category: VALUE]
category
instance-attribute
¶
category: Optional[ImplementationDataCategory]
category of this implementation data type
compu_method
instance-attribute
¶
compu_method: Optional[CompuMethod]
CompuMethod
of this implementation data type [category: VALUE, TYPE_REFERENCE
]
data_constraint
instance-attribute
¶
data_constraint: Optional[DataConstr]
DataConstr
of this implementation data type [category: VALUE, TYPE_REFERENCE
]
data_pointer_target
instance-attribute
¶
data_pointer_target: Optional[DataPointerTarget]
get the target type of the data pointer [category: DATA_REFERENCE]
referenced_type
instance-attribute
¶
referenced_type: Optional[ImplementationDataType]
get the referenced implementation data type [category: TYPE_REFERENCE
]
apply_settings ¶
apply_settings(
settings: ImplementationDataTypeSettings,
) -> None
apply the settings to this implementation data type
Calling this method completely replaces the existing settings of the implementation data type, deleting existing sub-elements and creating new ones according to the settings
settings ¶
settings() -> ImplementationDataTypeSettings
get the settings of this implementation data type
sub_elements ¶
sub_elements() -> Iterator[ImplementationDataTypeElement]
create an iterator over the sub-elements of this implementation data type
ImplementationDataTypeSettings ¶
Settings for an implementation data type
This structure is used to create new implementation data types
Array
staticmethod
¶
Array(
name: str,
*,
length: int,
element_type: ImplementationDataTypeSettings,
) -> ImplementationDataTypeSettings
DataReference
staticmethod
¶
DataReference(
name: str, *, target: DataPointerTarget
) -> ImplementationDataTypeSettings
Structure
staticmethod
¶
Structure(
name: str,
*,
elements: List[ImplementationDataTypeSettings],
) -> ImplementationDataTypeSettings
TypeReference
staticmethod
¶
TypeReference(
name: str,
*,
reftype: ImplementationDataType,
compu_method: Optional[CompuMethod] = None,
data_constraint: Optional[DataConstr] = None,
) -> ImplementationDataTypeSettings
Union
staticmethod
¶
Union(
name: str,
*,
elements: List[ImplementationDataTypeSettings],
) -> ImplementationDataTypeSettings
Value
staticmethod
¶
Value(
name: str,
*,
base_type: SwBaseType,
compu_method: Optional[CompuMethod] = None,
data_constraint: Optional[DataConstr] = None,
) -> ImplementationDataTypeSettings
ImplementationDataTypeSettings_Array ¶
ImplementationDataTypeSettings_DataReference ¶
ImplementationDataTypeSettings_FunctionReference ¶
ImplementationDataTypeSettings_Structure ¶
ImplementationDataTypeSettings_TypeReference ¶
ImplementationDataTypeSettings_Union ¶
ImplementationDataTypeSettings_Value ¶
LinearConversionParameters ¶
LinearConversionParameters(
*,
direction: CompuScaleDirection,
offset: float,
factor: float,
divisor: float,
lower_limit: float,
upper_limit: float,
)
Linear conversion parameters for CompuMethodScaleLinearContent and CompuMethodScaleLinearAndTextTable
RationalConversionParameters ¶
RationalConversionParameters(
*,
direction: CompuScaleDirection,
denominator: List[float],
numerator: List[float],
lower_limit: float,
upper_limit: float,
)
Description of the content of a CompuMethod
whose category is Rational
Initialize self. See help(type(self)) for accurate signature.
SwBaseType ¶
SwBaseType(element: Element)
SwBaseType
is a basic data type.
It is used to define the data types of signals and variables.
base_type_encoding
instance-attribute
¶
base_type_encoding: BaseTypeEncoding
set the base type encoding of the SwBaseType
byte_order
instance-attribute
¶
byte_order: Optional[ByteOrder]
set the byte order of the SwBaseType
The byte order is platform specific and should only be set when it is really needed.
mem_alignment
instance-attribute
¶
mem_alignment: Optional[int]
set the memory alignment of the SwBaseType
The memory alignment describes the slignement in bits. Example: 8 means that the type is aligned to a byte. Since the memory alignment is platform specific, it should only be set when it is really needed.
native_declaration
instance-attribute
¶
native_declaration: Optional[str]
set the native declaration of the SwBaseType
The native declaration is a string that represents the type in the native programming language.
TabNoIntpEntry ¶
TabNoIntpEntry(*, value_in: float, value_out: float)
TextTableEntry ¶
TextTableEntry(*, text: str, value: float)