AUTOSAR CanTp模块的代码记录-2
CanTp接收报文传输过程
一、void CanTp_RxIndication(PduIdType RxPduId, const PduInfoType *PduInfoPtr)
Indication of a received I-PDU from a lower layer communication interface module. I.e. CanIf Module
calls this Api for [SF][FF][CF][FC] type frames.

1、新建临时变量CanTp_RxContextType Context 存储当前的帧信息

2、CanTp_Prv_GetRxContext获取当前的报文中的帧信息
Context->FrameType 帧类型
Context->SduId 接收到的Pdu对应的SduId
通过SduId获取当前通道的属性
Context->ChannelId
Context->PduRPduHandleId
Context->AddressSize
Context->IsPaddingOn
Context->IsFdEnabled
Context->IsFunctional
3、CanTp_Prv_RxSduLengthCheck获取当前的CanTp传输的数据的长度以及校验正确性,并得到正确的数据长度。
4、CanTp_Prv_ProcessFrame 处理接收到的数据帧
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
