[CanTp] Vehicle Diagnostic Communication Part 33 [Simulation 21]

[CanTp] Vehicle Diagnostic Communication Part 33 [Simulation 21] 車両診断通信
[CanTp] Vehicle Diagnostic Communication Part 33 [Simulation 21]

Click here for back issues.
https://www.simulationroom999.com/blog/diagnostic-communication-en-back-issue/

Introduction.

Let’s simulate ISO-TP. series.
In this issue, I will try my best to draw a figure of the structure surrounding CanTp and so on.

AUTOSAR CanTp interface review

The last time we checked, the AUTOSAR CanTp interface was as follows

  • CanTp_Transmit.
  • CanTp_MainFunction.
  • CanTp_RxIndication.
  • CanTp_TxConfirmation.
  • CanIf_Transmit.
  • PduR_CanTpCopyRxData.
  • PduR_CanTpCopyTxData.
  • PduR_CanTpRxIndication.
  • PduR_CanTpStartOfReception.
  • PduR_CanTpTxConfirmation.

This was also written in the last issue, but based on the prefixes, the image is as follows

  • CanTp_: Notification to CanTp
  • CanIf_: Notification from CanTp to CanIf
  • PduR_: Notification from CanTp to upper layer

I’ve made a figure of the AUTOSAR CanTp interface.

And I have created a figure for my last homework assignment.
The following figure is it.

CanTp Structure,Normal route in case of ECU side,start of reception,receiving,Receiving Completed,Transmission start,during transmission,transmission complete,Realized by test program,Interaction layer.,CanTp,Data link layer.,Periodic call(1ms),Realized with XL driver,receive interrupt,transmission completion interrupt,Solid line is event flow, dashed line is data flow.,receive buffer,transmit buffer,CanTp_MainFunction(),PduR_CanTpStartOfReception(),PduR_CanTpCopyRxData(),PduR_CanTpRxIndication(),CanTp_Transmit(),PduR_CanTpCopyTxData(),PduR_CanTpTxConfirmation(),CanTp_RxIndication(),CanIf_Transmit(),CanTp_TxConfirmation()

CanTp is sandwiched between the interaction layer and the data link layer.

Therefore, it should work if the connection between CanTp and CanIf (XL driver library) and the connection between CanTp and the interaction layer are consistent.

This connection part should be either prepared in a dedicated interface source file or embedded in PduR_CanTp.h.
This time, I will adopt the method of embedding it in PduR_CanTp.h.
CanIf for the lower layer is also embedded in CanIf.h with the same approach.

About the future

Now that the various interfaces are connected, configuration definitions are needed.

You may be thinking, “What’s that?”.
This is the definition of channels for vehicle diagnostic communication.
This will be explained in the next article, as it will be quite large in scale.

Conclusion

  • Review of AUTOSAR CanTp interfaces.
  • I have drawn a figure of the interfaces of AUTOSAR CanTp.
  • Each interface is defined in its own header file.
    • But we need to be reconciled for simulation.

Click here for back issues.

コメント

タイトルとURLをコピーしました