JP2017050717A - CAN communication unit and CAN communication program - Google Patents

CAN communication unit and CAN communication program Download PDF

Info

Publication number
JP2017050717A
JP2017050717A JP2015173003A JP2015173003A JP2017050717A JP 2017050717 A JP2017050717 A JP 2017050717A JP 2015173003 A JP2015173003 A JP 2015173003A JP 2015173003 A JP2015173003 A JP 2015173003A JP 2017050717 A JP2017050717 A JP 2017050717A
Authority
JP
Japan
Prior art keywords
message
node
data
received
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015173003A
Other languages
Japanese (ja)
Other versions
JP6276738B2 (en
Inventor
一裕 樋渡
Kazuhiro Hiwatari
一裕 樋渡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Asahi Kasei Corp
FDK Corp
Original Assignee
Asahi Kasei Corp
FDK Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Asahi Kasei Corp, FDK Corp filed Critical Asahi Kasei Corp
Priority to JP2015173003A priority Critical patent/JP6276738B2/en
Publication of JP2017050717A publication Critical patent/JP2017050717A/en
Application granted granted Critical
Publication of JP6276738B2 publication Critical patent/JP6276738B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

【課題】CANバスのトラヒックを抑制する。【解決手段】ノード10Zは、メッセージを一意に識別するメッセージIDのうち、CANバス2を介した他のノードからの受信メッセージの受信メッセージID及び受信メッセージIDに応じた処理内容と、CANバス2を介した他のノードへの送信メッセージの送信メッセージID及び送信メッセージIDに応じた処理内容とを対応付けて格納するメッセージIDテーブル11Zを有する。ノード10Zは、受信メッセージを受信した際に、受信メッセージがメッセージIDテーブル11Zに格納されている場合、受信メッセージの受信メッセージIDに応じた処理内容を実行後、受信メッセージIDと対応する送信メッセージIDに応じた処理内容を実行し、送信メッセージIDを付与した送信メッセージを他のノードへCANバス2を介してする。【選択図】図1[PROBLEMS] To suppress traffic on a CAN bus. A node 10Z includes a message ID for uniquely identifying a message, a received message ID of a received message from another node via the CAN bus 2, a processing content corresponding to the received message ID, and a CAN bus 2. A message ID table 11Z that stores a transmission message ID of a transmission message to another node via the URL and a processing content corresponding to the transmission message ID in association with each other. When the received message is stored in the message ID table 11Z when the received message is received, the node 10Z executes the processing content corresponding to the received message ID of the received message, and then the transmitted message ID corresponding to the received message ID. The processing contents corresponding to the above are executed, and the transmission message assigned with the transmission message ID is sent to another node via the CAN bus 2. [Selection] Figure 1

Description

本発明は、CAN通信ユニット及びCAN通信プログラムに関する。   The present invention relates to a CAN communication unit and a CAN communication program.

CAN(Control Area Network)は、シンプルなネットワーク構成のため、低コストで構築できるネットワークである。さらには、CAN通信は、故障検出機能が優れており、信頼性が高い通信方式として知られている。   CAN (Control Area Network) is a network that can be constructed at low cost because of its simple network configuration. Furthermore, CAN communication is known as a highly reliable communication method that has an excellent failure detection function.

例えば、車載される複数のECU(Electronic Control Unit)を、グループ毎のCANバスに接続し、2つのCANバス間を中継装置により接続するCANがある。このCANにおいて、1つのCANバスから受信した情報を、その情報が有する識別情報に従って、指定された中継装置へ転送する技術がある。   For example, there is a CAN in which a plurality of ECUs (Electronic Control Units) mounted on a vehicle are connected to a CAN bus for each group, and two CAN buses are connected by a relay device. In this CAN, there is a technique for transferring information received from one CAN bus to a specified relay device according to identification information included in the information.

特開2013−135430号公報JP 2013-135430 A

しかしながら、CANにおいて、データの要否を判定するノードと、データを有するノードと、データを処理に用いるノードとが異なる場合がある。この場合に、上記技術では、先ず、データの要否を判定するノードが、判定結果に従って、データを有するノードからデータを取得する。その後、データの要否を判定するノードが、取得したデータを、データを処理に用いるノードへ送信する、というデータのやりとりにより、CANバスのトラヒック増大を招くという問題がある。   However, in CAN, a node that determines whether data is necessary, a node that has data, and a node that uses data for processing may be different. In this case, in the above technique, first, a node that determines whether data is necessary acquires data from a node that has data according to the determination result. Thereafter, there is a problem in that the CAN bus traffic increases due to data exchange in which a node that determines whether data is necessary transmits the acquired data to a node that uses the data for processing.

上述の問題に鑑み、実施形態の一例は、CANバスのトラヒックを抑制することを目的とする。   In view of the above-described problems, an example of an embodiment aims to suppress CAN bus traffic.

実施形態の一例に係るCAN通信ユニット及びCAN通信プログラムは、例えば、メッセージを一意に識別するメッセージIDのうち、CANバスを介した他のCAN(Control Area Network)通信ユニットからの受信メッセージの受信メッセージID及び受信メッセージIDに応じた処理内容と、CANバスを介した他のCANユニットへの送信メッセージの送信メッセージID及び送信メッセージIDに応じた処理内容とを対応付けて格納するメッセージテーブルを有する。そして、受信メッセージを受信した際に、受信メッセージがメッセージテーブルに格納されている場合、受信メッセージの受信メッセージIDに応じた処理内容を実行後、受信メッセージIDと対応する送信メッセージIDに応じた処理内容を実行し、送信メッセージIDを付与した送信メッセージを他のCAN通信ユニットへCANバスを介して送出し、受信メッセージがメッセージテーブルに格納されていない場合、受信メッセージを破棄する。   The CAN communication unit and the CAN communication program according to an example of the embodiment include, for example, a received message of a received message from another CAN (Control Area Network) communication unit via a CAN bus among message IDs that uniquely identify the message. It has a message table for storing the processing contents corresponding to the ID and the received message ID, the transmission message ID of the transmission message to other CAN units via the CAN bus, and the processing contents corresponding to the transmission message ID in association with each other. And when the received message is stored in the message table when the received message is received, the processing content corresponding to the received message ID of the received message is executed, and then the processing corresponding to the received message ID and the corresponding transmitted message ID The contents are executed, and the transmission message assigned with the transmission message ID is sent to another CAN communication unit via the CAN bus. If the reception message is not stored in the message table, the reception message is discarded.

実施形態の一例によれば、CANバスのトラヒックを抑制できる。   According to an example of the embodiment, traffic on the CAN bus can be suppressed.

図1は、実施形態に係るCANの一例を示すブロック図である。FIG. 1 is a block diagram illustrating an example of a CAN according to the embodiment. 図2は、実施形態に係るCANにおけるメッセージIDの一例を示す図である。FIG. 2 is a diagram illustrating an example of a message ID in the CAN according to the embodiment. 図3は、実施形態に係るノードAが有する受信メッセージIDテーブル及び送信メッセージIDテーブルの一例を示す図である。FIG. 3 is a diagram illustrating an example of a reception message ID table and a transmission message ID table included in the node A according to the embodiment. 図4は、実施形態に係るノードZが有するメッセージIDテーブルの一例を示す図である。FIG. 4 is a diagram illustrating an example of a message ID table included in the node Z according to the embodiment. 図5は、実施形態に係るノードBが有する受信メッセージIDテーブル及び送信メッセージIDテーブルの一例を示す図である。FIG. 5 is a diagram illustrating an example of a reception message ID table and a transmission message ID table included in the node B according to the embodiment. 図6は、実施形態に係るCANにおける通信処理を示すシーケンス図である。FIG. 6 is a sequence diagram illustrating communication processing in the CAN according to the embodiment. 図7は、実施形態の効果を示す説明図である。FIG. 7 is an explanatory diagram showing the effect of the embodiment. 図8は、実施形態の他の形態に係るCANにおける通信処理を示すシーケンス図である。FIG. 8 is a sequence diagram illustrating communication processing in the CAN according to another embodiment.

以下に、実施形態の一例にかかるCAN通信ユニット及びCAN通信プログラムを図面に基づいて説明する。なお、以下の実施形態は、一例を示すに過ぎず、開示技術を限定するものではない。以下の実施形態は、矛盾しない範囲で適宜組合せることができる。   Hereinafter, a CAN communication unit and a CAN communication program according to an example embodiment will be described with reference to the drawings. The following embodiments are merely examples, and do not limit the disclosed technology. The following embodiments can be appropriately combined within a consistent range.

[実施形態]
(実施形態に係るCAN)
図1は、実施形態に係るCANの一例を示すブロック図である。実施形態に係るCAN(Control Area Network)1は、ノードA_10A、ノードZ_10Z、ノードB_10Bを有する。CAN1において、ノードA_10A、ノードZ_10Z、ノードB_10Bは、CANバス2を介して接続される。CANバス2は、I2C(Inter-Integrated Circuit、登録商標)等の2線バスや、SPI(Serial Peripheral Interface、登録商標)等の3線バスを用いることができる。
[Embodiment]
(CAN according to the embodiment)
FIG. 1 is a block diagram illustrating an example of a CAN according to the embodiment. A CAN (Control Area Network) 1 according to the embodiment includes a node A_10A, a node Z_10Z, and a node B_10B. In CAN1, the node A_10A, the node Z_10Z, and the node B_10B are connected via the CAN bus 2. The CAN bus 2 may be a 2-wire bus such as I2C (Inter-Integrated Circuit, registered trademark) or a 3-wire bus such as SPI (Serial Peripheral Interface, registered trademark).

例えば、ノードA_10Aは、ノードZ_10Zが保持するデータの要否を判定するノードである。また、ノードZ_10Zは、データを保持するノードである。また、ノードB_10Bは、ノードA_10Aの判定により必要と判定された、ノードZ_10Zが保持するデータを受信し、データ処理を実行するノードである。   For example, the node A_10A is a node that determines whether data held by the node Z_10Z is necessary. The node Z_10Z is a node that holds data. Further, the node B_10B is a node that receives data held by the node Z_10Z, which is determined to be necessary by the determination of the node A_10A, and executes data processing.

なお、各ノードは、それぞれCPU(Central Processing Unit)やMPU(Micro-Processing Unit)等の処理部、CANプロトコルに規定される通信調停やエラー検出等の基本機能に関する処理を実行するCANコントローラを有する。各ノードは、各処理部により処理を実行し、CANコントローラによりCAN通信が制御される。また、図示は省略しているが、ノードは、温度センサやパルスセンサ等の各種センシングを実行するセンサ、表示や各種動作又は各種制御等のアクチュエーションを実行するアクチュエータ等の各種モジュールを含む。なお、図1に示す各ノードの数は、一例を示すに過ぎない。   Each node has a processing unit such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), and a CAN controller that executes processing related to basic functions such as communication arbitration and error detection defined in the CAN protocol. . Each node executes processing by each processing unit, and CAN communication is controlled by a CAN controller. Although not shown, the node includes various modules such as a sensor that performs various sensings such as a temperature sensor and a pulse sensor, and an actuator that performs actuation such as display, various operations, and various controls. Note that the number of nodes shown in FIG. 1 is merely an example.

(実施形態に係るCANにおけるメッセージIDの一例)
図2は、実施形態に係るCANにおけるメッセージIDの一例を示す図である。図2の一覧に示す「メッセージID」はCAN1内でユニークな識別子であり、「メッセージID」「処理内容」「受信ノード」の対応付けは、CAN1において一意である。例えば、CAN1において、「メッセージID」“#1”及び“#2”のメッセージは、「受信ノード」“ノードZ”に対する「処理内容」“データ要求”を行うメッセージである。また、例えば、CAN1において、「メッセージID」“#3”のメッセージは、「受信ノード」“ノードB”に対する「処理内容」“データ送信”を行うメッセージであり、このメッセージを受信した「受信ノード」“ノードB”が「処理内容」“データ受信”を行うメッセージである。また、例えば、CAN1において、「メッセージID」“#4”のメッセージは、「受信ノード」“ノードA”に対する「処理内容」“データ送信”を行うメッセージであり、このメッセージを受信した「受信ノード」“ノードA”が「処理内容」“データ受信”を行うメッセージである。
(Example of message ID in CAN according to the embodiment)
FIG. 2 is a diagram illustrating an example of a message ID in the CAN according to the embodiment. “Message ID” shown in the list of FIG. 2 is a unique identifier in CAN1, and the association of “message ID”, “processing content”, and “receiving node” is unique in CAN1. For example, in CAN 1, the messages “message ID” “# 1” and “# 2” are messages for “processing content” and “data request” for “receiving node” “node Z”. Further, for example, in CAN 1, the message with “message ID” “# 3” is a message for performing “processing contents” and “data transmission” with respect to “receiving node” “node B”. "Node B" is a message for "Processing content" and "Data reception". Further, for example, in CAN 1, the message “message ID” “# 4” is a message for performing “processing contents” and “data transmission” for “receiving node” “node A”, and the “receiving node” that received this message. "Node A" is a message for "Processing content" and "Data reception".

(実施形態に係るノードA)
ノードA_10Aは、メッセージIDテーブル11A、処理部12A、CANコントローラ13Aを有する。メッセージIDテーブル11Aは、受信メッセージIDテーブル11A−1、送信メッセージIDテーブル11A−2を含む。受信メッセージIDテーブル11A−1、送信メッセージIDテーブル11A−2は、EPROM(Erasable Programmable Read Only Memory)、FLASH ROM(Read Only Memory)等の、図示しない不揮発性記憶デバイスに格納される。受信メッセージIDテーブル11A−1、送信メッセージIDテーブル11A−2は、ノードA_10Aの電源投入時等に、処理部12Aがアクセス可能な、図示しないRAM(Random Access Memory)等の揮発性の記憶領域へ展開される。
(Node A according to the embodiment)
The node A_10A includes a message ID table 11A, a processing unit 12A, and a CAN controller 13A. The message ID table 11A includes a reception message ID table 11A-1 and a transmission message ID table 11A-2. The reception message ID table 11A-1 and the transmission message ID table 11A-2 are stored in a nonvolatile storage device (not shown) such as an EPROM (Erasable Programmable Read Only Memory) or a FLASH ROM (Read Only Memory). The reception message ID table 11A-1 and the transmission message ID table 11A-2 are stored in a volatile storage area such as a RAM (Random Access Memory) (not shown) that can be accessed by the processing unit 12A when the node A_10A is powered on. Be expanded.

図3は、実施形態に係るノードAが有する受信メッセージIDテーブル及び送信メッセージIDテーブルの一例を示す図である。例えば、図3の(a)に示すように、受信メッセージIDテーブル11A−1は、「受信メッセージID」「処理内容」「受信ノード」を対応付けて格納する。「受信メッセージID」は、CAN1内でユニークな識別子である。例えば、処理部12Aは、CANコントローラ13Aを介して「受信メッセージID」“#4”のメッセージをCANバス2から受信した場合に、「処理内容」“データ受信”の処理を実行する。   FIG. 3 is a diagram illustrating an example of a reception message ID table and a transmission message ID table included in the node A according to the embodiment. For example, as shown in FIG. 3A, the reception message ID table 11A-1 stores “reception message ID”, “processing content”, and “reception node” in association with each other. “Reception message ID” is an identifier unique within CAN1. For example, when the message of “reception message ID” “# 4” is received from the CAN bus 2 via the CAN controller 13A, the processing unit 12A executes the processing of “processing content” and “data reception”.

例えば、処理部12Aは、CANコントローラ13Aを介してCANバス2から「受信メッセージID」“#4”のメッセージを有するデータフレームを受信した場合に、「処理内容」“データ受信”に応じて、受信したデータフレームからデータを抽出する。そして、処理部12Aは、抽出したデータに対して所定の処理を行う。   For example, when the processing unit 12A receives a data frame having a message “reception message ID” “# 4” from the CAN bus 2 via the CAN controller 13A, according to “processing content” and “data reception”, Data is extracted from the received data frame. Then, the processing unit 12A performs a predetermined process on the extracted data.

なお、CAN通信フレームは、「RTR(Remote Transmission Request)フィールド」に“1”が格納されている場合には、他のノードへの要求を送信するリモートフレームである。また、CAN通信フレームは、「RTRフィールド」に“0”が格納されている場合には、他のノードからの要求に応答してデータを送信するデータフレームである。   The CAN communication frame is a remote frame for transmitting a request to another node when “1” is stored in the “RTR (Remote Transmission Request) field”. The CAN communication frame is a data frame that transmits data in response to a request from another node when “0” is stored in the “RTR field”.

また、例えば、図3の(b)に示すように、送信メッセージIDテーブル11A−2は、「送信メッセージID」「処理内容」「受信ノード」を対応付けて格納する。「送信メッセージID」は、CAN1内でユニークな識別子である。例えば、処理部12Aは、「送信メッセージID」“#1”が入力された場合には、「送信メッセージID」“#1”を埋め込んだ「処理内容」“データ要求”のリモートフレームを、「受信ノード」“ノードZ”を宛先としてCANコントローラ13Aを介してCANバス2へ送出する。   For example, as illustrated in FIG. 3B, the transmission message ID table 11A-2 stores “transmission message ID”, “processing content”, and “reception node” in association with each other. “Transmission message ID” is an identifier unique within CAN1. For example, when “transmission message ID” “# 1” is input, the processing unit 12A transmits a remote frame of “processing content” and “data request” embedded with “transmission message ID” “# 1” to “ The data is sent to the CAN bus 2 via the CAN controller 13A with the receiving node “node Z” as the destination.

また、例えば、処理部12Aは、「送信メッセージID」“#2”が入力された場合には、「送信メッセージID」“#2”を埋め込んだ「処理内容」“データ要求”のリモートフレームを、「受信ノード」“ノードZ”を宛先としてCANコントローラ13Aを介してCANバス2へ送出する。   Further, for example, when “transmission message ID” “# 2” is input, the processing unit 12A transmits a remote frame of “processing content” “data request” in which “transmission message ID” “# 2” is embedded. , "Receiving node" and "Node Z" are sent to the CAN bus 2 via the CAN controller 13A.

また、例えば、処理部12Aは、「送信メッセージID」“#3”が入力された場合には、「送信メッセージID」“#3”を埋め込んだ「処理内容」“データ送信”のデータフレームを、「受信ノード」“ノードB”を宛先としてCANコントローラ13Aを介してCANバス2へ送出する。なお、「送信メッセージID」“#3”を埋め込んだ「処理内容」“データ送信”のデータフレームは、ノードZ_10Zから取得したデータ又はノードA_10A内において取得したデータである。   Further, for example, when “transmission message ID” “# 3” is input, the processing unit 12A transmits a data frame of “processing content” and “data transmission” in which “transmission message ID” “# 3” is embedded. , "Receiving node" and "Node B" are sent to the CAN bus 2 via the CAN controller 13A. Note that the data frame of “processing content” and “data transmission” in which “transmission message ID” “# 3” is embedded is data acquired from the node Z_10Z or data acquired in the node A_10A.

(実施形態に係るノードZ)
ノードZ_10Zは、メッセージIDテーブル11Z、処理部12Z、CANコントローラ13Z、ノード間で送受信されるデータを格納する記憶部14Zを有する。メッセージIDテーブル11Zは、EPROM、FLASH ROM等の、図示しない不揮発性記憶デバイスに格納される。メッセージIDテーブルZ11は、ノードZ_10Zの電源投入時等に、処理部12Zがアクセス可能な、図示しないRAM等の揮発性の記憶領域へ展開される。
(Node Z according to the embodiment)
The node Z_10Z includes a message ID table 11Z, a processing unit 12Z, a CAN controller 13Z, and a storage unit 14Z that stores data transmitted and received between the nodes. The message ID table 11Z is stored in a nonvolatile storage device (not shown) such as EPROM or FLASH ROM. The message ID table Z11 is expanded to a volatile storage area such as a RAM (not shown) that can be accessed by the processing unit 12Z when the node Z_10Z is powered on.

図4に示すように、メッセージIDテーブル11Zは、「行No.」「受信メッセージID」「処理内容」「受信ノード」と、「送信メッセージID」「処理内容」「受信ノード」とを対応付けて格納する。「行No.」は、メッセージIDテーブル11Zにおける各行を識別する番号である。   As shown in FIG. 4, the message ID table 11Z associates “row No.”, “reception message ID”, “processing content”, “reception node” with “transmission message ID”, “processing content”, and “reception node”. Store. “Row No.” is a number for identifying each row in the message ID table 11Z.

「受信メッセージID」は、CAN1内でユニークな識別子である。例えば、処理部12Zは、CANコントローラ13Zを介して「受信メッセージID」“#1”のリモートフレームをCANバス2から受信した場合に、「送信メッセージID」“#4”を埋め込んだ「処理内容」“データ送信”のデータフレームを、「受信ノード」“ノードA”を宛先としてCANコントローラ13Zを介してCANバス2へ送出する。なお、「送信メッセージID」“#4”を埋め込んだデータフレームは、「受信メッセージID」“#1”のリモートフレームの「処理内容」“データ要求”に応じて記憶部14Zから読み出したデータを含む。   “Reception message ID” is an identifier unique within CAN1. For example, when the processing unit 12Z receives a remote frame of “reception message ID” “# 1” from the CAN bus 2 via the CAN controller 13Z, the “processing content” in which “transmission message ID” “# 4” is embedded. "Data transmission" data frame is sent to the CAN bus 2 via the CAN controller 13Z with the "receiving node" "node A" as the destination. Note that the data frame in which the “transmission message ID” “# 4” is embedded is the data read from the storage unit 14Z according to the “processing content” “data request” of the remote frame of the “reception message ID” “# 1”. Including.

また、例えば、処理部12Zは、CANコントローラ13Zを介して「受信メッセージID」“#2”のリモートフレームをCANバス2から受信した場合に、「送信メッセージID」“#3”を埋め込んだ「処理内容」“データ送信”のデータフレームを、「受信ノード」“ノードB”を宛先としてCANコントローラ13Zを介してCANバス2へ送出する。なお、「送信メッセージID」“#3”を埋め込んだデータフレームは、「受信メッセージID」“#2”のリモートフレームの「処理内容」“データ要求”に応じて記憶部14Zから読み出したデータを含む。   Further, for example, when the processing unit 12Z receives a remote frame of “reception message ID” “# 2” from the CAN bus 2 via the CAN controller 13Z, the processing unit 12Z embeds “transmission message ID” “# 3”. A data frame “processing content” “data transmission” is sent to the CAN bus 2 via the CAN controller 13Z with “receiving node” “node B” as a destination. Note that the data frame in which the “transmission message ID” “# 3” is embedded is the data read from the storage unit 14Z according to the “processing content” “data request” of the remote frame of the “reception message ID” “# 2”. Including.

このように「受信メッセージID」を対応する「送信メッセージID」へ変換することにより、例えば、ノードA_10Aからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードA_10Aへ送信し、ノードA_10AがデータをノードB_10Bへ送信するという送受信処理を、ノードA_10Aからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードB_10Bへ直接送信することができる。また、例えば、ノードB_10Bからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードB_10Bへ送信し、ノードB_10BがデータをノードA_10Aへ送信するという送受信処理を、ノードB_10Bからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードA_10Aへ直接送信することができる。   By converting the “reception message ID” to the corresponding “transmission message ID” in this way, for example, in response to a request from the node A_10A, the node Z_10Z reads data from the storage unit 14Z and transmits the data to the node A_10A. In response to a request from the node A_10A, the node Z_10Z can read the data from the storage unit 14Z and directly transmit the data to the node B_10B in a transmission / reception process in which A_10A transmits data to the node B_10B. For example, in response to a request from the node B_10B, the node Z_10Z reads out data from the storage unit 14Z and transmits the data to the node B_10B, and the node B_10B transmits data to the node A_10A. In response, the node Z_10Z can read the data from the storage unit 14Z and transmit it directly to the node A_10A.

(実施形態に係るノードB)
ノードB_10Bは、メッセージIDテーブル11B、処理部12B、CANコントローラ13Bを有する。メッセージIDテーブル11Bは、受信メッセージIDテーブル11B−1、送信メッセージIDテーブル11B−2を含む。受信メッセージIDテーブル11B−1、送信メッセージIDテーブル11B−2は、EPROM、FLASH ROM等の、図示しない不揮発性記憶デバイスに格納される。受信メッセージIDテーブル11B−1、送信メッセージIDテーブル11B−2は、ノードB_10Bの電源投入時等に、処理部12Bがアクセス可能な、図示しないRAM等の揮発性の記憶領域へ展開される。
(Node B according to the embodiment)
The node B_10B includes a message ID table 11B, a processing unit 12B, and a CAN controller 13B. The message ID table 11B includes a reception message ID table 11B-1 and a transmission message ID table 11B-2. The reception message ID table 11B-1 and the transmission message ID table 11B-2 are stored in a nonvolatile storage device (not shown) such as an EPROM or a FLASH ROM. The reception message ID table 11B-1 and the transmission message ID table 11B-2 are expanded in a volatile storage area such as a RAM (not shown) that can be accessed by the processing unit 12B when the node B_10B is powered on.

図5は、実施形態に係るノードBが有する受信メッセージIDテーブル及び送信メッセージIDテーブルの一例を示す図である。例えば、図5の(a)に示すように、受信メッセージIDテーブル11B−1は、「受信メッセージID」「処理内容」「受信ノード」を対応付けて格納する。「受信メッセージID」は、CAN1内でユニークな識別子である。例えば、処理部12Bは、CANコントローラ13Aを介して「受信メッセージID」“#3”のメッセージをCANバス2から受信した場合に、「処理内容」“データ受信”の処理を実行する。   FIG. 5 is a diagram illustrating an example of a reception message ID table and a transmission message ID table included in the node B according to the embodiment. For example, as shown in FIG. 5A, the reception message ID table 11B-1 stores “reception message ID”, “processing content”, and “reception node” in association with each other. “Reception message ID” is an identifier unique within CAN1. For example, when the message of “reception message ID” “# 3” is received from the CAN bus 2 via the CAN controller 13A, the processing unit 12B executes the processing of “processing content” and “data reception”.

例えば、処理部12Bは、CANコントローラ13Bを介してCANバス2から「受信メッセージID」“#3”のメッセージを有するデータフレームを受信した場合に、「処理内容」“データ受信”に応じて、受信したデータフレームからデータを抽出する。そして、処理部12Bは、抽出したデータに対して所定の処理を行う。   For example, when the processing unit 12B receives a data frame having a message “reception message ID” “# 3” from the CAN bus 2 via the CAN controller 13B, according to “processing content” and “data reception”, Data is extracted from the received data frame. Then, the processing unit 12B performs a predetermined process on the extracted data.

また、例えば、図5の(b)に示すように、送信メッセージIDテーブル11B−2は、「送信メッセージID」「処理内容」「受信ノード」を対応付けて格納する。「送信メッセージID」は、CAN1内でユニークな識別子である。例えば、処理部12Bは、「送信メッセージID」“#1”が入力された場合には、「送信メッセージID」“#1”を埋め込んだ「処理内容」“データ要求”のリモートフレームを、「受信ノード」“ノードZ”を宛先としてCANコントローラ13Aを介してCANバス2へ送出する。   For example, as illustrated in FIG. 5B, the transmission message ID table 11B-2 stores “transmission message ID”, “processing content”, and “reception node” in association with each other. “Transmission message ID” is an identifier unique within CAN1. For example, when “transmission message ID” “# 1” is input, the processing unit 12B transmits a remote frame of “processing content” and “data request” embedded with “transmission message ID” “# 1” to “ The data is sent to the CAN bus 2 via the CAN controller 13A with the receiving node “node Z” as the destination.

また、例えば、処理部12Bは、「送信メッセージID」“#2”が入力された場合には、「送信メッセージID」“#2”を埋め込んだ「処理内容」“データ要求”のリモートフレームを、「受信ノード」“ノードZ”を宛先としてCANコントローラ13Bを介してCANバス2へ送出する。   Further, for example, when “transmission message ID” “# 2” is input, the processing unit 12B transmits a remote frame of “processing content” “data request” in which “transmission message ID” “# 2” is embedded. , "Receiving node" and "Node Z" are sent to the CAN bus 2 via the CAN controller 13B.

また、例えば、処理部12Bは、「送信メッセージID」“#4”が入力された場合には、「送信メッセージID」“#4”を埋め込んだ「処理内容」“データ送信”のデータフレームを、「受信ノード」“ノードA”を宛先としてCANコントローラ13Aを介してCANバス2へ送出する。なお、「送信メッセージID」“#4”を埋め込んだ「処理内容」“データ送信”のデータフレームは、ノードZ_10Zから取得したデータ又はノードB_10B内において取得したデータである。   Further, for example, when “transmission message ID” “# 4” is input, the processing unit 12B transmits a data frame of “processing content” and “data transmission” in which “transmission message ID” “# 4” is embedded. , "Receiving node" and "Node A" are sent to the CAN bus 2 via the CAN controller 13A. Note that the data frame of “processing content” and “data transmission” in which “transmission message ID” “# 4” is embedded is data acquired from the node Z_10Z or data acquired in the node B_10B.

(実施形態に係るCANにおける通信処理)
図6は、実施形態に係るCANにおける通信処理を示すシーケンス図である。図6において、「受信メッセージID」は、図2〜図5に示したものと同一とする。
(Communication processing in CAN according to the embodiment)
FIG. 6 is a sequence diagram illustrating communication processing in the CAN according to the embodiment. In FIG. 6, the “reception message ID” is the same as that shown in FIGS.

先ず、ステップS11において、ノードA_10Aは、データ要求メッセージを、CANコントローラ13Aを介してCANバス2へ送出する。ここでのデータ要求メッセージの「メッセージID」は、“#1”又は“#2”であるとする。CAN通信の規格上、ステップS11において送出されたデータ要求メッセージは、ノードZ_10Z及びノードB_10Bへ送達する。しかし、ノードB_10Bは、ステップS11において送出されたデータ要求メッセージの対象外であるので、ノードB_10Bにおいてデータ要求メッセージは破棄される。   First, in step S11, the node A_10A sends a data request message to the CAN bus 2 via the CAN controller 13A. Here, it is assumed that the “message ID” of the data request message is “# 1” or “# 2”. Due to the CAN communication standard, the data request message sent in step S11 is delivered to the node Z_10Z and the node B_10B. However, since the node B_10B is not the target of the data request message sent in step S11, the data request message is discarded in the node B_10B.

次に、ステップS12において、ノードZ_10Zの処理部12Zは、受信したデータ要求メッセージから「メッセージID」を抽出し、抽出した「メッセージID」がメッセージIDテーブル11Zに存在するか否かを判定する。処理部12Zは、ステップS12で抽出した「メッセージID」がメッセージIDテーブル11Zに存在する場合に(ステップS12:Yes)、ステップS13へ処理を移す。一方、処理部12Zは、ステップS12で抽出した「受信メッセージID」がメッセージテーブル11Zに存在しない場合に(ステップS12:No)、ステップS18へ処理を移す。なお、ステップS18では、処理部12Zは、ステップS12で受信したデータ要求メッセージを破棄する。   Next, in step S12, the processing unit 12Z of the node Z_10Z extracts “message ID” from the received data request message, and determines whether or not the extracted “message ID” exists in the message ID table 11Z. When the “message ID” extracted in step S12 exists in the message ID table 11Z (step S12: Yes), the processing unit 12Z moves the process to step S13. On the other hand, when the “reception message ID” extracted in step S12 does not exist in the message table 11Z (step S12: No), the processing unit 12Z moves the process to step S18. In step S18, the processing unit 12Z discards the data request message received in step S12.

ステップS13では、処理部12Zは、ステップS12で抽出した「メッセージID」がメッセージIDテーブル11Zの「行No.」“1”に該当するか否かを判定する。処理部12Zは、ステップS12で抽出した「メッセージID」がメッセージIDテーブル11Zの「行No.」“1”に該当する場合に(ステップS13:Yes)、ステップS14へ処理を移す。一方、処理部12Zは、ステップS12で抽出した「メッセージID」がメッセージIDテーブル11Zの「行No.」“1”に該当しない場合に(ステップS13:No)、ステップS16へ処理を移す。   In step S13, the processing unit 12Z determines whether or not the “message ID” extracted in step S12 corresponds to “row No.” “1” in the message ID table 11Z. When the “message ID” extracted in step S12 corresponds to “row No.” “1” in the message ID table 11Z (step S13: Yes), the processing unit 12Z moves the process to step S14. On the other hand, when the “message ID” extracted in step S12 does not correspond to “line No.” or “1” in the message ID table 11Z (step S13: No), the processing unit 12Z moves the process to step S16.

ステップS14では、処理部12Zは、メッセージIDテーブル11Zにおいて、ステップS12で抽出した「受信メッセージID」“#1”と対応する「処理内容」を実行し、対応する「送信メッセージID」“#4”を設定したメッセージ(データフレーム)を生成する。続いて、ステップS15では、処理部12Zは、CANコントローラ13Zを介して、ステップS14で生成したメッセージ(データフレーム)をCANバス2へ送出する。なお、CAN通信の規格上、ステップS15において送出されたメッセージ(データフレーム)は、ノードA_10A及びノードB_10Bへ送達する。しかし、ノードB_10Bは、ステップS15において送出されたメッセージ(データフレーム)の対象外であるので、ノードB_10Bにおいてメッセージ(データフレーム)は破棄される。   In step S14, the processing unit 12Z executes “processing content” corresponding to “reception message ID” “# 1” extracted in step S12 in the message ID table 11Z, and corresponding “transmission message ID” “# 4”. A message (data frame) with "" set is generated. Subsequently, in step S15, the processing unit 12Z sends the message (data frame) generated in step S14 to the CAN bus 2 via the CAN controller 13Z. Note that the message (data frame) transmitted in step S15 is delivered to the node A_10A and the node B_10B according to the CAN communication standard. However, since the node B_10B is not subject to the message (data frame) sent in step S15, the message (data frame) is discarded in the node B_10B.

なお、ステップS11→ステップS12:Yes→ステップS13:Yes→ステップS14→ステップS15の処理の流れとなるのは、例えば、ステップS11において、ノードA_10Aから「メッセージID」“#1”のメッセージが送出された場合である。すなわち、ノードA_10Aが、ノードZ_10Zへ要求したデータを、自身が受信する場合である。   It should be noted that the flow of processing from step S11 → step S12: Yes → step S13: Yes → step S14 → step S15 is, for example, that a message “message ID” “# 1” is sent from the node A_10A in step S11. This is the case. That is, the node A_10A receives the data requested to the node Z_10Z by itself.

一方、ステップS16では、処理部12Zは、メッセージIDテーブル11Zにおいて、ステップS12で抽出した「受信メッセージID」“#2”と対応する「処理内容」を実行し、対応する「送信メッセージID」“#3”を設定したメッセージ(データフレーム)を生成する。続いて、ステップS17では、処理部12Zは、CANコントローラ13Zを介して、ステップS16で生成したメッセージ(データフレーム)をCANバス2へ送出する。なお、CAN通信の規格上、ステップS17において送出されたメッセージ(データフレーム)は、ノードA_10A及びノードB_10Bへ送達する。しかし、ノードA_10Aは、ステップS17において送出されたメッセージ(データフレーム)の対象外であるので、ノードA_10Aにおいてメッセージ(データフレーム)は破棄される。   On the other hand, in step S16, the processing unit 12Z executes “processing content” corresponding to “reception message ID” “# 2” extracted in step S12 in the message ID table 11Z, and corresponding “transmission message ID” “ A message (data frame) in which # 3 ″ is set is generated. Subsequently, in step S17, the processing unit 12Z sends the message (data frame) generated in step S16 to the CAN bus 2 via the CAN controller 13Z. Note that in accordance with the CAN communication standard, the message (data frame) sent in step S17 is delivered to the node A_10A and the node B_10B. However, since node A_10A is not subject to the message (data frame) sent in step S17, the message (data frame) is discarded at node A_10A.

なお、ステップS11→ステップS12:Yes→ステップS13:No→ステップS16→ステップS17の処理の流れとなるのは、例えば、ステップS11において、ノードA_10Aから「メッセージID」“#2”のメッセージが送出された場合である。すなわち、ノードA_10Aが、ノードZ_10Zへ要求したデータを、ノードB_10Bへ直接送信する場合である。   Note that the flow of processing from step S11 → step S12: Yes → step S13: No → step S16 → step S17 is, for example, that a message “message ID” “# 2” is transmitted from the node A_10A in step S11. This is the case. That is, the node A_10A directly transmits the data requested to the node Z_10Z to the node B_10B.

(実施形態による効果)
図7は、実施形態の効果を示す説明図である。図7の(a)に示す従来技術は、ノードA_10Aが、ノードZ_10Z−1に記憶されるデータをノードB_10Bへ受け渡すために、次の処理を実行する。すなわち、先ず、ノードA_10Aが、データ要求メッセージをノードZ_10Z−1へ、CANバス2を介して送出する(ステップS1a)。次に、ノードA_10Aからデータ要求メッセージを受信したノードZ_10Z−1が、データ要求に対応する応答データをノードA_10Aへ、CANバス2を介して送出する(ステップS2a)。そして、応答データをノードZ_10Z−1から受信したノードA_10Aが、応答データをノードB_10BへCANバス2を介して送出する(ステップS3a)。すなわち、従来技術は、ノードA_10Aが、ノードZ_10Z−1に記憶されるデータをノードB_10Bへ受け渡すために、ステップS1a〜ステップS3aの3ステップにわたりCANバス2を使用する。
(Effect by embodiment)
FIG. 7 is an explanatory diagram showing the effect of the embodiment. In the prior art shown in FIG. 7A, the node A_10A executes the following process in order to transfer the data stored in the node Z_10Z-1 to the node B_10B. That is, first, the node A_10A sends a data request message to the node Z_10Z-1 via the CAN bus 2 (step S1a). Next, the node Z_10Z-1 that has received the data request message from the node A_10A sends response data corresponding to the data request to the node A_10A via the CAN bus 2 (step S2a). Then, the node A_10A that has received the response data from the node Z_10Z-1 transmits the response data to the node B_10B via the CAN bus 2 (step S3a). That is, in the prior art, the node A_10A uses the CAN bus 2 over three steps from step S1a to step S3a in order to transfer the data stored in the node Z_10Z-1 to the node B_10B.

一方、図7の(b)に示す実施形態の一例は、ノードA_10Aが、ノードZ_10Zに記憶されるデータをノードB_10Bへ受け渡すために、次の処理を実行する。すなわち、先ず、ノードA_10Aが、ノードZ_10Zへデータ要求メッセージを送出する(ステップS1b)。そして、データ要求メッセージを受信したノードZ_10Zが、データ要求メッセージの「メッセージID」を、データ要求メッセージに対する応答データをノードB_10Bで処理できる「メッセージID」へ変換する。そして、ノードZ_10Zが、応答データをノードB_10Bへ送出する(ステップS2b)。すなわち、実施形態の一例は、ノードA_10Aが、ノードZ_10Zに記憶されるデータをノードB_10Bへ受け渡すために、ステップS1b〜ステップS2bの2ステップにわたりCANバス2を使用する。このため、実施形態の一例は、CANバス2を使用する時間を短縮し、CANバス2のトラヒックを削減し、CANバス2の利用効率を向上させることができる。そして、実施形態の一例は、CANシステムの負荷を軽減できる。   On the other hand, in the example of the embodiment illustrated in FIG. 7B, the node A_10A performs the following process in order to transfer the data stored in the node Z_10Z to the node B_10B. That is, first, the node A_10A sends a data request message to the node Z_10Z (step S1b). Then, the node Z_10Z that has received the data request message converts the “message ID” of the data request message into a “message ID” that can be processed by the node B_10B in response data for the data request message. Then, the node Z_10Z sends response data to the node B_10B (step S2b). That is, in the example of the embodiment, the node A_10A uses the CAN bus 2 over two steps S1b to S2b in order to pass the data stored in the node Z_10Z to the node B_10B. For this reason, in an example of the embodiment, the time for using the CAN bus 2 can be shortened, the traffic of the CAN bus 2 can be reduced, and the utilization efficiency of the CAN bus 2 can be improved. And an example of embodiment can reduce the load of a CAN system.

[実施形態の他の形態]
(1)CANにおける通信処理について
図8は、実施形態の他の形態に係るCANにおける通信処理を示すシーケンス図である。実施形態の他の形態に係るCANにおける通信処理は、実施形態に係るCANにおける通信処理におけるステップS13:Noと、ステップS16との間に、ステップS13aを実行する点が異なる。ステップS13:Noの場合、ステップS13aでは、ノードZ_10Zの処理部12Zは、ノードA_10A宛としてデータを送出するか否かを判定する。処理部12Zは、ノードA_10A宛としてデータを送出する場合(ステップS13a:Yes)、ステップS14へ処理を移す。一方、処理部12Zは、ノードB_10B宛としてデータを送出する場合(ステップS13a:No)、ステップS16へ処理を移す。
[Other forms of embodiment]
(1) About Communication Processing in CAN FIG. 8 is a sequence diagram showing communication processing in CAN according to another embodiment of the embodiment. The communication process in the CAN according to another embodiment of the embodiment is different in that step S13a is executed between step S13: No and step S16 in the communication process in the CAN according to the embodiment. Step S13: In the case of No, in step S13a, the processing unit 12Z of the node Z_10Z determines whether or not to send data addressed to the node A_10A. When the processing unit 12Z sends data addressed to the node A_10A (step S13a: Yes), the processing unit 12Z moves the process to step S14. On the other hand, when the processing unit 12Z sends data addressed to the node B_10B (step S13a: No), the processing unit 12Z moves the process to step S16.

ここで、ステップS13:Noは、ノードA_10Aからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードA_10A宛へ送信し、ノードA_10AがデータをノードB_10B宛へ送信する代わりに、ノードA_10Aからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードB_10B宛へ直接送信する場合である。しかし、処理部12Zは、例えば、「メッセージID」から判定できるメッセージの優先順位が高く、より優先して送出されるべきメッセージが他に存在する場合に、ノードA_10Aからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードB_10B宛へ直接送信するとの判定結果にかかわらず、優先して送出されるべきメッセージを送出し、当該データをノードA_10A宛へ送信してもよい。すなわち、ステップS13aの判定処理時に、ノードB_10B宛へ送出するメッセージが複数あり、ステップS11のデータ要求メッセージに応じて送出されるデータよりも優先順位が高いメッセージが存在する場合がある。このとき、優先順位が高いメッセージが先に送出される。このため、ステップS11のデータ要求メッセージに応じて送出されるデータは、優先順位が低いため、ステップS13a:Yes→ステップS14→ステップS15の処理を経て、ノードA_10A宛として送出され、ノードA_10Aを経由してノードB_10B宛へ送出される。   Here, in step S13: No, in response to a request from the node A_10A, the node Z_10Z reads the data from the storage unit 14Z and transmits the data to the node A_10A, and the node A_10A does not transmit the data to the node B_10B. This is a case where the node Z_10Z reads data from the storage unit 14Z and directly transmits it to the node B_10B in response to a request from A_10A. However, for example, when the priority of a message that can be determined from the “message ID” is high and there are other messages that should be transmitted with higher priority, the processing unit 12Z responds to a request from the node A_10A. Regardless of the determination result that the data is read from the storage unit 14Z and transmitted directly to the node B_10B, a message to be transmitted with priority may be transmitted, and the data may be transmitted to the node A_10A. That is, there may be a plurality of messages to be sent to the node B_10B during the determination process in step S13a, and there may be a message having a higher priority than the data sent in response to the data request message in step S11. At this time, a message with a high priority is sent first. For this reason, since the data sent in response to the data request message in step S11 has a low priority, the data is sent as addressed to node A_10A through the process of step S13a: Yes → step S14 → step S15, and passes through node A_10A. And sent to the node B_10B.

また、例えば、ステップS13aの判定処理時に、ノードZ_10ZからノードB_10B宛へのトラヒックが輻輳状態であり、ノードZ_10ZからノードA_10Aへのトラヒックに空きがある場合がある。このとき、ステップS11のデータ要求メッセージに応じて送出されるデータは、トラヒックの輻輳を回避して、ステップS13a:Yes→ステップS14→ステップS15の処理を経て、ノードA_10A宛として送出され、ノードA_10Aを経由してノードB_10B宛へ送出される。   Further, for example, during the determination process in step S13a, traffic from the node Z_10Z to the node B_10B may be in a congested state, and traffic from the node Z_10Z to the node A_10A may be free. At this time, the data sent in response to the data request message in step S11 is sent to the node A_10A through the process of step S13a: Yes → step S14 → step S15, avoiding traffic congestion, and is sent to the node A_10A. To the node B_10B.

例えば、送出するメッセージの「メッセージID」に“#3”を設定することに代えて“#4”を設定することで、ノードB_10B宛のメッセージをノードA_10A宛とすることができる(図4参照)。このように、ステップS13におけるノードA_10Aからの要求に応じてノードZ_10Zが記憶部14Zからデータを読み出してノードB_10B宛へ直接送信するとの判定結果にかかわらず、ステップS13aにおいてノードA_10A宛へ送信するとすることにより、メッセージの優先順位やCANバス2のトラヒックに応じて、データが目的の宛先であるノードB_10Bへより迅速に到達する場合がある。   For example, by setting “# 4” instead of setting “# 3” in the “message ID” of the message to be sent, the message addressed to the node B_10B can be addressed to the node A_10A (see FIG. 4). ). As described above, in response to the request from the node A_10A in step S13, the node Z_10Z reads the data from the storage unit 14Z and directly transmits it to the node B_10B, and transmits it to the node A_10A in step S13a. As a result, depending on the priority of the message and traffic on the CAN bus 2, the data may reach the target destination Node B_10B more quickly.

(2)リモートフレーム及びデータフレームについて
上記の実施形態では、データを要求するフレームをリモートフレームとし、リモートフレームに応答してデータを送信するフレームをデータフレームとした。しかし、開示技術は、これに限られず、データフレームでデータを要求し、データフレームでデータ要求に応答してデータを送信するとしてもよい。例えば、データフレームのデータフィールドにデータが格納されていないデータフレームを、データを要求するフレームとし、データフィールドにデータが格納されているデータフレームを、データを送信するフレームとしてもよい。
(2) About Remote Frame and Data Frame In the above embodiment, a frame that requests data is a remote frame, and a frame that transmits data in response to the remote frame is a data frame. However, the disclosed technology is not limited to this, and data may be requested in a data frame and data may be transmitted in response to the data request in the data frame. For example, a data frame in which no data is stored in the data field of the data frame may be used as a frame for requesting data, and a data frame in which data is stored in the data field may be used as a frame for transmitting data.

(3)メッセージIDテーブル14Zをもとに送信メッセージIDを設定する点について
上記の実施形態では、ノードZ_10Zに記憶されるデータをノードA_10Aの指示のもとに、ノードB_10Bへ受け渡す際に、ノードA_10Aを経由させずにデータをノードB_10Bへデータを送信するよう送信メッセージIDを設定するとした。しかし、送信メッセージIDの設定は、データの間接受け渡しから直接受け渡しへの変更に係るものに限らず、各ノードにおける処理一般に適用可能である。例えば、ノードA_10Aの指示のもとに、ノードZ_10Z及びノードB_10Bが互いに連携して処理を行い、ノードZ_10Z及びノードB_10BからノードA_10Aへ各処理結果を返し、ノードA_10Aは、ノードZ_10Z及びノードB_10Bからの各処理結果に応じて、次処理をノードZ_10Z及びノードB_10Bへ指示する場合がある。このような場合に、ノードZ_10Z及びノードB_10Bは、各処理結果をノードA_10Aへ返さず、ノードZ_10Z及びノードB_10B間で処理結果を授受することにより、処理を完結させるようにすることも可能である。
(3) Regarding the point of setting the transmission message ID based on the message ID table 14Z In the above embodiment, when the data stored in the node Z_10Z is transferred to the node B_10B under the instruction of the node A_10A, The transmission message ID is set so that the data is transmitted to the node B_10B without going through the node A_10A. However, the setting of the transmission message ID is not limited to the one relating to the change from the indirect delivery of data to the direct delivery, and can be applied to the processing in each node in general. For example, under the instruction of the node A_10A, the node Z_10Z and the node B_10B perform processing in cooperation with each other, return the processing results from the node Z_10Z and the node B_10B to the node A_10A, and the node A_10A Depending on each processing result, the next processing may be instructed to the node Z_10Z and the node B_10B. In such a case, the node Z_10Z and the node B_10B can complete the processing by not passing back the processing results to the node A_10A but by passing the processing results between the nodes Z_10Z and B_10B. .

すなわち、処理の始点となる始点ノードから処理の終点となる終点ノードとの間に、中間の処理を担う中間ノードが存在する場合がある。この場合に、実施形態は、始点ノードから中間ノードへ送信されたメッセージIDを、中間ノードが保持するメッセージIDテーブルの記述内容に従って設定変更する。これにより、始点ノード及び中間ノード間、もしくは、中間ノード及び終点ノード間におけるメッセージのやりとりを省略できる場合に、実施形態は広く適用可能である。   In other words, there may be an intermediate node responsible for intermediate processing between the start point node that is the start point of the process and the end point node that is the end point of the process. In this case, the embodiment changes the setting of the message ID transmitted from the start point node to the intermediate node according to the description content of the message ID table held by the intermediate node. Thus, the embodiment can be widely applied when message exchange between the start node and the intermediate node or between the intermediate node and the end node can be omitted.

上記の実施形態に係るノードA_10A、ノードZ_10Z、ノードB_10Bの各部は、メモリ等の記憶装置と協働するCPUやMPU、あるいは、FPGAやASIC等の処理装置がCAN通信プログラムを実行することにより、実現される。FPGAは、Field-Programmable Gate Arrayである。ASICは、Application Specific Integrated Circuitである。そして、上記の実施形態に係るノードA_10A、ノードZ_10Z、ノードB_10Bの各部は、処理負荷や回路設計に応じて、適宜統合又は分散してもよい。また、上記の実施形態に係るノードA_10A、ノードZ_10Z、ノードB_10Bの各部を適宜、組合せ、代替、省略して構成したCAN通信ユニットも、開示技術にかかるCAN通信ユニットに含まれる。   Each unit of the node A_10A, the node Z_10Z, and the node B_10B according to the above embodiment is executed by a CPU or MPU cooperating with a storage device such as a memory or a processing device such as an FPGA or an ASIC executing a CAN communication program. Realized. FPGA is a Field-Programmable Gate Array. ASIC is an Application Specific Integrated Circuit. And each part of node A_10A, node Z_10Z, and node B_10B which concerns on said embodiment may be integrated or disperse | distributed suitably according to a processing load or circuit design. In addition, a CAN communication unit configured by appropriately combining, substituting, or omitting each part of the node A_10A, the node Z_10Z, and the node B_10B according to the above embodiment is also included in the CAN communication unit according to the disclosed technology.

1 CAN
2 CANバス
10A ノードA
10Z ノードZ
10B ノードB
11A−1、11B−1 受信メッセージIDテーブル
11B−2、11B−2 送信メッセージIDテーブル
11Z メッセージIDテーブル
12A、12Z、12B 処理部
13A、13Z、13B CANコントローラ
14Z 記憶部
1 CAN
2 CAN bus 10A Node A
10Z Node Z
10B Node B
11A-1, 11B-1 Reception message ID table 11B-2, 11B-2 Transmission message ID table 11Z Message ID table 12A, 12Z, 12B Processing unit 13A, 13Z, 13B CAN controller 14Z Storage unit

Claims (4)

メッセージを一意に識別するメッセージIDのうち、CANバスを介した他のCAN(Control Area Network)通信ユニットからの受信メッセージの受信メッセージID及び該受信メッセージIDに応じた処理内容と、前記CANバスを介した他のCANユニットへの送信メッセージの送信メッセージID及び該送信メッセージIDに応じた処理内容とを対応付けて格納するメッセージテーブルと、
前記受信メッセージを受信した際に、該受信メッセージが前記メッセージテーブルに格納されている場合、該受信メッセージの受信メッセージIDに応じた処理内容を実行後、該受信メッセージIDと対応する送信メッセージIDに応じた処理内容を実行し、該送信メッセージIDを付与した前記送信メッセージを他のCAN通信ユニットへ前記CANバスを介して送出し、該受信メッセージが前記メッセージテーブルに格納されていない場合、該受信メッセージを破棄する処理部と
を備えることを特徴とするCAN通信ユニット。
Among the message IDs that uniquely identify the message, the received message ID of the received message from another CAN (Control Area Network) communication unit via the CAN bus, the processing content corresponding to the received message ID, and the CAN bus A message table for storing a transmission message ID of a transmission message to another CAN unit via the storage unit and a processing content corresponding to the transmission message ID in association with each other;
When the received message is stored in the message table when the received message is received, the processing content corresponding to the received message ID of the received message is executed, and then the transmitted message ID corresponding to the received message ID is set. If the received message is not stored in the message table, the received message is sent to another CAN communication unit via the CAN bus. A CAN communication unit comprising: a processing unit that discards a message.
データを記憶する記憶部
をさらに備え、
前記処理部は、第1の他のCAN通信ユニットから前記受信メッセージを受信した際に、該受信メッセージが前記メッセージテーブルに格納されている場合、該受信メッセージの受信メッセージIDに応じて前記記憶部からデータを取得後、該受信メッセージIDと対応する送信メッセージIDを付与した前記送信メッセージに該データを埋め込んで第2の他のCAN通信ユニットへ前記CANバスを介して送出する
ことを特徴とする請求項1に記載のCAN通信ユニット。
A storage unit for storing data;
When the received message is stored in the message table when the received message is received from the first other CAN communication unit, the processing unit stores the storage unit according to the received message ID of the received message. After the data is acquired, the data is embedded in the transmission message assigned with the transmission message ID corresponding to the reception message ID, and is transmitted to the second other CAN communication unit via the CAN bus. The CAN communication unit according to claim 1.
前記処理部は、前記送信メッセージを他のCAN通信ユニットへ前記CANバスを介して送出する際に、該CANバスの通信状況に応じて該送信メッセージの送信メッセージIDを変更して送信する
ことを特徴とする請求項1又は2に記載のCAN通信ユニット。
When the transmission unit sends the transmission message to another CAN communication unit via the CAN bus, the processing unit changes the transmission message ID of the transmission message according to the communication status of the CAN bus and transmits the transmission message. The CAN communication unit according to claim 1 or 2, characterized by the above-mentioned.
コンピュータに、
CANバスを介した他のCAN(Control Area Network)通信ユニットから受信メッセージを受信し、
前記受信メッセージを受信した際に、メッセージを一意に識別するメッセージIDのうち、前記受信メッセージの受信メッセージID及び該受信メッセージIDに応じた処理内容と、前記CANバスを介した他のCANユニットへの送信メッセージの送信メッセージID及び該送信メッセージIDに応じた処理内容とを対応付けて格納するメッセージテーブルを参照し、該受信メッセージが前記メッセージテーブルに格納されている場合、該受信メッセージの受信メッセージIDに応じた処理内容を実行後、該受信メッセージIDと対応する送信メッセージIDに応じた処理内容を実行し、該送信メッセージIDを付与した前記送信メッセージを他のCAN通信ユニットへ前記CANバスを介して送出し、
前記受信メッセージを受信した際に、該受信メッセージが前記メッセージテーブルに格納されていいない場合、該受信メッセージを破棄する
処理を実行させるCAN通信プログラム。
On the computer,
Receive messages from other CAN (Control Area Network) communication units via the CAN bus,
When the received message is received, among the message IDs that uniquely identify the message, the received message ID of the received message, the processing content corresponding to the received message ID, and other CAN units via the CAN bus If the received message is stored in the message table with reference to the message table that stores the transmission message ID of the transmission message and the processing content corresponding to the transmission message ID in association with each other, the received message of the received message After executing the processing content according to the ID, execute the processing content according to the transmission message ID corresponding to the reception message ID, and send the transmission message with the transmission message ID to the other CAN communication unit via the CAN bus. Send out through
A CAN communication program for executing a process of discarding the received message when the received message is not stored in the message table when the received message is received.
JP2015173003A 2015-09-02 2015-09-02 CAN communication unit and CAN communication program Active JP6276738B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015173003A JP6276738B2 (en) 2015-09-02 2015-09-02 CAN communication unit and CAN communication program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015173003A JP6276738B2 (en) 2015-09-02 2015-09-02 CAN communication unit and CAN communication program

Publications (2)

Publication Number Publication Date
JP2017050717A true JP2017050717A (en) 2017-03-09
JP6276738B2 JP6276738B2 (en) 2018-02-07

Family

ID=58279669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015173003A Active JP6276738B2 (en) 2015-09-02 2015-09-02 CAN communication unit and CAN communication program

Country Status (1)

Country Link
JP (1) JP6276738B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200112439A1 (en) * 2018-10-03 2020-04-09 Panasonic Automotive Systems Company Of America, Division Of Panasonic Corporation Of North America Secure controller area network in vehicles

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014115455A1 (en) * 2013-01-28 2014-07-31 日立オートモティブシステムズ株式会社 Network device and data sending and receiving system
JP2015080126A (en) * 2013-10-18 2015-04-23 トヨタ自動車株式会社 Communication system and communication method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014115455A1 (en) * 2013-01-28 2014-07-31 日立オートモティブシステムズ株式会社 Network device and data sending and receiving system
JP2015080126A (en) * 2013-10-18 2015-04-23 トヨタ自動車株式会社 Communication system and communication method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200112439A1 (en) * 2018-10-03 2020-04-09 Panasonic Automotive Systems Company Of America, Division Of Panasonic Corporation Of North America Secure controller area network in vehicles
US12088728B2 (en) * 2018-10-03 2024-09-10 Panasonic Automotive Systems Company Of America, Division Of Panasonic Corporation Of North America Secure controller area network in vehicles

Also Published As

Publication number Publication date
JP6276738B2 (en) 2018-02-07

Similar Documents

Publication Publication Date Title
WO2014057643A1 (en) Relay device
EP3582458A1 (en) Communication system, communication device, and communication method
US11398919B2 (en) Method for detecting network subscribers in an automation network and automation network
US20140003325A1 (en) Relay communication system and relay communication device
JP2014045421A (en) Network system
JPWO2020039844A1 (en) In-vehicle communication device and in-vehicle system
US20220050442A1 (en) Communication Device, Communication Terminal, Communication Device and Method for Operating a Communication System for Transmitting Time-Critical Data
JP5767277B2 (en) Gateway device
JP6544230B2 (en) Communications system
US20130145025A1 (en) Programmable controller
JP6276738B2 (en) CAN communication unit and CAN communication program
JP6569547B2 (en) Communication method
JP2015053568A (en) Communication controller
JP2017175231A (en) Communication system using ring network
WO2020136787A1 (en) Data processing device, data processing system, data processing method, and program
JP5728043B2 (en) Gateway device
CN107222379A (en) A kind of method and apparatus of serial communication
CN117971515A (en) Operation instruction sending method, device, computer equipment and storage medium
JP7140011B2 (en) Gateway device
JP2015210667A (en) Communication unit and can(control area network) communication control program
US10713198B2 (en) Direct memory access control unit for a processing unit that includes a working memory
JP4361540B2 (en) Gateway device, data transfer method, and program
CN1668041B (en) Communication device and communication method
US20160344573A1 (en) Method and apparatus for processing interactions between devices
JP6137033B2 (en) In-vehicle network system and in-vehicle relay device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170530

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170727

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20171226

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180112

R150 Certificate of patent or registration of utility model

Ref document number: 6276738

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250