API Documentation: autosar_data.abstraction.software_component¶
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)
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.
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_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.
parent_compositions ¶
parent_compositions() -> List[CompositionSwComponentType]
list all compositions containing instances of the component type
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
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.
AssemblySwConnector ¶
AssemblySwConnector(element: Element)
An AssemblySwConnector
connects ports of two SwCompositionType
s.
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
BackgroundEvent ¶
BackgroundEvent(element: Element)
starts a runnable for background processing at low priority
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
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
possible_errors ¶
possible_errors() -> Iterator[ApplicationError]
iterate over all application errors
ClientServerOperation ¶
ClientServerOperation(element: Element)
A ClientServerOperation
defines an operation in a ClientServerInterface
add_possible_error ¶
add_possible_error(error: ApplicationError) -> None
add a reference to possible error to the operation
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.
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_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.
parent_compositions ¶
parent_compositions() -> List[CompositionSwComponentType]
list all compositions containing instances of the component type
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.
components ¶
components() -> Iterator[SwComponentPrototype]
get an iterator over the components of the composition
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_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
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
DataReceiveErrorEvent ¶
DataReceiveErrorEvent(element: Element)
A DataReceiveErrorEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when a data receive error occurs
DataReceivedEvent ¶
DataReceivedEvent(element: Element)
A DataReceivedEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when data is received
DataSendCompletedEvent ¶
DataSendCompletedEvent(element: Element)
A DataSendCompletedEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when data is sent
DataWriteCompletedEvent ¶
DataWriteCompletedEvent(element: Element)
A DataWriteCompletedEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when data is written
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
.
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
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.
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_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.
parent_compositions ¶
parent_compositions() -> List[CompositionSwComponentType]
list all compositions containing instances of the component type
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
InitEvent ¶
InitEvent(element: Element)
A InitEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when the software component is initialized
InternalTriggerOccurredEvent ¶
InternalTriggerOccurredEvent(element: Element)
A InternalTriggerOccurredEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when an internal trigger occurs
ModeSwitchInterface ¶
ModeSwitchInterface(element: Element)
ModeSwitchedAckEvent ¶
ModeSwitchedAckEvent(element: Element)
A ModeSwitchedAckEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when a mode switch is acknowledged
NvDataInterface ¶
NvDataInterface(element: Element)
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
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
PPortPrototype ¶
PPortPrototype(element: Element)
PRPortPrototype ¶
PRPortPrototype(element: Element)
PRPortPrototype
represents a provided and required port prototype
ParameterInterface ¶
ParameterInterface(element: Element)
PassThroughSwConnector ¶
PassThroughSwConnector(element: Element)
PortGroup ¶
PortGroup(element: Element)
RPortPrototype ¶
RPortPrototype(element: Element)
RootSwCompositionPrototype ¶
RootSwCompositionPrototype(element: Element)
The RootSwCompositionPrototype
is a special kind of SwComponentPrototype
that represents the root of the composition hierarchy
RunnableEntity ¶
RunnableEntity(element: Element)
A RunnableEntity
is a function that can be executed by the RTE
swc_internal_behavior
instance-attribute
¶
swc_internal_behavior: Optional[SwcInternalBehavior]
SwcInternalBehavior
that contains the RunnableEntity
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
create_data_element ¶
create_data_element(
name: str, data_type: AutosarDataType
) -> VariableDataPrototype
Add a new data element to the sender receiver interface
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.
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_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.
parent_compositions ¶
parent_compositions() -> List[CompositionSwComponentType]
list all compositions containing instances of the component type
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.
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_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.
parent_compositions ¶
parent_compositions() -> List[CompositionSwComponentType]
list all compositions containing instances of the component type
swc_internal_behaviors ¶
swc_internal_behaviors() -> Iterator[SwcInternalBehavior]
iterate over all swc internal behaviors - typically zero or one
SwComponentPrototype ¶
SwComponentPrototype(element: Element)
SwcInternalBehavior ¶
SwcInternalBehavior(element: Element)
The SwcInternalBehavior
of a software component type describes the
details that are needed to generate the RTE.
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_init_event ¶
create_init_event(
name: str, runnable: RunnableEntity
) -> InitEvent
Create a new InitEvent
in the SwcInternalBehavior
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
SwcModeSwitchEvent ¶
SwcModeSwitchEvent(element: Element)
A SwcModeSwitchEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when a mode switch occurs
TimingEvent ¶
TimingEvent(element: Element)
A TimingEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
periodically
TransformerHardErrorEvent ¶
TransformerHardErrorEvent(element: Element)
A TransformerHardErrorEvent
is a subclass of RTEEvent
which triggers a RunnableEntity
when a transformer hard error occurs
TriggerInterface ¶
TriggerInterface(element: Element)