API Documentation: autosar_data.abstraction.software_component

Example

from autosar_data.abstraction import *
from autosar_data.abstraction.datatype import *
from autosar_data.abstraction.software_component import *

model = AutosarModelAbstraction.create("swc.arxml")
package = model.get_or_create_package("/Package")

# create some software components
composition_type = package.create_composition_sw_component_type("CompositionType")
app_swc1_type = package.create_application_sw_component_type("AppSwc1Type")
app_swc1 = composition_type.create_component("AppSwc1", app_swc1_type)
app_swc2_type = package.create_application_sw_component_type("AppSwc2Type")
app_swc2 = composition_type.create_component("AppSwc2", app_swc2_type)

# create a data type
sw_base_type = package.create_sw_base_type(
    "SwBaseType", 16, BaseTypeEncoding.TwosComplement
)
sr_data_type = package.create_implementation_data_type(
    ImplementationDataTypeSettings.Value("ImplValue", base_type=sw_base_type)
)

# create interfaces and ports
cs_interface = package.create_client_server_interface("CsInterface")
cs_operation = cs_interface.create_operation("CsOp")
sr_interface = package.create_sender_receiver_interface("SrInterface")
sr_data = sr_interface.create_data_element("SrData", sr_data_type)

# app1 provides the server interface, app2 requires it
app1_cs_p_port = app_swc1_type.create_p_port("P_CS", cs_interface)
app2_cs_r_port = app_swc2_type.create_r_port("R_CS", cs_interface)
# connect the ports
composition_type.create_assembly_connector(
    "CS_Assembly", app1_cs_p_port, app_swc1, app2_cs_r_port, app_swc2
)

# app1 receives data from app2 using the sender-receiver interface
app1_sr_r_port = app_swc1_type.create_r_port("R_Sr", sr_interface)
app2_sr_p_port = app_swc2_type.create_p_port("P_Sr", sr_interface)
# connect the ports
composition_type.create_assembly_connector(
    "Sr_Assembly", app1_sr_r_port, app_swc1, app2_sr_p_port, app_swc2
)

# create internal behavior for app1
app1_behavior = app_swc1_type.create_swc_internal_behavior("InternalBehavior")
# app1 needs a server runnable to process calls to its cs_operation
server_runnable = app1_behavior.create_runnable_entity("ServerRunnable")
app1_behavior.create_operation_invoked_event(
    "CsOperationEvent", server_runnable, cs_operation, app1_cs_p_port
)

# create a cyclically triggered runnable for app1
cyclic_runnable = app1_behavior.create_runnable_entity("CyclicRunnable")
app1_behavior.create_timing_event("CyclicEvent", cyclic_runnable, 0.01)

# allow the cyclic runnable to read data from the sender-receiver port
cyclic_runnable.create_data_receive_point_by_argument(
    "ReceiveData", sr_data, app1_sr_r_port
)

# create internal behavior for app2
app2_behavior = app_swc2_type.create_swc_internal_behavior("InternalBehavior")
# app2 has a cyclic runnable that sends data to app1 and calls the server operation
cyclic_runnable = app2_behavior.create_runnable_entity("CyclicRunnable")
app2_behavior.create_timing_event("CyclicEvent", cyclic_runnable, 0.01)
# allow the cyclic runnable to send data to app1
cyclic_runnable.create_data_send_point("SendData", sr_data, app2_sr_p_port)
# allow the cyclic runnable to call the server operation on app1
cyclic_runnable.create_synchronous_server_call_point(
    "ServerCall", cs_operation, app2_cs_r_port
)

API

software_component

PortInterface module-attribute

PortInterface: TypeAlias = Union[
    SenderReceiverInterface,
    ClientServerInterface,
    ModeSwitchInterface,
    NvDataInterface,
    ParameterInterface,
    TriggerInterface,
]

PortPrototype module-attribute

PortPrototype: TypeAlias = Union[
    PPortPrototype, PRPortPrototype, RPortPrototype
]

RTEEvent module-attribute

RTEEvent: TypeAlias = Union[
    AsynchronousServerCallReturnsEvent,
    BackgroundEvent,
    DataReceiveErrorEvent,
    DataReceivedEvent,
    DataSendCompletedEvent,
    DataWriteCompletedEvent,
    ExternalTriggerOccurredEvent,
    InitEvent,
    InternalTriggerOccurredEvent,
    ModeSwitchedAckEvent,
    OperationInvokedEvent,
    OsTaskExecutionEvent,
    SwcModeManagerErrorEvent,
    SwcModeSwitchEvent,
    TimingEvent,
    TransformerHardErrorEvent,
]

SwComponentType module-attribute

SwComponentType: TypeAlias = Union[
    ApplicationSwComponentType,
    ComplexDeviceDriverSwComponentType,
    CompositionSwComponentType,
    EcuAbstractionSwComponentType,
    SensorActuatorSwComponentType,
    ServiceSwComponentType,
]

ApplicationError

ApplicationError(element: Element)

An ApplicationError represents an error that can be returned by a client server operation

element instance-attribute

element: Element

error_code instance-attribute

error_code: int

the error code of the application error

name instance-attribute

name: str

ApplicationSwComponentType

ApplicationSwComponentType(element: Element)

An ApplicationSwComponentType is a software component that provides application functionality

Use [ArPackage::create_application_sw_component_type] to create a new application sw component type.

element instance-attribute

element: Element

name instance-attribute

name: str

create_p_port

create_p_port(
    name: str, port_interface: PortInterface
) -> PPortPrototype

create a new provided port with the given name and port interface

create_port_group

create_port_group(name: str) -> PortGroup

create a new port group

create_pr_port

create_pr_port(
    name: str, port_interface: PortInterface
) -> PRPortPrototype

create a new provided required port with the given name and port interface

create_r_port

create_r_port(
    name: str, port_interface: PortInterface
) -> RPortPrototype

create a new required port with the given name and port interface

create_swc_internal_behavior

create_swc_internal_behavior(
    name: str,
) -> SwcInternalBehavior

create an SwcInternalBehavior for the component

A component can have only one internal behavior, but since the internal behavior is a variation point, more than one internal behavior can be created. In this case the variation point settings must ensure that only one internal behavior is active.

instances

instances() -> List[SwComponentPrototype]

list all instances of the component type

parent_compositions

parent_compositions() -> List[CompositionSwComponentType]

list all compositions containing instances of the component type

ports

ports() -> Iterator[PortPrototype]

get an iterator over the ports of the component

swc_internal_behaviors

swc_internal_behaviors() -> Iterator[SwcInternalBehavior]

iterate over all swc internal behaviors - typically zero or one

ArgumentDataPrototype

ArgumentDataPrototype(element: Element)

An ArgumentDataPrototype represents an argument in a ClientServerOperation

data_type instance-attribute

data_type: Optional[AutosarDataType]

data type of the argument

direction instance-attribute

direction: Optional[ArgumentDirection]

direction of the argument

element instance-attribute

element: Element

name instance-attribute

name: str

ArgumentDirection

The ArgumentDirection defines the direction of an argument in a ClientServerOperation

Input arguments are used to pass data from the client to the server and are usualy passed by value. Output arguments are used to pass data from the server to the client and are usually passed by reference. In/Out arguments are used to pass data in both directions and are usually passed by reference.

In instance-attribute

In: ArgumentDirection

InOut instance-attribute

InOut: ArgumentDirection

Out instance-attribute

Out: ArgumentDirection

AssemblySwConnector

AssemblySwConnector(element: Element)

An AssemblySwConnector connects ports of two SwCompositionTypes.

element instance-attribute

element: Element

name instance-attribute

name: str

p_port instance-attribute

p_port: Optional[PortPrototype]

get the provided port of the assembly connector

p_sw_component instance-attribute

p_sw_component: Optional[SwComponentPrototype]

get the software component that contains the provided port of the assembly connector

r_port instance-attribute

r_port: Optional[PortPrototype]

get the required port of the assembly connector

r_sw_component instance-attribute

r_sw_component: Optional[SwComponentPrototype]

get the software component that contains the required port of the assembly connector

AsynchronousServerCallReturnsEvent

AsynchronousServerCallReturnsEvent(element: Element)

an asynchronous server call completed

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

BackgroundEvent

BackgroundEvent(element: Element)

starts a runnable for background processing at low priority

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

ClientServerInterface

ClientServerInterface(element: Element)

A ClientServerInterface defines a set of operations that can be implemented by a server and called by a client

Use [ArPackage::create_client_server_interface] to create a new client server interface

element instance-attribute

element: Element

is_service instance-attribute

is_service: Optional[bool]

Get/Set if the client server interface is a service interface

name instance-attribute

name: str

create_operation

create_operation(name: str) -> ClientServerOperation

add an operation to the client server interface

create_possible_error

create_possible_error(
    name: str, error_code: int
) -> ApplicationError

Create a new ClientServerInterface Add a possible error to the client server interface

operations

operations() -> Iterator[ClientServerOperation]

iterate over all operations

possible_errors

possible_errors() -> Iterator[ApplicationError]

iterate over all application errors

ClientServerOperation

ClientServerOperation(element: Element)

A ClientServerOperation defines an operation in a ClientServerInterface

element instance-attribute

element: Element

name instance-attribute

name: str

add_possible_error

add_possible_error(error: ApplicationError) -> None

add a reference to possible error to the operation

arguments

arguments() -> Iterator[ArgumentDataPrototype]

iterate over all arguments

create_argument

create_argument(
    name: str,
    data_type: AutosarDataType,
    direction: ArgumentDirection,
) -> ArgumentDataPrototype

Create a new ClientServerOperation Add an argument to the operation

possible_errors

possible_errors() -> Iterator[ApplicationError]

Get the possible errors of the operation

ComplexDeviceDriverSwComponentType

ComplexDeviceDriverSwComponentType(element: Element)

A ComplexDeviceDriverSwComponentType is a software component that provides complex device driver functionality

Use [ArPackage::create_complex_device_driver_sw_component_type] to create a new complex device driver sw component type.

element instance-attribute

element: Element

name instance-attribute

name: str

create_p_port

create_p_port(
    name: str, port_interface: PortInterface
) -> PPortPrototype

create a new provided port with the given name and port interface

create_port_group

create_port_group(name: str) -> PortGroup

create a new port group

create_pr_port

create_pr_port(
    name: str, port_interface: PortInterface
) -> PRPortPrototype

create a new provided required port with the given name and port interface

create_r_port

create_r_port(
    name: str, port_interface: PortInterface
) -> RPortPrototype

create a new required port with the given name and port interface

create_swc_internal_behavior

create_swc_internal_behavior(
    name: str,
) -> SwcInternalBehavior

create an SwcInternalBehavior for the component

A component can have only one internal behavior, but since the internal behavior is a variation point, more than one internal behavior can be created. In this case the variation point settings must ensure that only one internal behavior is active.

instances

instances() -> List[SwComponentPrototype]

list of all instances of the component type

parent_compositions

parent_compositions() -> List[CompositionSwComponentType]

list all compositions containing instances of the component type

ports

ports() -> Iterator[PortPrototype]

get an iterator over the ports of the component

swc_internal_behaviors

swc_internal_behaviors() -> Iterator[SwcInternalBehavior]

iterate over all swc internal behaviors - typically zero or one

CompositionSwComponentType

CompositionSwComponentType(element: Element)

A CompositionSwComponentType is a software component that contains other software components

Use [ArPackage::create_composition_sw_component_type] to create a new composition sw component type.

element instance-attribute

element: Element

name instance-attribute

name: str

components

components() -> Iterator[SwComponentPrototype]

get an iterator over the components of the composition

connectors

connectors() -> Iterator[AssemblySwConnector]

iterate over all connectors

create_assembly_connector

create_assembly_connector(
    name: str,
    port_1: PortPrototype,
    sw_prototype_1: SwComponentPrototype,
    port_2: PortPrototype,
    sw_prototype_2: SwComponentPrototype,
) -> AssemblySwConnector

create a new delegation connector between an inner port and an outer port this is the actual implementation of the public method, but without the generic parameters create a new assembly connector between two ports of contained software components

The two ports must be compatible.

create_component

create_component(
    name: str, component_type: SwComponentType
) -> SwComponentPrototype

create a component of type component_type in the composition

It is not allowed to form cycles in the composition hierarchy, and this will return an error

create_delegation_connector

create_delegation_connector(
    name: str,
    inner_port: PortPrototype,
    inner_sw_prototype: SwComponentPrototype,
    outer_port: PortPrototype,
) -> DelegationSwConnector

create a new delegation connector between an inner port and an outer port

The two ports must be compatible.

create_p_port

create_p_port(
    name: str, port_interface: PortInterface
) -> PPortPrototype

create a new provided port with the given name and port interface

create_pass_through_connector

create_pass_through_connector(
    name: str, port_1: PortPrototype, port_2: PortPrototype
) -> PassThroughSwConnector

create a new passthrough connector between two outer ports of the composition

The two ports must be compatible.

create_port_group

create_port_group(name: str) -> PortGroup

create a new port group

create_pr_port

create_pr_port(
    name: str, port_interface: PortInterface
) -> PRPortPrototype

create a new provided required port with the given name and port interface

create_r_port

create_r_port(
    name: str, port_interface: PortInterface
) -> RPortPrototype

create a new required port with the given name and port interface

instances

instances() -> List[SwComponentPrototype]

list of all instances of the component type

is_parent_of

is_parent_of(other: SwComponentType) -> bool

check if the composition is a parent (or grand-parent, etc.) of the component

parent_compositions

parent_compositions() -> Iterator[
    CompositionSwComponentType
]

iterator over all compositions containing instances of the component type

ports

ports() -> Iterator[PortPrototype]

get an iterator over the ports of the component

DataReceiveErrorEvent

DataReceiveErrorEvent(element: Element)

A DataReceiveErrorEvent is a subclass of RTEEvent which triggers a RunnableEntity when a data receive error occurs

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

DataReceivedEvent

DataReceivedEvent(element: Element)

A DataReceivedEvent is a subclass of RTEEvent which triggers a RunnableEntity when data is received

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

variable_data_prototype instance-attribute

variable_data_prototype: Optional[
    Tuple[VariableDataPrototype, PortPrototype]
]

Get the VariableDataPrototype that triggers the DataReceivedEvent

set_variable_data_prototype

set_variable_data_prototype(
    variable_data_prototype: VariableDataPrototype,
    context_port: PPortPrototype,
) -> None

Set the VariableDataPrototype that triggers the DataReceivedEvent

DataSendCompletedEvent

DataSendCompletedEvent(element: Element)

A DataSendCompletedEvent is a subclass of RTEEvent which triggers a RunnableEntity when data is sent

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

DataWriteCompletedEvent

DataWriteCompletedEvent(element: Element)

A DataWriteCompletedEvent is a subclass of RTEEvent which triggers a RunnableEntity when data is written

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

DelegationSwConnector

DelegationSwConnector(element: Element)

A DelegationSwConnector connects a port of a software component that is contained inside a SwCompositionType with a port of the SwCompositionType.

element instance-attribute

element: Element

inner_port instance-attribute

inner_port: Optional[PortPrototype]

get the inner port of the delegation connector

inner_sw_component instance-attribute

inner_sw_component: Optional[SwComponentPrototype]

get the software component that contains the inner port of the delegation connector

name instance-attribute

name: str

outer_port instance-attribute

outer_port: Optional[PortPrototype]

get the outer port of the delegation connector

EcuAbstractionSwComponentType

EcuAbstractionSwComponentType(element: Element)

The EcuAbstractionSwComponentType is a special AtomicSwComponentType that resides between a software-component that wants to access ECU periphery and the Microcontroller Abstraction

Use [ArPackage::create_ecu_abstraction_sw_component_type] to create a new ECU abstraction sw component type.

element instance-attribute

element: Element

name instance-attribute

name: str

create_p_port

create_p_port(
    name: str, port_interface: PortInterface
) -> PPortPrototype

create a new provided port with the given name and port interface

create_port_group

create_port_group(name: str) -> PortGroup

create a new port group

create_pr_port

create_pr_port(
    name: str, port_interface: PortInterface
) -> PRPortPrototype

create a new provided required port with the given name and port interface

create_r_port

create_r_port(
    name: str, port_interface: PortInterface
) -> RPortPrototype

create a new required port with the given name and port interface

create_swc_internal_behavior

create_swc_internal_behavior(
    name: str,
) -> SwcInternalBehavior

create an SwcInternalBehavior for the component

A component can have only one internal behavior, but since the internal behavior is a variation point, more than one internal behavior can be created. In this case the variation point settings must ensure that only one internal behavior is active.

instances

instances() -> List[SwComponentPrototype]

list all instances of the component type

parent_compositions

parent_compositions() -> List[CompositionSwComponentType]

list all compositions containing instances of the component type

ports

ports() -> Iterator[PortPrototype]

get an iterator over the ports of the component

swc_internal_behaviors

swc_internal_behaviors() -> Iterator[SwcInternalBehavior]

iterate over all swc internal behaviors - typically zero or one

ExternalTriggerOccurredEvent

ExternalTriggerOccurredEvent(element: Element)

A ExternalTriggerOccurredEvent is a subclass of RTEEvent which triggers a RunnableEntity when an external trigger occurs

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

InitEvent

InitEvent(element: Element)

A InitEvent is a subclass of RTEEvent which triggers a RunnableEntity when the software component is initialized

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

InternalTriggerOccurredEvent

InternalTriggerOccurredEvent(element: Element)

A InternalTriggerOccurredEvent is a subclass of RTEEvent which triggers a RunnableEntity when an internal trigger occurs

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

ModeAccessPoint

ModeAccessPoint(element: Element)

A ModeAccessPointprovides the ability to access the current mode of a ModeDeclarationGroup

element instance-attribute

element: Element

mode_group instance-attribute

mode_group: Optional[Tuple[ModeGroup, PortPrototype]]

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

Get the RunnableEntity that contains the ModeAccessPoint

set_mode_group

set_mode_group(
    mode_group: ModeGroup, context_port: PortPrototype
) -> None

Set the mode group and context port of the ModeAccessPoint

ModeActivationKind

Kind of mode switch condition used for activation of an event

OnEntry instance-attribute

OnEntry: ModeActivationKind

The mode is activated on entry to the mode.

OnExit instance-attribute

OnExit: ModeActivationKind

The mode is activated on exit from the mode.

OnTransition instance-attribute

OnTransition: ModeActivationKind

The mode is activated on transition from the first mode to the second mode.

ModeDeclaration

ModeDeclaration(element: Element)

A ModeDeclaration represents a mode declaration in a ModeDeclarationGroup

element instance-attribute

element: Element

name instance-attribute

name: str

value instance-attribute

value: Optional[int]

value of the mode declaration, if any.

ModeDeclarationGroup

ModeDeclarationGroup(element: Element)

A ModeDeclarationGroup is a collection of mode declarations.

category instance-attribute

category: Optional[ModeDeclarationGroupCategory]

category of the mode declaration group

element instance-attribute

element: Element

initial_mode instance-attribute

initial_mode: Optional[ModeDeclaration]

initial mode of the mode declaration group, if any

name instance-attribute

name: str

on_transition_value instance-attribute

on_transition_value: Optional[int]

Value to be used when switching to the mode declaration group, if any. This is the onTransitionValue attribute of the mode declaration group.

create_mode_declaration

create_mode_declaration(name: str) -> ModeDeclaration

Create a new mode declaration in the group

mode_declarations

mode_declarations() -> Iterator[ModeDeclaration]

iterate over all mode declarations in the group

ModeDeclarationGroupCategory

Category of mode declaration groupy, which defines the ordering of the modes in the group

AlphabeticOrder instance-attribute

AlphabeticOrder: ModeDeclarationGroupCategory

Alphabetic order of the modes in the group.

ExplicitOrder instance-attribute

ExplicitOrder: ModeDeclarationGroupCategory

Ordering of modes in the mode declaration group is made explicit by the value, which must be set for each mode. Additonally, the on_transition_value attribute must be set in this case.

ModeGroup

ModeGroup(element: Element)

A ModeGroup represents a mode group in a ModeSwitchInterface

element instance-attribute

element: Element

mode_declaration_group instance-attribute

mode_declaration_group: ModeDeclarationGroup

Get/Set the mode declaration group of the mode group

name instance-attribute

name: str

ModeSwitchInterface

ModeSwitchInterface(element: Element)

A ModeSwitchInterface defines a set of modes that can be switched

Use [ArPackage::create_mode_switch_interface] to create a new mode switch interface

element instance-attribute

element: Element

is_service instance-attribute

is_service: Optional[bool]

Get/Set if the mode switch interface is a service interface

mode_group instance-attribute

mode_group: Optional[ModeGroup]

Get the mode group of the mode switch interface

name instance-attribute

name: str

create_mode_group

create_mode_group(
    name: str, mode_declaration_group: ModeDeclarationGroup
) -> ModeGroup

Create a new mode group in the mode switch interface The ModeSwitchInterface can only contain one mode group

ModeSwitchPoint

ModeSwitchPoint(element: Element)

A ModeSwitchPoint allows a RunnableEntity to switch modes in a ModeDeclarationGroup

element instance-attribute

element: Element

mode_group instance-attribute

mode_group: Optional[Tuple[ModeGroup, PortPrototype]]

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

Get the RunnableEntity that contains the ModeSwitchPoint

set_mode_group

set_mode_group(
    mode_group: ModeGroup, context_port: PortPrototype
) -> None

Set the mode group and context port of the ModeSwitchPoint

ModeSwitchedAckEvent

ModeSwitchedAckEvent(element: Element)

A ModeSwitchedAckEvent is a subclass of RTEEvent which triggers a RunnableEntity when a mode switch is acknowledged

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

NvDataInterface

NvDataInterface(element: Element)

An NvDataInterface defines non-volatile data that can be accessed through the interface

Use [ArPackage::create_nv_data_interface] to create a new non-volatile data interface

element instance-attribute

element: Element

is_service instance-attribute

is_service: Optional[bool]

Get/Set if the Nv-data interface is a service interface

name instance-attribute

name: str

OperationInvokedEvent

OperationInvokedEvent(element: Element)

A OperationInvokedEvent is a subclass of RTEEvent which triggers a RunnableEntity when an operation is invoked

client_server_operation instance-attribute

client_server_operation: Tuple[
    ClientServerOperation, PPortPrototype
]

Get the ClientServerOperation that triggers the OperationInvokedEvent

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the OperationInvokedEvent

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

SwcInternalBehavior that contains the event

set_client_server_operation

set_client_server_operation(
    client_server_operation: ClientServerOperation,
    context_p_port: PPortPrototype,
) -> None

Set the ClientServerOperation that is triggers the OperationInvokedEvent

OsTaskExecutionEvent

OsTaskExecutionEvent(element: Element)

A OsTaskExecutionEvent is a subclass of RTEEvent which triggers a RunnableEntity when an OS task is executed

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

PPortPrototype

PPortPrototype(element: Element)

PPortPrototype represents a provided port prototype

component_type instance-attribute

component_type: Optional[SwComponentType]

component type containing the port prototype

element instance-attribute

element: Element

name instance-attribute

name: str

port_interface instance-attribute

port_interface: Optional[PortInterface]

port interface of the port prototype

PRPortPrototype

PRPortPrototype(element: Element)

PRPortPrototype represents a provided and required port prototype

component_type instance-attribute

component_type: Optional[SwComponentType]

component type containing the port prototype

element instance-attribute

element: Element

name instance-attribute

name: str

port_interface instance-attribute

port_interface: Optional[PortInterface]

port interface of the port prototype

ParameterDataPrototype

ParameterDataPrototype(element: Element)

A ParameterDataPrototype represents a parameter in a ParameterInterface

data_type instance-attribute

data_type: Optional[AutosarDataType]

data type of the parameter

element instance-attribute

element: Element

init_value instance-attribute

init_value: Optional[ValueSpecification]

interface instance-attribute

interface: Optional[SenderReceiverInterface]

Get the interface containing the parameter

name instance-attribute

name: str

ParameterInterface

ParameterInterface(element: Element)

A ParameterInterface defines a set of parameters that can be accessed

Use [ArPackage::create_parameter_interface] to create a new parameter interface

element instance-attribute

element: Element

is_service instance-attribute

is_service: Optional[bool]

Get/Set if the parameter interface is a service interface

name instance-attribute

name: str

create_parameter

create_parameter(
    name: str, data_type: AutosarDataType
) -> ParameterDataPrototype

Add a new parameter to the parameter interface

parameters

parameters() -> Iterator[ParameterDataPrototype]

iterate over all parameters

PassThroughSwConnector

PassThroughSwConnector(element: Element)

A PassThroughSwConnector connects two ports of a SwCompositionType.

element instance-attribute

element: Element

name instance-attribute

name: str

p_port instance-attribute

p_port: Optional[PortPrototype]

get the provided port of the pass-through connector

r_port instance-attribute

r_port: Optional[PortPrototype]

get the required port of the pass-through connector

PortGroup

PortGroup(element: Element)

PortGroup represents a group of ports

element instance-attribute

element: Element

name instance-attribute

name: str

RPortPrototype

RPortPrototype(element: Element)

RPortPrototype represents a required port prototype

component_type instance-attribute

component_type: Optional[SwComponentType]

component type containing the port prototype

element instance-attribute

element: Element

name instance-attribute

name: str

port_interface instance-attribute

port_interface: Optional[PortInterface]

port interface of the port prototype

RootSwCompositionPrototype

RootSwCompositionPrototype(element: Element)

The RootSwCompositionPrototype is a special kind of SwComponentPrototype that represents the root of the composition hierarchy

composition instance-attribute

composition: Optional[CompositionSwComponentType]

composition that this root component is based on

element instance-attribute

element: Element

name instance-attribute

name: str

RunnableEntity

RunnableEntity(element: Element)

A RunnableEntity is a function that can be executed by the RTE

element instance-attribute

element: Element

name instance-attribute

name: str

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

SwcInternalBehavior that contains the RunnableEntity

create_data_read_access

create_data_read_access(
    name: str,
    data_element: VariableDataPrototype,
    port: PortPrototype,
) -> VariableAccess

add implicit read access to a data element of a sender-receiver PortPrototype

this results in Rte_IRead_<port>_<data_element> being generated

create_data_receive_point_by_argument

create_data_receive_point_by_argument(
    name: str,
    data_element: VariableDataPrototype,
    port: PortPrototype,
) -> VariableAccess

add explicit read access by argument to a data element of a sender-receiver PortPrototype

create_data_receive_point_by_value

create_data_receive_point_by_value(
    name: str,
    data_element: VariableDataPrototype,
    port: PortPrototype,
) -> VariableAccess

add explicit read access by value to a data element of a sender-receiver PortPrototype

create_data_send_point

create_data_send_point(
    name: str,
    data_element: VariableDataPrototype,
    port: PortPrototype,
) -> VariableAccess

add a data send point to a data element of a sender-receiver PortPrototype

create_data_write_access

create_data_write_access(
    name: str,
    data_element: VariableDataPrototype,
    port: PortPrototype,
) -> VariableAccess

add implicit write access to a data element of a sender-receiver PortPrototype

this results in Rte_IWrite_<port>_<data_element> being generated

create_mode_access_point

create_mode_access_point(
    name: str,
    mode_group: ModeGroup,
    context_port: PortPrototype,
) -> ModeAccessPoint

create a mode access point that allows the runnable to access the current mode of a mode group

create_mode_switch_point

create_mode_switch_point(
    name: str,
    mode_group: ModeGroup,
    context_port: PortPrototype,
) -> ModeSwitchPoint

create a mode switch point that allows the runnable to switch modes in a mode group

create_synchronous_server_call_point

create_synchronous_server_call_point(
    name: str,
    operation: ClientServerOperation,
    port: PPortPrototype,
) -> SynchronousServerCallPoint

create a synchronous server call point that allows the runnable to call a server operation

data_read_accesses

data_read_accesses() -> Iterator[VariableAccess]

iterate over all data read accesses of the runnable entity

data_receive_points_by_argument

data_receive_points_by_argument() -> Iterator[
    VariableAccess
]

iterate over all data receive points by argument of the runnable entity

data_receive_points_by_value

data_receive_points_by_value() -> Iterator[VariableAccess]

iterate over all data receive points by value of the runnable entity

data_send_points

data_send_points() -> Iterator[VariableAccess]

iterate over all data send points of the runnable entity

data_write_accesses

data_write_accesses() -> Iterator[VariableAccess]

iterate over all data write accesses of the runnable entity

events

events() -> List[RTEEvent]

Iterate over all events that can trigger the RunnableEntity

mode_access_points

mode_access_points() -> Iterator[ModeAccessPoint]

iterate over all mode access points of the runnable entity

mode_switch_points

mode_switch_points() -> Iterator[ModeSwitchPoint]

iterate over all mode switch points of the runnable entity

synchronous_server_call_points

synchronous_server_call_points() -> Iterator[
    SynchronousServerCallPoint
]

iterate over all synchronous server call points of the runnable entity

SenderReceiverInterface

SenderReceiverInterface(element: Element)

A SenderReceiverInterface defines a set of data elements that can be sent and received

Use [ArPackage::create_sender_receiver_interface] to create a new sender receiver interface

element instance-attribute

element: Element

is_service instance-attribute

is_service: Optional[bool]

Get/Set if the sender/receiver interface is a service interface

name instance-attribute

name: str

create_data_element

create_data_element(
    name: str, data_type: AutosarDataType
) -> VariableDataPrototype

Add a new data element to the sender receiver interface

data_elements

data_elements() -> Iterator[VariableDataPrototype]

iterate over all data elements

SensorActuatorSwComponentType

SensorActuatorSwComponentType(element: Element)

SensorActuatorSwComponentType is used to connect sensor/acutator devices to the ECU configuration

Use [ArPackage::create_sensor_actuator_sw_component_type] to create a new sensor/actuator sw component type.

element instance-attribute

element: Element

name instance-attribute

name: str

create_p_port

create_p_port(
    name: str, port_interface: PortInterface
) -> PPortPrototype

create a new provided port with the given name and port interface

create_port_group

create_port_group(name: str) -> PortGroup

create a new port group

create_pr_port

create_pr_port(
    name: str, port_interface: PortInterface
) -> PRPortPrototype

create a new provided required port with the given name and port interface

create_r_port

create_r_port(
    name: str, port_interface: PortInterface
) -> RPortPrototype

create a new required port with the given name and port interface

create_swc_internal_behavior

create_swc_internal_behavior(
    name: str,
) -> SwcInternalBehavior

create an SwcInternalBehavior for the component

A component can have only one internal behavior, but since the internal behavior is a variation point, more than one internal behavior can be created. In this case the variation point settings must ensure that only one internal behavior is active.

instances

instances() -> List[SwComponentPrototype]

list all instances of the component type

parent_compositions

parent_compositions() -> List[CompositionSwComponentType]

list all compositions containing instances of the component type

ports

ports() -> Iterator[PortPrototype]

get an iterator over the ports of the component

swc_internal_behaviors

swc_internal_behaviors() -> Iterator[SwcInternalBehavior]

iterate over all swc internal behaviors - typically zero or one

ServiceSwComponentType

ServiceSwComponentType(element: Element)

ServiceSwComponentType is used for configuring services for a given ECU. Instances of this class should only be created in ECU Configuration phase for the specific purpose of the service configuration.

Use [ArPackage::create_service_sw_component_type] to create a new service sw component type.

element instance-attribute

element: Element

name instance-attribute

name: str

create_p_port

create_p_port(
    name: str, port_interface: PortInterface
) -> PPortPrototype

create a new provided port with the given name and port interface

create_port_group

create_port_group(name: str) -> PortGroup

create a new port group

create_pr_port

create_pr_port(
    name: str, port_interface: PortInterface
) -> PRPortPrototype

create a new provided required port with the given name and port interface

create_r_port

create_r_port(
    name: str, port_interface: PortInterface
) -> RPortPrototype

create a new required port with the given name and port interface

create_swc_internal_behavior

create_swc_internal_behavior(
    name: str,
) -> SwcInternalBehavior

create an SwcInternalBehavior for the component

A component can have only one internal behavior, but since the internal behavior is a variation point, more than one internal behavior can be created. In this case the variation point settings must ensure that only one internal behavior is active.

instances

instances() -> List[SwComponentPrototype]

list all instances of the component type

parent_compositions

parent_compositions() -> List[CompositionSwComponentType]

list all compositions containing instances of the component type

ports

ports() -> Iterator[PortPrototype]

get an iterator over the ports of the component

swc_internal_behaviors

swc_internal_behaviors() -> Iterator[SwcInternalBehavior]

iterate over all swc internal behaviors - typically zero or one

SwComponentPrototype

SwComponentPrototype(element: Element)

A SwComponentPrototype is an instance of a software component type

element instance-attribute

element: Element

name instance-attribute

name: str

SwcInternalBehavior

SwcInternalBehavior(element: Element)

The SwcInternalBehavior of a software component type describes the details that are needed to generate the RTE.

element instance-attribute

element: Element

name instance-attribute

name: str

sw_component_type instance-attribute

sw_component_type: Optional[SwComponentType]

software component type that contains the SwcInternalBehavior

add_data_type_mapping_set

add_data_type_mapping_set(
    data_type_mapping_set: DataTypeMappingSet,
) -> None

Add a reference to a DataTypeMappingSet to the SwcInternalBehavior

create_background_event

create_background_event(
    name: str, runnable: RunnableEntity
) -> BackgroundEvent

Create a new BackgroundEvent in the SwcInternalBehavior that triggers a runnable at low priority

create_data_received_event

create_data_received_event(
    name: str,
    runnable: RunnableEntity,
    variable_data_prototype: VariableDataPrototype,
    context_port: PortPrototype,
) -> DataReceivedEvent

Create a new DataReceivedEvent in the SwcInternalBehavior that triggers a runnable when data is received

create_init_event

create_init_event(
    name: str, runnable: RunnableEntity
) -> InitEvent

Create a new InitEvent in the SwcInternalBehavior

create_mode_switch_event

create_mode_switch_event(
    name: str,
    runnable: RunnableEntity,
    activation: ModeActivationKind,
    context_port: PortPrototype,
    mode_declaration: ModeDeclaration,
    /,
    second_mode_declaration: Optional[
        ModeDeclaration
    ] = None,
) -> SwcModeSwitchEvent

create a mode switch event that triggers a runnable in the SwcInternalBehavior when the mode is switched

create_operation_invoked_event

create_operation_invoked_event(
    name: str,
    runnable: RunnableEntity,
    client_server_operation: ClientServerOperation,
    context_p_port: PPortPrototype,
) -> OperationInvokedEvent

Create a new OperationInvokedEvent in the SwcInternalBehavior

create_os_task_execution_event

create_os_task_execution_event(
    name: str, runnable: RunnableEntity
) -> OsTaskExecutionEvent

Create a new OsTaskExecutionEvent in the SwcInternalBehavior that triggers a runnable when an OS task is executed

create_runnable_entity

create_runnable_entity(name: str) -> RunnableEntity

Create a new RunnableEntity in the SwcInternalBehavior

create_timing_event

create_timing_event(
    name: str, runnable: RunnableEntity, period: float
) -> TimingEvent

Create a timing event that triggers a runnable in the SwcInternalBehavior

data_type_mapping_sets

data_type_mapping_sets() -> Iterator[DataTypeMappingSet]

iterator over all DataTypeMappingSet references in the SwcInternalBehavior

events

events() -> Iterator[RTEEvent]

create an iterator over all events in the SwcInternalBehavior

runnable_entities

runnable_entities() -> Iterator[RunnableEntity]

Get an iterator over all RunnableEntities in the SwcInternalBehavior

SwcModeManagerErrorEvent

SwcModeManagerErrorEvent(element: Element)

A SwcModeManagerErrorEvent is a subclass of RTEEvent which triggers a RunnableEntity when a mode manager error occurs

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

SwcModeSwitchEvent

SwcModeSwitchEvent(element: Element)

A SwcModeSwitchEvent is a subclass of RTEEvent which triggers a RunnableEntity when a mode switch occurs

element instance-attribute

element: Element

mode_activation_kind instance-attribute

mode_activation_kind: Optional[ModeActivationKind]

Get/Set the mode activation kind of the SwcModeSwitchEvent

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

mode_declarations

mode_declarations() -> Optional[List[ModeDeclaration]]

Get the mode declarations that trigger the SwcModeSwitchEvent

The list contains one or two mode declarations, depending on the activation kind. If the activation kind is OnTransition, the list contains two mode declarations. Otherwise, it contains one mode declaration.

set_mode_declaration

set_mode_declaration(
    ontext_port: PortPrototype,
    mode_declaration: ModeDeclaration,
    /,
    second_mode_declaration: Optional[
        ModeDeclaration
    ] = None,
) -> None

Set the mode declaration within a context port that triggers the SwcModeSwitchEvent

The second mode must be provided if the activation kind OnTransition is configured. In that case only transitions between the two modes trigger the event.

SynchronousServerCallPoint

SynchronousServerCallPoint(element: Element)

A SynchronousServerCallPoint allows a RunnableEntity to call a server operation synchronously

client_server_operation instance-attribute

client_server_operation: Optional[
    Tuple[ClientServerOperation, PPortPrototype]
]

Get the ClientServerOperation that is called by the SynchronousServerCallPoint

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that contains the SynchronousServerCallPoint

set_client_server_operation

set_client_server_operation(
    client_server_operation: ClientServerOperation,
    context_p_port: PPortPrototype,
) -> None

Set the ClientServerOperation that is called by the SynchronousServerCallPoint

TimingEvent

TimingEvent(element: Element)

A TimingEvent is a subclass of RTEEvent which triggers a RunnableEntity periodically

element instance-attribute

element: Element

name instance-attribute

name: str

period instance-attribute

period: Optional[float]

period of the TimingEvent

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

TransformerHardErrorEvent

TransformerHardErrorEvent(element: Element)

A TransformerHardErrorEvent is a subclass of RTEEvent which triggers a RunnableEntity when a transformer hard error occurs

element instance-attribute

element: Element

element of the TransformerHardErrorEvent

name instance-attribute

name: str

name of the TransformerHardErrorEvent

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that is triggered by the AsynchronousServerCallCompleted

swc_internal_behavior instance-attribute

swc_internal_behavior: Optional[SwcInternalBehavior]

Get the SwcInternalBehavior that contains the event

TriggerInterface

TriggerInterface(element: Element)

A TriggerInterface declares a number of triggers that can be sent by an trigger source

Use [ArPackage::create_trigger_interface] to create a new trigger interface

element instance-attribute

element: Element

is_service instance-attribute

is_service: Optional[bool]

Get/Set if the trigger interface is a service interface

name instance-attribute

name: str

VariableAccess

VariableAccess(element: Element)

A VariableAccess allows a RunnableEntity to access a variable in various contexts

accessed_variable instance-attribute

accessed_variable: Optional[
    Tuple[VariableDataPrototype, PortPrototype]
]

Get the variable that is accessed by the VariableAccess

element instance-attribute

element: Element

name instance-attribute

name: str

runnable_entity instance-attribute

runnable_entity: Optional[RunnableEntity]

RunnableEntity that contains the VariableAccess

set_accessed_variable

set_accessed_variable(
    variable: VariableDataPrototype,
    context_port: PortPrototype,
) -> None

Set the variable that is accessed by the VariableAccess

VariableDataPrototype

VariableDataPrototype(element: Element)

A VariableDataPrototype represents a data element in a SenderReceiverInterface

data_type instance-attribute

data_type: Optional[AutosarDataType]

data type of the data element

element instance-attribute

element: Element

init_value instance-attribute

init_value: Optional[ValueSpecification]

initial value of the data element, if any

interface instance-attribute

interface: Optional[SenderReceiverInterface]

Get the interface containing the data element

name instance-attribute

name: str