[CanTp] Vehicle Diagnostic Communication Part 34 [Simulation 22]

[CanTp] Vehicle Diagnostic Communication Part 34 [Simulation 22] 車両診断通信
[CanTp] Vehicle Diagnostic Communication Part 34 [Simulation 22]

Click here for back issues.


Let’s simulate ISO-TP. series.
In this article, I will explain the configuration of CanTp.

Configuration of the AUTOSAR-CanTp we will be experimenting with

I’m going to talk about the configuration soon, but before I do that, I’ll draw a figure of what the internal configuration will look like.

(I’m going to draw it after all, so I’ll make a figure from the beginning…)

The figure will be as follows.

CanTp internal configuration,Multichannel specifications,Test Program(Service$22 response),CanTp,Channel(1),Transmission(1)18DAF110,Received(2)18DA10F1,CanIf(XL driver),Diagnostic message level handling only,A channel is a unit of "transaction (send/receive)”,Transmit interrupts and receive interrupts are using threads. Pseudo-reproduction

Vehicle diagnostic communication requires a transmitter and receiver function because transmitting and receiving realize one communication.
However, the question here is whether it would be acceptable to combine the transmitter and receiver into a single unit.

Such a configuration may be possible if only sending and receiving are performed.
In reality, however, there are patterns in which only receiving is done and then it is over, or transmitting is done multiple times.
It is better to separate transmitting and receiving functions for ease of use, which is why it is configured this way.

You may not get an idea of this until you try it.

Multi-channel specifications

The previous figure shows one channel, but there is a pattern to make it multiple.
The following figure is a rather straight-forward one.

Multichannel specifications,Test Program(Service$22 response),CanTp,Channel(1),Transmission(1)18DAF110,Received(2)18DA10F1,CanIf(XL driver),Channel(2),Transmission(3)18DAF111,Received(4)18DA11F1

Conceptually, it is really just an increase.
The actual code is implemented in such a way that the number of structure definitions increases with the number of functions required.

This replication of functions is object-oriented-like.
It is certainly a close concept.
The structures used for transmitting and receiving are the same as those used for the base and can be called polymorphic.

The big difference is that dynamic replication is not possible.
This is not surprising, since dynamic generation is not permitted in many cases, since it is assumed to be embedded in an ECU.
Still, it is very helpful to be able to duplicate it easily.

In the next issue, we will go into the details of configuration.


  • CanTp is based on the concept of a pair of transmitting and receiving channels.
  • Channels can be duplicated.
    • However, dynamic duplication is not allowed. Only static duplication is possible.

Click here for back issues.