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.

array_element instance-attribute

array_element: ApplicationArrayElement

array element of the array data type

element instance-attribute

element: Element

name instance-attribute

name: str

set_size

set_size(size: ApplicationArraySize) -> None

set the size specification of the array

size

size() -> ApplicationArraySize

get the size specification of the array: Variable, Fixed, etc.

ApplicationArrayElement

ApplicationArrayElement(element: Element)

An element in an application array data type

data_type instance-attribute

data_type: ApplicationDataType

data type of the array element

element instance-attribute

element: Element

name instance-attribute

name: str

ApplicationArraySize

definition of the size type of an application array data type

Fixed instance-attribute

Fixed: Type[ApplicationArraySize_Fixed]

VariableFullyFlexible instance-attribute

VariableFullyFlexible: Type[
    ApplicationArraySize_VariableFullyFlexible
]

VariableLinear instance-attribute

VariableLinear: Type[ApplicationArraySize_VariableLinear]

VariableRectangular instance-attribute

VariableRectangular: Type[
    ApplicationArraySize_VariableRectangular
]

VariableSquare instance-attribute

VariableSquare: Type[ApplicationArraySize_VariableSquare]

ApplicationArraySize_Fixed

ApplicationArraySize_Fixed(length: int)

Bases: ApplicationArraySize

length instance-attribute

length: int

ApplicationArraySize_VariableFullyFlexible

ApplicationArraySize_VariableFullyFlexible(max_size: int)

Bases: ApplicationArraySize

max_size instance-attribute

max_size: int

ApplicationArraySize_VariableLinear

ApplicationArraySize_VariableLinear(max_size: int)

Bases: ApplicationArraySize

max_size instance-attribute

max_size: int

ApplicationArraySize_VariableRectangular

ApplicationArraySize_VariableRectangular(max_size: int)

Bases: ApplicationArraySize

max_size instance-attribute

max_size: int

ApplicationArraySize_VariableSquare

ApplicationArraySize_VariableSquare()

ApplicationPrimitiveCategory

The category of an application primitive data type

Boolean instance-attribute

Boolean: ApplicationPrimitiveCategory

ComAxis instance-attribute

ComAxis: ApplicationPrimitiveCategory

Cube4 instance-attribute

Cube4: ApplicationPrimitiveCategory

Cube5 instance-attribute

Cube5: ApplicationPrimitiveCategory

Cuboid instance-attribute

Cuboid: ApplicationPrimitiveCategory

Curve instance-attribute

Curve: ApplicationPrimitiveCategory

Map instance-attribute

Map: ApplicationPrimitiveCategory

ResAxis instance-attribute

ResAxis: ApplicationPrimitiveCategory

String instance-attribute

String: ApplicationPrimitiveCategory

ValBlk instance-attribute

ValBlk: ApplicationPrimitiveCategory

Value instance-attribute

Value: ApplicationPrimitiveCategory

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

element instance-attribute

element: Element

name instance-attribute

name: str

unit instance-attribute

unit: Unit

unit 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.

element instance-attribute

element: Element

name instance-attribute

name: str

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)

An element in an application record data type

data_type instance-attribute

data_type: ApplicationDataType

data type of the record element

element instance-attribute

element: Element

name instance-attribute

name: str

BaseTypeEncoding

BaseTypeEncoding describes the encoding of a basic data type.

BcdPacked instance-attribute

BcdPacked: BaseTypeEncoding

BcdUnpacked instance-attribute

BcdUnpacked: BaseTypeEncoding

Boolean instance-attribute

Boolean: BaseTypeEncoding

DspFractional instance-attribute

DspFractional: BaseTypeEncoding

Ieee754 instance-attribute

Ieee754: BaseTypeEncoding

Iso8859_1 instance-attribute

Iso8859_1: BaseTypeEncoding

Iso8859_2 instance-attribute

Iso8859_2: BaseTypeEncoding

NoEncoding instance-attribute

NoEncoding: BaseTypeEncoding

OnesComplement instance-attribute

OnesComplement: BaseTypeEncoding

SignMagnitude instance-attribute

SignMagnitude: BaseTypeEncoding

TwosComplement instance-attribute

TwosComplement: BaseTypeEncoding

Ucs2 instance-attribute

Ucs2: BaseTypeEncoding

Utf16 instance-attribute

Utf16: BaseTypeEncoding

Utf8 instance-attribute

Utf8: BaseTypeEncoding

Void instance-attribute

Void: BaseTypeEncoding

Windows1252 instance-attribute

Windows1252: BaseTypeEncoding

BitfieldEntry

BitfieldEntry(*, text: str, value: float, mask: int)

A single entry of a bitfield text table conversion

mask instance-attribute

mask: int

bit mask of this entry

text instance-attribute

text: str

text of this entry

value instance-attribute

value: float

numeric value of this entry

CompuMethod

CompuMethod(element: Element)

A CompuMethod describes the conversion between physical and internal values

Use [ArPackage::create_compu_method] to create a new CompuMethod

category instance-attribute

category: CompuMethodCategory

category of the CompuMethod

element instance-attribute

element: Element

name instance-attribute

name: str

content

content() -> Optional[CompuMethodContent]

get the CompuMethodContent of the 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

A single entry of a bitfield text table conversion

mask instance-attribute

mask: int

bit mask of this entry

text instance-attribute

text: str

text of this entry

value instance-attribute

value: float

numeric value of this entry

CompuMethodCategory

Category of a CompuMethod

BitfieldTextTable instance-attribute

BitfieldTextTable: CompuMethodCategory

Identical instance-attribute

Identical: CompuMethodCategory

Linear instance-attribute

Linear: CompuMethodCategory

Rational instance-attribute

Rational: CompuMethodCategory

ScaleLinear instance-attribute

ScaleLinear: CompuMethodCategory

ScaleLinearAndTextTable instance-attribute

ScaleLinearAndTextTable: CompuMethodCategory

ScaleRational instance-attribute

ScaleRational: CompuMethodCategory

ScaleRationalAndTextTable instance-attribute

ScaleRationalAndTextTable: CompuMethodCategory

TabNoInterpretation instance-attribute

TabNoInterpretation: CompuMethodCategory

TextTable instance-attribute

TextTable: CompuMethodCategory

CompuMethodContent

Content of a CompuMethod

BitfieldTextTable instance-attribute

BitfieldTextTable: Type[
    CompuMethodContent_BitfieldTextTable
]

Identical instance-attribute

Identical: Type[CompuMethodContent_Identical]

Linear instance-attribute

Linear: Type[CompuMethodContent_Linear]

Rational instance-attribute

Rational: Type[CompuMethodContent_Rational]

ScaleLinear instance-attribute

ScaleLinear: Type[CompuMethodContent_ScaleLinear]

ScaleLinearAndTextTable instance-attribute

ScaleLinearAndTextTable: Type[
    CompuMethodContent_ScaleLinearAndTextTable
]

ScaleRational instance-attribute

ScaleRational: Type[CompuMethodContent_ScaleRational]

ScaleRationalAndTextTable instance-attribute

ScaleRationalAndTextTable: Type[
    CompuMethodContent_ScaleRationalAndTextTable
]

TabNoInterpretation instance-attribute

TabNoInterpretation: Type[
    CompuMethodContent_TabNoInterpretation
]

TextTable instance-attribute

TextTable: Type[CompuMethodContent_TextTable]

CompuMethodContent_BitfieldTextTable

CompuMethodContent_BitfieldTextTable(
    entries: List[BitfieldEntry],
)

Bases: CompuMethodContent

entries instance-attribute

entries: List[BitfieldEntry]

CompuMethodContent_Identical

CompuMethodContent_Identical()

CompuMethodContent_Linear

CompuMethodContent_Linear(
    *,
    direction: CompuScaleDirection,
    divisor: float,
    factor: float,
    offset: float,
    lower_limit: Optional[float] = None,
    upper_limit: Optional[float] = None,
)

Bases: CompuMethodContent

direction instance-attribute

direction: CompuScaleDirection

divisor instance-attribute

divisor: float

factor instance-attribute

factor: float

lower_limit instance-attribute

lower_limit: Optional[float]

offset instance-attribute

offset: float

upper_limit instance-attribute

upper_limit: Optional[float]

CompuMethodContent_Rational

CompuMethodContent_Rational(
    *,
    direction: CompuScaleDirection,
    denominator: List[float],
    numerator: List[float],
    lower_limit: float,
    upper_limit: float,
)

Bases: CompuMethodContent

denominator instance-attribute

denominator: List[float]

direction instance-attribute

direction: CompuScaleDirection

lower_limit instance-attribute

lower_limit: float

numerator instance-attribute

numerator: List[float]

upper_limit instance-attribute

upper_limit: float

CompuMethodContent_ScaleLinear

CompuMethodContent_ScaleLinear(
    *, scales: List[LinearConversionParameters]
)

Bases: CompuMethodContent

scales instance-attribute

scales: List[LinearConversionParameters]

CompuMethodContent_ScaleLinearAndTextTable

CompuMethodContent_ScaleLinearAndTextTable(
    *,
    scales: List[LinearConversionParameters],
    texts: List[TextTableEntry],
)

Bases: CompuMethodContent

scales instance-attribute

scales: List[LinearConversionParameters]

texts instance-attribute

texts: List[TextTableEntry]

CompuMethodContent_ScaleRational

CompuMethodContent_ScaleRational(
    *, scales: List[RationalConversionParameters]
)

Bases: CompuMethodContent

scales instance-attribute

scales: List[RationalConversionParameters]

CompuMethodContent_ScaleRationalAndTextTable

CompuMethodContent_ScaleRationalAndTextTable(
    *,
    scales: List[RationalConversionParameters],
    texts: List[TextTableEntry],
)

Bases: CompuMethodContent

scales instance-attribute

scales: List[RationalConversionParameters]

texts instance-attribute

texts: List[TextTableEntry]

CompuMethodContent_TabNoInterpretation

CompuMethodContent_TabNoInterpretation(
    *, entries: List[TabNoIntpEntry]
)

Bases: CompuMethodContent

entries instance-attribute

entries: List[TabNoIntpEntry]

CompuMethodContent_TextTable

CompuMethodContent_TextTable(
    *, texts: List[TextTableEntry]
)

Bases: CompuMethodContent

texts instance-attribute

texts: List[TextTableEntry]

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

content instance-attribute

content: Union[CompuScaleRationalCoefficients, str, int]

content of the CompuScale

element instance-attribute

element: Element

lower_limit instance-attribute

lower_limit: Optional[float]

lower limit of the CompuScale

mask instance-attribute

mask: Optional[int]

mask of the CompuScale, applicable for BitfieldTextTable

upper_limit instance-attribute

upper_limit: Optional[float]

upper limit of the CompuScale

CompuScaleDirection

Direction of a CompuScale

IntToPhys instance-attribute

IntToPhys: CompuScaleDirection

PhysToInt instance-attribute

PhysToInt: CompuScaleDirection

CompuScaleRationalCoefficients

CompuScaleRationalCoefficients(
    *, numerator: List[float], denominator: List[float]
)

Rational coefficients of a CompuScale

denominator instance-attribute

denominator: List[float]

list of denominator coefficients

numerator instance-attribute

numerator: List[float]

list of numerator coefficients

DataConstr

DataConstr(element: Element)

DataConstr represents a data constraint.

element instance-attribute

element: Element

name instance-attribute

name: str

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

data_constr_rules

data_constr_rules() -> Iterator[DataConstrRule]

Get all data constraint rules

DataConstrRule

DataConstrRule(element: Element)

DataConstrRule represents a data constraint rule.

element instance-attribute

element: Element

lower_limit instance-attribute

lower_limit: Optional[float]

get the lower limit

rule_type instance-attribute

rule_type: DataConstrType

get the constraint type

upper_limit instance-attribute

upper_limit: Optional[float]

get the upper limit

DataConstrType

The type of a data constraint rule

Internal instance-attribute

Internal: DataConstrType

Physical instance-attribute

Physical: DataConstrType

DataTypeMap

DataTypeMap(element: Element)

A DataTypeMap maps an ImplementationDataType to an ApplicationDataType

application_data_type instance-attribute

application_data_type: ApplicationDataType

Get the ApplicationDataType of the DataTypeMap

element instance-attribute

element: Element

implementation_data_type instance-attribute

implementation_data_type: ImplementationDataType

Get the ImplementationDataType of the DataTypeMap

DataTypeMappingSet

DataTypeMappingSet(element: Element)

A [DataTypeMappingSet] contains DataTypeMaps

Use [ArPackage::create_data_type_mapping_set] to create a new DataTypeMappingSet

element instance-attribute

element: Element

name instance-attribute

name: str

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 DataTypeMaps in the DataTypeMappingSet

ImplementationDataCategory

The category of an implementation data type

Array instance-attribute

Array: ImplementationDataCategory

DataReference instance-attribute

DataReference: ImplementationDataCategory

FunctionReference instance-attribute

FunctionReference: ImplementationDataCategory

Structure instance-attribute

Structure: ImplementationDataCategory

TypeReference instance-attribute

TypeReference: ImplementationDataCategory

Union instance-attribute

Union: ImplementationDataCategory

Value instance-attribute

Value: ImplementationDataCategory

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]

element instance-attribute

element: Element

name instance-attribute

name: str

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]

element instance-attribute

element: Element

name instance-attribute

name: str

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

FunctionReference staticmethod

FunctionReference(
    name: str,
) -> 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

Bases: ImplementationDataTypeSettings

element_type instance-attribute

element_type: ImplementationDataType

length instance-attribute

length: int

name instance-attribute

name: str

ImplementationDataTypeSettings_DataReference

Bases: ImplementationDataTypeSettings

data_pointer_target instance-attribute

data_pointer_target: DataPointerTarget

get the target type of the data pointer

name instance-attribute

name: str

ImplementationDataTypeSettings_FunctionReference

Bases: ImplementationDataTypeSettings

name instance-attribute

name: str

ImplementationDataTypeSettings_Structure

Bases: ImplementationDataTypeSettings

elements instance-attribute

elements: List[ImplementationDataTypeElement]

name instance-attribute

name: str

ImplementationDataTypeSettings_TypeReference

Bases: ImplementationDataTypeSettings

compu_method instance-attribute

compu_method: CompuMethod

data_constraint instance-attribute

data_constraint: DataConstr

name instance-attribute

name: str

reftype instance-attribute

reftype: ImplementationDataType

ImplementationDataTypeSettings_Union

Bases: ImplementationDataTypeSettings

elements instance-attribute

elements: List[ImplementationDataTypeElement]

name instance-attribute

name: str

ImplementationDataTypeSettings_Value

Bases: ImplementationDataTypeSettings

base_type instance-attribute

base_type: SwBaseType

compu_method instance-attribute

compu_method: CompuMethod

data_constraint instance-attribute

data_constraint: DataConstr

name instance-attribute

name: str

LinearConversionParameters

LinearConversionParameters(
    *,
    direction: CompuScaleDirection,
    offset: float,
    factor: float,
    divisor: float,
    lower_limit: float,
    upper_limit: float,
)

Linear conversion parameters for CompuMethodScaleLinearContent and CompuMethodScaleLinearAndTextTable

direction instance-attribute

direction: CompuScaleDirection

direction of the conversion

divisor instance-attribute

divisor: float

divisor

factor instance-attribute

factor: float

factor

lower_limit instance-attribute

lower_limit: float

lower limit of the scale

offset instance-attribute

offset: float

offset

upper_limit instance-attribute

upper_limit: float

upper limit of the scale

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.

denominator instance-attribute

denominator: List[float]

list of numerator coefficients

direction instance-attribute

direction: CompuScaleDirection

direction of the conversion

lower_limit instance-attribute

lower_limit: float

lower limit of the scale

numerator instance-attribute

numerator: List[float]

list of denominator coefficients

upper_limit instance-attribute

upper_limit: float

upper limit of the scale

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

bit_length instance-attribute

bit_length: Optional[int]

get the bit length 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.

element instance-attribute

element: Element

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.

name instance-attribute

name: str

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)

a single entry of a CompuMethod whose category is TabNoInterpretation

value_in instance-attribute

value_in: float

input value

value_out instance-attribute

value_out: float

output value

TextTableEntry

TextTableEntry(*, text: str, value: float)

text instance-attribute

text: str

text

value instance-attribute

value: float

value

Unit

Unit(element: Element)

Unit represents a unit of measurement.

Use [ArPackage::create_unit] to create a new unit.

display_name instance-attribute

display_name: Optional[str]

display name of the unit

element instance-attribute

element: Element

name instance-attribute

name: str