API Documentation: autosar_data.abstraction.datatype¶
datatype ¶
ApplicationDataType
module-attribute
¶
ApplicationDataType: TypeAlias = Union[
ApplicationPrimitiveDataType,
ApplicationArrayDataType,
ApplicationRecordDataType,
]
AutosarDataType
module-attribute
¶
AutosarDataType: TypeAlias = Union[
ApplicationDataType, ImplementationDataType
]
CompositeRuleBasedValueArgument
module-attribute
¶
CompositeRuleBasedValueArgument: TypeAlias = Union[
ApplicationValueSpecification,
ApplicationRuleBasedValueSpecification,
]
CompositeValueSpecification
module-attribute
¶
CompositeValueSpecification: TypeAlias = Union[
ArrayValueSpecification, RecordValueSpecification
]
DataPointerTarget
module-attribute
¶
DataPointerTarget: TypeAlias = Union[
ImplementationDataType, SwBaseType
]
DataPrototype
module-attribute
¶
DataPrototype: TypeAlias = Union[
ArgumentDataPrototype,
ParameterDataPrototype,
VariableDataPrototype,
ApplicationArrayElement,
ApplicationRecordElement,
]
ValueSpecification
module-attribute
¶
ValueSpecification: TypeAlias = Union[
ArrayValueSpecification,
RecordValueSpecification,
TextValueSpecification,
NumericalValueSpecification,
ConstantReference,
ApplicationValueSpecification,
NotAvailableValueSpecification,
ReferenceValueSpecification,
ApplicationRuleBasedValueSpecification,
CompositeRuleBasedValueSpecification,
NumericalRuleBasedValueSpecification,
List[ValueSpecification],
Tuple[ValueSpecification, ...],
str,
float,
]
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)
ApplicationRuleBasedValueSpecification ¶
ApplicationRuleBasedValueSpecification(
category: ApplicationPrimitiveCategory,
sw_axis_cont: List[RuleBasedAxisCont],
sw_value_cont: RuleBasedValueCont,
/,
*,
label: Optional[str] = None,
)
An application rule based value specification
category
instance-attribute
¶
category: ApplicationPrimitiveCategory
category of the application rule based value specification
label
instance-attribute
¶
label: Optional[str]
label of the application rule based value specification, if any
sw_axis_cont
instance-attribute
¶
sw_axis_cont: List[RuleBasedAxisCont]
list of RuleBasedAxisCont
objects in the application rule based value specification
sw_value_cont
instance-attribute
¶
sw_value_cont: RuleBasedValueCont
RuleBasedValueCont
of the application rule based value specification
ApplicationValueSpecification ¶
ApplicationValueSpecification(
category: ApplicationPrimitiveCategory,
sw_axis_conts: List[SwAxisCont],
sw_value_cont: SwValueCont,
*,
label: Optional[str] = None,
)
An application value specification
category
instance-attribute
¶
category: ApplicationPrimitiveCategory
category of the application value specification
label
instance-attribute
¶
label: Optional[str]
label of the application value specification, if any
sw_axis_conts
instance-attribute
¶
sw_axis_conts: List[SwAxisCont]
list of SwAxisCont
objects in the application value specification
sw_value_cont
instance-attribute
¶
sw_value_cont: SwValueCont
SwValueCont
of the application value specification
ArrayValueSpecification ¶
ArrayValueSpecification(
values: List[ValueSpecification],
/,
*,
label: Optional[str] = None,
)
BaseTypeEncoding ¶
BaseTypeEncoding
describes the encoding of a basic data type.
BitfieldEntry ¶
BitfieldEntry(*, text: str, value: float, mask: int)
CompositeRuleBasedValueSpecification ¶
CompositeRuleBasedValueSpecification(
argument: List[CompositeValueSpecification],
compound_primitive_argument: List[
CompositeRuleBasedValueArgument
],
max_size_to_fill: Optional[int],
rule: RuleBasedFillUntil,
/,
*,
label: Optional[str] = None,
)
A composite rule based value specification
argument
instance-attribute
¶
argument: List[CompositeValueSpecification]
list of CompositeValueSpecification
objects in the composite rule based value specification
compound_primitive_argument
instance-attribute
¶
compound_primitive_argument: List[
CompositeRuleBasedValueArgument
]
list of CompositeRuleBasedValueArgument
objects in the composite rule based value specification
label
instance-attribute
¶
label: Optional[str]
label of the composite rule based value specification, if any
max_size_to_fill
instance-attribute
¶
max_size_to_fill: Optional[int]
maximum size to fill in the composite rule based value specification
rule
instance-attribute
¶
rule: RuleBasedFillUntil
rule for filling the composite rule based value specification
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]
)
ConstantReference ¶
ConstantReference(
constant: ConstantSpecification,
/,
*,
label: Optional[str] = None,
)
ConstantSpecification ¶
ConstantSpecification(element: Element)
A ConstantSpecification
is a specification of a constant value.
Use [ArPackage::create_constant_specification
] to create a new ConstantSpecification
.
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
NotAvailableValueSpecification ¶
NotAvailableValueSpecification(
*,
default_pattern: Optional[int] = None,
label: Optional[str] = None,
)
A value specification that is not available. It is used for ApplicationRecordElements where the attribute isOptional ist set to the value True.
NumericalRuleBasedValueSpecification ¶
NumericalRuleBasedValueSpecification(
rule_based_values: RuleBasedValueSpecification,
/,
*,
label: Optional[str] = None,
)
A numerical rule based value specification
This is a value specification that contains a rule based value specification for numerical values.
NumericalValueSpecification ¶
NumericalValueSpecification(
value: float, /, *, label: Optional[str] = None
)
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.
RecordValueSpecification ¶
RecordValueSpecification(
values: List[ValueSpecification],
/,
*,
label: Optional[str] = None,
)
ReferenceValueSpecification ¶
ReferenceValueSpecification(
reference_value: DataPrototype,
/,
*,
label: Optional[str] = None,
)
A reference value specification
This is a value specification that contains a reference to a DataPrototype which defines the target value specification.
RuleArgument ¶
argument of a rule-based value specification
VtfNumber
instance-attribute
¶
VtfNumber: Type[RuleArgument_VtfNumber]
VTF: argument is a numerical value
RuleArgument_VtfNumber ¶
RuleArgument_VtfNumber(value: float)
RuleArgument_VtfText ¶
RuleArgument_VtfText(value: str)
RuleBasedAxisCont ¶
RuleBasedAxisCont(
category: SwAxisContCategory,
sw_array_size: List[int],
sw_axis_index: int,
rule_based_values: RuleBasedValueSpecification,
unit: Optional[Unit] = None,
)
Specification of the axis values of a compound primitive data type (curve, map) in a rule-based definition
RuleBasedFillUntil ¶
standard fill rules for rule based value specifications
End
instance-attribute
¶
End: RuleBasedFillUntil
FILL_UNTIL_END
: fills the value of the last RuleBasedValueSpecification.arguments
until the last element of the array has been filled
MaxSize
instance-attribute
¶
MaxSize: RuleBasedFillUntil
FILL_UNTIL_MAX_SIZE
: fills the value of the last RuleBasedValueSpecification.arguments
until maxSizeToFill elements of the array have been filled
RuleBasedValueCont ¶
RuleBasedValueCont(
rule_based_values: RuleBasedValueSpecification,
sw_array_size: List[int],
unit: Optional[Unit] = None,
)
Specification of the value content of a compound primitive data type (curve, map) in a rule-based definition
rule_based_values
instance-attribute
¶
rule_based_values: RuleBasedValueSpecification
rule based value specification of the value content
RuleBasedValueSpecification ¶
RuleBasedValueSpecification(
arguments: List[RuleArgument],
rule: RuleBasedFillUntil,
max_size_to_fill: Optional[int] = None,
)
A rule based value specification
arguments
instance-attribute
¶
arguments: List[RuleArgument]
list of RuleArgument
objects in the rule based value specification
max_size_to_fill
instance-attribute
¶
max_size_to_fill: Optional[int]
maximum size to fill in the rule based value specification, if any
rule
instance-attribute
¶
rule: RuleBasedFillUntil
rule for filling the rule based value specification
SwAxisCont ¶
SwAxisCont(
category: SwAxisContCategory,
sw_array_size: List[int],
sw_axis_index: int,
sw_values_phys: List[SwValue],
/,
*,
unit: Optional[Unit] = None,
unit_display_name: Optional[str] = None,
)
Specification of the axis values of a compound primitive data type (curve, map)
sw_axis_index
instance-attribute
¶
sw_axis_index: int
index of the axis in the compound primitive data type
sw_values_phys
instance-attribute
¶
sw_values_phys: List[SwValue]
list of SwValue
objects in the axis content
unit_display_name
instance-attribute
¶
unit_display_name: Optional[str]
display name of the unit, if any
SwAxisContCategory ¶
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.
SwValue ¶
a single value of a compound primitive data type (curve, map)
SwValueCont ¶
SwValueCont(
sw_array_size: List[int], sw_values_phys: List[SwValue]
)
SwValue_V ¶
SwValue_V(value: float)
SwValue_Vf ¶
SwValue_Vf(value: float)
SwValue_Vg ¶
SwValue_Vg(
values: List[SwValue], label: Optional[str] = None
)
SwValue_Vt ¶
SwValue_Vt(value: str)
SwValue_VtfNumber ¶
SwValue_VtfNumber(value: float)
SwValue_VtfText ¶
SwValue_VtfText(value: str)
TabNoIntpEntry ¶
TabNoIntpEntry(*, value_in: float, value_out: float)
TextTableEntry ¶
TextTableEntry(*, text: str, value: float)
TextValueSpecification ¶
TextValueSpecification(
value: str, /, *, label: Optional[str] = None
)