【AUTOSAR Mode Management相关概念】

Introduction

Mode management involves switching an ECU or a functional unit within an ECU between its possible operating states.

Managing operating states

An ECU can be in different modes. These are the operating states of the ECU or its functional units, for example:

  • Sleep mode
  • Startup mode
  • Network synchronization mode
  • Normal operating mode
  • Error condition mode
  • Shutdown mode

The management of the modes is basically carried out by a state machine. It controls and manages the modes which can activate or deactivate different control algorithms during the different operating states. The mode management can also observe the transition between the modes which can take a certain time.

Mode management according to AUTOSAR

The purpose of modes is to start runnables on the transition between modes or to disable specified triggers of runnables in certain modes.
在这里插入图片描述

Mode manager

Mode manager
Entering and leaving modes is initiated by a mode manager. It contains the master state machine to initiate the mode switches. The mode manager can be either a basic software module that provides a service including mode switches, for example, the ECU State Manager, or an application software component (SWC). In the latter case, the mode manager is called an application mode manager.

The mode manager communicates the mode switches to the mode user(s) via a port with a provided mode switch interface. The mode manager itself does not perform the mode switches, but the mode machine instance of the RTE or a schedule manager.

A mode switch interface can contain several mode declaration groups. A mode declaration group contains a list of the required modes which represent the possible operating states.

A mode switch point represents the position within the mode manager where the mode switch is initiated. The mode switch point defines the runnable that uses the Rte_Switch API.

Mode machine instance

Mode machine instance
The RTE performs all the necessary actions to switch between the modes. The RTE has its own state machine, the mode machine instance, to handle the modes and transitions initiated by the mode manager. The mode machine instance is not visible in the AUTOSAR composition diagrams.

The RTE can be configured to send an acknowledgment to the mode manager when the requested transition is completed. This results in a mode switched ack event at the mode manager.

Mode user

Mode user
A mode user is an SWC or an atomic SWC with runnables whose execution depends on modes.

There are two mechanisms:

  • 1

For all RTE events, for example, a timing event, mode disabling dependencies can prevent a runnable from being triggered as long as one or more modes are active.

  • 2

If the triggering RTE event of a runnable is a mode switch event, the runnable is executed as a result of a mode switch. If the runnable is not mapped to a task, it is executed synchronously, i.e. in the same task that the Rte_Switch function call occurs in. If a runnable is mapped to a task, it is executed asynchronously, i.e. not until the corresponding task is running. The runnable can be triggered on entry to or exit from the mode.
The mode user can use the Rte_Mode API to get the currently active mode.

参考:本文内容源自dSPACE Help。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值