Intrusion Detection System Manager (IdsM)
Collects and reports onboard security events to detect threats.
Funktionen — Übersicht
void IdsM_Init (const IdsM_ConfigType* configPtr);Service to initialize the module IdsM.void IdsM_GetVersionInfo (const Std_VersionInfoType* versionInfo);Returns version information, vendor ID and AUTOSAR module ID of the component.void IdsM_MainFunction (void);This function is called periodically.BufReq_ReturnType IdsM_CopyTxDataManager (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);This function is called to acquire the transmit data of an I-PDU segment (N-PDU).void IdsM_SetSecurityEvent (IdsM_SecurityEventIdType securityEventId);This API is the application interface to report security events to the IdsM.void IdsM_SetSecurityEventWithContextData (IdsM_SecurityEventIdType securityEventId, const uint8* contextData, uint16 contextDataSize);This API is the application interface to report security events with context data to the IdsM.void IdsM_SetSecurityEventWithCount (IdsM_SecurityEventIdType securityEventId, uint16 count);This API is the application interface for Smart Sensors to report security events with a count value to the IdsM.void IdsM_SetSecurityEventWithCountContextData (IdsM_SecurityEventIdType securityEventId, uint16 count, const uint8* contextData, uint16 contextDataSize);This API is the application interface for Smart Sensors to report security events with a count value and context data to the IdsM.void IdsM_SetSecurityEventWithTimestampCount (IdsM_SecurityEventIdType securityEventId, IdsM_TimestampType timestamp, uint16 count);This API is the application interface for Smart Sensors to report security events with a timestamp and a count value to the IdsM.void IdsM_SetSecurityEventWithTimestampCountContextDataManager (IdsM_SecurityEventIdType securityEventId, IdsM_TimestampType timestamp, uint16 count, const uint8* contextData, uint16 contextDataSize);This API is the application interface for Smart Sensors to report security events with a timestamp, a count value and context...void IdsM_BswM_StateChanged (IdsM_Filters_BlockStateType state);This callback function is invoked by the BswM to indicate ECU state changes.void IdsM_TpTxConfirmation (PduIdType id, Std_ReturnType result);This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was...void IdsM_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.Std_ReturnType IdsM_Dcm_GetReportingMode_RequestResults (Dcm_OpStatusType OpStatus, uint8* Out_ReportingMode, Dcm_NegativeResponseCodeType* ErrorCode);This function is a request from DCM to the IdsM to read the routine results triggered by function...Std_ReturnType IdsM_Dcm_GetReportingMode_Start (uint16 In_SecurityEventId, uint8 In_SensorInstanceId, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);This function is a request from DCM to the IdsM to start the routine execution to request the current reporting mode of a...Std_ReturnType IdsM_Dcm_SetReportingMode_Start (uint16 In_SecurityEventId, uint8 In_SensorInstanceId, uint8 In_ReportingMode, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);This function is a request from DCM to the IdsM to start the routine execution to set the reporting mode of a specific...
Typen — Übersicht
struct IdsM_ConfigTypeConfiguration data structure of IdsM module.enum IdsM_Filters_BlockStateTypeData type used for "Block State" filter values (bit masks)enum IdsM_Filters_ReportingModeTypeReporting modes used by the reporting mode filterIdsM_TimestampTypeData type for IdsM timestampsIdsM_SecurityEventIdTypeData type used for local IdsM Security Event IDs
Funktionen & Typen — Detailansicht
函数 IdsM_Init [SWS_IdsM_91001] 📄 PDF
void IdsM_Init (const IdsM_ConfigType* configPtr);
Service to initialize the module IdsM. It initializes all variables and sets the module state to initialized.
同步且不可重入的接口 IdsM_Init 用于根据 [SWS_IdsM_91001] 对模块 IdsM 进行基本初始化。调用时,该服务会初始化所有内部变量,并将 IdsM 转换到已初始化状态([SWS_IdsM_00202])。通过输入参数 configPtr,该函数接收指向模块特定配置结构的指针([SWS_IdsM_91001])。
执行 IdsM_Init 构成了模块运行的强制性功能前提条件。如果在尚未初始化的状态下调用了除 IdsM_Init 或 IdsM_GetVersionInfo 以外的 IdsM API,当开发错误检测(IdsMDevErrorDetect)激活时,模块会通过 Det_ReportError 报告错误 IDSM_E_PARAM_UNINIT([SWS_IdsM_00203],另见 [SWS_IdsM_02003] 下的错误代码 0x0D)。
对于错误处理和调用上下文,适用特定的行为规则:
- 如果在模块已处于已初始化状态时调用
IdsM_Init,则不会对内部变量进行重新初始化([SWS_IdsM_00204])。 - 相反,在启用
IdsMDevErrorDetect的情况下,模块会通过Det_ReportError报告数值为0x0E的开发错误IDSM_E_ALREADY_INITIALIZED([SWS_IdsM_00204],[SWS_IdsM_02003])。 - 该函数无返回值,并被定义为不可重入([SWS_IdsM_91001])。因此,在系统中不得并发调用该函数,也不得由中断上下文多次同时调用该函数。
本说明由 AI 基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 IdsM_GetVersionInfo [SWS_IdsM_91004] 📄 PDF
void IdsM_GetVersionInfo (const Std_VersionInfoType* versionInfo);
Returns version information, vendor ID and AUTOSAR module ID of the component.
函数 IdsM_MainFunction [SWS_IdsM_91000] 📄 PDF
void IdsM_MainFunction (void);
This function is called periodically. It processes security events asynchronously which are queued during API function calls.
用法与调用上下文
函数 IdsM_MainFunction 会被周期性调用,并可通过头文件 IdsM.h 获取 [SWS_IdsM_91000]。其签名格式为 void IdsM_MainFunction(void),不接收任何参数,也没有返回值 [SWS_IdsM_91000]。该函数本身的调用是同步的,但用于异步处理先前在同步 API 调用期间排入队列的安全事件(Security Event,SEv)[SWS_IdsM_91000]。周期性触发通常由 BSW 调度器或循环操作系统任务执行。 问题 Q-86e2e870c3496bad (未决)
并发性与限制
根据规范,IdsM_MainFunction 被归类为不可重入(Non Reentrant)[SWS_IdsM_91000]。因此,调用系统环境必须确保该函数在任何时间点仅在一个单实例中执行,且不发生重叠调用。
事件处理中的协同交互
循环处理框架下的主要任务包括以下方面:
- 事件缓冲区:接收到 SEv 后,IdsM 将其保存在 Event Buffer 中;这些缓冲区在
IdsM_MainFunction的框架下进行异步管理和过滤 [SWS_IdsM_00702]。 - 上下文数据缓冲区:若接收到带有上下文数据的 SEv,IdsM 将使用来自 Context Data Buffer Pool 的合适缓冲区;这些缓冲区也在
IdsM_MainFunction中进行异步处理和过滤 [SWS_IdsM_00705]。 - 合格化:异步处理保存在 Event Buffer 中的 SEv,以将其识别为合格安全事件(QSEv)[SWS_IdsM_00901]。
此文本由 AI 基于 R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
函数 IdsM_CopyTxDataManager [SWS_IdsM_91010] 📄 PDF
BufReq_ReturnType IdsM_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);
This function is called to acquire the transmit data of an I-PDU segment (N-PDU). Each call to this function provides the next part of the I-PDU data unless retry->TpDataState is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry->TxTpDataCnt. The size of the remaining data is written to the position indicated by availableDataPtr.
该回调函数以同步且可重入的方式被调用,以检索 I-PDU(N-PDU)分段的发送数据 [SWS_IdsM_91010]。它通过头文件 IdsM_Cbk.h 提供,并对应服务 ID 0x43 [SWS_IdsM_91010]。
通过 id 识别要传输的 I-PDU [SWS_IdsM_91010]。参数 info 传递目标缓冲区(SduDataPtr)以及请求的字节长度(SduLength);对于 SduLength,值为 0(其中 SduDataPtr 可以是 NULL_PTR)用于参数 retry 中的状态更改或查询剩余数据 [SWS_IdsM_91010]。通过 availableDataPtr,该函数返回 Tx 缓冲区中剩余的数据量,这使得具有动态有效负载长度的传输协议(例如 FrIsoTp)能够确定后续 Consecutive Frame 的大小 [SWS_IdsM_91010]。
如果 retry 为 NULL_PTR,则允许在复制过程之后立即从缓冲区中释放已复制的数据 [SWS_IdsM_91010]。否则,RetryInfoType 控制错误处理:在 TP_CONFPENDING 的情况下,先前复制的数据保留在 TP 缓冲区中,而 TP_DATACONF 确认并释放在本次调用之前复制的所有数据 [SWS_IdsM_91010]。如果 TpDataState 设为 TP_DATARETRY,该函数将从 TxTpDataCnt 指定的字节偏移量处重新复制先前传输的数据 [SWS_IdsM_91010]。
在成功完成完全复制时,该函数返回 BUFREQ_OK [SWS_IdsM_91010]。如果没有足够的发送数据可用,则不会复制任何数据并返回 BUFREQ_E_BUSY,下层模块随后可以重试该调用 [SWS_IdsM_91010]。如果请求失败,则返回 BUFREQ_E_NOT_OK 且不接收任何数据 [SWS_IdsM_91010]。
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 IdsM_SetSecurityEvent [SWS_IdsM_91002] 📄 PDF
void IdsM_SetSecurityEvent (IdsM_SecurityEventIdType securityEventId);
This API is the application interface to report security events to the IdsM.
函数 IdsM_SetSecurityEvent 用作应用程序向模块 IdsM(Intrusion Detection System Manager)报告安全事件的接口 [SWS_IdsM_91002]。
用法与调用上下文
调用通过头文件 IdsM.h 同步进行,服务 ID 为 0x03 [SWS_IdsM_91002]。安全事件的标识符作为唯一的传入参数传递:
securityEventId(IN,IdsM_SecurityEventIdType):所报告安全事件的唯一标识符 [SWS_IdsM_91002]。
该函数没有返回值(void)[SWS_IdsM_91002]。
错误处理
如果开发错误检测(IdsMDevErrorDetect)已激活,模块会针对已配置的安全事件检查参数 securityEventId [SWS_IdsM_02101]。如果传递了未在 IdsMEvent 中配置的未知事件 ID,IdsM 会报告开发错误 IDSM_E_PARAM_INVALID [SWS_IdsM_02101]。
并发性与限制
该函数被指定为不可重入(Non Reentrant)[SWS_IdsM_91002]。因此,调用者必须同步或避免来自不同上下文的并发或中断调用。
本使用说明基于版本 R20-11 中 AUTOSAR Classic 平台的规范。
实现者指南即将推出(复杂度 I1)
函数 IdsM_SetSecurityEventWithContextData [SWS_IdsM_91003] 📄 PDF
void IdsM_SetSecurityEventWithContextData (IdsM_SecurityEventIdType securityEventId, const uint8* contextData, uint16 contextDataSize);
This API is the application interface to report security events with context data to the IdsM.
函数 IdsM_SetSecurityEventWithContextData 用作应用接口,用于将安全事件连同可选上下文数据同步报告给 Intrusion Detection System Manager([SWS_IdsM_91003])。它没有返回值。
参数与使用
securityEventId:所报告安全事件的唯一标识符([SWS_IdsM_91003])。contextData:指向可选上下文数据的指针;若无可用上下文数据,则应传递NULL_PTR([SWS_IdsM_91003])。contextDataSize:所提供上下文数据的大小(以字节为单位)([SWS_IdsM_91003])。
错误处理
在启用开发错误检测(IdsMDevErrorDetect)时,IdsM 模块会执行以下检查:
- 若传入的
securityEventId并非来自在IdsMEvent中配置的安全事件,则会报告开发错误IDSM_E_PARAM_INVALID([SWS_IdsM_02102])。 - 若
contextDataSize超过了配置的上下文数据最大缓冲区大小(通过参数化IdsMContextDataBufferSize的最大值定义),则会报告开发错误IDSM_E_PARAM_LENGTH([SWS_IdsM_02107])。
并发与集成
该接口被指定为不可重入(Non Reentrant)([SWS_IdsM_91003])。因此,调用方必须确保避免并发调用或进行相应同步。其声明可通过头文件 IdsM.h 获取([SWS_IdsM_91003])。
本段文本由人工智能系统基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I1)
函数 IdsM_SetSecurityEventWithCount [SWS_IdsM_91018] 📄 PDF
void IdsM_SetSecurityEventWithCount (IdsM_SecurityEventIdType securityEventId, uint16 count);
This API is the application interface for Smart Sensors to report security events with a count value to the IdsM.
同步函数 IdsM_SetSecurityEventWithCount(服务 ID 0x05)代表 Smart Sensor 的应用接口,用于将安全事件 (Security Events, SEvs) 连同计数值一起传输至 IdsM [SWS_IdsM_91018], [SWS_IdsM_00401]。由此,IdsM 能够接收带有由传感器预先计算的计数器的事件 [SWS_IdsM_00401]。函数声明通过头文件 IdsM.h 提供 [SWS_IdsM_91018]。
调用时,该函数需要两个输入参数:
securityEventId:类型为IdsM_SecurityEventIdType的安全事件标识符 [SWS_IdsM_91018]。count:类型为uint16的计数值,源自传感器并充当该事件的初始起始值 [SWS_IdsM_91018], [SWS_IdsM_00401]。
该函数不返回任何返回值,也不定义输出参数 [SWS_IdsM_91018]。在并发性和调用上下文方面,该函数被声明为不可重入 (Non Reentrant) [SWS_IdsM_91018];因此必须在软件端避免并发调用。
关于错误处理规定,在开发错误检测 (IdsMDevErrorDetect) 激活时,IdsM 会检查参数 securityEventId 和 count [SWS_IdsM_02103]。若传递了未知的 Event-ID 或 count 的值为 0,则报告开发错误 IDSM_E_PARAM_INVALID [SWS_IdsM_02103]。
本使用说明由 AI 基于 AUTOSAR 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 IdsM_SetSecurityEventWithCountContextData [SWS_IdsM_91019] 📄 PDF
void IdsM_SetSecurityEventWithCountContextData (IdsM_SecurityEventIdType securityEventId, uint16 count, const uint8* contextData, uint16 contextDataSize);
This API is the application interface for Smart Sensors to report security events with a count value and context data to the IdsM.
函数 IdsM_SetSecurityEventWithCountContextData 用作智能传感器的应用接口,用于将带有计数值和可选上下文数据的安全事件同步报告给 [SWS_IdsM_91019]。
用法与参数
调用以同步方式进行,并被指定为不可重入(Non Reentrant)[SWS_IdsM_91019]:
securityEventId:安全事件的唯一标识符 [SWS_IdsM_91019]。count:用作该安全事件起始值的计数值 [SWS_IdsM_91019]。contextData:指向包含待提供上下文数据的字节数组的指针 [SWS_IdsM_00502]。若不存在上下文数据,则应传递NULL_PTR[SWS_IdsM_91019]。contextDataSize:传入的上下文数据大小(以字节为单位)[SWS_IdsM_91019]。该函数支持最大达 1500 字节的长度 [SWS_IdsM_00501]。
错误处理
在启用开发错误检测(IdsMDevErrorDetect)时,模块会监控传入参数的有效性:
- 如果传递了未知的
securityEventId或count的值为 0,则会报告开发错误IDSM_E_PARAM_INVALID[SWS_IdsM_02104]。 - 如果
contextDataSize超过了配置的最大缓冲区大小(由配置的最大IdsMContextDataBufferSize决定),IdsM 将报告开发错误IDSM_E_PARAM_LENGTH[SWS_IdsM_02108]。
该函数不返回任何返回值 [SWS_IdsM_91019];在发生错误时,错误响应可能主要基于通过 DET 进行的报告。 问题 Q-135f4b865790f34d (未决)
本段文本由人工智能基于 AUTOSAR 规范 R20-11 生成。
实现者指南即将推出(复杂度 I2)
函数 IdsM_SetSecurityEventWithTimestampCount [SWS_IdsM_91020] 📄 PDF
void IdsM_SetSecurityEventWithTimestampCount (IdsM_SecurityEventIdType securityEventId, IdsM_TimestampType timestamp, uint16 count);
This API is the application interface for Smart Sensors to report security events with a timestamp and a count value to the IdsM.
同步接口 IdsM_SetSecurityEventWithTimestampCount 用于 Smart Sensor 向 IdsM 报告带有时间戳和计数值的安全事件 [SWS_IdsM_91020]。该函数没有返回值,并通过头文件 IdsM.h 可用 [SWS_IdsM_91020]。
将处理以下输入参数:
securityEventId:所报告安全事件的特定标识符 [SWS_IdsM_91020]。timestamp:用于该事件时间引用的时间戳 [SWS_IdsM_91020]。如果时间戳特性处于活动状态且传递了时间戳,IdsM 将使用它来存储或传输合格安全事件 (QSEv) [SWS_IdsM_01108]。相反,如果在该特性处于活动状态时报告事件且不带时间戳,IdsM 将在传输或存储之前将协议头中的时间戳选项位设置为 0 [SWS_IdsM_01112]。count:作为安全事件起始值的计数值 [SWS_IdsM_91020]。若事先不存在计算出的计数器,则可以使用值 1 调用该函数 [SWS_IdsM_00405]。
在开发错误检测 (IdsMDevErrorDetect) 激活时,IdsM 会校验实参 securityEventId 和 count。如果传递了未知的 Event-ID 或 count 的值为 0,模块将报告开发错误 IDSM_E_PARAM_INVALID [SWS_IdsM_02105]。
关于并发性,该函数被指定为不可重入 (Non Reentrant) [SWS_IdsM_91020]。
本文本根据 AUTOSAR 规范自动生成。
实现者指南即将推出(复杂度 I2)
函数 IdsM_SetSecurityEventWithTimestampCountContextDataManager [SWS_IdsM_91021] 📄 PDF
void IdsM_SetSecurityEventWithTimestampCountContextData (IdsM_SecurityEventIdType securityEventId, IdsM_TimestampType timestamp, uint16 count, const uint8* contextData, uint16 contextDataSize);
This API is the application interface for Smart Sensors to report security events with a timestamp, a count value and context data to the IdsM.
具有服务 ID 0x08 的函数 IdsM_SetSecurityEventWithTimestampCountContextData 用作 Smart Sensor 的标准化应用接口,以将安全事件连同时间戳、起始计数值以及可选上下文数据报告给 Intrusion Detection System Manager (IdsM) [SWS_IdsM_91021]。该接口的声明通过头文件 IdsM.h 提供 [SWS_IdsM_91021]。
该调用同步执行,且仅使用输入参数,不存在输入/输出参数或输出参数 [SWS_IdsM_91021]。调用时须传递以下参数 [SWS_IdsM_91021]:
securityEventId:要传输给 IdsM 的特定安全事件的标识符 [SWS_IdsM_91021]。timestamp:充当所发生安全事件的时间引用的时间戳值 [SWS_IdsM_91021]。count:计数值,IdsM 将其用作相应安全事件的起始值 [SWS_IdsM_91021]。contextData:指向事件可选上下文数据的指针;若没有可用数据,则必须传递NULL_PTR[SWS_IdsM_91021]。contextDataSize:所传递上下文数据大小的数值说明 [SWS_IdsM_91021]。
关于执行行为,该函数被归类为不可重入 (Non Reentrant),且没有返回值 (void) [SWS_IdsM_91021]。因此,调用的 Smart Sensor 必须确保不会发生该接口的并发或重叠调用 [SWS_IdsM_91021]。
该文本由 AI 生成,用作参考指引。
实现者指南即将推出(复杂度 I1)
函数 IdsM_BswM_StateChanged [SWS_IdsM_91005] 📄 PDF
void IdsM_BswM_StateChanged (IdsM_Filters_BlockStateType state);
This callback function is invoked by the BswM to indicate ECU state changes.
回调函数 IdsM_BswM_StateChanged([SWS_IdsM_91005])由 BswM 调用,以向 Intrusion Detection System Manager (IdsM) 通知当前 ECU 状态的更改([SWS_IdsM_91005])。它在头文件 IdsM_Cbk.h 中声明,且服务 ID 为 0x0F([SWS_IdsM_91005])。
该接口具有签名 void IdsM_BswM_StateChanged (IdsM_Filters_BlockStateType state)([SWS_IdsM_91005])。输入参数 state(类型为 IdsM_Filters_BlockStateType)用作唯一的传入值,表示当前 ECU 状态([SWS_IdsM_91005])。既未提供输入/输出参数,也未提供输出参数,并且该函数不返回任何返回值([SWS_IdsM_91005])。调用同步执行,并被归类为可重入([SWS_IdsM_91005])。
在功能交互中,该通知服务用于让 BswM 持续向 IdsM 通报当前状态([SWS_IdsM_01022])。接收到的状态信息保存在 IdsM 中,并在主函数(main function)框架内稍后对块状态过滤器(block state filter)进行异步处理时进行评估([SWS_IdsM_01022])。在规范范围内,未针对此调用定义特定的错误代码、返回值或向开发错误管理(DET)或诊断事件管理(DEM)的报告。
本使用说明为自动生成,并基于 AUTOSAR Classic R20-11 的规范要求。
实现者指南即将推出(复杂度 I1)
函数 IdsM_TpTxConfirmation [SWS_IdsM_91011] 📄 PDF
void IdsM_TpTxConfirmation (PduIdType id, Std_ReturnType result);
This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not.
回调函数 IdsM_TpTxConfirmation 作为同步且可重入的服务通过头文件 IdsM_Cbk.h 声明 [SWS_IdsM_91011]。根据 [SWS_IdsM_01502],模块 IdsM 通过该服务接收来自模块 PduR 关于分段 PDU 传输的确认。一旦相关 I-PDU 在底层网络上传输完毕,即发生该调用 [SWS_IdsM_91011]。
该接口具有服务 ID 0x48,且不提供返回值(void)[SWS_IdsM_91011]。在调用时传递两个输入参数:
id(类型PduIdType):已传输 I-PDU 的唯一标识 [SWS_IdsM_91011]。result(类型Std_ReturnType):传递 I-PDU 传输的结果,并指示发送过程是成功还是失败 [SWS_IdsM_91011]。
规范中未为此调用定义特定的错误代码以及 DET 或 DEM 消息。由于指定了可重入性,调用层可以针对不同的 I-PDU 并行调用该函数 [SWS_IdsM_91011]。解释:模块 IdsM 可能会评估状态参数 result,以更新分段 PDU 的内部传输状态并在完成后释放占用的发送缓冲区。 问题 Q-9179efcbf744346d (未决)
本文档由 AI 生成,且完全基于 AUTOSAR R20-11 规范。
实现者指南即将推出(复杂度 I2)
函数 IdsM_TxConfirmation [SWS_IdsM_91009] 📄 PDF
void IdsM_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);
The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
使用
回调函数 IdsM_TxConfirmation ([SWS_IdsM_91009]) 由底层通信接口模块调用,以确认 PDU 的成功发送或传输失败。它被定义为同步的,在 IdsM_Cbk.h 中声明,且没有返回值。它接收以下参数:
TxPduId:已传输 PDU 的标识符 ([SWS_IdsM_91009])。result:传输结果,发送成功时为E_OK,发生错误时为E_NOT_OK([SWS_IdsM_91009])。
并发性与限制
该函数对于不同的 PDU-ID 是可重入的,但对于相同的 TxPduId 则不可重入 ([SWS_IdsM_91009])。
相互协作与顺序条件
对于传输顺序存在严格的顺序条件:根据 [SWS_IdsM_01499],IdsM 仅在先前调用了 IdsM_TxConfirmation 或 IdsM_TpTxConfirmation 之后,才允许再次调用发送函数 PduR_IdsMTransmit。Interpretation:确认的到达预计在 IdsM 中用作完成传输并允许后续调用的触发器。 问题 Q-dd4013520e85370c (未决)
错误处理
PDU 传输失败直接通过参数 result = E_NOT_OK 报告 ([SWS_IdsM_91009])。接口规范中未指明具体的 DET 或 DEM 错误码。
本文本基于 AUTOSAR CP R20-11 规范自动生成。
实现者指南即将推出(复杂度 I1)
函数 IdsM_Dcm_GetReportingMode_RequestResults [SWS_IdsM_91007] 📄 PDF
Std_ReturnType IdsM_Dcm_GetReportingMode_RequestResults (Dcm_OpStatusType OpStatus, uint8* Out_ReportingMode, Dcm_NegativeResponseCodeType* ErrorCode);
This function is a request from DCM to the IdsM to read the routine results triggered by function IdsM_Dcm_GetReportingMode_Start().
用法与调用上下文
同步函数 IdsM_Dcm_GetReportingMode_RequestResults(服务 ID 0x0D,头文件 IdsM_Cbk.h)由 Diagnostic Communication Manager (DCM) 调用,以查询先前通过 IdsM_Dcm_GetReportingMode_Start() 发起的请求的例程结果 [SWS_IdsM_91007]。当前操作状态通过传入参数 OpStatus 进行传递 [SWS_IdsM_91007]。成功完成时,该函数返回 E_OK,并通过输出指针 Out_ReportingMode 输出所请求 Security Event 的确定 Reporting 模式 [SWS_IdsM_91007]。若处理尚未完成,则通过返回值 DCM_E_PENDING 进行指示 [SWS_IdsM_91007]。
错误处理
若查询失败,函数将返回 E_NOT_OK [SWS_IdsM_91007]。在这种情况下,必须通过参数 ErrorCode 设置一个具体的 Negative Response Code (Dcm_NegativeResponseCodeType);若未设置,DCM 将发送错误码 0x22 [SWS_IdsM_91007]。针对该服务未指明具体的 DET 或 DEM 事件 [SWS_IdsM_91007]。
并发性与交互
该函数被指定为可重入的 [SWS_IdsM_91007]。关于调用顺序,它强制要求该例程先前已通过 IdsM_Dcm_GetReportingMode_Start() 触发 [SWS_IdsM_91007]。Interpretation:在返回 DCM_E_PENDING 后的重复查询中,参数 OpStatus 预计由 DCM 用于协调诊断操作的进度。 问题 Q-c268fab018a1f5b3 (未决)
此使用说明由 AI 基于 AUTOSAR R20-11 规范生成。
实现者指南即将推出(复杂度 I2)
函数 IdsM_Dcm_GetReportingMode_Start [SWS_IdsM_91006] 📄 PDF
Std_ReturnType IdsM_Dcm_GetReportingMode_Start (uint16 In_SecurityEventId, uint8 In_SensorInstanceId, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);
This function is a request from DCM to the IdsM to start the routine execution to request the current reporting mode of a specific Security Event ID.
函数 IdsM_Dcm_GetReportingMode_Start 由诊断模块(DCM)调用,以便在入侵检测系统管理器(Intrusion Detection System Manager,IdsM)中启动用于查询特定安全事件(SEv)当前上报模式的例程执行 [SWS_IdsM_91006]、[SWS_IdsM_02001]。该接口在头文件 IdsM_Cbk.h 中声明,具有服务 ID 0x0C,并被指定为同步且可重入 [SWS_IdsM_91006]。
在调用时,DCM 传递安全事件的外部 ID(In_SecurityEventId)、传感器的实例 ID(In_SensorInstanceId)和操作状态(OpStatus)[SWS_IdsM_91006]。该函数返回 Std_ReturnType 作为返回值:
E_OK:操作成功完成 [SWS_IdsM_91006]。DCM_E_PENDING:操作尚未完成 [SWS_IdsM_91006]。这可能意味着该例程的内部处理将以多周期或异步方式继续进行,直到数据可用为止。 问题 Q-395a30fc3ed42497 (未决)E_NOT_OK:操作失败 [SWS_IdsM_91006]。
在发生错误时(E_NOT_OK),IdsM 有义务通过输出参数 ErrorCode 提供具体的否定响应码(NRC);若未提供,DCM 默认发送 NRC 0x22(Conditions Not Correct)[SWS_IdsM_91006]。
该函数仅触发例程;所确定结果的实际读取随后通过函数 IdsM_Dcm_GetReportingMode_RequestResults 执行 [SWS_IdsM_91007]。
本使用说明为自动生成。所有陈述均完全基于 AUTOSAR Classic R20-11 规范。
实现者指南即将推出(复杂度 I2)
函数 IdsM_Dcm_SetReportingMode_Start [SWS_IdsM_91008] 📄 PDF
Std_ReturnType IdsM_Dcm_SetReportingMode_Start (uint16 In_SecurityEventId, uint8 In_SensorInstanceId, uint8 In_ReportingMode, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);
This function is a request from DCM to the IdsM to start the routine execution to set the reporting mode of a specific Security Event ID.
同步且可重入的函数 IdsM_Dcm_SetReportingMode_Start 由诊断模块 (DCM) 调用,以启动用于在 Intrusion Detection System Manager 中更改特定安全事件报告模式 (IdsMReportingModeFilter) 的例程 [SWS_IdsM_91008], [SWS_IdsM_01901]。该声明通过头文件 IdsM_Cbk.h 提供 [SWS_IdsM_91008]。
调用时会传递外部事件 ID (In_SecurityEventId)、传感器实例 ID (In_SensorInstanceId)、要新设置的报告模式 (In_ReportingMode) 以及操作状态 (OpStatus) [SWS_IdsM_91008], [SWS_IdsM_01901]。该函数提供以下返回值:
E_OK:操作的执行已成功完成 [SWS_IdsM_91008]。DCM_E_PENDING:处理尚未完成,将异步继续进行 [SWS_IdsM_91008]。E_NOT_OK:操作失败;在此情况下,必须通过输出参数ErrorCode设置一个具体的 Negative Response Code (NRC),否则 DCM 将传递 NRC0x22[SWS_IdsM_91008]。
若因使用了无效的 Security Event Definition ID 而导致事件 ID 验证失败,则函数返回 E_NOT_OK,并强制将错误码 ErrorCode 设置为 DCM_E_REQUESTOUTOFRANGE [SWS_IdsM_01903]。
本使用说明由自动生成,基于 AUTOSAR 规范。
实现者指南即将推出(复杂度 I2)
类型 IdsM_ConfigType [SWS_IdsM_91012] 📄 PDF
Configuration data structure of IdsM module.
类型 IdsM_Filters_BlockStateType [SWS_IdsM_91017] 📄 PDF
Data type used for "Block State" filter values (bit masks)
根据 [SWS_IdsM_91017],数据类型 IdsM_Filters_BlockStateType 用于为 Intrusion Detection System Manager (IdsM) 的所谓“Block State”过滤器定义位掩码。该类型派生自 uint16,覆盖 0 到 65535 的整数值范围,并通过头文件 IdsM_Filters_Types.h 对软件模块可用 ([SWS_IdsM_91017])。
主要用途是与 Basic Software Mode Manager (BswM) 协同工作。当系统或 ECU 状态发生更改时,BswM 会调用回调函数 IdsM_BswM_StateChanged,并通过该类型的参数 state 传递当前的 ECU 状态 ([SWS_IdsM_91005])。该回调接口在 IdsM_Cbk.h 中声明,没有返回值,并被指定为同步且可重入的 ([SWS_IdsM_91005])。
Interpretation:由于该类型被设计为过滤器的位掩码,IdsM 预计会将传递的 ECU 状态值与配置的过滤状态进行比对,以根据 ECU 状态过滤安全事件的记录或阻塞。 问题 Q-00b355cc5ec6383f (未决)该数据类型不存在具有特定错误码、DET 或 DEM 消息的独立错误处理。
本提示由 AI 生成,且仅基于 AUTOSAR CP R20-11 的规范数据。
实现者指南即将推出(复杂度 I1)
类型 IdsM_Filters_ReportingModeType [SWS_IdsM_91013] 📄 PDF
Reporting modes used by the reporting mode filter
数据类型 IdsM_Filters_ReportingModeType 基于基本类型 uint8,并通过头文件 IdsM_Types.h 为软件组件提供 [SWS_IdsM_91013]。它描述了在 Intrusion Detection System Manager (IdsM) 内的 Reporting-Mode 过滤器中用于有针对性地处理和转发安全事件的标准化报告模式 [SWS_IdsM_91013]。
通过定义的枚举值,精确控制是否报告某个事件以及报告时采用何种详细程度 [SWS_IdsM_91013]:
IDSM_REPORTING_MODE_OFF(0x00):该事件被抑制,不向上一级实例报告 [SWS_IdsM_91013]。IDSM_REPORTING_MODE_BRIEF(0x01):该事件在没有附加上下文数据的情况下以紧凑形式报告 [SWS_IdsM_91013]。IDSM_REPORTING_MODE_DETAILED(0x02):该事件在包含所有相关上下文数据的情况下详细报告 [SWS_IdsM_91013]。IDSM_REPORTING_MODE_BRIEF_BYPASSING_FILTERS(0x03):该事件绕过后续过滤级,并在无上下文数据的情况下未过滤地报告 [SWS_IdsM_91013]。IDSM_REPORTING_MODE_DETAILED_BYPASSING_FILTERS(0x04):该事件绕过后续过滤级,并在包含所有上下文数据的情况下未过滤地报告 [SWS_IdsM_91013]。IDSM_REPORTING_MODE_INVALID(0xFF):标识值范围内的无效报告模式 [SWS_IdsM_91013]。
因此,这些值结合了两个功能控制维度:通过上下文数据的详细程度,以及通过绕过 (bypassing) 有针对性地绕过常规过滤机制 [SWS_IdsM_91013]。这使得 IdsM 能够根据严重度和过滤器配置对安全事件进行差异化处理 [SWS_IdsM_91013]。
此文本由 AI 基于 R20-11 规范生成。
实现者指南即将推出(复杂度 I1)
类型 IdsM_TimestampType [SWS_IdsM_91014] 📄 PDF
Data type for IdsM timestamps
类型 IdsM_SecurityEventIdType [SWS_IdsM_91031] 📄 PDF
Data type used for local IdsM Security Event IDs
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_IdsM- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_IdsM@rel:R20-11#ae5de603- Content hash
ae5de603- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_IntrusionDetectionSystemManager.pdf#nameddest=SWS_IdsM_91001
gemini-3.8-flash-low· 2026-10-13 · 德文原文