バックナンバーはこちら。
https://www.simulationroom999.com/blog/diagnostic-communication-backnumber/
はじめに
ISO14229ことUDSの話。
TesterPresentサービスのメッセージについて。
登場人物
博識フクロウのフクさん

イラストACにて公開の「kino_k」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=iKciwKA9&area=1
エンジニア歴8年の太郎くん

イラストACにて公開の「しのみ」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=uCKphAW2&area=1
TesterPresentサービスのリクエストメッセージ

じゃ、TesterPresentサービスのメッセージを見てみよう。

見てみよう!

リクエストメッセージはこんなん。
Position | Parameter Name | Value |
---|---|---|
1 | TesterPresent Request SID | 0x3E |
2 | sub-function = [ zeroSubFunction ] | 0x00,0x80 |

ん?
sub-functionは0x00か0x80?
なんかずいぶん間が飛んでるね。

あー。
0x80はsuppressPosRspMsgIndicationBitが立ってる状態だね。
suppressPosRspMsgIndicationBit

suppressPosRspMsgIndicationBit?
なにそれ?

suppressPosRspMsgIndicationBitは別にTesterPresentサービス限定の仕様ではない。
sub-functionのパラメータを持っているサービス全てに適用される仕様。
効能は、PositiveResponse応答抑制。
sub-functionの最上位bitに位置するんで、通常のsub-functionと0x80でORを取ったものになるね。

PositiveResponse応答抑制?
なんでそんなのがあるの?

TesterPresentサービスとかだと割と顕著なんだけど、
「メンドクサイから応答しなくていいよ」
って感じ。

メンドクサイって・・・。

TesterPresentサービス自体は特に処理とか無くて、
S3時間の維持だけのために使われることが多い。

例えば、CANネットワークに8台のECUが居て、
機能アドレスでTesterPresentを送るとどうなると思う?

全員が応答してくる?

suppressPosRspMsgIndicationBitがあると?

全員応答してこない!

なるほど!
S3時間の延長だけを考えると
機能アドレス且つsuppressPosRspMsgIndicationBit付きが効率が良いのか!

そういうこと。
TesterPresentサービスだと無いけど、
他のサービスでsuppressPosRspMsgIndicationBitを付けた場合、
NegativeResponseは普通に応答が来る。
あと、NRC$78も返信して、そのあとのPositiveResponseも返す。
って仕様になってる。

あれ?
PositiveResponseは返さないんじゃないの?

NRC$78を一回返してるからね。
PositiveResponseを返さないとタイムアウトとしてハンドリングされるんで、
この場合はPositiveResponse返す必要がある。
って感じ。

なるほど。
言われてみればそうかも。
TesterPresentサービスのレスポンスメッセージ

そして、レスポンスメッセージはこう
Position | Parameter Name | Value |
---|---|---|
1 | TesterPresent Response SID | 0x7E |
2 | sub-function = [ zeroSubFunction ] | 0x00 |

これは予想付いてたな。
sub-functionで0x80はsuppressPosRspMsgIndicationBitの場合で、
TesterPresentの場合はNegativeResponseも無い想定だからだね。

正解!

TesterPresentサービスについてはこんなもんかな。
まとめ

まとめだよ。
- TesterPresentサービスのメッセージについて説明。
- suppressPosRspMsgIndicationBitについて説明。
- PositiveResponse抑制。
- NegativeResponseは返す。
- NRC$78後のPositiveResponseも返す。
バックナンバーはこちら。
コメント