SwcInternalBehavior

XML tag

<SWC-INTERNAL-BEHAVIOR>

Module

autosar.behavior

Inherits

autosar.element.Element

This is the internal behavior class for AUTOSAR4 SWCs.

Attributes

For inherited attributes see autosar.element.Element.

Name

Type

Description

componentRef

str

Reference to SWC prototype

events

list(Event)

Events

exclusiveAreas

list(ExclsiveArea)

Exclusive areas

multipleInstance

bool

Enables/disabled Multiple instances

perInstanceMemories

list(PerInstanceMemory)

PerInstanceMemory objects

portAPIOptions

list(PortAPIOption)

Port API options

runnables

list(Runnable)

Runnables

Public Methods

Method Description

createRunnable

SwcInternalBehavior.createRunnable(name[, portAccess=None][, symbol=None][, concurrent=False][, exclusiveAreas=None][, adminData=None])
参数
  • name (str) – ShortName of the runnable

  • portAccess (list(str)) – Select which ports this runnable will access

  • symbol (str) – Used to override the generated C symbol (default is to use the name)

  • concurrent (bool) – Selects if this runnable can run concurrently

  • exclusiveAreas (list(str)) – Select which exclusive areas this runnable will use

  • adminData – Optional AdminData

createModeSwitchEvent

SwcInternalBehavior.createModeSwitchEvent(runnableName, modeRef[, activationType = 'ENTRY'][, name = None])
参数
  • runnableName (str) – Name of (aldready existing) runnable to trigger when event occurs

  • modeRef (str) – Mode reference

  • activationType (str) – Activation type

  • name (str) – Override of the shortName of this event. If left as None a (unique) default name will be generated.

返回类型

ModeSwitchEvent

Creates a new ModeSwitchEvent object and appends it to this object.

activationType

  • ENTRY (Will be automatically converted to “ON-ENTRY”)

  • EXIT (Will be automatically converted to “ON-EXIT”)

  • ON-ENTRY

  • ON-EXIT

createTimerEvent

SwcInternalBehavior.createTimerEvent(runnableName, period[, modeDependency = None][, name = None])
参数
  • runnableName (str) – Name of (aldready existing) runnable to trigger when event occurs

  • period (str) – Cycle time in milliseconds

  • modeDependency (list) – Optional mode disabling settings for this event

  • name (str) – Override of the shortName of this event. If left as None a (unique) default name will be generated.

返回类型

TimingEvent

Creates a new TimingEvent object and appends it to this object.

createOperationInvokedEvent

SwcInternalBehavior.createOperationInvokedEvent(runnableName, operationRef[, modeDependency = None][, name = None])
参数
  • runnableName (str) – Name of (aldready existing) runnable to trigger when event occurs

  • operationRef (str) – Reference to operation

  • modeDependency (list) – Optional mode disabling settings for this event

  • name (str) – Override of the shortName of this event. If left as None a (unique) default name will be generated.

返回类型

OperationInvokedEvent

Creates a new OperationInvokedEvent object and appends it to this object.

createDataReceivedEvent

SwcInternalBehavior.createDataReceivedEvent(runnableName, dataElementRef[, modeDependency=None][, name=None])
参数
  • runnableName (str) – Name of (aldready existing) runnable to trigger when event occurs

  • dataElementRef (str) – Reference to DataElement

  • modeDependency (list) – Optional mode disabling settings for this event

  • name (str) – Override of the shortName of this event. If left as None a (unique) default name will be generated.

返回类型

DataReceivedEvent

Creates a new DataReceivedEvent object and appends it to this object.

createExclusiveArea

SwcInternalBehavior.createExclusiveArea(name)
参数

name (str) – ShortName of exclusive area

返回类型

ExclusiveArea

Creates a new ExclusiveArea object and appends it to this object.

createPerInstanceMemory

createSharedDataParameter

createNvmBlock

createInitEvent

SwcInternalBehavior.createInitEvent(runnableName[, modeDependency=None][, name=None])
参数
  • runnableName (str) – Name of (aldready existing) runnable to trigger when event occurs

  • modeDependency (list) – Optional mode disabling settings for this event

  • name (str) – Override of the shortName of this event. If left as None a (unique) default name will be generated.

返回类型

InitEvent

Creates a new InitEvent and appends it to this object.

createModeSwitchAckEvent