TTCAN Interface(CanIf TTCAN 扩展)提供 TTCAN 协议栈的 ECU 抽象层。管理基本周期(Basic Cycle)+ 矩阵周期(Matrix Cycle)调度、时间窗口属性、PDU 路由。
TTCAN / Basic Cycle / Matrix Cycle / Time Window / Exclusive / Arbitrating / Merged / TBTT / Level 0/1/2 / StbM
[1] AUTOSAR SWS CAN Interface
[2] AUTOSAR SWS TTCAN Driver
[3] AUTOSAR SRS TTCAN
[4] ISO 11898-4
TTCAN Interface 应:
TTCAN Interface 依赖:TTCAN Driver / CanIf / PduR / StbM / ComM / BswM / Dem。
TTCAN Interface 扩展 CanIf,添加 TTCAN 特定功能。位于 TTCAN Driver 之上,PduR 之下。
TTCAN Interface 管理 Matrix Cycle(包含多个 Basic Cycle)的调度。
void CanIf_Init(const CanIf_ConfigType* ConfigPtr):初始化 TTCAN Interface(沿用 CanIf 命名)。
void CanIf_DeInit(void):去初始化。
Std_ReturnType CanIf_SetControllerMode(uint8 Controller, CanIf_ControllerModeType ControllerMode):设置控制器模式(UNINIT / STARTED / STOPPED / SLEEP)。
Std_ReturnType CanIf_GetControllerMode(uint8 Controller, CanIf_ControllerModeType* ControllerModePtr):获取模式。
Std_ReturnType CanIf_Transmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr):发送 PDU。
void CanIf_RxIndication(const Can_HwType* Hw, const PduIdType PduId, const PduInfoType* PduInfoPtr):接收指示。
void CanIf_TxConfirmation(PduIdType CanTxPduId, Std_ReturnType Result):发送确认。
Std_ReturnType CanIf_SetTrcvMode(uint8 Transceiver, CanTrcv_TrcvModeType TransceiverMode):设置收发器模式。
Std_ReturnType CanIf_GetTrcvMode(uint8 Transceiver, CanTrcv_TrcvModeType* TransceiverModePtr):获取收发器模式。
void CanIf_MainFunction_Read(void):读取事件处理。
void CanIf_MainFunction_BusOff(void):BusOff 处理。
void CanIf_MainFunction_Wakeup(void):唤醒处理。
void CanIf_MainFunction_Mode(void):模式处理。
TTCAN Interface 配置类:
CANIF_E_UNINIT:模块未初始化。
CANIF_E_PARAM_POINTER:参数指针为空。
CANIF_E_PARAM:参数无效。
CANIF_E_INV_CFG:配置无效。
CANIF_E_BUSY:模块忙。
校对轮次:L1 自动校对(2026-06-13)