目录
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。

5097

被折叠的 条评论
为什么被折叠?



