ECU State Manager (EcuM)
Controls ECU lifecycle states: Startup, Run, PostRun, Sleep, and Shutdown.
Funktionen — Übersicht
void EcuM_GetVersionInfo (Std_VersionInfoType* versioninfo);Returns the version information of this module.Std_ReturnType EcuM_GoDownHaltPoll (EcuM_UserType UserID);Instructs the ECU State Manager module to go into a sleep mode, Reset or OFF depending on the previously selected shutdown target.void EcuM_Init (void);Initializes the ECU state manager and carries out the startup procedure.void EcuM_StartupTwo (void);This function implements the STARTUP II state.void EcuM_Shutdown (void);Typically called from the shutdown hook, this function takes over execution control and will carry out GO OFF II activities.void EcuM_SetState (EcuM_StateType state);Function called by BswM to notify about State Switch.Std_ReturnType EcuM_RequestRUN (EcuM_UserType user);Places a request for the RUN state.Std_ReturnType EcuM_ReleaseRUN (EcuM_UserType user);Releases a RUN request previously done with a call to EcuM_RequestRUN.Std_ReturnType EcuM_RequestPOST_RUN (EcuM_UserType user);Places a request for the POST RUN state.Std_ReturnType EcuM_ReleasePOST_RUN (EcuM_UserType user);Releases a POST RUN request previously done with a call to EcuM_RequestPOST_RUN.Std_ReturnType EcuM_SelectShutdownTarget (EcuM_ShutdownTargetType shutdownTarget, EcuM_ShutdownModeType shutdownMode);EcuM_SelectShutdownTarget selects the shutdown target.Std_ReturnType EcuM_GetShutdownTarget (EcuM_ShutdownTargetType* shutdownTarget, EcuM_ShutdownModeType* shutdownMode);EcuM_GetShutdownTarget returns the currently selected shutdown target as set by EcuM_ SelectShutdownTarget.Std_ReturnType EcuM_GetLastShutdownTarget (EcuM_ShutdownTargetType* shutdownTarget, EcuM_ShutdownModeType* shutdownMode);EcuM_GetLastShutdownTarget returns the shutdown target of the previous shutdown process.Std_ReturnType EcuM_SelectShutdownCause (EcuM_ShutdownCauseType target);EcuM_SelectShutdownCause elects the cause for a shutdown.Std_ReturnType EcuM_GetShutdownCause (EcuM_ShutdownCauseType* shutdownCause);EcuM_GetShutdownCause returns the selected shutdown cause as set by EcuM_Select ShutdownCause.EcuM_WakeupSourceType EcuM_GetPendingWakeupEvents (void);Gets pending wakeup events.void EcuM_ClearWakeupEvent (EcuM_WakeupSourceType sources);Clears wakeup events.EcuM_WakeupSourceType EcuM_GetValidatedWakeupEvents (void);Gets validated wakeup events.EcuM_WakeupSourceType EcuM_GetExpiredWakeupEvents (void);Gets expired wakeup events.Std_ReturnType EcuM_SetRelWakeupAlarm (EcuM_UserType user, EcuM_TimeType time);EcuM_SetRelWakeupAlarm sets a user's wakeup alarm relative to the current point in time.Std_ReturnType EcuM_SetAbsWakeupAlarm (EcuM_UserType user, EcuM_TimeType time);EcuM_SetAbsWakeupAlarm sets the user's wakeup alarm to an absolute point in time.Std_ReturnType EcuM_AbortWakeupAlarm (EcuM_UserType user);Ecum_AbortWakeupAlarm aborts the wakeup alarm previously set by this user.Std_ReturnType EcuM_GetCurrentTime (EcuM_TimeType* time);EcuM_GetCurrentTime returns the current value of the EcuM clock (i.Std_ReturnType EcuM_GetWakeupTime (EcuM_TimeType* time);EcuM_GetWakeupTime returns the current value of the master alarm clock (the minimum absolute time of all user alarm clocks).Std_ReturnType EcuM_SetClock (EcuM_UserType user, EcuM_TimeType time);EcuM_SetClock sets the EcuM clock time to the provided value.Std_ReturnType EcuM_SelectBootTarget (EcuM_BootTargetType target);EcuM_SelectBootTarget selects a boot target.Std_ReturnType EcuM_GetBootTarget (EcuM_BootTargetType* target);EcuM_GetBootTarget returns the current boot target - see EcuM_SelectBootTarget.void EcuM_SetWakeupEvent (EcuM_WakeupSourceType sources);Sets the wakeup event.void EcuM_ValidateWakeupEvent (EcuM_WakeupSourceType sources);After wakeup, the ECU State Manager will stop the process during the WAKEUP VALIDATION state/sequence to wait for validation...void EcuM_ErrorHook (uint16 reason);The ECU State Manager will call the error hook if the error codes "ECUM_E_RAM_CHECK_ FAILED" or...void EcuM_AL_SetProgrammableInterrupts (void);If the configuration parameter EcuMSetProgrammableInterrupts is set to true, this callout Ecu M_AL_SetProgrammableInterrupts...void EcuM_AL_DriverInitZero (void);This callout shall provide driver initialization and other hardware-related startup activities for loading the post-build...const EcuM_ConfigType* EcuM_DeterminePbConfiguration (void);This callout should evaluate some condition, like port pin or NVRAM value, to determine which post-build configuration shall...void EcuM_AL_DriverInitOne (void);This callout shall provide driver initialization and other hardware-related startup activities in case of a power on reset.void EcuM_LoopDetection (void);If the configuration parameter EcuMResetLoopDetection is set to true, this callout EcuM_Loop Detection is called on every startup.void EcuM_OnGoOffOne (void);This call allows the system designer to notify that the GO OFF I state is about to be entered.void EcuM_OnGoOffTwo (void);This call allows the system designer to notify that the GO OFF II state is about to be entered.void EcuM_AL_SwitchOff (void);This callout shall take the code for shutting off the power supply of the ECU.void EcuM_AL_Reset (EcuM_ResetType reset);This callout shall take the code for resetting the ECU.void EcuM_EnableWakeupSources (EcuM_WakeupSourceType wakeupSource);The ECU Manager Module calls EcuM_EnableWakeupSource to allow the system designer to notify wakeup sources defined in the...void EcuM_GenerateRamHash (void);see EcuM_CheckRamHashvoid EcuM_SleepActivity (void);This callout is invoked periodically in all reduced clock sleep modes.void EcuM_StartCheckWakeup (EcuM_WakeupSourceType WakeupSource);This API is called by the ECU Firmware to start the CheckWakeupTimer for the corresponding WakeupSource.void EcuM_CheckWakeup (EcuM_WakeupSourceType wakeupSource);This callout is called by the EcuM to poll a wakeup source.void EcuM_EndCheckWakeup (EcuM_WakeupSourceType WakeupSource);This API is called by any SW Module whose wakeup source is checked asynchronously (e.uint8 EcuM_CheckRamHash (void);This callout is intended to provide a RAM integrity test.void EcuM_DisableWakeupSources (EcuM_WakeupSourceType wakeupSource);The ECU Manager Module calls EcuM_DisableWakeupSources to set the wakeup source(s) defined in the wakeupSource bitfield so...void EcuM_AL_DriverRestart (void);This callout shall provide driver initialization and other hardware-related startup activities in the wakeup case.void EcuM_StartWakeupSources (EcuM_WakeupSourceType wakeupSource);The callout shall start the given wakeup source(s) so that they are ready to perform wakeup validation.void EcuM_CheckValidation (EcuM_WakeupSourceType wakeupSource);This callout is called by the EcuM to validate a wakeup source.void EcuM_StopWakeupSources (EcuM_WakeupSourceType wakeupSource);The callout shall stop the given wakeup source(s) after unsuccessful wakeup validation.void EcuM_MainFunction (void);The purpose of this service is to implement all activities of the ECU State Manager while the OS is up and running.
Typen — Übersicht
struct EcuM_ConfigTypeA pointer to such a structure shall be provided to the ECU State Manager initialization routine for configuration.enum EcuM_RunStatusTypeResult of the Run Request Protocol sent to BswMEcuM_WakeupSourceTypeEcuM_WakeupSourceType defines a bitfield with 5 pre-defined positions (see Range).enum EcuM_WakeupStatusTypeThe type describes the possible states of a wakeup source.EcuM_ResetTypeThis type describes the reset mechanisms supported by the ECU State Manager.enum EcuM_StateTypeECU State Manager states.EcuM_ModecurrentModeEcuM_UserTypeUnique value for each user.EcuM_TimeTypeThis data type represents the time of the ECU Manager module.EcuM_ShutdownCauseTypeThis type describes the cause for a shutdown by the ECU State Manager.enum EcuM_ShutdownModeTypeThis data type represents the modes of the ECU Manager module.EcuM_ShutdownTargetType
Funktionen & Typen — Detailansicht
函数 EcuM_GetVersionInfo [SWS_EcuM_02813] 📄 PDF
void EcuM_GetVersionInfo (Std_VersionInfoType* versioninfo);
Returns the version information of this module.
函数 EcuM_GoDownHaltPoll [SWS_EcuM_91002] 📄 PDF
Std_ReturnType EcuM_GoDownHaltPoll (EcuM_UserType UserID);
Instructs the ECU State Manager module to go into a sleep mode, Reset or OFF depending on the previously selected shutdown target.
同步且可重入的函数 EcuM_GoDownHaltPoll 指示 ECU State Manager 模块根据先前选择的关机目标转换到 Sleep 模式、复位或 OFF 状态 [SWS_EcuM_91002]。它可通过头文件 EcuM.h 获取,其服务 ID 为 0x2c [SWS_EcuM_91002]。
参数与调用权限
作为唯一的输入参数,传入类型为 EcuM_UserType 的 UserID。它用于标识调用用户。调用受到严格限制:仅预先配置的用户才允许执行此函数 [SWS_EcuM_91002]。
返回值与执行行为
返回行为主要取决于所设定的关机目标的类型 [SWS_EcuM_91002]:
E_NOT_OK:请求未被接受 [SWS_EcuM_91002]。E_OK:若目标为SLEEP,函数在退出睡眠状态后成功返回该状态 [SWS_EcuM_91002]。- 不返回:若选择
RESET或OFF作为关机目标,函数调用将不再返回给调用者 [SWS_EcuM_91002]。
限制与错误处理
尽管该函数在形式上被声明为可重入,但其按规范执行的前提是预先确定有效的关机目标 [SWS_EcuM_91002]。接口规范中未列出特定的 DET 或 DEM 错误码;失败或请求被拒绝会直接通过返回值 E_NOT_OK 指示 [SWS_EcuM_91002]。
本使用说明是基于 AUTOSAR 规范自动生成的。
实现者指南即将推出(复杂度 I1)
函数 EcuM_Init [SWS_EcuM_02811] 📄 PDF
void EcuM_Init (void);
Initializes the ECU state manager and carries out the startup procedure. The function will never return (it calls StartOS)
同步服务函数 EcuM_Init 初始化 ECU State Manager 并启动 ECU 的有序启动流程([SWS_EcuM_02811])。它通过带有服务 ID 0x01 的头文件 EcuM.h 声明,不接受任何参数,且不返回任何返回值([SWS_EcuM_02811])。形式上归类为可重入,但在调用后 EcuM_Init 绝不返回给调用者,因为它通过调用 StartOS 将执行移交给操作系统([SWS_EcuM_02811])。
在其执行过程中,该函数按照严格指定的顺序处理已定义的 StartPreOS 序列及其活动([SWS_EcuM_02411],[SWS_EcuM_02684])。此阶段的一个重要组成部分是配置一致性检查:模块在 EcuM_Init 内部检查相应的结构字段是否与 ECUM_CONFIGCONSISTENCY_HASH 的值相同([SWS_EcuM_02798])。
此外,EcuM_Init 控制多核系统上的驱动程序初始化([SWS_EcuM_04145])。该函数在每个单独的核上调用标注 EcuM_AL_DriverInitZero 以及 EcuM_AL_DriverInitOne([SWS_EcuM_04145])。对于标注实现的要求是,确保在各自活动的核上仅初始化实际在该核上执行的 MCAL 模块([SWS_EcuM_04145])。
此使用说明基于 AUTOSAR Classic R20-11 规范自动生成。
实现者指南即将推出(复杂度 I2)
函数 EcuM_StartupTwo [SWS_EcuM_02838] 📄 PDF
void EcuM_StartupTwo (void);
This function implements the STARTUP II state.
同步且不可重入的函数 EcuM_StartupTwo 实现 ECU State Manager 的状态 STARTUP II [SWS_EcuM_02838]。该接口通过头文件 EcuM.h 声明,并具有服务 ID 0x1a [SWS_EcuM_02838]。根据函数签名 void EcuM_StartupTwo(void),该调用既不接收输入参数,也不接收输入/输出或输出参数,且不向调用方返回返回值 [SWS_EcuM_02838]。
若 ECU 管理器模块被函数 EcuM_StartupTwo 激活,它将执行 StartPostOS 序列的操作 [SWS_EcuM_02932]。
在集成方面,对调用上下文和并发性有基本规定:该函数必须强制从作为 StartOS 的直接结果而启动的 Task 中调用 [SWS_EcuM_02806]。这要求对 EcuM_StartupTwo 的调用要么从 Autostart-Task 中发起,要么从显式启动的 Task 中发起 [SWS_EcuM_02806]。由于该函数被指定为不可重入,因此不得发生并发或多次调用 [SWS_EcuM_02838]。
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_Shutdown [SWS_EcuM_02812] 📄 PDF
void EcuM_Shutdown (void);
Typically called from the shutdown hook, this function takes over execution control and will carry out GO OFF II activities.
同步服务函数 EcuM_Shutdown(服务 ID 0x02)通过头文件 EcuM.h 提供,并负责执行控制以开展“GO OFF II”阶段的活动 [SWS_EcuM_02812]。它用于最终终止关闭过程 [SWS_EcuM_02953]。
调用上下文与语义
通常情况下,该函数从关机钩子(Shutdown-Hook)中调用 [SWS_EcuM_02812]。根据需求,该钩子有明确义务调用 EcuM_Shutdown 以结束关闭过程 [SWS_EcuM_02953]。
- 签名:带有服务 ID
0x02的void EcuM_Shutdown(void)[SWS_EcuM_02812]。 - 参数:既不存在输入参数、输出参数,也不存在输入/输出参数 [SWS_EcuM_02812]。
- 返回值:接口不返回任何返回值 [SWS_EcuM_02812]。
- 同步性:调用同步执行 [SWS_EcuM_02812]。
并发性与控制流
在规范中,EcuM_Shutdown 被声明为可重入 [SWS_EcuM_02812]。然而,对于程序流程有着严格的要求,即 EcuM_Shutdown 不得返回给调用方 [SWS_EcuM_02953]。处理完毕后,函数最终关闭 ECU 或作为替代触发复位 [SWS_EcuM_02953]。
本使用说明基于 AUTOSAR 规范 R20-11 自动生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_SetState [SWS_EcuM_04122] 📄 PDF
void EcuM_SetState (EcuM_StateType state);
Function called by BswM to notify about State Switch.
用法与调用上下文
同步函数 EcuM_SetState 供 BswM 用于向 EcuM 通知状态切换 [SWS_EcuM_04122]。作为输入参数传入类型为 EcuM_StateType 的 state,该参数指定了由 BswM 指定的状态 [SWS_EcuM_04122]。该函数没有返回值 [SWS_EcuM_04122]。
工作原理与协同交互
调用时,该函数将 EcuM 的内部状态设置为参数 state 的值 [SWS_EcuM_04123]。如果 BswM 以这种方式设置了 EcuM 的状态,EcuM 会向 RTE 指示相应的模式 [SWS_EcuM_04116]。
错误处理
若传入的参数 state 的值无效,EcuM_SetState 不会更改 EcuM 状态 [SWS_EcuM_04123]。若启用了开发错误报告(Development Error Reporting),该函数在发生此类错误时还会向 DET 模块报告错误 ECUM_E_STATE_PAR_OUT_OF_RANGE [SWS_EcuM_04123]。
并发性与接口
执行是同步且可重入的 [SWS_EcuM_04122]。该服务通过头文件 EcuM.h 进行声明 [SWS_EcuM_04122]。
此使用说明基于 AUTOSAR Classic R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_RequestRUN [SWS_EcuM_04124] 📄 PDF
Std_ReturnType EcuM_RequestRUN (EcuM_UserType user);
Places a request for the RUN state. Requests can be placed by every user made known to the state manager at configuration time.
使用
同步且可重入的函数 EcuM_RequestRUN 用于向 ECU State Manager 请求 RUN 状态 [SWS_EcuM_04124]。请求实体的标识作为类型为 EcuM_UserType 的参数通过 user 传入;仅在配置期就已向状态管理器声明的用户才具备权限 [SWS_EcuM_04124]。若 EcuM 接受了该请求,函数返回 E_OK,否则返回 E_NOT_OK [SWS_EcuM_04124]。该服务通过头文件 EcuM.h 进行声明 [SWS_EcuM_04124]。
错误处理与限制
请求不得嵌套:单个用户在同一时间最多只能持有一个活动的 RUN 请求 [SWS_EcuM_04125]。若 EcuM_RequestRUN 检测到同一用户的重复调用,则在启用开发错误检测时向 DET 报告错误码 ECUM_E_MULTIPLE_RUN_REQUESTS [SWS_EcuM_03024],[SWS_EcuM_04125]。
相互作用
每个使用 EcuM_RequestRUN 成功设置的状态请求,在活动结束后都必须重新释放。为此提供了互补的、同样是同步且可重入的服务 EcuM_ReleaseRUN,并向其传入相同的用户 ID [SWS_EcuM_04127]。
本使用说明基于 AUTOSAR 规范 R20-11 自动生成。
实现者指南即将推出(复杂度 I2)
函数 EcuM_ReleaseRUN [SWS_EcuM_04127] 📄 PDF
Std_ReturnType EcuM_ReleaseRUN (EcuM_UserType user);
Releases a RUN request previously done with a call to EcuM_RequestRUN. The service is intended for implementing AUTOSAR ports.
使用
同步函数 EcuM_ReleaseRUN(服务 ID 0x04)用于释放先前通过 EcuM_RequestRUN 注册的 RUN 状态请求 [SWS_EcuM_04127]。该接口通过头文件 EcuM.h 提供,主要用于 AUTOSAR 端口的实现 [SWS_EcuM_04127]。作为输入参数,该函数需要类型为 EcuM_UserType 的用户标识符 user,该标识符在模块内唯一定义了执行释放的实体 [SWS_EcuM_04127]。
类型为 Std_ReturnType 的返回值通过 E_OK 指示释放请求已成功被模块接受 [SWS_EcuM_04127]。若无法处理该释放,该服务将返回错误值 E_NOT_OK [SWS_EcuM_04127]。
错误处理与并发
规范中未列出具体的错误码、开发错误(DET)或生产错误(DEM);请求的拒绝仅通过返回 E_NOT_OK 体现 [SWS_EcuM_04127]。可以假定(理解:),当针对给定的用户 ID 不存在活动请求或传递了无效参数值时,推测会返回 E_NOT_OK。 问题 Q-cbe9031cffe1be81 (未决)
该函数被声明为可重入,因此允许在并发执行上下文中被调用 [SWS_EcuM_04127]。作为功能性顺序条件,该调用强制要求相应用户先前已通过 EcuM_RequestRUN 请求了该状态 [SWS_EcuM_04127]。
相互作用
模块 EcuM 提供此服务,以便通过已定义的端口终止 RUN 状态的保持 [SWS_EcuM_04127]。对于 RTE 配置以及与本地 RTE 运行时行为的交互,规范定义了包含多个可并发执行的可运行实体(Runnable Entity)的 EcuStateManager 内部行为 [SWS_EcuM_03018]。
该文本由 AI 基于 AUTOSAR 规范生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_RequestPOST_RUN [SWS_EcuM_04128] 📄 PDF
Std_ReturnType EcuM_RequestPOST_RUN (EcuM_UserType user);
Places a request for the POST RUN state. Requests can be placed by every user made known to the state manager at configuration time. Requests for RUN and POST RUN must be tracked independently (in other words: two independent variables). The service is intended for implementing AUTOSAR ports.
使用
同步函数 EcuM_RequestPOST_RUN 用于向 ECU State Manager([SWS_EcuM_04128])请求 POST RUN 状态。调用者通过参数 user 进行身份识别,其中每个请求实体必须在配置期就已向状态管理器声明([SWS_EcuM_04128])。该服务在头文件 EcuM.h 中声明,用于 AUTOSAR 端口的实现,并在成功接受时确认返回 E_OK,在拒绝时确认返回 E_NOT_OK([SWS_EcuM_04128])。
错误处理
若启用了开发错误检测,同一用户再次调用会导致 EcuM_RequestPOST_RUN 向 DET 报告错误 ECUM_E_MULTIPLE_RUN_REQUESTS([SWS_EcuM_03025])。解释:在此类多次请求或用户 ID 无效的情况下,该服务可能会以 E_NOT_OK 作为响应([SWS_EcuM_04128])。 问题 Q-b5bbd7d5b53e76ba (未决)
并发性与交互
该函数被设计为可重入的([SWS_EcuM_04128])。在模块内部,RUN 和 POST RUN 的请求必须通过两个独立的变量严格彼此独立地进行跟踪([SWS_EcuM_04128])。通过此服务注册的每个请求都会保持 POST-RUN 状态处于活动状态,直到通过互补调用 EcuM_ReleasePOST_RUN 显式将其撤销([SWS_EcuM_04129])。
本段文本由系统自动生成。所有技术内容均基于 AUTOSAR 规范。
实现者指南即将推出(复杂度 I2)
函数 EcuM_ReleasePOST_RUN [SWS_EcuM_04129] 📄 PDF
Std_ReturnType EcuM_ReleasePOST_RUN (EcuM_UserType user);
Releases a POST RUN request previously done with a call to EcuM_RequestPOST_RUN. The service is intended for implementing AUTOSAR ports.
用法与语义
同步且可重入的函数 EcuM_ReleasePOST_RUN([SWS_EcuM_04129])用于释放先前通过 EcuM_RequestPOST_RUN 设置的 POST-RUN 请求。通过类型为 EcuM_UserType 的输入参数 user 传递重新释放 POST-RUN 状态的实体标识。该接口通过头文件 EcuM.h 可用,并主要设计用于实现 AUTOSAR 端口([SWS_EcuM_04129])。
返回值与错误处理
该函数返回状态 Std_ReturnType([SWS_EcuM_04129]):
E_OK:释放请求已成功被 ECU State Manager 接受。E_NOT_OK:释放请求被拒绝。理解:若对于指定的未注册有活动请求的用户,或传递了无效的用户标识符,推测会出现带有E_NOT_OK的拒绝。 问题 Q-67bd8594612defca (未决)
并发性与交互
该服务被指定为可重入([SWS_EcuM_04129]),因此允许多个实体同时调用。该函数是模块 EcuM 内部行为的一部分([SWS_EcuM_03018])。该调用在逻辑上前置要求实体先前已请求过 POST RUN 阶段([SWS_EcuM_04129])。理解:通常情况下,一旦软件组件在关机前的后续运行活动完成,推测便会通过 RTE 端口调用该函数。 问题 Q-81f71656d4debb4a (未决)
本使用说明是基于 AUTOSAR 规范版本 R20-11 自动生成的。
实现者指南即将推出(复杂度 I1)
函数 EcuM_SelectShutdownTarget [SWS_EcuM_02822] 📄 PDF
Std_ReturnType EcuM_SelectShutdownTarget (EcuM_ShutdownTargetType shutdownTarget, EcuM_ShutdownModeType shutdownMode);
EcuM_SelectShutdownTarget selects the shutdown target. EcuM_SelectShutdownTarget is part of the ECU Manager Module port interface.
同步服务函数 EcuM_SelectShutdownTarget 用于选择 ECU 的关闭目标,通过头文件 EcuM.h 以及作为 ECU 管理器模块端口接口的一部分提供 [SWS_EcuM_02822]。通过该调用,内部关闭目标被设置为所传递参数 shutdownTarget 的值 [SWS_EcuM_00624]。
该函数需要两个输入参数 [SWS_EcuM_02822]:
shutdownTarget:确定所选定的关闭目标 [SWS_EcuM_02822]。shutdownMode:包含休眠模式的标识符(当目标为ECUM_SHUTDOWN_TARGET_SLEEP时)或复位机制的标识符(当目标为ECUM_SHUTDOWN_TARGET_RESET时),均符合配置 [SWS_EcuM_02822]。
该调用不会触发即时的设置或执行活动(Setup),而仅保存这些值以供稍后在阶段 SHUTDOWN 或 SLEEP 中使用 [SWS_EcuM_02585]。
在并发性方面,该函数被指定为可重入 [SWS_EcuM_02822]。在 ECU State Manager 的 RTE 内部行为中,对应的可运行实体(Runnable Entity)SelectShutdownTarget 被声明为 canbeInvokedConcurrently = TRUE [SWS_EcuM_03018],因此允许并行调用。
类型为 Std_ReturnType 的返回值通过 E_OK 指示新的关闭目标已成功设置,通过 E_NOT_OK 指示接收失败 [SWS_EcuM_02822]。规范在此处未提及 E_NOT_OK 的具体错误原因或 DET 报告;推测无效或未配置的目标与模式组合会导致拒绝。 问题 Q-e916f3a6ac0bf47e (未决)
该文本由 AI 生成,并基于 Release R20-11 的规范。
实现者指南即将推出(复杂度 I2)
函数 EcuM_GetShutdownTarget [SWS_EcuM_02824] 📄 PDF
Std_ReturnType EcuM_GetShutdownTarget (EcuM_ShutdownTargetType* shutdownTarget, EcuM_ShutdownModeType* shutdownMode);
EcuM_GetShutdownTarget returns the currently selected shutdown target as set by EcuM_ SelectShutdownTarget. EcuM_GetShutdownTarget is part of the ECU Manager Module port interface.
函数 EcuM_GetLastShutdownTarget [SWS_EcuM_02825] 📄 PDF
Std_ReturnType EcuM_GetLastShutdownTarget (EcuM_ShutdownTargetType* shutdownTarget, EcuM_ShutdownModeType* shutdownMode);
EcuM_GetLastShutdownTarget returns the shutdown target of the previous shutdown process. EcuM_GetLastShutdownTarget is part of the ECU Manager Module port interface.
函数 EcuM_SelectShutdownCause [SWS_EcuM_04050] 📄 PDF
Std_ReturnType EcuM_SelectShutdownCause (EcuM_ShutdownCauseType target);
EcuM_SelectShutdownCause elects the cause for a shutdown. EcuM_SelectShutdownCause is part of the ECU Manager Module port interface.
同步函数 EcuM_SelectShutdownCause 用于选择 ECU 关闭原因,并通过头文件 EcuM.h 可用 [SWS_EcuM_04050]。
使用与语义:
- 参数:类型为
EcuM_ShutdownCauseType的输入参数target传递所选的关闭原因 [SWS_EcuM_04050]。 - 返回值:类型为
Std_ReturnType的返回值通过E_OK指示新原因设置成功,通过E_NOT_OK指示设置失败 [SWS_EcuM_04050]。 - 执行:该服务在 Service-ID
0x1b下同步运行,并被指定为可重入 [SWS_EcuM_04050]。
并发性与交互:
该函数是 ECU Manager 模块端口接口(Port-Interface)的一部分 [SWS_EcuM_04050]。对于本地 RTE 的配置,在内部行为 EcuStateManager 中定义了符号为 EcuM_SelectShutdownCause 的可运行实体(Runnable Entity)SelectShutdownCause,其中分配了属性 canbeInvokedConcurrently = TRUE [SWS_EcuM_03018]。
错误处理:
规范范围内未列出具体的 DET 或 DEM 消息;设置原因时的错误状态仅通过返回值 E_NOT_OK 指示 [SWS_EcuM_04050]。
此使用说明自动生成,并基于 AUTOSAR Classic Release R20-11 的规范要求。
实现者指南即将推出(复杂度 I1)
函数 EcuM_GetShutdownCause [SWS_EcuM_04051] 📄 PDF
Std_ReturnType EcuM_GetShutdownCause (EcuM_ShutdownCauseType* shutdownCause);
EcuM_GetShutdownCause returns the selected shutdown cause as set by EcuM_Select ShutdownCause. EcuM_GetShutdownCause is part of the ECU Manager Module port interface.
函数 EcuM_GetPendingWakeupEvents [SWS_EcuM_02827] 📄 PDF
EcuM_WakeupSourceType EcuM_GetPendingWakeupEvents (void);
Gets pending wakeup events.
函数 EcuM_ClearWakeupEvent [SWS_EcuM_02828] 📄 PDF
void EcuM_ClearWakeupEvent (EcuM_WakeupSourceType sources);
Clears wakeup events.
同步服务函数 EcuM_ClearWakeupEvent(服务 ID 0x16)用于重置唤醒事件,并通过头文件 EcuM.h 提供 [SWS_EcuM_02828]。它接受类型为 EcuM_WakeupSourceType 的位掩码 sources 作为参数,并且没有返回值 [SWS_EcuM_02828]。
在调用时,在 sources 中作为位置位的所有待处理事件将从模块的三个内部变量中清除 [SWS_EcuM_02683]:
- 从待处理唤醒事件(pending wakeup events)的内部变量中,
- 从已验证唤醒事件(validated events)的内部变量中,以及
- 从已过期唤醒事件(expired events)的内部变量中 [SWS_EcuM_02683]。
关于调用上下文,可以灵活地从中断上下文、常规 OS 上下文以及无 OS 上下文中调用 EcuM_ClearWakeupEvent [SWS_EcuM_02807]。然而,与此同时,该函数被强制指定为不可重入(Non-Reentrant)且不可中断(Non-Interruptible)[SWS_EcuM_02828]。解读:由于该函数在不同上下文中被允许但在不可中断,集成商或调用者推测必须在组织上确保不发生同时或相互中断的调用。 问题 Q-71a4b1b218505a1c (未决)
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
函数 EcuM_GetValidatedWakeupEvents [SWS_EcuM_02830] 📄 PDF
EcuM_WakeupSourceType EcuM_GetValidatedWakeupEvents (void);
Gets validated wakeup events.
函数 EcuM_GetExpiredWakeupEvents [SWS_EcuM_02831] 📄 PDF
EcuM_WakeupSourceType EcuM_GetExpiredWakeupEvents (void);
Gets expired wakeup events.
函数 EcuM_SetRelWakeupAlarm [SWS_EcuM_04054] 📄 PDF
Std_ReturnType EcuM_SetRelWakeupAlarm (EcuM_UserType user, EcuM_TimeType time);
EcuM_SetRelWakeupAlarm sets a user's wakeup alarm relative to the current point in time. EcuM_SetRelWakeupAlarm is part of the ECU Manager Module port interface.
函数 EcuM_SetAbsWakeupAlarm [SWS_EcuM_04057] 📄 PDF
Std_ReturnType EcuM_SetAbsWakeupAlarm (EcuM_UserType user, EcuM_TimeType time);
EcuM_SetAbsWakeupAlarm sets the user's wakeup alarm to an absolute point in time. EcuM_ SetAbsWakeupAlarm is part of the ECU Manager Module port interface.
函数 EcuM_AbortWakeupAlarm [SWS_EcuM_04061] 📄 PDF
Std_ReturnType EcuM_AbortWakeupAlarm (EcuM_UserType user);
Ecum_AbortWakeupAlarm aborts the wakeup alarm previously set by this user. EcuM_Abort WakeupAlarm is part of the ECU Manager Module port interface.
同步函数 EcuM_AbortWakeupAlarm 用于中止先前由用户设置的唤醒警报 [SWS_EcuM_04061]。该接口通过头文件 EcuM.h 提供,并构成 ECU Manager 模块端口接口的组成部分 [SWS_EcuM_04061]。
参数与返回值
user(In):希望取消唤醒警报的用户的标识符,类型为EcuM_UserType[SWS_EcuM_04061]。不存在输入/输出参数或纯输出参数 [SWS_EcuM_04061]。E_OK:服务已成功执行,且警报已取消 [SWS_EcuM_04061]。ECUM_E_NOT_ACTIVE:未找到属于所传入用户的活动警报 [SWS_EcuM_04061]。E_NOT_OK:服务执行失败 [SWS_EcuM_04061]。
并发性与交互
该函数具有 Service-ID 0x24,并被指定为可重入 [SWS_EcuM_04061]。因此,可以针对不同用户并发进行调用。ECU Manager 的内部行为定义了用于配置本地 RTE 的可执行实体 [SWS_EcuM_03018];作为模块端口接口的一部分,调用通常可能由软件组件通过 RTE 发起。 问题 Q-2c8f004d9f00bbd3 (未决)
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_GetCurrentTime [SWS_EcuM_04062] 📄 PDF
Std_ReturnType EcuM_GetCurrentTime (EcuM_TimeType* time);
EcuM_GetCurrentTime returns the current value of the EcuM clock (i.e. the time since battery connect). EcuM_GetCurrentTime is part of the ECU Manager Module port interface.
函数 EcuM_GetWakeupTime [SWS_EcuM_04063] 📄 PDF
Std_ReturnType EcuM_GetWakeupTime (EcuM_TimeType* time);
EcuM_GetWakeupTime returns the current value of the master alarm clock (the minimum absolute time of all user alarm clocks). EcuM_GetWakeupTime is part of the ECU Manager Module port interface.
函数 EcuM_SetClock [SWS_EcuM_04064] 📄 PDF
Std_ReturnType EcuM_SetClock (EcuM_UserType user, EcuM_TimeType time);
EcuM_SetClock sets the EcuM clock time to the provided value. This API is useful for testing the alarm services; Alarms that take days to expire can be tested. EcuM_SetClock is part of the ECU Manager Module port interface.
根据 [SWS_EcuM_04064],同步且可重入的函数 EcuM_SetClock 用于将 ECU State Manager 的内部时间设置为指定值。作为 ECU Manager 端口接口(Port-Interface)的一部分,该函数可以通过头文件 EcuM.h 包含并调用 [SWS_EcuM_04064]。
该接口的主要应用目的是测试警报服务:在测试模式下,通过有针对性地设置时间,可以验证常规执行需要数天时间的警报 [SWS_EcuM_04064]。在此传递两个输入参数:
user(类型EcuM_UserType):想要设置时间的调用方或用户的标识符。time(类型EcuM_TimeType):自连接电池(Battery Connect)以来的绝对时间(以秒为单位)。
作为返回值,该服务返回状态 Std_ReturnType,执行成功时为 E_OK,出错时为 E_NOT_OK [SWS_EcuM_04064]。该接口未指定具体的错误原因或 DET 消息;推测传入未授权的用户标识符或无效的时间值会导致返回 E_NOT_OK。 问题 Q-248768580c0309e8 (未决)
就内部模块行为和 RTE 配置而言,该函数集成在 EcuStateManager 的可运行实体(Runnable Entities)结构中 [SWS_EcuM_03018]。
本文由 AI 生成,用于技术指导。
实现者指南即将推出(复杂度 I1)
函数 EcuM_SelectBootTarget [SWS_EcuM_02835] 📄 PDF
Std_ReturnType EcuM_SelectBootTarget (EcuM_BootTargetType target);
EcuM_SelectBootTarget selects a boot target. EcuM_SelectBootTarget is part of the ECU Manager Module port interface.
同步函数 EcuM_SelectBootTarget 用于为 ECU 选择 Boot-Target,它是 ECU Manager 端口接口的一部分,并通过头文件 EcuM.h 提供 [SWS_EcuM_02835]。所需的目标通过类型为 EcuM_BootTargetType 的输入参数 target 传递 [SWS_EcuM_02835]。
作为返回值,如果新的 Boot-Target 被 EcuM 接受,该函数将指示 E_OK,否则指示 E_NOT_OK [SWS_EcuM_02835]。实现必须以与引导加载程序兼容的方式保存所选目标 [SWS_EcuM_02247]。当前设置的值可以通过补充服务 EcuM_GetBootTarget 查询 [SWS_EcuM_02836]。
该函数被指定为可重入的 [SWS_EcuM_02835];作为 RTE 配置内部行为的一部分,Runnable Entity SelectBootTarget 被声明为 canbeInvokedConcurrently = TRUE [SWS_EcuM_03018]。限制性规定是,该服务仅专供与诊断或引导管理相关的软件组件(SW-C)使用,并且可能取决于具体使用的引导加载程序 [SWS_EcuM_03000]。
此文本由 AI 生成,并基于 AUTOSAR 规范的要求。
实现者指南即将推出(复杂度 I1)
函数 EcuM_GetBootTarget [SWS_EcuM_02836] 📄 PDF
Std_ReturnType EcuM_GetBootTarget (EcuM_BootTargetType* target);
EcuM_GetBootTarget returns the current boot target - see EcuM_SelectBootTarget. EcuM_Get BootTarget is part of the ECU Manager Module port interface.
函数 EcuM_SetWakeupEvent [SWS_EcuM_02826] 📄 PDF
void EcuM_SetWakeupEvent (EcuM_WakeupSourceType sources);
Sets the wakeup event.
函数 EcuM_ValidateWakeupEvent [SWS_EcuM_02829] 📄 PDF
void EcuM_ValidateWakeupEvent (EcuM_WakeupSourceType sources);
After wakeup, the ECU State Manager will stop the process during the WAKEUP VALIDATION state/sequence to wait for validation of the wakeup event.This API service is used to indicate to the ECU Manager module that the wakeup events indicated in the sources parameter have been validated.
EcuM_ValidateWakeupEvent 是一项同步服务(服务 ID 0x14),用于向 ECU Manager 指示在参数 sources 中传递的唤醒源已成功验证([SWS_EcuM_02829])。唤醒后,ECU State Manager 在验证序列中等待此确认。在调用时,该函数停止验证的当前超时定时器([SWS_EcuM_02710]),并通过对位掩码执行按位或运算将传入的事件输入到已验证唤醒事件的内部变量中([SWS_EcuM_04078])。
该函数是可重入的([SWS_EcuM_02829]),并且允许从任务上下文和中断上下文中调用([SWS_EcuM_02345])。如果 ECU Manager 处于状态 RUN,则除非涉及通信通道,否则该调用对所有唤醒源均无效果([SWS_EcuM_02790])。相反,对于分配给通信通道的源,该服务在 ECU 的任何阶段均发挥完全的作用([SWS_EcuM_02791])。
在整个执行流程中,该服务与唤醒验证和通信管理紧密交互:
- 验证检查:ECU Manager 调用标注(callout)
EcuM_CheckValidation进行检查;如果检测到有效的唤醒事件,则通过EcuM_ValidateWakeupEvent进行反馈([SWS_EcuM_02925])。 - 配置:如果未为唤醒源配置验证协议(
EcuMValidationTimeout),则EcuM_SetWakeupEvent已隐含调用EcuM_ValidateWakeupEvent([SWS_EcuM_02566])。 - 通知:如果为唤醒源配置了
EcuMComMChannelRef,该服务将调用ComM_EcuM_WakeUpIndication([SWS_EcuM_02645])。在配置了EcuMComMPNCRef的情况下,还会额外为每个引用的 PNC 触发ComM_EcuM_PNCWakeUpIndication([SWS_EcuM_04140])。
本使用说明由 AI 基于 AUTOSAR Classic R20-11 规范生成。
实现者指南即将推出(复杂度 I2)
函数 EcuM_ErrorHook [SWS_EcuM_02904] 📄 PDF
void EcuM_ErrorHook (uint16 reason);
The ECU State Manager will call the error hook if the error codes "ECUM_E_RAM_CHECK_ FAILED" or "ECUM_E_CONFIGURATION_DATA_INCONSISTENT" occur. In this situation it is not possible to continue processing and the ECU must be stopped. The integrator may choose the modality how the ECU is stopped, i.e. reset, halt, restart, safe state etc.
同步且不可重入的回调函数 EcuM_ErrorHook(通过 EcuM_Externals.h 提供)在发生使常规后续处理无法继续并需要停止 ECU 的严重错误时,由 ECU State Manager 调用 [SWS_EcuM_02904]。具体的错误原因通过传入参数 reason 传递 [SWS_EcuM_02904]。
定义的错误原因包括 ECUM_E_RAM_CHECK_FAILED 和 ECUM_E_CONFIGURATION_DATA_INCONSISTENT [SWS_EcuM_02904]。如果唤醒时的 RAM 检查失败,ECU Manager 有义务以原因 ECUM_E_RAM_CHECK_FAILED 触发 EcuM_ErrorHook [SWS_EcuM_02987]。此外,当调用操作系统函数失败且未指定其他错误响应时,通过此 hook 进行错误处理;在这种情况下,EcuM 保持在先前的状态 [SWS_EcuM_04139]。
在实现时,以下边界条件适用于系统集成商:
- ECU 的停止形式:集成商选择使 ECU 停机的方式(例如复位、halt、重启或安全状态)[SWS_EcuM_02904]。Interpretation:在采取诸如复位或 halt 等彻底措施时,该函数通常可能不再返回常规流程控制。 问题 Q-59c23e3a2569f670 (未决)
- 向 DEM 发送错误消息:只要能确保 DEM 不会写入损坏的 NVRAM 块,将错误转发给 DEM 由集成商自行决定 [SWS_EcuM_02987]。
此文本由 AI 创建,并基于 AUTOSAR CP R20-11 规范。
实现者指南即将推出(复杂度 I1)
函数 EcuM_AL_SetProgrammableInterrupts [SWS_EcuM_04085] 📄 PDF
void EcuM_AL_SetProgrammableInterrupts (void);
If the configuration parameter EcuMSetProgrammableInterrupts is set to true, this callout Ecu M_AL_SetProgrammableInterrupts is executed and shall set the interrupts on ECUs with programmable interrupts.
使用和调用条件
Callout 函数 EcuM_AL_SetProgrammableInterrupts 由 ECU State Manager 模块调用,以便在具有可编程中断控制器的 ECU 上配置和设置相应的中断 [SWS_EcuM_04085]。然而,仅当配置参数 EcuMSetProgrammableInterrupts 被设置为值 true 时,才会执行此 Callout [SWS_EcuM_04085]。如果该参数未激活,则不进行调用 [SWS_EcuM_04085]。对于集成人员和平台驱动程序,该接口的声明通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_04085]。
该接口具有语法 void EcuM_AL_SetProgrammableInterrupts (void) 并分配有 Service-ID 0x4A [SWS_EcuM_04085]。调用完全不带参数:既不传递输入、输入/输出参数,也不传递输出参数,且函数不向调用模块返回返回值 [SWS_EcuM_04085]。
并发性与限制
规范为 EcuM_AL_SetProgrammableInterrupts 规定了异步执行行为(Asynchronous)[SWS_EcuM_04085]。关于并发性,该函数被归类为不可重入(Non Reentrant)[SWS_EcuM_04085]。对于集成而言,这意味着对该接口进行并行或嵌套调用是不允许的,并且与中断相关的配置必须在没有并发重入的情况下运行 [SWS_EcuM_04085]。
本使用说明基于 AUTOSAR 规范自动创建。
函数 EcuM_AL_DriverInitZero [SWS_EcuM_02905] 📄 PDF
void EcuM_AL_DriverInitZero (void);
This callout shall provide driver initialization and other hardware-related startup activities for loading the post-build configuration data. Beware: Here only pre-compile and link-time configurable modules may be used.
使用
标注函数 EcuM_AL_DriverInitZero(Service-ID 0x31)被同步调用,既没有参数也没有返回值,且不可重入 [SWS_EcuM_02905]。它通过头文件 EcuM_Externals.h 声明 [SWS_EcuM_02905]。该函数用于提供早期驱动程序初始化以及基本的硬件相关启动活动,这些对于随后能够加载 post-build 配置数据是绝对必要的 [SWS_EcuM_02905]。
限制与多核运行
对于实现和执行,适用以下具体规定和限制:
- 配置类:在此早期时间点,仅允许使用可预编译(Pre-Compile)或链接时(Link-Time)配置的模块 [SWS_EcuM_02905]。此时 Post-Build 可配置驱动程序尚不可用。
- 调用上下文:该函数由
EcuM_Init在系统的每个 Core 上调用 [SWS_EcuM_04145]。 - Core 特定初始化:标注的实现必须确保,在当前活动的 Core 上仅初始化实际在该特定 Core 上执行的那些 MCAL 模块 [SWS_EcuM_04145]。
对于此标注,未定义返回值、具体错误代码或通过 DET 或 DEM 的通知 [SWS_EcuM_02905]。
此使用说明基于 AUTOSAR Release R20-11 的规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_DeterminePbConfiguration [SWS_EcuM_02906] 📄 PDF
const EcuM_ConfigType* EcuM_DeterminePbConfiguration (void);
This callout should evaluate some condition, like port pin or NVRAM value, to determine which post-build configuration shall be used in the remainder of the startup process. It shall load this configuration data into a piece of memory that is accessible by all BSW modules and shall return a pointer to the EcuM post-build configuration as a base for all BSW module post-build configrations.
函数 EcuM_DeterminePbConfiguration([SWS_EcuM_02906])是 ECU State Manager 的同步标注(callout),通过头文件 EcuM_Externals.h 提供,且 Service-ID 为 0x32。该接口不包含输入、输出或输入/输出参数([SWS_EcuM_02906])。其核心目的在于:在启动过程中根据硬件或存储器条件确定在系统启动的后续过程中应采用哪一个 post-build 配置数据集([SWS_EcuM_02906])。
为确定配置,标注应当评估外部或驻留准则,例如端口引脚的状态或 NVRAM 中的值([SWS_EcuM_02906])。随后,该函数必须将这些配置数据加载到所有 BSW 模块均可访问的内存段中([SWS_EcuM_02906])。作为返回值,它返回一个指向 EcuM post-build 配置的类型为 const EcuM_ConfigType* 的指针([SWS_EcuM_02906])。该指针构成了整个 BSW 的共同基础,因为该结构体包含指向所有其他 BSW 模块各自 post-build 配置的指针([SWS_EcuM_02906])。
就调用行为而言,该函数被指定为同步且不可重入(Non Reentrant)([SWS_EcuM_02906])。未为该标注定义具体的错误代码、特殊的错误返回值以及与 DET 或 DEM 的接口([SWS_EcuM_02906])。因此,根据规范要求的解释,推测特定于应用的标注实现必须自行处理错误状态,因为缺少有效的配置指针推测会阻碍相关依赖 BSW 模块的有序启动。 问题 Q-b9487647fb39a2e2 (未决)
此使用说明基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_AL_DriverInitOne [SWS_EcuM_02907] 📄 PDF
void EcuM_AL_DriverInitOne (void);
This callout shall provide driver initialization and other hardware-related startup activities in case of a power on reset.
用法与语义
函数 EcuM_AL_DriverInitOne 是 ECU 状态管理器(EcuM)的一个标注函数,通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_02907]。其主要任务是在上电复位的情况下执行驱动程序初始化以及控制单元的其他硬件相关启动活动 [SWS_EcuM_02907]。由于这是一个标注,硬件和驱动程序初始化的具体实现可能由各自的系统集成商完成。 问题 Q-e22baf2fa31cf075 (未决)
该接口具有 C 签名 void EcuM_AL_DriverInitOne (void),并分配给 Service-ID 0x33 [SWS_EcuM_02907]。它不接受任何输入参数,也不向调用者返回任何返回值 [SWS_EcuM_02907]。
并发性与限制
根据 [SWS_EcuM_02907],以下边界条件适用于调用和运行时行为:
- 同步性:执行是同步进行的(
Synchronous),因此调用者会等待启动活动完成。 - 可重入性:该函数被定义为不可重入(
Non Reentrant);不允许并发或中断性的多次调用。 - 调用上下文:仅针对上电复位之后的初始化阶段指定激活。
错误处理
由于 EcuM_AL_DriverInitOne 具有返回类型 void,因此在接口级别不存在关于初始化成功或失败的直接反馈 [SWS_EcuM_02907]。在当前规范范围内,未为此标注定义具体错误代码、DET 或 DEM 消息。
此文本由 AI 创建,并基于 AUTOSAR 规范 R20-11。
实现者指南即将推出(复杂度 I1)
函数 EcuM_LoopDetection [SWS_EcuM_04137] 📄 PDF
void EcuM_LoopDetection (void);
If the configuration parameter EcuMResetLoopDetection is set to true, this callout EcuM_Loop Detection is called on every startup.
函数 EcuM_LoopDetection 是 ECU State Manager 的一个 Callout,其服务 ID 为 0x4B,通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_04137]。
用法与调用上下文
只要配置参数 EcuMResetLoopDetection 设置为 true,该 Callout 就会在每次启动(Startup)时被同步调用 [SWS_EcuM_04137]。该函数既没有输入、输入/输出参数,也没有输出参数,并且不提供返回值(签名:void EcuM_LoopDetection (void))[SWS_EcuM_04137]。
并发性与限制
EcuM_LoopDetection 的执行被指定为同步且不可重入(Non Reentrant)[SWS_EcuM_04137]。由于它是一个 Callout,循环检测的具体实现通常由集成商或用户负责,以捕获系统启动时的重复复位循环。
本使用提示基于 AUTOSAR 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_OnGoOffOne [SWS_EcuM_02916] 📄 PDF
void EcuM_OnGoOffOne (void);
This call allows the system designer to notify that the GO OFF I state is about to be entered.
使用
函数 EcuM_OnGoOffOne 用于通告达到系统状态 GO OFF I,并使系统设计人员有机会在转换之前立即采取相应措施 [SWS_EcuM_02916]。该函数同步执行,不需要传入参数(既无 in 也无 inout),且不返回返回值(void)[SWS_EcuM_02916]。由于该接口是通过头文件 EcuM_Externals.h 声明的,因此可以合理推断这是一个在集成代码中实现的用户自定义 Callout 函数 [SWS_EcuM_02916]。 问题 Q-93de53c47a5a6142 (未决)
错误处理
在 EcuM_OnGoOffOne 的规范中,既未列出开发错误(DET),也未列出生产错误(DEM)或特定的错误返回值 [SWS_EcuM_02916]。由此可以推断,调用方不期望标准化的错误管理,任何异常情况都必须在用户自定义实现中自主处理 [SWS_EcuM_02916]。
并发性与限制
对于调用上下文和运行时行为,规定了以下属性 [SWS_EcuM_02916]:
- 重入性:该函数被指定为不可重入(Non Reentrant),绝不得并行或嵌套调用 [SWS_EcuM_02916]。
- 同步性:其语义为严格同步(Synchronous),因此调用方会等待该函数完全返回 [SWS_EcuM_02916]。
- Service-ID:该服务在内部由十六进制标识符
0x3C表示 [SWS_EcuM_02916]。
由于同步行为以及即将转换到 GO OFF I 状态,可以假定应避免阻塞操作,以免不允许地延迟关闭或转换过程 [SWS_EcuM_02916]。 问题 Q-93f5e23c581f0c38 (未决)
本使用说明由 AI 基于 AUTOSAR CP R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_OnGoOffTwo [SWS_EcuM_02917] 📄 PDF
void EcuM_OnGoOffTwo (void);
This call allows the system designer to notify that the GO OFF II state is about to be entered.
根据规范,同步函数 EcuM_OnGoOffTwo 用于使系统设计人员能够收到状态 GO OFF II 即将到来的通知 [SWS_EcuM_02917]。该调用无参数进行,没有 In、Inout 或 Out 参数,且不向调用者返回任何返回值 [SWS_EcuM_02917]。
关于执行上下文和并发性,该接口带有 Service-ID 0x3D,并被指定为不可重入(Non Reentrant)[SWS_EcuM_02917]。它通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_02917]。Interpretation:由于声明位于 EcuM_Externals.h 中并用于通知系统设计人员,因此该函数可能被设计为 ECU 管理的同步标注,在切换到状态 GO OFF II 之前被调用。 问题 Q-bb0ae6e4632de827 (未决)
由于具有不可重入接口的特性,该调用不得并行或以中断方式重复进行 [SWS_EcuM_02917]。在规范范围内,未定义具体错误代码、向 DET 或 DEM 的反馈以及单独的错误处理机制 [SWS_EcuM_02917]。
此文本由 AI 基于 R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_AL_SwitchOff [SWS_EcuM_02920] 📄 PDF
void EcuM_AL_SwitchOff (void);
This callout shall take the code for shutting off the power supply of the ECU. If the ECU cannot unpower itself, a reset may be an adequate reaction.
使用
标注函数 EcuM_AL_SwitchOff 是 ECU State Manager(EcuM)模块的一部分,用于包含用于关闭 ECU 电源供电的用户特定代码 [SWS_EcuM_02920]。该接口被定义为同步的,具有 Service-ID 0x3E,并通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_02920]。
根据规范,该函数既不接收输入、输入/输出参数,也不接收输出参数,并且没有返回值(void)[SWS_EcuM_02920]。如果 ECU 的硬件无法自行断电,规范规定触发复位可以作为替代的妥当响应 [SWS_EcuM_02920]。
协同交互与并发性
一旦选定的关机目标为 OFF,ECU Manager 模块必须强制调用 EcuM_AL_SwitchOff [SWS_EcuM_04075]。关于并发行为,该标注被确定为不可重入(Non Reentrant)[SWS_EcuM_02920]。Interpretation:由于该函数的目标是完全切断电源或备选地进行复位,该标注可能代表关机序列的最后一步,此后不再进行任何常规程序执行。 问题 Q-e8a1aaa1413bbea9 (未决)
错误处理
在规范中,既未为此标注规定具体错误代码,也未规定错误处理机制或向 DET 或 DEM 发送的消息 [SWS_EcuM_02920]。
此使用说明基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_AL_Reset [SWS_EcuM_04065] 📄 PDF
void EcuM_AL_Reset (EcuM_ResetType reset);
This callout shall take the code for resetting the ECU.
标注 EcuM_AL_Reset 用于包含负责复位 ECU 的集成特定代码([SWS_EcuM_04065])。该接口通过头文件 EcuM_Externals.h 声明,并具有 Service-ID 0x4C([SWS_EcuM_04065])。
该函数的调用是同步进行的,并被定义为不可重入(Non Reentrant)([SWS_EcuM_04065])。作为唯一的输入参数,传入类型为 EcuM_ResetType 的 reset,用于确定要执行的具体复位类型([SWS_EcuM_04065])。该函数没有返回值(void),并且没有任何用于输出或输入/输出的参数([SWS_EcuM_04065])。
在关机阶段的交互中规定,当关机目标设置为 RESET 时,ECU Manager 模块必须强制调用标注 EcuM_AL_Reset([SWS_EcuM_04074])。在规范中,既未为此标注规定错误代码,也未规定向 DET 或 DEM 发送的通知([SWS_EcuM_04065])。Interpretation:该标注可能执行直接导致 MCU 复位的底层硬件控制命令。 问题 Q-1e318404843faabd (未决)
本使用说明由 AI 基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_EnableWakeupSources [SWS_EcuM_02918] 📄 PDF
void EcuM_EnableWakeupSources (EcuM_WakeupSourceType wakeupSource);
The ECU Manager Module calls EcuM_EnableWakeupSource to allow the system designer to notify wakeup sources defined in the wakeupSource bitfield that SLEEP will be entered and to adjust their source accordingly.
函数 EcuM_EnableWakeupSources 是 ECU Manager 具有 Service-ID 0x3F 的同步标注,通过头文件 EcuM_Externals.h 声明 [SWS_EcuM_02918]。它用于通知系统开发人员状态 SLEEP 即将到来,以便对位字段 wakeupSource(类型 EcuM_WakeupSourceType)中指定的唤醒源进行相应的准备和设置 [SWS_EcuM_02918]。
使用与交互
ECU Manager 执行 EcuM_EnableWakeupSources 以配置用于下一个 Sleep 模式的唤醒源;这针对在 EcuMWakeupSourceMask 中为目标 Sleep 模式配置的每个唤醒源进行 [SWS_EcuM_02389]。该函数没有返回值(void),并期望位字段 wakeupSource 作为输入参数 [SWS_EcuM_02918]。
并发性与限制
- 可重入性:该函数被指定为不可重入(
Non Reentrant)[SWS_EcuM_02918]。 - 同步性:处理是同步进行的 [SWS_EcuM_02918]。
- 错误处理:在该接口的规范范围内,未定义具体的 DET 或 DEM 错误消息 [SWS_EcuM_02918]。
本使用说明基于 AUTOSAR 规范版本 R20-11 自动生成。
函数 EcuM_GenerateRamHash [SWS_EcuM_02919] 📄 PDF
void EcuM_GenerateRamHash (void);
see EcuM_CheckRamHash
函数 EcuM_GenerateRamHash 用于在 ECU State Manager 上下文中生成 RAM 校验值,关于工作原理规范参见 EcuM_CheckRamHash [SWS_EcuM_02919]。生成的校验值大概用于稍后结合睡眠或休眠状态对主内存进行完整性检查。 问题 Q-7f316b389e1609c0 (未决)
使用与接口
该服务具有 Service-ID 0x40 和签名 void EcuM_GenerateRamHash(void) [SWS_EcuM_02919]。该函数既没有输入、输出参数,也没有输入/输出参数,且不返回任何返回值。执行是同步进行的。
并发性与限制
该函数被指定为不可重入(Non Reentrant)[SWS_EcuM_02919]。因此,不得从多个上下文以中断方式或并行调用它。声明通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_02919]。Interpretation:通过在 EcuM_Externals.h 中的定义,它可能是一个需要用户特定实现的标注,由 ECU State Manager 在状态流程中的适当时机调用。 问题 Q-2f53f1a19cee079c (未决)
错误处理
在 [SWS_EcuM_02919] 中未针对 EcuM_GenerateRamHash 定义具体错误代码,也未定义 DET 或 DEM 消息。
此使用说明基于模块 EcuM 的规范自动生成。
函数 EcuM_SleepActivity [SWS_EcuM_02928] 📄 PDF
void EcuM_SleepActivity (void);
This callout is invoked periodically in all reduced clock sleep modes. It is explicitely allowed to poll wakeup sources from this callout and to call wakeup notification functions to indicate the end of the sleep state to the ECU State Manager.
用法与调用上下文
函数 EcuM_SleepActivity 代表 ECU State Manager 的一个 Callout,在头文件 EcuM_Externals.h 中提供,其 Service-ID 为 0x41 [SWS_EcuM_02928]。该调用在所有降低处理器时钟的睡眠模式(reduced clock sleep modes)下周期性进行 [SWS_EcuM_02928]。该函数的签名为 void EcuM_SleepActivity(void),同步工作,且不接收输入、输出或输入/输出参数 [SWS_EcuM_02928]。
功能任务与交互
该 Callout 的目的是在睡眠期间执行活动:规范中明确规定并允许在 EcuM_SleepActivity 内循环轮询(Polling)唤醒源 [SWS_EcuM_02928]。此外,允许直接从该 Callout 中调用唤醒通知函数,以向 ECU State Manager 指示睡眠状态的结束 [SWS_EcuM_02928]。
并发性与限制
该接口被指定为不可重入(Non Reentrant)[SWS_EcuM_02928]。由于该 Callout 不提供返回值,且未定义错误参数,因此不会通过函数接口利用错误代码或像 DET 或 DEM 这样的错误报告器进行直接的错误处理 [SWS_EcuM_02928]。
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_StartCheckWakeup [SWS_EcuM_04096] 📄 PDF
void EcuM_StartCheckWakeup (EcuM_WakeupSourceType WakeupSource);
This API is called by the ECU Firmware to start the CheckWakeupTimer for the corresponding WakeupSource. If EcuMCheckWakeupTimeout > 0 the CheckWakeupTimer for the Wakeup Source is started. If EcuMCheckWakeupTimeout <= 0 the API call is ignored by the EcuM.
用法与调用上下文
根据 [SWS_EcuM_04096],同步接口 EcuM_StartCheckWakeup 由 ECU 固件调用,以针对特定唤醒源启动定时器 CheckWakeupTimer。为此,向该函数传递类型为 EcuM_WakeupSourceType 的参数 WakeupSource。它没有返回值(void),并通过头文件 EcuM_Externals.h 提供。
流程与条件
该函数的执行取决于唤醒源的配置 [SWS_EcuM_04096]:
- 如果为相关唤醒源配置了
EcuMCheckWakeupTimeout > 0,则启动相应的CheckWakeupTimer。 - 如果适用
EcuMCheckWakeupTimeout <= 0,则该函数调用将被 EcuM 完全忽略。
并发与错误处理
该函数被指定为非重入(Non Reentrant)[SWS_EcuM_04096]。因此,调用者必须确保针对相同或其他唤醒源的调用不会并发发生。未针对该调用指定特定错误码以及向 DET 或 DEM 发送的通知;根据规范,在非正超时时间下调用不会产生任何影响,这大概可以解释为对无关定时器检查的容错拦截 [SWS_EcuM_04096]。 问题 Q-19d98b03d3ee7504 (未决)
此使用说明由 AI 基于 AUTOSAR R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_CheckWakeup [SWS_EcuM_02929] 📄 PDF
void EcuM_CheckWakeup (EcuM_WakeupSourceType wakeupSource);
This callout is called by the EcuM to poll a wakeup source. It shall also be called by the ISR of a wakeup source to set up the PLL and check other wakeup sources that may be connected to the same interrupt.
标注 EcuM_CheckWakeup 用于在唤醒事件后检查和轮询唤醒源以及配置 PLL [SWS_EcuM_02929]。该函数通过头文件 EcuM_Externals.h 提供,并具有 Service-ID 0x42 [SWS_EcuM_02929] 敬请注意。
调用上下文与语义
- 签名与参数:该函数同步执行(
Synchronous),没有返回值,并期望类型为EcuM_WakeupSourceType的wakeupSource作为输入参数 [SWS_EcuM_02929]。 - 调用者:该标注由
EcuM调用,以周期性查询唤醒源。此外,必须由唤醒源的中断服务例程(ISR)调用它,以建立 PLL 并检查连接在同一中断上的其他唤醒源 [SWS_EcuM_02929]。 - 轮询循环:在轮询序列中,EcuM 在阻塞循环中重复调用标注
EcuM_SleepActivity和EcuM_CheckWakeup,直到唤醒事件被报告为挂起或已验证 [SWS_EcuM_03020]。
限制与错误处理
该函数被指定为不可重入(Non Reentrant)[SWS_EcuM_02929]。由于调用既可以来自轮询序列的阻塞流程,也可以来自 ISR 上下文,因此集成可能必须确保不会发生未协调的并发调用。 问题 Q-8bc8f164670a0911 (未决)未为此标注定义具体错误代码或向 DET 或 DEM 发送的错误通知。
本使用说明是基于 AUTOSAR 规范自动生成的。
实现者指南即将推出(复杂度 I1)
函数 EcuM_EndCheckWakeup [SWS_EcuM_02927] 📄 PDF
void EcuM_EndCheckWakeup (EcuM_WakeupSourceType WakeupSource);
This API is called by any SW Module whose wakeup source is checked asynchronously (e.g. asynchronous Can Trcv Driver) and the Check of the Wakeup returns a negative Result (no Wakeup by this Source). The API cancels the CheckWakeupTimer for the WakeupSource. If the correponding CheckWakeupTimer is canceled the check of this wakeup source is finished.
当唤醒源的异步检查(例如在异步 CAN 收发器驱动程序中)产生消极结果(即该源未出现唤醒事件)时,软件模块会调用同步函数 EcuM_EndCheckWakeup [SWS_EcuM_02927]。
用法与参数
通过类型为 EcuM_WakeupSourceType 的输入参数 WakeupSource 传入需要取消其关联监控定时器的唤醒源 [SWS_EcuM_02927]。该函数没有返回值(void),且不包含输入/输出或输出参数 [SWS_EcuM_02927]。
工作原理与并发性
- 该函数取消针对指定唤醒源的定时器
CheckWakeupTimer;随着该定时器的取消,唤醒源的检查被视为已完成 [SWS_EcuM_02927]。 - 该接口被定义为同步且不可重入(
Non Reentrant)[SWS_EcuM_02927]。 - 声明通过头文件
EcuM_Externals.h提供 [SWS_EcuM_02927]。
本使用说明是基于 AUTOSAR R20-11 的规范自动生成的。
函数 EcuM_CheckRamHash [SWS_EcuM_02921] 📄 PDF
uint8 EcuM_CheckRamHash (void);
This callout is intended to provide a RAM integrity test. The goal of this test is to ensure that after a long SLEEP duration, RAM contents is still consistent. The check does not need to be exhaustive since this would consume quite some processing time during wakeups. A well designed check will execute quickly and detect RAM integrity defects with a sufficient probability. This specification does not make any assumption about the algorithm chosen for a particular ECU. The areas of RAM which will be checked have to be chosen carefully. It depends on the check algorithm itself and the task structure. Stack contents of the task executing the RAM check e.g. very likely cannot be checked. It is good practice to have the hash generation and checking in the same task and that this task is not preemptible and that there is only little activity between hash generation and hash check. The RAM check itself is provided by the system designer. In case of applied multi core and existence of Satellite-Ecu M(s): this API will be called by the Master-EcuM only.
函数 EcuM_CheckRamHash 是一个同步且不可重入的标注(在 EcuM_Externals.h 中声明),它提供 RAM 内存的完整性测试 [SWS_EcuM_02921]。该函数没有参数,并返回类型为 uint8 的状态值:值 0 表示测试失败,而任何其他值表示成功通过 [SWS_EcuM_02921]。
根据 [SWS_EcuM_02863],EcuM 模块在停止微控制器之前首先调用 [SWS_EcuM_02919],并在从 halt 状态返回后执行 EcuM_CheckRamHash。目标是验证即使在漫长的 SLEEP 阶段之后,RAM 内容也保持一致 [SWS_EcuM_02921]。
对于实现和流程,适用以下边界条件:
- 算法与检查区域:检查函数由系统设计人员提供;它不必是详尽无遗的,但应执行迅速且足够可靠地检测错误 [SWS_EcuM_02921]。要检查的区域必须仔细选择;执行任务的堆栈内容通常无法检查 [SWS_EcuM_02921]。
- 任务结构:最佳实践是在具有最小中间活动的同一个不可中断任务中执行哈希生成和检查 [SWS_EcuM_02921]。
- 多核:在具有卫星 EcuM 的多个处理器内核的情况下,该标注仅由主 EcuM 调用,并且仅检查其范围之内的数据 [SWS_EcuM_02863]、[SWS_EcuM_02921]。
未为此标注定义具体的 DET 或 DEM 消息;返回值为 0 时的错误响应大概取决于上层系统设计 [SWS_EcuM_02921]。 问题 Q-473ef8617db29fe3 (未决)
本段文本由AI创建,基于AUTOSAR Classic R20-11规范。
函数 EcuM_DisableWakeupSources [SWS_EcuM_02922] 📄 PDF
void EcuM_DisableWakeupSources (EcuM_WakeupSourceType wakeupSource);
The ECU Manager Module calls EcuM_DisableWakeupSources to set the wakeup source(s) defined in the wakeupSource bitfield so that they are not able to wake the ECU up.
Service-ID 为 0x44 的同步接口 EcuM_DisableWakeupSources 用于对类型为 EcuM_WakeupSourceType 的位字段参数 wakeupSource 中定义的唤醒源进行配置,使其不再能够唤醒 ECU [SWS_EcuM_02922]。函数签名形式为 void EcuM_DisableWakeupSources (EcuM_WakeupSourceType wakeupSource) [SWS_EcuM_02922]。
根据规范,调用上下文和集成适用以下特性:
- 调用方与头文件:该函数由 ECU Manager 模块调用,并通过头文件
EcuM_Externals.h提供 [SWS_EcuM_02922]。 - 参数与返回值:位字段
wakeupSource作为唯一的输入参数传入。该函数既无输入/输出参数也无输出参数,且不返回任何返回值(void)[SWS_EcuM_02922]。 - 执行语义与并发性:处理同步进行。此外,该函数被指定为不可重入(
Non Reentrant),因此必须避免并发或嵌套调用 [SWS_EcuM_02922]。
关于错误处理,该规范对于此函数调用既未包含具体错误代码,也未包含发送给 DET 或 DEM 的通知 [SWS_EcuM_02922]。
此文本由 AI 基于 AUTOSAR CP R20-11 规范生成。
函数 EcuM_AL_DriverRestart [SWS_EcuM_02923] 📄 PDF
void EcuM_AL_DriverRestart (void);
This callout shall provide driver initialization and other hardware-related startup activities in the wakeup case.
标注 EcuM_AL_DriverRestart 通过头文件 EcuM_Externals.h 声明,并具有 Service-ID 0x45 [SWS_EcuM_02923]。该函数具有签名 void EcuM_AL_DriverRestart (void),不需要传入参数,且不返回任何返回值 [SWS_EcuM_02923]。该接口的目的是在唤醒情况(Wakeup Case)下提供驱动程序初始化以及启动阶段的其他硬件相关活动 [SWS_EcuM_02923]。
对于集成以及与模块 EcuM 的交互,适用强制性规定:
- 为了在阶段
WakeupRestart期间重新初始化,集成商必须在EcuM_AL_DriverRestart的集成代码中包含一个重启块,该块使用已配置的列表EcuMDriverRestartList[SWS_EcuM_02947] [SWS_EcuM_02923]。 - 列表
EcuMDriverRestartList可以包含充当唤醒源(Wakeup Sources)的驱动程序 [SWS_EcuM_02562]。在这种情况下,EcuM_AL_DriverRestart必须重新使能(re-arm)这些驱动程序的唤醒检测(“wakeup detected”)回调触发机制 [SWS_EcuM_02562]。
关于运行时行为,该函数被定义为同步且不可重入 [SWS_EcuM_02923]。由于涉及应用程序特定的集成代码,规范在此接口上未定义其自身的错误代码,也未定义向 DET 或 DEM 发送的标准化消息。
此文本由 AI 创建。信息可能不完整,且不替代官方 AUTOSAR 规范。
实现者指南即将推出(复杂度 I2)
函数 EcuM_StartWakeupSources [SWS_EcuM_02924] 📄 PDF
void EcuM_StartWakeupSources (EcuM_WakeupSourceType wakeupSource);
The callout shall start the given wakeup source(s) so that they are ready to perform wakeup validation.
标注函数 EcuM_StartWakeupSources 用于启动并使传入的唤醒源投入运行,以便为随后执行唤醒验证(Wakeup Validation)做好准备 [SWS_EcuM_02924]。
用法与调用上下文
该函数被指定为具有 Service-ID 0x46 的同步调用,没有返回值(void),并通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_02924]。
- 参数
wakeupSource(in):将要启动的唤醒源或多个唤醒源的位掩码(类型为EcuM_WakeupSourceType)传递给标注函数 [SWS_EcuM_02924]。不存在额外的输入或输出参数(inout/out)[SWS_EcuM_02924]。
并发性与限制
关于执行环境,EcuM_StartWakeupSources 被归类为不可重入(Non Reentrant)[SWS_EcuM_02924]。因此,调用者必须确保该函数不会同时从中断服务例程或并行任务中执行。
交互与错误处理
由于 EcuM_StartWakeupSources 被声明为标注,受影响源的底层硬件激活由系统集成商通过应用程序特定实现负责 [SWS_EcuM_02924]。规范既未为此接口规定向 DET 或 DEM 发送错误消息,也未规定特定的错误返回值 [SWS_EcuM_02924];因此,启动源时的任何错误状态大概都会在标注内进行集成特定的捕获。 问题 Q-b595e7175c34a831 (未决)
此文本由 AI 创建,并基于 AUTOSAR R20-11 规范。
实现者指南即将推出(复杂度 I2)
函数 EcuM_CheckValidation [SWS_EcuM_02925] 📄 PDF
void EcuM_CheckValidation (EcuM_WakeupSourceType wakeupSource);
This callout is called by the EcuM to validate a wakeup source. If a valid wakeup has been detected, it shall be reported to EcuM via EcuM_ValidateWakeupEvent().
函数 EcuM_CheckValidation 用作 ECU State Manager 检查唤醒源的 Callout 接口 [SWS_EcuM_02925]。EcuM 调用此函数以确定检测到的唤醒事件是否有效 [SWS_EcuM_02925]。
使用
该 Callout 具有服务 ID 0x47,并通过头文件 EcuM_Externals.h 提供 [SWS_EcuM_02925]。作为传递参数,使用类型为 EcuM_WakeupSourceType 的 wakeupSource,通过它识别待校验的唤醒源 [SWS_EcuM_02925]。该函数没有返回值(void),且不包含输出或输入/输出参数 [SWS_EcuM_02925]。执行方式为同步 [SWS_EcuM_02925]。
错误处理
规范中未为此 Callout 定义特定的错误码、错误情况下的返回值或向 DET 或 DEM 的上报。
并发性与限制
在并发性方面,EcuM_CheckValidation 被定义为不可重入(Non Reentrant)[SWS_EcuM_02925]。EcuM 的调用上下文必须确保不会针对相同或不同的唤醒源发生并行或嵌套调用。
相互作用
如果在执行过程中检测到有效的唤醒事件,则必须通过函数调用 EcuM_ValidateWakeupEvent() 将其回报给 EcuM [SWS_EcuM_02925]。理解:用于检查硬件的设备专用逻辑以及关于有效性的决定,推测完全在集成代码中实现。 问题 Q-08061e09b474728d (未决)
本使用说明基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_StopWakeupSources [SWS_EcuM_02926] 📄 PDF
void EcuM_StopWakeupSources (EcuM_WakeupSourceType wakeupSource);
The callout shall stop the given wakeup source(s) after unsuccessful wakeup validation.
EcuM 模块(Classic Platform)的标注函数 EcuM_StopWakeupSources 用于在唤醒验证未成功后有针对性地停止传入的唤醒源 [SWS_EcuM_02926]。该同步接口的声明可通过头文件 EcuM_Externals.h 获取,并带有 Service-ID 0x48 [SWS_EcuM_02926]。
使用与接口参数:
- 输入参数:作为唯一参数,传入类型为
EcuM_WakeupSourceType的wakeupSource,用于指定要停止的唤醒源 [SWS_EcuM_02926]。 - 返回值与输入/输出:既不存在输入/输出参数(
inout),也不存在输出参数(out)[SWS_EcuM_02926]。该函数不向调用者返回任何返回值(void)[SWS_EcuM_02926]。 - 执行行为:函数执行被确定为同步(
Synchronous)[SWS_EcuM_02926]。
并发性与错误处理:
该接口被指定为不可重入(Non Reentrant)[SWS_EcuM_02926]。因此不允许并行调用,调用者必须避免并行调用。规范未为此标注定义具体的错误代码、返回值,也未定义向 Default Error Tracer(DET)或 Diagnostic Event Manager(DEM)模块发送的通知 [SWS_EcuM_02926]。Interpretation:由于该函数作为外部标注通过 EcuM_Externals.h 提供,相关唤醒硬件的硬件相关停用以及内部错误处理由用户特定实现负责。 问题 Q-b537c805bed751ab (未决)
此文本由 AI 基于 R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
函数 EcuM_MainFunction [SWS_EcuM_02837] 📄 PDF
void EcuM_MainFunction (void);
The purpose of this service is to implement all activities of the ECU State Manager while the OS is up and running.
用法与调用上下文
函数 EcuM_MainFunction 具有签名 void EcuM_MainFunction(void),服务 ID 为 0x18,并通过头文件 SchM_EcuM.h 提供 [SWS_EcuM_02837]。它不接收参数且不返回返回值 [SWS_EcuM_02837]。其任务是在操作系统运行(“OS is up and running”)期间处理 ECU State Manager 的所有活动 [SWS_EcuM_02837]。在此期间,该函数通常应由调度器周期性调用(Interpretation:通过 SchM_EcuM.h 集成)。 问题 Q-ca471f22bdb1f11d (未决)
交互与任务
在运行期间,EcuM_MainFunction 承担核心协调任务:
- 唤醒源校验:若在 WakeupRestart 序列完成后存在候选唤醒源列表,EcuM 模块将在
EcuM_MainFunction内校验这些候选对象 [SWS_EcuM_02539]。 - 校验超时到期:若挂起唤醒事件的校验超时到期,函数将通过“或”运算设置已到期唤醒事件内部变量中的关联位 [SWS_EcuM_04081]。此外,它通过
BswM_EcuM_Current_Wakeup并带有该事件的EcuM_WakeupSourceType位掩码和状态ECUM_WKSTATUS_EXPIRED通知 BSW 管理 [SWS_EcuM_04082]。 - Alarm Clock Service:若该服务通过
EcuMAlarmClockPresent存在,则EcuM_MainFunction更新 Alarm Clock Timer [SWS_EcuM_04002]。
限制与实例
作为多核或多实例架构的一项重要边界条件,EcuM_MainFunction 必须在 EcuM 的所有实例中执行 [SWS_EcuM_04011]。
本使用说明根据 R20-11 规范自动生成。
实现者指南即将推出(复杂度 I2)
类型 EcuM_ConfigType [SWS_EcuM_04038] 📄 PDF
A pointer to such a structure shall be provided to the ECU State Manager initialization routine for configuration.
类型 EcuM_RunStatusType [SWS_EcuM_04120] 📄 PDF
Result of the Run Request Protocol sent to BswM
数据类型 EcuM_RunStatusType 被定义为 uint8,并通过头文件 EcuM.h 提供([SWS_EcuM_04120])。它用于在 ECU Manager 中正式表示 Run-Request 协议的当前状态,并作为结果传输给 Basic Software Mode Manager(BswM)([SWS_EcuM_04120])。
允许的取值范围包括三个离散状态([SWS_EcuM_04120]):
ECUM_RUNSTATUS_UNKNOWN(值 0):表示未知状态,同时用作定义的初始化值(Init Value)。ECUM_RUNSTATUS_REQUESTED(值 1):标识 ECU Manager 已主动请求 RUN 状态这一状况。ECUM_RUNSTATUS_RELEASED(值 2):指示 ECU Manager 已再次释放 RUN 状态。
在交互方面,要求 [SWS_EcuM_04121] 规定 ECU Manager 模块必须根据 EcuM_RunStatusType 中列出的状态值,将 Run-Request 协议的当前状态强制通知给 BswM。Interpretation:由于该要求未提及用于消息流的具体函数签名或调用约定,因此状态信息通常应通过内部通知函数或回调接口传递给 BswM 模块。 问题 Q-e136b90c2edbc29c (未决)在当前要求中,未针对该基本数据类型规定特定的错误代码、DET 或 DEM 报告以及特殊的重入条件。
本使用说明是基于 AUTOSAR Classic R20-11 的规范自动创建的。
实现者指南即将推出(复杂度 I1)
类型 EcuM_WakeupSourceType [SWS_EcuM_04040] 📄 PDF
EcuM_WakeupSourceType defines a bitfield with 5 pre-defined positions (see Range). The bitfield provides one bit for each wakeup source. In WAKEUP, all bits cleared indicates that no wakeup source is known. In STARTUP, all bits cleared indicates that no reason for restart or reset is known. In this case, ECUM_WKSOURCE_RESET shall be assumed.
类型 EcuM_WakeupStatusType [SWS_EcuM_04041] 📄 PDF
The type describes the possible states of a wakeup source.
根据 [SWS_EcuM_04041],数据类型 EcuM_WakeupStatusType 描述了 ECU State Manager 中唤醒源(Wakeup Source)的可能状态。该类型派生自基本类型 uint8,并通过头文件 EcuM.h 提供 [SWS_EcuM_04041]。
值范围通过四个状态体现唤醒事件的生命周期 [SWS_EcuM_04041]:
ECUM_WKSTATUS_NONE(值 0):未检测到挂起的唤醒事件 [SWS_EcuM_04041]。ECUM_WKSTATUS_PENDING(值 1):检测到唤醒事件,但尚未验证 [SWS_EcuM_04041]。ECUM_WKSTATUS_VALIDATED(值 2):唤醒事件有效并已成功确认 [SWS_EcuM_04041]。ECUM_WKSTATUS_EXPIRED(值 3):唤醒事件未及时验证,因此已过期 [SWS_EcuM_04041]。
使用与交互:该类型充当唤醒源的中央状态表示。Interpretation:调用者可能在状态查询范围内评估此状态,以确定是唤醒源正在被积极验证、已经发出了有效唤醒信号,还是超出了验证时间窗口。 问题 Q-a3f721e8f1753eb1 (未决)
此文本自动生成。所有信息仅基于相应版本的规范要求。
实现者指南即将推出(复杂度 I1)
类型 EcuM_ResetType [SWS_EcuM_04044] 📄 PDF
This type describes the reset mechanisms supported by the ECU State Manager. It can be extended by configuration.
类型 EcuM_StateType [SWS_EcuM_91005] 📄 PDF
ECU State Manager states.
类型 EcuM_StateType 是从 uint8 派生的数据类型,通过头文件 EcuM.h 提供,用于表示 ECU State Manager 的运行状态 [SWS_EcuM_91005]。EcuM 模块必须定义 EcuM_StateType 中列出的所有状态 [SWS_EcuM_02664]。取值范围包括子状态掩码 ECUM_SUBSTATE_MASK(0x0f)以及主状态 ECUM_STATE_STARTUP(0x10)、ECUM_STATE_RUN(0x32)、ECUM_STATE_POST_RUN(0x33)、ECUM_STATE_SHUTDOWN(0x40)和 ECUM_STATE_SLEEP(0x50)[SWS_EcuM_91005]。
使用与交互
该数据类型作为 BswM 与 EcuM 之间进行状态通信的核心参数:
- 向 EcuM 发起状态切换:BswM 通过服务 ID 为
0x2b的同步且可重入的函数调用EcuM_SetState(EcuM_StateType state),将状态切换通知 EcuM 模块 [SWS_EcuM_04122]。 - 向 BswM 报告状态:EcuM 通过调用接口
BswM_EcuM_CurrentState(EcuM_StateType State)向 BswM 报告当前状态 [SWS_EcuM_04143]。
并发、时序与错误处理
关于时间顺序,规范要求只有当 RTE 通过相应的确认端口给出反馈后,EcuM 才允许设置新状态 [SWS_EcuM_04143]。当前资料中未针对该数据类型规定特定的错误码、返回值或 DET/DEM 消息。
此使用说明是基于规范要求自动生成的。
实现者指南即将推出(复杂度 I1)
类型 EcuM_Mode [SWS_EcuM_04107] 📄 PDF
类型 EcuM_Mode 根据 [SWS_EcuM_04107] 定义为 ModeDeclarationGroup,表示 ECU State Manager 的核心状态。STARTUP 被确定为初始模式。此外,该组还包含定义的模式 POST_RUN、RUN、SHUTDOWN 以及 SLEEP [SWS_EcuM_04107]。
在系统集成中,EcuM_Mode 用作服务接口 EcuM_CurrentMode 内模式组 currentMode 的类型基础 [SWS_EcuM_04108]。通过该接口可以查询当前 ECU 模式,或者通过 RTE 模式机制向其他软件组件发送信号。
在调用上下文和并发性方面,该类型规范本身不包含关于重入性或错误码的显式限制;状态转换的管理通过 EcuM 的相应服务接口进行。
本提示自动生成,基于 AUTOSAR R20-11 规范数据。
实现者指南即将推出(复杂度 I1)
类型 currentMode [SWS_EcuM_04112] 📄 PDF
元素 currentMode 被定义为 EcuM 模块的 Provided-Port,并为软件架构提供服务接口 EcuM_CurrentMode [SWS_EcuM_04112]。该服务接口用于读取当前 ECU 模式,并在数据类型 EcuM_Mode 的基础上封装模式组 currentMode [SWS_EcuM_04108]。
在系统运行过程中,用于指示状态变更:
- 调用与使用:一旦发生模式切换,EcuM 便会通过 RTE 模式端口向软件组件(SW-C)报告该切换 [SWS_EcuM_04133]。在规范假定端口名称为
currentMode且使用直接 RTE API 的情况下,为此会调用函数Rte_Switch_currentMode_currentMode( Rte_ModeType_EcuM_Mode mode)[SWS_EcuM_04133]。 - 参数与返回值:参数
mode将新进入的模式传递给 RTE [SWS_EcuM_04133]。由 Switch-API 提供的Rte_StatusType类型的返回值不作评估,而是根据规范必须强制忽略 [SWS_EcuM_04133]。 - 交互:需要获知模式变更通知的软件组件,必须将模式切换接口
EcuM_CurrentMode请求为 Required-Port [SWS_EcuM_04133]。
此使用说明由系统自动生成,且仅基于 R20-11 版本的规范要求。
实现者指南即将推出(复杂度 I1)
类型 EcuM_UserType [SWS_EcuM_91004] 📄 PDF
Unique value for each user.
类型 EcuM_TimeType [SWS_EcuM_04102] 📄 PDF
This data type represents the time of the ECU Manager module.
类型 EcuM_ShutdownCauseType [SWS_EcuM_04045] 📄 PDF
This type describes the cause for a shutdown by the ECU State Manager. It can be extended by configuration.
类型 EcuM_ShutdownModeType [SWS_EcuM_04101] 📄 PDF
This data type represents the modes of the ECU Manager module.
使用与取值范围
数据类型 EcuM_ShutdownModeType 基于 uint16,并通过头文件 Rte_EcuM_Type.h 提供 [SWS_EcuM_04101]。它映射了在 ECU State Manager 中配置的模式。其取值范围包括:
- 根据
EcuMSleepModeId配置的 Sleep 模式 [SWS_EcuM_04101],以及 - 由偏移量
256 + EcuMResetModeId计算得出的已配置 Reset 模式 [SWS_EcuM_04101]。
交互与调用上下文
该类型用于 ECU Manager 的同步且可重入的服务中:
EcuM_SelectShutdownTarget接收shutdownMode作为输入参数,以指定具体的 Sleep 模式(当目标为ECUM_SHUTDOWN_TARGET_SLEEP时)或 Reset 机制(当目标为ECUM_SHUTDOWN_TARGET_RESET时)[SWS_EcuM_02822]。EcuM_GetShutdownTarget通过指向EcuM_ShutdownModeType的指针参数返回为当前关机目标选择了哪个已配置的 Sleep 或 Reset 模式 [SWS_EcuM_02824]。EcuM_GetLastShutdownTarget通过输出参数输出前一次关机过程的关机模式 [SWS_EcuM_02825]。通过服务接口EcuM_ShutdownTarget,该功能也可供软件组件(SW-C)使用 [SWS_EcuM_03011]。
错误处理与边界条件
这些函数返回 Std_ReturnType。例如,如果向 EcuM_GetShutdownTarget 或 EcuM_GetLastShutdownTarget 传递了 NULL 指针,则调用失败并返回 E_NOT_OK [SWS_EcuM_02824], [SWS_EcuM_02825]。成功执行时,这些服务报告 E_OK [SWS_EcuM_02822], [SWS_EcuM_03011]。
此使用说明是基于规范要求自动生成的。
实现者指南即将推出(复杂度 I1)
类型 EcuM_ShutdownTargetType [SWS_EcuM_04136] 📄 PDF
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_EcuM- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_EcuM@rel:R20-11#295c3b66- Content hash
295c3b66- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_ECUStateManager.pdf#nameddest=SWS_EcuM_02813
gemini-3.8-flash-low· 2026-10-13 · 德文原文