JP5767277B2 - Gateway device - Google Patents

Gateway device Download PDF

Info

Publication number
JP5767277B2
JP5767277B2 JP2013124783A JP2013124783A JP5767277B2 JP 5767277 B2 JP5767277 B2 JP 5767277B2 JP 2013124783 A JP2013124783 A JP 2013124783A JP 2013124783 A JP2013124783 A JP 2013124783A JP 5767277 B2 JP5767277 B2 JP 5767277B2
Authority
JP
Japan
Prior art keywords
bus
frame
terminal device
transmission
stored
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.)
Expired - Fee Related
Application number
JP2013124783A
Other languages
Japanese (ja)
Other versions
JP2015000597A (en
Inventor
道孝 坪井
道孝 坪井
松浦 正典
正典 松浦
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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor Co Ltd
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 Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP2013124783A priority Critical patent/JP5767277B2/en
Publication of JP2015000597A publication Critical patent/JP2015000597A/en
Application granted granted Critical
Publication of JP5767277B2 publication Critical patent/JP5767277B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Description

本発明は、通信ネットワーク相互間の通信接続を中継するゲートウェイ装置に関し、特に、端末装置間において動的に決定したデータ送信間隔の条件(例えば、その下限値)を損なうことなく当該端末装置間の通信を中継することのできるゲートウェイ装置に関する。本ゲートウェイ装置は、例えば車両に搭載され、車載ネットワークシステムを構成するネットワーク相互間の通信接続を中継する。   The present invention relates to a gateway device that relays a communication connection between communication networks, and in particular, between terminal devices without impairing a condition (for example, a lower limit value) of a data transmission interval that is dynamically determined between terminal devices. The present invention relates to a gateway device capable of relaying communication. The gateway device is mounted on a vehicle, for example, and relays a communication connection between networks constituting the in-vehicle network system.

従来、車載ネットワークシステムにおけるゲートウェイ装置として、CAN(Controller Area Network)通信規格に準拠し、一のネットワークから受信したフレームをメモリに蓄積して、当該受信したフレームを当該メモリから送信用バッファへ順次転送しつつ、送信用バッファ内のフレームを送信機により他のネットワークへ送出する、ゲートウェイ装置が知られている(特許文献1参照)。   Conventionally, as a gateway device in an in-vehicle network system, conforming to the CAN (Controller Area Network) communication standard, frames received from one network are stored in a memory, and the received frames are sequentially transferred from the memory to a transmission buffer. However, there is known a gateway device that transmits a frame in a transmission buffer to another network by a transmitter (see Patent Document 1).

このゲートウェイ装置では、送信機によりフレームが送出されて送信用バッファ内に空きができる毎に、即座に上記メモリから送信用バッファへ新たなフレームを非同期で転送し、メモリから送信用バッファへのフレーム転送の遅れを防止して、フレーム送信に係る処理の遅れを最小化している。   In this gateway device, every time a frame is sent out by the transmitter and a space is created in the transmission buffer, a new frame is immediately transferred asynchronously from the memory to the transmission buffer, and the frame from the memory to the transmission buffer is immediately transferred. A delay in transfer is prevented, and a delay in processing related to frame transmission is minimized.

これにより、上記ゲートウェイ装置は、送信先であるネットワークの空き時間(バス上にデータが何も送出されていない時間)を最小化して、当該ネットワークにおける通信効率を最大化することができる。   As a result, the gateway device can minimize the idle time of the network that is the transmission destination (the time during which no data is transmitted on the bus) and maximize the communication efficiency in the network.

ところで、車載ネットワークシステムにおいては、様々な車両動作の制御を行う複数のECU(電子制御装置、Electronic Control Unit)が車載ネットワークを介して通信可能に接続され、各ECUは、それぞれが受け持つ制御動作に係るデータを他のECUとの間で送受信することにより、車両全体として適切な制御を実現する。   By the way, in an in-vehicle network system, a plurality of ECUs (Electronic Control Units) that control various vehicle operations are communicably connected via an in-vehicle network. By transmitting and receiving such data to and from other ECUs, appropriate control as a whole vehicle is realized.

すなわち、各ECUは、車両動作の制御に係る処理と通信に係る処理とを、当該ECUに与えられた処理能力の範囲内で同時に実行しており、通常は、車両の動作状態に応じて車両制御に係る処理負荷が増加しても、一定の通信処理能力が確保されている。   That is, each ECU simultaneously executes a process related to the control of the vehicle operation and a process related to the communication within the range of the processing capability given to the ECU. Even if the processing load related to the control increases, a certain communication processing capability is secured.

しかしながら、例えば通常の車両動作の制御に加えて付加的な処理が求められるような場合には、車両制御の負荷変動や当該付加的処理の負荷変動に伴って、通信処理の能力は低下し、その時々の通信処理能力を超えて短い時間間隔でフレームが到来してしまうと、それらのフレームを正しく受信できない事態が生じ得る。   However, for example, when additional processing is required in addition to normal vehicle operation control, the capability of communication processing decreases due to load fluctuation of the vehicle control and load fluctuation of the additional processing, When frames arrive at a short time interval exceeding the communication processing capability at that time, a situation may arise in which those frames cannot be received correctly.

例えば、車両動作の異常を診断する際には、車両外部から車載ネットワークに診断装置が接続され、当該診断装置と各ECUとの間で、各ECUの動作を診断するための様々な情報のやりとり(診断通信)が行われる。ここで、診断装置がECUへ送信する一塊りの情報を、「診断情報」と称するものとする。   For example, when diagnosing abnormalities in vehicle operation, a diagnostic device is connected to the in-vehicle network from the outside of the vehicle, and various information for diagnosing the operation of each ECU is exchanged between the diagnostic device and each ECU. (Diagnostic communication) is performed. Here, a group of information transmitted from the diagnosis device to the ECU is referred to as “diagnosis information”.

一方、CAN通信規格に従うフレームは、1フレーム当たり最大7byteの情報しか伝達することができない。このため、診断装置は、8byte以上の診断情報を送信する場合には、当該診断情報を7byte以下のデータに分割し、複数の連続するフレームとして送信する。   On the other hand, a frame conforming to the CAN communication standard can transmit only a maximum of 7 bytes of information per frame. For this reason, when transmitting diagnostic information of 8 bytes or more, the diagnostic apparatus divides the diagnostic information into data of 7 bytes or less and transmits the data as a plurality of continuous frames.

しかしながら、このような車両診断のための処理が行われる際には、各ECUは、通常の車両制御に係る処理に加えて、診断器との通信や自己診断のための付加的な処理を行うこととなるため、診断装置から短い周期で連続的にフレームが送信されたとしても、当該フレームの全てを受信できない場合があり得る。   However, when such processing for vehicle diagnosis is performed, each ECU performs communication with a diagnostic device and additional processing for self-diagnosis in addition to processing related to normal vehicle control. Therefore, even if frames are continuously transmitted from the diagnostic apparatus in a short cycle, there is a case where all of the frames cannot be received.

そこで、このような状態を防止するため、診断通信においては、ECUが診断装置に対してフレーム送信周期の下限値を指定するためのフレームを送信する方法が用いられている。これにより、ECUと診断装置との間のデータ送信間隔の条件が、当該ECUにおける処理負荷に応じて動的に決定されることとなる。   Therefore, in order to prevent such a state, in diagnostic communication, a method is used in which the ECU transmits a frame for designating the lower limit value of the frame transmission cycle to the diagnostic device. Thereby, the condition of the data transmission interval between the ECU and the diagnostic device is dynamically determined according to the processing load in the ECU.

この場合、診断通信は、例えば次のような手順で行われる。
まず、診断装置は、ECUに対し、複数のフレームにより診断情報を分割して送信することを示すフレーム(First Frame。以下、「FFフレーム」と称する)を送信する。このFFフレームには、その診断情報全体の長さ(データ長)が含まれる。
In this case, the diagnostic communication is performed by the following procedure, for example.
First, the diagnostic device transmits a frame (First Frame; hereinafter referred to as “FF frame”) indicating that diagnostic information is divided and transmitted by a plurality of frames to the ECU. This FF frame includes the entire length (data length) of the diagnostic information.

FFフレームを受信したECUは、診断情報を構成する後続のフレーム(Consecutive Frame。以下、「CFフレーム」と称する)の送信周期を指定すべく、診断装置に対しFC(Flow Control)フレームを送信する。このFCフレームには、上記CFフレームの送信周期の下限を指定する値(下限値)STminが含まれている。 The ECU that has received the FF frame transmits an FC (Flow Control) frame to the diagnostic apparatus in order to designate a transmission cycle of a subsequent frame (Consecutive Frame; hereinafter referred to as “CF frame”) that constitutes the diagnostic information. . This FC frame includes a value (lower limit value) ST min that specifies the lower limit of the transmission period of the CF frame.

FCフレームを受信した診断装置は、当該FCフレームに含まれる上記下限値STmin以上の送信周期で(又は送信間隔で)CFフレームをECUへ送信する。これにより、ECUは、送信された全てのCFフレームを受信することが可能となり、これらのCFフレームからデータを抽出して診断情報の全体を取得することができる。なお、ECUは、受信したCFフレームに含まれるデータのデータ長を積算し、その積算値と上記FFフレームに含まれていた診断情報全体のデータ長とを比較することにより、全てのCFフレームを受信したか否かを判断することができる。 The diagnostic device that has received the FC frame transmits the CF frame to the ECU at a transmission cycle (or at a transmission interval) equal to or higher than the lower limit ST min included in the FC frame. As a result, the ECU can receive all the transmitted CF frames, and can extract the data from these CF frames to obtain the entire diagnostic information. The ECU integrates the data length of the data included in the received CF frame, and compares all the CF frames with the total length of the diagnostic information included in the FF frame. It can be determined whether or not it has been received.

上述した診断通信によれば、診断装置から連続して送信される複数のフレームは、上記STmin以上の間隔でECUに到来することとなり、当該ECUは、これら連続する複数のフレームを正しく受信して、当該フレームにより分割して送信された診断情報を適正に受信することができる。   According to the diagnostic communication described above, a plurality of frames continuously transmitted from the diagnostic device arrive at the ECU at intervals of the STmin or more, and the ECU correctly receives the plurality of consecutive frames. The diagnostic information divided and transmitted by the frame can be properly received.

しかしながら、上記従来のゲートウェイ装置が診断装置とECUとの間に介在した場合には、図11に示すように、診断装置から一のネットワークに対してSTmin以上の周期でCFフレームが送出されたとしても、他のネットワークに接続されたECUに対して当該CFフレームがSTmin以上の周期で到来するとは限らない。 However, when the conventional gateway device is interposed between the diagnostic device and the ECU, as shown in FIG. 11, a CF frame is sent from the diagnostic device to one network at a cycle of ST min or more. However, the CF frame does not always arrive at a cycle of ST min or more with respect to the ECU connected to another network.

図11は、従来のゲートウェイ装置を用いて構成された車載ネットワークシステムにおける、診断通信の一例を示す図である。図11には、診断通信を構成する通信イベントが図示上方から下方に向かって時系列に示されている。図示の例では、診断装置1100は診断情報を複数のフレームに分割して送信しようとしている。また、診断装置1100はネットワークAに、診断情報の送信先であるECU1104はネットワークBに、それぞれ接続されており、ゲートウェイ装置1102はネットワークA及びネットワークBに接続されてネットワーク間の通信を中継している。   FIG. 11 is a diagram illustrating an example of diagnostic communication in an in-vehicle network system configured using a conventional gateway device. In FIG. 11, communication events constituting diagnostic communication are shown in time series from the top to the bottom of the figure. In the example shown in the figure, the diagnostic apparatus 1100 attempts to divide diagnostic information into a plurality of frames and transmit it. The diagnostic apparatus 1100 is connected to the network A, and the ECU 1104 that is the transmission destination of the diagnostic information is connected to the network B. The gateway apparatus 1102 is connected to the network A and the network B, and relays communication between the networks. Yes.

符号1110及び1112により示された図示縦方向の2つのラインは、ネットワークAに接続された各装置の時間の経過を表しており、より具体的には、診断装置1100のにおける時間の経過及びゲートウェイ装置1102のネットワークA側通信機における時間の経過をそれぞれ表している。また、符号1114及び1116により示された図示縦方向の2つのラインは、ネットワークBに接続された各装置の時間の経過を表しており、より具体的には、ゲートウェイ装置1102のネットワークB側通信機における時間の経過及びECU1104における時間の経過をそれぞれ表わしている。   Two lines in the illustrated vertical direction indicated by reference numerals 1110 and 1112 represent the passage of time of each device connected to the network A. More specifically, the passage of time and the gateway in the diagnostic device 1100 The passage of time in the network A side communication device of the device 1102 is shown. In addition, two lines in the illustrated vertical direction indicated by reference numerals 1114 and 1116 represent the passage of time of each device connected to the network B. More specifically, the network B side communication of the gateway device 1102 The passage of time in the machine and the passage of time in the ECU 1104 are respectively shown.

ライン1110〜1116のうち互いに隣接するライン間に描かれた図示横方向の実線矢印は、それぞれ通信イベントを表わしている。より詳細には、ライン1110とライン1112との間の実線矢印はネットワークAにおける通信イベントを表わし、ライン1114とライン1116との間の実線矢印はネットワークBにおける通信イベントを表わしている。また、ライン1112とライン1114との間の図示横方向の破線矢印は、ゲートウェイ装置1102の内部を通過する受信フレームの流れを模式的に示している。   Of the lines 1110 to 1116, solid arrows in the horizontal direction drawn between adjacent lines represent communication events. More specifically, a solid arrow between line 1110 and line 1112 represents a communication event in network A, and a solid arrow between line 1114 and line 1116 represents a communication event in network B. In addition, a horizontal broken arrow between the line 1112 and the line 1114 schematically shows the flow of the received frame passing through the inside of the gateway device 1102.

まず、診断装置1100は、ECU1104に向けてFFフレーム1120をネットワークAへ送出し、当該FFフレーム1120は、ゲートウェイ装置1102を介してネットワークBへ送出され、ECU1104に受信される。次に、FFフレーム1120を受信したECU1104は、送信周期の下限値STminを指定するFCフレーム1122を、診断装置1100に向けてネットワークBへ送出する。当該送出されたFCフレーム1122は、ゲートウェイ装置1102を介してネットワークAへ送出され、診断装置1100に受信される。   First, the diagnostic device 1100 sends an FF frame 1120 to the network A toward the ECU 1104, and the FF frame 1120 is sent to the network B via the gateway device 1102 and received by the ECU 1104. Next, ECU 1104 that has received FF frame 1120 sends FC frame 1122 designating lower limit value STmin of the transmission cycle to network B toward diagnostic device 1100. The sent FC frame 1122 is sent to the network A via the gateway device 1102 and received by the diagnostic device 1100.

次に、診断装置1100は、5つのCFフレーム1130、1132、1134、1136、及び1138を、上記FCフレームにより指定された送信周期の下限値STmin以上の時間間隔で、ネットワークAへ送出し、各FCフレーム1130〜1138は、ゲートウェイ装置1102に受信される。そして、ゲートウェイ装置1102は、受信したこれらのFCフレーム1130〜1138をネットワークBへ送出しようと試みる。   Next, the diagnostic apparatus 1100 sends the five CF frames 1130, 1132, 1134, 1136, and 1138 to the network A at time intervals equal to or greater than the lower limit value STmin of the transmission cycle specified by the FC frame. The FC frames 1130 to 1138 are received by the gateway device 1102. Then, the gateway device 1102 tries to send the received FC frames 1130 to 1138 to the network B.

ここで、CAN通信規格に従うフレームには、当該フレームの送信の優先度を表わす識別子(ID、Identifier)が含まれており、2つ以上の送信機が一のネットワークに対して同時にフレームを送信しようとする場合、各送信機は自装置が送信しようとするフレームより優先度の高いフレームが他の送信機から同時に送信されようとしている場合には、その送信動作を中止して当該優先度の高いフレームの送信完了を待たなければならない。なお、優先度の高いフレームが他の送信機から同時に送信されようとしているか否かは、各フレームの先頭に配されたIDコードがバス上にシリアルデータとして送出されることにより、各フレームのIDコードが当該バス上でビット毎に比較されることにより判断される。   Here, the frame according to the CAN communication standard includes an identifier (ID) that indicates the priority of transmission of the frame, and two or more transmitters try to transmit the frame simultaneously to one network. If each transmitter tries to transmit a frame having a higher priority than the frame to be transmitted by its own device from another transmitter at the same time, the transmitter stops the transmission operation and the priority is higher. You must wait for the frame transmission to complete. Whether or not a frame having a high priority is about to be transmitted simultaneously from another transmitter is determined by sending an ID code arranged at the head of each frame as serial data on the bus, thereby identifying the ID of each frame. The determination is made by comparing the code bit by bit on the bus.

図11の例では、例えば時刻t7からt8までの期間1140において、CFフレーム1130〜1138より優先度の高いフレームが、ECU1104以外の他のECU(不図示)からネットワークBに送出されたものとする。   In the example of FIG. 11, for example, in a period 1140 from time t7 to t8, a frame having a higher priority than the CF frames 1130 to 1138 is sent to the network B from another ECU (not shown) other than the ECU 1104. .

このため、ゲートウェイ装置1102は、期間1140においては、受信したCFフレーム1130〜1138をネットワークBへ送出することができず、これらのCFフレーム1130〜1138を自装置内のメモリに保存することとなる。そして、ゲートウェイ装置1102は、ネットワークBにおいて上記優先度の高いフレームの送信が終了した時刻t8の後に、メモリ内に保存したCFフレーム1130〜1138を順次、ネットワークBへ送出する。   For this reason, the gateway apparatus 1102 cannot transmit the received CF frames 1130 to 1138 to the network B in the period 1140, and stores these CF frames 1130 to 1138 in the memory in the own apparatus. . Then, the gateway device 1102 sequentially transmits the CF frames 1130 to 1138 stored in the memory to the network B after the time t8 when the transmission of the frame with the high priority is completed in the network B.

一般に従来のゲートウェイ装置は、特許文献1に記載のゲートウェイ装置の如く、専ら一のネットワークから他のネットワークへ向かうフレームの流れが自装置内部で停滞しないように、自装置内部に保存したフレームをできる限り迅速に他のネットワークへ送出するように構成されている。   In general, a conventional gateway device, like the gateway device described in Patent Document 1, can generate a frame stored inside its own device so that the flow of frames from one network to another network does not stagnate inside the own device. It is configured to send to other networks as quickly as possible.

このため、ゲートウェイ装置1102に保存されたCFフレーム1130〜1138は、ECU1104から指定された送信周期の下限値STminよりも短い時間間隔で、ゲートウェイ装置1102からネットワークBへ送出されることとなる。その結果、ECU1104は、CFフレーム1130〜1138の一部を受信できなくなり、診断装置1100から送信された診断情報を正しく受信できない事態が発生し得る。   For this reason, the CF frames 1130 to 1138 stored in the gateway device 1102 are transmitted from the gateway device 1102 to the network B at a time interval shorter than the lower limit value STmin of the transmission cycle designated by the ECU 1104. As a result, the ECU 1104 may not be able to receive a part of the CF frames 1130 to 1138, and a situation may occur in which the diagnostic information transmitted from the diagnostic device 1100 cannot be correctly received.

特開2007−243322号公報JP 2007-243322 A

上記背景より、端末装置間において動的に決定したデータ送信間隔の条件(例えば、その下限値)を損なうことなく当該端末装置間の通信を中継することのできるゲートウェイ装置の実現が望まれている。   From the above background, it is desired to realize a gateway device that can relay communication between the terminal devices without impairing the condition (for example, the lower limit value) of the data transmission interval dynamically determined between the terminal devices. .

本発明は、一のネットワークを構成する一のバスに接続された一の端末装置と、他のネットワークを構成する他のバスに接続された他の端末装置との間の通信を、前記一及び他のネットワーク間で中継するゲートウェイ装置である。本ゲートウェイ装置は、前記一のバスから受信したデータの前記他のバスへの送信を管理すると共に、前記他のバスから受信したデータの前記一のバスへの送信を管理する処理装置を備える。そして、前記処理装置は、前記一の端末装置から前記他の端末装置へ向けて送信された、データ送信間隔を指定する情報を含む第1の所定の信号を検出して、当該情報を記憶するよう構成され、かつ、前記他の端末装置から受信したデータを記憶装置に保存し、当該保存したデータを、前記記憶した情報が表すデータ送信間隔の指定に従って、前記一の端末装置へ送信するよう構成されている。
本発明の一の態様によると、前記処理装置は、さらに、前記他のバスから受信して前記一のバスへ送出する第2の所定の信号の、自装置である前記ゲートウェイ装置内での滞留時間を計測し、前記計測した滞留時間が所定時間を超えており、かつ、前記一の端末装置から受信した前記第1の所定の信号に含まれる前記情報から特定されるデータ送信間隔が所定の時間間隔より短い間隔を含むときは、当該情報を予め定めた所定の時間間隔以上のデータ送信間隔を指定する内容に書き換えて、当該書き換え後の前記第1の所定の信号を前記他の端末装置へ送信するよう構成されている。
本発明の他の態様によると、前記第2の所定の信号は、前記他の端末装置から前記一の端末装置に向けてデータを連続送信する旨の通知を含むものである。
本発明の他の態様によると、前記第1の所定の信号に含まれる前記情報が表すデータ送信間隔の指定は、前記第2の所定の信号により通知される連続送信に係るデータに対して適用される。
本発明の他の態様によると、前記一のネットワーク及び前記他のネットワークは、共に車両に搭載された車載ネットワークであり、前記ゲートウェイ装置は、車両に搭載されて上記車載ネットワーク間の通信を中継するものである。
本発明の他の態様によると、前記一の端末装置は、前記車両の動作を制御する電子制御装置(ECU)であり、前記他の端末装置は、前記車両の外部から前記他のネットワークに接続される、車両動作を診断するための診断装置である。
本発明の他の態様によると、前記第1の所定の信号を受信しないとき、又は、前記第1の所定の信号が含む情報により特定されるデータ送信間隔の下限値が0であるときは、前記他の端末装置から受信したデータを前記一の端末装置に向けて任意の送信間隔で送信する。
また、本発明は、一のネットワークを構成する一のバスに接続された一の端末装置と、他のネットワークを構成する他のバスに接続された他の端末装置との間の通信を、前記一及び他のネットワーク間で中継するゲートウェイ装置であって、前記一の端末装置から前記他の端末装置へ向けて送信された、データ送信間隔を指定する情報を含む第1の所定の信号を検出して、当該情報を記憶する手段を備え、かつ、前記他の端末装置から受信したデータを記憶装置に保存し、当該保存したデータを、前記記憶した情報が表すデータ送信間隔の指定に従って、前記一の端末装置へ送信する手段と、を備える。
さらに、本発明は、一のネットワークを構成する一のバスに接続された一の端末装置と、他のネットワークを構成する他のバスに接続された他の端末装置との間の通信を、前記一及び他のネットワーク間で中継するゲートウェイ装置が備える処理装置により行われるデータ転送処理の方法である。本方法は、前記一の端末装置から前記他の端末装置へ向けて送信された、データ送信間隔を指定する情報を含む第1の所定の信号を検出して、当該情報を記憶するステップと、前記他の端末装置から受信したデータを記憶装置に記憶させるステップと、当該記憶させたデータを、前記記憶した情報が表すデータ送信間隔の指定に従って、前記一の端末装置へ送信するステップと、を含んでいる。
The present invention relates to communication between one terminal device connected to one bus constituting one network and another terminal device connected to another bus constituting another network. It is a gateway device that relays between other networks. The gateway device includes a processing device that manages transmission of data received from the one bus to the other bus and manages transmission of data received from the other bus to the one bus. Then, the processing device detects a first predetermined signal including information specifying a data transmission interval transmitted from the one terminal device to the other terminal device, and stores the information. The data received from the other terminal device is stored in a storage device, and the stored data is transmitted to the one terminal device in accordance with a data transmission interval specified by the stored information. It is configured.
According to one aspect of the present invention, the processing device further retains a second predetermined signal received from the other bus and sent to the one bus in the gateway device which is its own device. Time is measured, the measured residence time exceeds a predetermined time, and a data transmission interval specified from the information included in the first predetermined signal received from the one terminal device is a predetermined time When an interval shorter than the time interval is included, the information is rewritten to a content specifying a data transmission interval that is equal to or greater than a predetermined time interval, and the first predetermined signal after the rewriting is changed to the other terminal device. Configured to send to.
According to another aspect of the present invention, the second predetermined signal includes a notification that data is continuously transmitted from the other terminal device to the one terminal device.
According to another aspect of the present invention, the designation of the data transmission interval represented by the information included in the first predetermined signal is applied to data related to continuous transmission notified by the second predetermined signal. Is done.
According to another aspect of the present invention, the one network and the other network are both in-vehicle networks mounted in a vehicle, and the gateway device is mounted in the vehicle and relays communication between the in-vehicle networks. Is.
According to another aspect of the present invention, the one terminal device is an electronic control unit (ECU) that controls the operation of the vehicle, and the other terminal device is connected to the other network from outside the vehicle. A diagnostic device for diagnosing vehicle operation.
According to another aspect of the present invention, when the first predetermined signal is not received or when the lower limit value of the data transmission interval specified by the information included in the first predetermined signal is 0, Data received from the other terminal device is transmitted to the one terminal device at an arbitrary transmission interval.
The present invention also provides communication between one terminal device connected to one bus constituting one network and another terminal device connected to another bus constituting another network, A gateway device that relays between one and another network, and detects a first predetermined signal including information specifying a data transmission interval transmitted from the one terminal device to the other terminal device And storing means for storing the information, storing the data received from the other terminal device in a storage device, and storing the stored data according to the specification of the data transmission interval represented by the stored information, Means for transmitting to one terminal device.
Further, the present invention provides communication between one terminal device connected to one bus constituting one network and another terminal device connected to another bus constituting another network, This is a data transfer processing method performed by a processing device provided in a gateway device that relays between one network and another network. The method includes detecting a first predetermined signal including information specifying a data transmission interval transmitted from the one terminal device to the other terminal device, and storing the information; Storing the data received from the other terminal device in a storage device, and transmitting the stored data to the one terminal device in accordance with a data transmission interval specified by the stored information. Contains.

本発明によれば、通信ネットワーク相互間の通信接続を中継するゲートウェイ装置において、端末装置間において動的に決定したデータ送信間隔の条件を損なうことなく当該端末装置間の通信を中継することができる。   According to the present invention, in a gateway device that relays communication connections between communication networks, communication between the terminal devices can be relayed without impairing the data transmission interval condition dynamically determined between the terminal devices. .

車載ネットワークシステムに適用された本発明の第1の実施形態に係るゲートウェイ装置の例を示す図である。It is a figure which shows the example of the gateway apparatus which concerns on the 1st Embodiment of this invention applied to the vehicle-mounted network system. 本発明の第1の実施形態に係るゲートウェイ装置の構成を示すブロック図である。It is a block diagram which shows the structure of the gateway apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係るゲートウェイ装置の、動作の一例を示す図である。It is a figure which shows an example of operation | movement of the gateway apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係るゲートウェイ装置の、処理装置が行う受信処理の手順を示すフロー図である。It is a flowchart which shows the procedure of the reception process which the processing apparatus of the gateway apparatus which concerns on the 1st Embodiment of this invention performs. 本発明の第1の実施形態に係るゲートウェイ装置の、処理装置が行う送信処理の手順を示すフロー図である。It is a flowchart which shows the procedure of the transmission process which the processing apparatus of the gateway apparatus which concerns on the 1st Embodiment of this invention performs. 本発明の第2の実施形態に係るゲートウェイ装置の構成を示す図である。It is a figure which shows the structure of the gateway apparatus which concerns on the 2nd Embodiment of this invention. バス上に高優先度フレームが頻繁に送出される状態における、第1の実施形態に係るゲートウェイ装置10の動作の例を示す図である。It is a figure which shows the example of operation | movement of the gateway apparatus 10 which concerns on 1st Embodiment in the state in which a high priority flame | frame is frequently sent on a bus | bath. 図7と同じ状態における、本発明の第2の実施形態に係るゲートウェイ装置の動作の例を示す図である。It is a figure which shows the example of operation | movement of the gateway apparatus which concerns on the 2nd Embodiment of this invention in the same state as FIG. 本発明の第2の実施形態に係るゲートウェイ装置の、処理装置が行う受信処理の手順を示すフロー図である。It is a flowchart which shows the procedure of the reception process which the processing apparatus performs of the gateway apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るゲートウェイ装置の、処理装置が行う送信処理の手順を示すフロー図である。It is a flowchart which shows the procedure of the transmission process which the processing apparatus performs of the gateway apparatus which concerns on the 2nd Embodiment of this invention. 従来のゲートウェイ装置を用いて構成された車載ネットワークシステムにおける、診断通信の一例を示す図である。It is a figure which shows an example of diagnostic communication in the vehicle-mounted network system comprised using the conventional gateway apparatus.

以下、図面を参照して、本発明の実施の形態を説明する。
〔第1実施形態〕
図1は、車載ネットワークシステムに適用された本発明の第1の実施形態に係るゲートウェイ装置の例を示す図である。
本ゲートウェイ装置10は、例えば、車載ネットワークシステム1を構成するネットワーク100及び102に接続され、ネットワーク100とネットワーク102との間の通信接続を中継する。
Embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram illustrating an example of a gateway device according to a first embodiment of the present invention applied to an in-vehicle network system.
The gateway device 10 is connected to, for example, the networks 100 and 102 configuring the in-vehicle network system 1 and relays communication connection between the network 100 and the network 102.

より具体的には、ネットワーク100は、バス104と、当該バス104を介して互いに通信可能に接続された、例えばECU110、112、114、116とを有する。また、ネットワーク102は、バス106と、当該バス106を介して互いに通信可能に接続された、例えばECU120、122、124とを有する。なお、図1において、バス104及び106にそれぞれ接続されているECUの数は一例であり、車両制御の必要に応じてそれぞれ任意の数のECUを接続することができる。   More specifically, the network 100 includes a bus 104 and, for example, ECUs 110, 112, 114, and 116 that are communicably connected to each other via the bus 104. The network 102 includes a bus 106 and, for example, ECUs 120, 122, and 124 connected to be communicable with each other via the bus 106. In FIG. 1, the number of ECUs connected to the buses 104 and 106 is an example, and any number of ECUs can be connected as required for vehicle control.

ゲートウェイ装置10は、ネットワーク100のバス104とネットワーク102のバス106とに接続され、バス104及びバス106間の通信接続を中継する。また、ネットワーク102のバス106には、車両動作の診断を行う際に、バス106に設けられたコネクタ等(不図示)を介して診断装置130が車両外部から接続される。   The gateway device 10 is connected to the bus 104 of the network 100 and the bus 106 of the network 102 and relays the communication connection between the bus 104 and the bus 106. Further, when diagnosing vehicle operation, a diagnosis device 130 is connected to the bus 106 of the network 102 from the outside of the vehicle via a connector or the like (not shown) provided on the bus 106.

診断装置130は、バス106を介してECU120〜124と通信すると共に、バス106、ゲートウェイ装置10、及びバス104を介してECU110〜116と通信し、各ECU120〜124、110〜116から制御動作に関する診断データを収集すると共に、当該診断データの収集に必要な測定パラメータ等の診断情報を各ECU110〜116、120〜124へ送信する。   The diagnostic device 130 communicates with the ECUs 120 to 124 via the bus 106 and also communicates with the ECUs 110 to 116 via the bus 106, the gateway device 10, and the bus 104, and relates to control operations from the ECUs 120 to 124, 110 to 116. The diagnostic data is collected, and diagnostic information such as measurement parameters necessary for collecting the diagnostic data is transmitted to the ECUs 110 to 116 and 120 to 124.

ここで、診断装置130と各ECU110〜116、120〜124との間の通信は、診断通信の形式に従って行われるものとする。すなわち、診断装置130は、ECU110〜116、120〜124に対し、診断情報を複数のフレームに分割して送信することができるものとし、ECU110〜116、120〜124は、診断装置130に対し、当該複数のフレームの送信周期の下限値を指定することができるものとする。   Here, it is assumed that communication between the diagnostic device 130 and each of the ECUs 110 to 116 and 120 to 124 is performed according to a format of diagnostic communication. That is, the diagnostic device 130 can transmit diagnostic information divided into a plurality of frames to the ECUs 110 to 116 and 120 to 124, and the ECUs 110 to 116 and 120 to 124 can transmit the diagnostic information to the diagnostic device 130. It is assumed that the lower limit value of the transmission period of the plurality of frames can be designated.

より具体的には、診断装置130は、通信相手であるECU110〜116、120〜124の何れかのECUに対し、FFフレームを送信して、診断情報を複数のフレーム(CFフレーム)に分割して送信する旨を通知し、当該通信相手であるECUは、診断装置130に対し、FCフレームを送信してフレーム送信周期の下限値を指定し、診断装置130は、指定された当該下限値以上の時間間隔で、後続するCFフレームを送信する。   More specifically, the diagnostic device 130 transmits the FF frame to any one of the ECUs 110 to 116 and 120 to 124 as communication partners, and divides the diagnostic information into a plurality of frames (CF frames). The ECU that is the communication partner transmits an FC frame to the diagnostic device 130 and designates the lower limit value of the frame transmission cycle. The diagnostic device 130 is equal to or greater than the designated lower limit value. Subsequent CF frames are transmitted at time intervals of.

すなわち、FCフレームは、一の端末装置から他の端末装置に向けて送信される、データ送信間隔を指定する情報を含む第1の所定の信号であり、FFフレームは、他の端末装置から一の端末装置に向けてデータを連続送信する旨の通知を含む、第2の所定の信号である。また、第1の所定の信号であるFCフレームが指定するデータ送信間隔(すなわち、フレーム送信周期の下限値)は、第2の所定の信号であるFFフレームによって通知される連続送信に係るデータに対して適用される。   That is, the FC frame is a first predetermined signal including information specifying a data transmission interval transmitted from one terminal device to another terminal device, and the FF frame is transmitted from one terminal device to another terminal device. This is a second predetermined signal including a notification that data is continuously transmitted to the terminal device. The data transmission interval specified by the FC frame that is the first predetermined signal (that is, the lower limit value of the frame transmission cycle) is the data related to continuous transmission notified by the FF frame that is the second predetermined signal. It applies to.

図2は、ゲートウェイ装置10の構成を示すブロック図である。
本ゲートウェイ装置10は、CAN通信モジュール200a及び200bと、処理装置202と、記憶装置204と、を有する。
FIG. 2 is a block diagram illustrating a configuration of the gateway device 10.
The gateway device 10 includes CAN communication modules 200a and 200b, a processing device 202, and a storage device 204.

CAN通信モジュール200aは、受信機210aと、受信MB(メッセージボックス、Massage Box)212aと、送信機214aと、一つ以上の送信MB216aと、ステータスレジスタ218aと、を備える   The CAN communication module 200a includes a receiver 210a, a reception MB (Message Box) 212a, a transmitter 214a, one or more transmission MBs 216a, and a status register 218a.

受信機210aは、CAN通信規格に従ってバス104からフレームを受信し、当該受信したフレームを受信MB212aに格納する。受信MB212aは、受信機210aが受信したフレーム(受信フレーム)の一時記憶装置、例えばレジスタであり、受信MB212aに格納された受信フレームは、処理装置202により読み出される。   The receiver 210a receives a frame from the bus 104 in accordance with the CAN communication standard, and stores the received frame in the reception MB 212a. The reception MB 212a is a temporary storage device, for example, a register, for frames (reception frames) received by the receiver 210a, and the reception frame stored in the reception MB 212a is read by the processing device 202.

送信MB216aは、一時記憶装置、例えばレジスタであり、処理装置202からCAN通信モジュール200aに入力された送信すべきフレーム(送信フレーム)を格納する。送信機214aは、CAN通信規格に従って、一つ以上の送信MB216aに格納されている送信フレームを、優先度順に送信する。ここで、送信フレームの優先度は、当該送信フレームに含まれるID番号に従って決定され、通常は、ID番号の小さいフレームほど優先度が高いものと判断される。   The transmission MB 216a is a temporary storage device, for example, a register, and stores a frame to be transmitted (transmission frame) input from the processing device 202 to the CAN communication module 200a. The transmitter 214a transmits the transmission frames stored in one or more transmission MBs 216a in order of priority according to the CAN communication standard. Here, the priority of the transmission frame is determined according to the ID number included in the transmission frame, and it is usually determined that the lower the ID number, the higher the priority.

ステータスレジスタ218aは、CAN通信モジュール200aの動作状態を表わすデータ(ステータスデータ)が格納される一時記憶装置である。ステータスレジスタ218aは、上記動作状態として、例えば、受信MB212aにおける受信フレームの格納の有無、各送信MB216aにおける送信フレームの格納の有無を表わすステータスデータを格納する。   The status register 218a is a temporary storage device that stores data (status data) representing the operating state of the CAN communication module 200a. The status register 218a stores, for example, status data indicating whether or not a received frame is stored in the reception MB 212a and whether or not a transmission frame is stored in each transmission MB 216a as the operation state.

CAN通信モジュール200bは、CAN通信モジュール200aと同様の構成を有しており、バス104に代えてバス106に接続されることのみが異なる。すなわち、CAN通信モジュール200bの受信機210b、受信MB212b、送信機214b、送信MB216b、及びステータスレジスタ218bは、それぞれ、CAN通信モジュール200aの受信機210a、受信MB212a、送信機214a、送信MB216a、及びステータスレジスタ218aに対応する。従って、CAN通信モジュール200bを構成する上記各構成要素の説明については、記載の重複を避けて理解を容易にするため、上述したCAN通信モジュール200aの、上記対応する各構成要素についての説明を援用するものとする。   The CAN communication module 200b has the same configuration as the CAN communication module 200a, and is different only in that it is connected to the bus 106 instead of the bus 104. That is, the receiver 210b, the reception MB 212b, the transmitter 214b, the transmission MB 216b, and the status register 218b of the CAN communication module 200b are respectively the receiver 210a, the reception MB 212a, the transmitter 214a, the transmission MB 216a, and the status of the CAN communication module 200a. This corresponds to the register 218a. Therefore, for the explanation of each of the constituent elements constituting the CAN communication module 200b, the explanation of the corresponding constituent elements of the CAN communication module 200a described above is used in order to avoid the duplication of description and facilitate understanding. It shall be.

本実施形態では、CAN通信モジュール200a及び200bは、共に、汎用ロジックIC(Integrated Circuit)や大規模集積回路(LSI、Large scale Integration)、あるいはASIC(Application Specific Integrated Circuit)等のハードウェアにより構成されている。ただし、CAN通信モジュール200a及び200bにCPU(Central Processing Unit)等のプロセッサを備えるものとし、上述したCAN通信モジュール200a及び200bの機能の一部をソフトウェア機能(上記プロセッサがソフトウェアを実行することにより実現される機能)として実現することもできる。   In this embodiment, each of the CAN communication modules 200a and 200b is configured by hardware such as a general-purpose logic IC (Integrated Circuit), a large scale integrated circuit (LSI, Large Scale Integration), or an ASIC (Application Specific Integrated Circuit). ing. However, the CAN communication modules 200a and 200b are provided with a processor such as a CPU (Central Processing Unit), and some of the functions of the CAN communication modules 200a and 200b described above are implemented as software functions (the processor executes the software). Function).

記憶装置204は、例えばRAM(Random Access Memory)であり、CAN通信モジュール200aの受信機210aが受信したフレームを一時的に記憶しておくための送信バッファ220bと、CAN通信モジュール200bの受信機210bが受信したフレームを一時的に記憶しておくための送信バッファ220aと、を有している。   The storage device 204 is, for example, a RAM (Random Access Memory), a transmission buffer 220b for temporarily storing frames received by the receiver 210a of the CAN communication module 200a, and a receiver 210b of the CAN communication module 200b. Has a transmission buffer 220a for temporarily storing received frames.

より具体的には、送信バッファ220a及び220bは、それぞれ、記憶装置204内の所定のアドレスから始まる所定の大きさの記憶領域であり、当該記憶領域に上記受信した複数のフレームをそれぞれ記憶しておくことができる。なお、図2において、送信バッファ220a及び220bを示す矩形内にそれぞれ点線で示した仕切り線は、当該送信バッファ220a及び220bが、それぞれ複数のフレームを格納する領域を有していることを模式的に示したものであり、例えば仕切り線で区切られた各領域にそれぞれ一つのフレームが保存される。   More specifically, each of the transmission buffers 220a and 220b is a storage area having a predetermined size starting from a predetermined address in the storage device 204, and stores the plurality of received frames in the storage area. I can leave. In FIG. 2, the partition lines indicated by dotted lines in the rectangles indicating the transmission buffers 220a and 220b schematically indicate that the transmission buffers 220a and 220b each have an area for storing a plurality of frames. For example, one frame is stored in each area divided by a partition line.

また、図2においては、送信バッファ220a及び220bは、上記仕切り線により4つの領域に区切られて4つのフレームを保存するものとなっているが、これに限らず、記憶装置204の記憶容量に応じた範囲において、それぞれ5個以上のフレームを保存できるように構成することもできる。   In FIG. 2, the transmission buffers 220a and 220b are divided into four areas by the partition lines and store four frames. However, the present invention is not limited to this, and the storage capacity of the storage device 204 is not limited thereto. It is also possible to configure so that five or more frames can be stored in the corresponding range.

処理装置202は、CPU等のプロセッサとRAMやROM(Read Only Memory)等の記憶装置とを備えるコンピュータであり、周期指定検出ユニット230と、送信間隔調整ユニット232と、を備える。ここで上記各ユニットは、コンピュータである処理装置202がプログラムを実行することにより実現される仮想マシンであり、機能実現手段である。ただし、上記各ユニットは、ハードウェアにより構成することもできる。なお、コンピュータ・プログラムは、コンピュータ読み取り可能な任意の記憶媒体に記憶させておくことができる。   The processing device 202 is a computer including a processor such as a CPU and a storage device such as a RAM and a ROM (Read Only Memory), and includes a cycle designation detection unit 230 and a transmission interval adjustment unit 232. Here, each of the above units is a virtual machine that is realized when the processing device 202, which is a computer, executes a program, and is a function realizing unit. However, each of the above units can also be configured by hardware. The computer program can be stored in any computer-readable storage medium.

ここで、処理装置202の動作の理解を容易にするため、以下では、バス104に接続されたECU110とバス106に接続された診断装置130との間で、ゲートウェイ装置10を介した診断通信が行われるものとする。ただし、図2に示すゲートウェイ装置10は、診断装置130がバス104に接続された他の任意のECUとの間で診断通信を行う場合にも、同様に適用することができる。   Here, in order to facilitate understanding of the operation of the processing device 202, in the following, diagnostic communication via the gateway device 10 is performed between the ECU 110 connected to the bus 104 and the diagnostic device 130 connected to the bus 106. Shall be done. However, the gateway device 10 illustrated in FIG. 2 can be similarly applied when the diagnostic device 130 performs diagnostic communication with another arbitrary ECU connected to the bus 104.

周期指定検出ユニット230は、バス104から受信されたフレームをCAN通信モジュール200aの受信MB212aから読み出して、送信バッファ220bに時系列に保存する。本実施形態では、例えば、送信バッファ220bの記憶領域の先頭から受信時刻順に受信フレームが記憶されるものとする。したがって、周期指定検出ユニット230は、新たに受信したフレームを、送信バッファ220bに最後に記憶されたフレームの後ろの記憶領域に保存することにより、上記時系列順の保存を行うことができる。   The cycle designation detection unit 230 reads the frame received from the bus 104 from the reception MB 212a of the CAN communication module 200a and stores it in the transmission buffer 220b in time series. In the present embodiment, for example, it is assumed that received frames are stored in order of reception time from the beginning of the storage area of the transmission buffer 220b. Therefore, the cycle designation detecting unit 230 can perform the above-described time-series order storage by storing the newly received frame in the storage area after the frame stored last in the transmission buffer 220b.

また、周期指定検出ユニット230は、当該受信されたフレーム(受信フレーム)がFCフレームか否かを判断し、受信フレームがFCフレームであるときは、当該FCフレームに含まれるデータからフレーム送信周期の下限を指定する値(下限値)を取得し、当該取得した下限値を、処理装置202が備えるRAM等の記憶装置(不図示)に記憶する。   Further, the cycle designation detection unit 230 determines whether or not the received frame (reception frame) is an FC frame. When the reception frame is an FC frame, the cycle designation detection unit 230 determines the frame transmission cycle from the data included in the FC frame. A value specifying the lower limit (lower limit value) is acquired, and the acquired lower limit value is stored in a storage device (not shown) such as a RAM provided in the processing device 202.

なお、一般に、診断通信に用いられるFFフレーム、FCフレーム、及びCFフレームには、それぞれ、上述した優先度を示すIDコード(ID番号)とは別に、当該フレームの種類(FF、FC、又はCF)を識別するためのフレーム識別コードがデータとして含まれている。したがって、周期指定検出ユニット230は、受信フレームに含まれる上記フレーム識別コードを参照することにより、当該受信フレームがFCフレームであるか否かを判断することができる。同様に、以下の説明に記載されているFFフレーム、FCフレーム、又はCFフレームであるか否かについての判断は、特に断りのない限り、上記フレーム識別コードを参照することにより行われるものとする。   In general, each of the FF frame, FC frame, and CF frame used for diagnostic communication has a frame type (FF, FC, or CF) separately from the ID code (ID number) indicating the priority. ) Is included as data. Therefore, the cycle designation detection unit 230 can determine whether or not the received frame is an FC frame by referring to the frame identification code included in the received frame. Similarly, whether or not the frame is an FF frame, FC frame, or CF frame described in the following description is determined by referring to the frame identification code unless otherwise specified. .

送信間隔調整ユニット232は、CAN通信モジュール200bに空いている(すなわち、フレームが格納されていない)送信MB216bがあるときは、当該空いている送信MB216bへ、送信バッファ220bの先頭に保存されているフレームを転送する。このとき、送信間隔調整ユニット232は、当該先頭に保存されているフレームがCFフレームであるときは、周期指定検出ユニット230が記憶した上記フレーム送信周期の下限値を参照し、送信バッファ220bから送信MB216bへのCFフレームの転送間隔が上記下限値以上の時間間隔となるように、送信MB216bへフレーム転送処理を制御する。   When there is an empty transmission MB 216b (that is, no frame is stored) in the CAN communication module 200b, the transmission interval adjustment unit 232 is stored at the head of the transmission buffer 220b to the empty transmission MB 216b. Forward the frame. At this time, when the frame stored at the head is a CF frame, the transmission interval adjustment unit 232 refers to the lower limit value of the frame transmission cycle stored in the cycle designation detection unit 230 and transmits the frame from the transmission buffer 220b. The frame transfer process to the transmission MB 216b is controlled so that the transfer interval of the CF frame to the MB 216b is equal to or greater than the above lower limit value.

より具体的には、送信間隔調整ユニット232は、まず、先頭の送信バッファ220bに保存されているフレームがCFフレームか否かを判断する。そして、CFフレームであるときは、最初のCFフレームか否かを判断し、最初のCFフレームであるときは、当該最初のCFフレームを空いている送信MB216bへ転送すると共に、処理装置202が備えるタイマ(不図示)により、当該転送後の経過時間の計測を開始する。   More specifically, the transmission interval adjustment unit 232 first determines whether or not the frame stored in the leading transmission buffer 220b is a CF frame. If it is a CF frame, it is determined whether or not it is the first CF frame. If it is the first CF frame, the first CF frame is transferred to an empty transmission MB 216b and the processing device 202 is provided. A timer (not shown) starts measuring the elapsed time after the transfer.

一方、先頭の送信バッファ220bに保存されているフレームがCFフレームであるが最初のCFフレームでないとき、すなわち、後続のCFフレームであるときは、上記タイマにより計測された前回のCFフレーム転送からの経過時間が上記下限値以上であるか否かを判断する。   On the other hand, when the frame stored in the first transmission buffer 220b is a CF frame but not the first CF frame, that is, a subsequent CF frame, the frame from the previous CF frame transfer measured by the timer is used. It is determined whether the elapsed time is equal to or greater than the lower limit value.

そして、上記経過時間が上記下限値未満であるときは、送信バッファ220bの先頭に保存されているCFフレームに代えて、送信バッファ220bに記憶されているCFフレーム以外のフレームのうち受信時刻が最も古いフレームを、空いている送信MB216bへ転送する。一方、上記経過時間が上記下限値以上であるときは、送信バッファ220bの先頭に保存されているCFフレームを、空いている送信MB216bへ転送すると共に、上記タイマにより、当該転送後の経過時間の計測を新たに開始する。   When the elapsed time is less than the lower limit value, the reception time of the frames other than the CF frame stored in the transmission buffer 220b is the best instead of the CF frame stored at the head of the transmission buffer 220b. The old frame is transferred to an empty transmission MB 216b. On the other hand, when the elapsed time is equal to or greater than the lower limit value, the CF frame stored at the head of the transmission buffer 220b is transferred to an empty transmission MB 216b, and the elapsed time after the transfer is transferred by the timer. Start a new measurement.

また、一方、送信バッファ220bの先頭に保存されているフレームがCFフレームでないときは、送信間隔調整ユニット232は、当該先頭に保存されているフレームを、そのまま空いている送信MB216bへ転送する。   On the other hand, when the frame stored at the head of the transmission buffer 220b is not a CF frame, the transmission interval adjustment unit 232 transfers the frame stored at the head to the empty transmission MB 216b as it is.

そして、送信バッファ220b内のいずれかのフレームを送信MB216bへ転送した後は、送信バッファ220bに受信フレームが時系列順に格納されている状態となるように、送信バッファ220bの受信フレームをその到着時刻順にソートする。このソートは、例えば、当該転送により送信バッファ220b内に生じた空き領域以降の領域に保存されているフレームを当該送信バッファ220bの先頭方向へ移動させ、送信バッファ220b内にフレームが連続して保存されている状態となるようにすることで行うことができる。   After any frame in the transmission buffer 220b is transferred to the transmission MB 216b, the reception frame of the transmission buffer 220b is received at the arrival time so that the reception frames are stored in the transmission buffer 220b in chronological order. Sort in order. This sorting is performed by, for example, moving a frame stored in an area after the empty area generated in the transmission buffer 220b by the transfer to the head of the transmission buffer 220b, and continuously storing the frames in the transmission buffer 220b. It can be done by making it be in a state that is.

上記の構成を有するゲートウェイ装置10は、処理装置202の周期指定検出ユニット230により、ECU110から診断装置130へ送信されたFCフレームを検出し、当該FCフレームにより指定されたフレーム送信周期の下限値を取得して記憶する。そして、ゲートウェイ装置10は、送信間隔調整ユニット232により、診断装置130からECU110へ向けてCFフレームを転送する際に、上記記憶した下限値を参照し、送信バッファ220bから送信MB216bへのCFフレームの転送間隔が上記下限値以上となるように、送信MB216bへのフレーム転送処理を制御する。   The gateway device 10 having the above configuration detects the FC frame transmitted from the ECU 110 to the diagnostic device 130 by the cycle designation detection unit 230 of the processing device 202, and sets the lower limit value of the frame transmission cycle designated by the FC frame. Acquire and memorize. Then, when the gateway apparatus 10 transfers the CF frame from the diagnosis apparatus 130 to the ECU 110 by the transmission interval adjustment unit 232, the gateway apparatus 10 refers to the stored lower limit value, and transmits the CF frame from the transmission buffer 220b to the transmission MB 216b. The frame transfer process to the transmission MB 216b is controlled so that the transfer interval becomes equal to or greater than the lower limit value.

これにより、ゲートウェイ装置10は、ECU110と診断装置130との間で動的に決定されたデータ送信間隔の条件(すなわち、FCフレームにより与えられたフレーム送信周期の下限値の指定)を損なうことなく、診断装置130から送信されるCFフレームをECU110に中継することができる。   Thereby, the gateway apparatus 10 does not impair the condition of the data transmission interval dynamically determined between the ECU 110 and the diagnostic apparatus 130 (that is, designation of the lower limit value of the frame transmission period given by the FC frame). The CF frame transmitted from the diagnostic device 130 can be relayed to the ECU 110.

図3は、診断装置130とECU110との間の診断通信を中継する、ゲートウェイ装置10の動作の一例を示す図である。図3には、当該診断通信を構成する通信イベントが、図示上方から下方に向かって時系列に示されている。   FIG. 3 is a diagram illustrating an example of the operation of the gateway device 10 that relays the diagnostic communication between the diagnostic device 130 and the ECU 110. In FIG. 3, communication events constituting the diagnostic communication are shown in time series from the upper side to the lower side in the figure.

符号300及び302により示された図示縦方向の2つのラインは、ネットワーク102のバス106に接続された各装置の時間の経過を表しており、より具体的には、診断装置130における時間の経過及びゲートウェイ装置10のCAN通信モジュール200bにおける時間の経過をそれぞれ表している。また、符号304及び306により示された図示縦方向の2つのラインは、ネットワーク100のバス104に接続された各装置の時間の経過を表しており、より具体的には、ゲートウェイ装置10のCAN通信モジュール200aにおける時間の経過及びECU110における時間の経過をそれぞれ表わしている。   Two lines in the illustrated vertical direction indicated by reference numerals 300 and 302 represent the passage of time of each device connected to the bus 106 of the network 102, and more specifically, the passage of time in the diagnostic device 130. And the passage of time in the CAN communication module 200b of the gateway device 10 respectively. In addition, two lines in the illustrated vertical direction indicated by reference numerals 304 and 306 represent the passage of time of each device connected to the bus 104 of the network 100. More specifically, the CAN of the gateway device 10 is shown. The passage of time in the communication module 200a and the passage of time in the ECU 110 are respectively shown.

ライン300〜306のうち互いに隣接するライン間に描かれた図示横方向の実線矢印は、それぞれ通信イベントを表わしている。より詳細には、ライン300とライン302との間の実線矢印はバス106における通信イベントを表わし、ライン304とライン306との間の実線矢印はバス104における通信イベントを表わしている。また、ライン302とライン304との間の図示横方向の破線矢印は、ゲートウェイ装置10内部を通過する受信フレームの流れを、模式的に示している。   Of the lines 300 to 306, solid horizontal arrows depicted between adjacent lines represent communication events, respectively. More particularly, a solid arrow between line 300 and line 302 represents a communication event on bus 106, and a solid arrow between line 304 and line 306 represents a communication event on bus 104. In addition, a broken line arrow in the horizontal direction between the line 302 and the line 304 schematically shows the flow of the reception frame passing through the inside of the gateway device 10.

まず、診断装置130は、ECU110に向けてFFフレーム310をバス106へ送出し、当該FFフレーム310は、ゲートウェイ装置10を介してバス104へ送出され、ECU110に受信される。次に、FFフレーム310を受信したECU110は、送信周期の下限値T1を指定するFCフレーム312を、診断装置130に向けてバス104へ送出する。   First, the diagnostic device 130 sends an FF frame 310 to the bus 106 toward the ECU 110, and the FF frame 310 is sent to the bus 104 via the gateway device 10 and received by the ECU 110. Next, the ECU 110 that has received the FF frame 310 sends an FC frame 312 specifying the lower limit value T1 of the transmission cycle to the bus 104 toward the diagnostic device 130.

当該送出されたFCフレーム312は、ゲートウェイ装置10により受信され、ゲートウェイ装置10の周期指定検出ユニット230により検知される。当該周期指定検出ユニット230は、FCフレーム312からフレーム送信周期の下限値T1を取得し、当該取得した下限値T1を記憶した後、当該FCフレーム312をそのままバス106へ送出する。送出された当該FCフレーム312は、バス106を介して診断装置130に受信される。   The sent FC frame 312 is received by the gateway device 10 and detected by the cycle designation detection unit 230 of the gateway device 10. The cycle designation detection unit 230 acquires the lower limit value T1 of the frame transmission cycle from the FC frame 312, stores the acquired lower limit value T1, and then sends the FC frame 312 to the bus 106 as it is. The sent FC frame 312 is received by the diagnostic device 130 via the bus 106.

次に、FCフレーム312を受信した診断装置130は、例えば5つのCFフレーム320、322、324、326、及び328を、上記FCフレーム312により指定された送信周期の下限値T1以上の時間間隔でバス106へ送出する。当該送出されたCFフレーム320〜328は、ゲートウェイ装置10に受信され、周期指定検出ユニット230により送信バッファ220aに一旦格納された後、送信間隔調整ユニット232により送信MB216aへ転送され、送信機214aによりバス104への送信が試みられる。これにより、より優先度の高いフレームがバス104上に送信されなければ、上記受信されたフレームは、送信バッファ220a及び送信MB216a内に留まることなく、送信機214aからバス104へ送出される。   Next, the diagnostic apparatus 130 that has received the FC frame 312 receives, for example, five CF frames 320, 322, 324, 326, and 328 at time intervals that are equal to or greater than the lower limit value T1 of the transmission period specified by the FC frame 312. The data is sent to the bus 106. The sent CF frames 320 to 328 are received by the gateway device 10, temporarily stored in the transmission buffer 220 a by the cycle designation detection unit 230, transferred to the transmission MB 216 a by the transmission interval adjustment unit 232, and transmitted by the transmitter 214 a. A transmission to the bus 104 is attempted. Thus, if a frame with a higher priority is not transmitted on the bus 104, the received frame is transmitted from the transmitter 214a to the bus 104 without remaining in the transmission buffer 220a and the transmission MB 216a.

図3に示す例では、診断装置130からCFフレーム320がバス106上に送出される時刻より少し前の時刻t1から、CFフレーム238がバス106へ送出される時刻より少し後の時刻t2までの期間340において、バス104上にCFフレーム320〜328よりも優先度の高いフレームが他のECUから送出されたとする。この場合、ゲートウェイ装置10が備える送信機214aは、CAN通信規格に従い、バス104上に送出された上記優先度の高いフレームよりも優先度の低いCFフレーム320〜328の送出を中止し、上記優先度の高いフレームの送信完了を待機する。その結果、バス106から受信されたCFフレーム320〜328は、送信バッファ220a内に全て保存され蓄積される。   In the example shown in FIG. 3, from a time t 1 slightly before the time when the CF frame 320 is sent out from the diagnostic device 130 to the bus 106 to a time t 2 slightly after the time when the CF frame 238 is sent out to the bus 106. It is assumed that a frame having a higher priority than the CF frames 320 to 328 is sent from another ECU on the bus 104 in the period 340. In this case, the transmitter 214a included in the gateway device 10 stops sending the CF frames 320 to 328 having a lower priority than the higher priority frames sent on the bus 104 according to the CAN communication standard, and Wait for completion of high-frequency frame transmission. As a result, all the CF frames 320 to 328 received from the bus 106 are stored and accumulated in the transmission buffer 220a.

時刻t2を過ぎ、バス104上に優先度の高いフレームが送出されなくなると、ゲートウェイ装置10の送信機214aは、CAN通信規格に従い、送信MB216a内のフレームを優先度順にバス104へ送出するので、送信MB216aには順次空きが生ずることとなる。送信間隔調整ユニット232は、送信MB216aに空きが生じたことを検知すると、周期指定検出ユニット230が記憶した上記下限値以上の時間間隔で、送信バッファ220a内のCFフレーム320〜328を送信MB216aへ転送する。   When time t2 passes and a frame with a high priority is no longer transmitted on the bus 104, the transmitter 214a of the gateway device 10 transmits the frames in the transmission MB 216a to the bus 104 in order of priority according to the CAN communication standard. The transmission MB 216a is sequentially vacant. When the transmission interval adjustment unit 232 detects that the transmission MB 216a is free, the CF frames 320 to 328 in the transmission buffer 220a are transmitted to the transmission MB 216a at a time interval equal to or greater than the lower limit value stored by the cycle designation detection unit 230. Forward.

これにより、ゲートウェイ装置10の送信機214aは、診断装置130からのCFフレーム320〜328を、上記下限値以上の時間間隔でECU110へ送信することとなる。   As a result, the transmitter 214a of the gateway device 10 transmits the CF frames 320 to 328 from the diagnostic device 130 to the ECU 110 at time intervals equal to or greater than the lower limit value.

次に、ゲートウェイ装置10の処理装置202の動作手順について説明する。
処理装置202は、バス104及びバス106から受信されたフレームを、それぞれ、受信MB212a及び212bから取得して送信バッファ220b及び220aに格納する受信処理と、送信バッファ220a及び220bに格納されたフレームを、それぞれ送信MB216a及び216bへ転送する送信処理と、を行う。以下、受信処理及び送信処理の手順を、順に説明する。
Next, an operation procedure of the processing device 202 of the gateway device 10 will be described.
The processing device 202 obtains the frames received from the bus 104 and the bus 106 from the reception MBs 212a and 212b and stores them in the transmission buffers 220b and 220a, and the frames stored in the transmission buffers 220a and 220b, respectively. And transmission processing for transferring to the transmission MBs 216a and 216b, respectively. Hereinafter, procedures of the reception process and the transmission process will be described in order.

〔受信処理〕
まず、処理装置202が行う受信処理の手順について、図4に示すフロー図に従って説明する。以下の説明では、一例としてバス104から受信されたフレームを受信MB212aから取得して送信バッファ220bに格納する場合の受信処理について説明する。
[Reception processing]
First, the procedure of reception processing performed by the processing device 202 will be described with reference to the flowchart shown in FIG. In the following description, a reception process when a frame received from the bus 104 is acquired from the reception MB 212a and stored in the transmission buffer 220b will be described as an example.

なお、バス106から受信されたフレームを受信MB212bから取得して送信バッファ220aに格納する場合の受信処理は、以下に示すバス104から受信されたフレームを受信MB212aから取得して送信バッファ220bに格納する場合の受信処理と同様である。   In addition, the reception process in the case of acquiring the frame received from the bus 106 from the reception MB 212b and storing it in the transmission buffer 220a is as follows. The frame received from the bus 104 shown below is acquired from the reception MB 212a and stored in the transmission buffer 220b. It is the same as the reception process when

すなわち、以下に示す受信処理は、「バス104」との記載を「バス106」に置き換えると共に、CAN通信モジュール200aの各要素についての記載をCAN通信モジュール200bの各要素に置き換え、「送信バッファ220b」との記載を「送信バッファ220a」に置き換えることにより、バス106から受信されたフレームを受信MB212bから取得して送信バッファ220aに格納する場合の受信処理となる。   That is, in the following reception processing, the description of “bus 104” is replaced with “bus 106”, and the description of each element of the CAN communication module 200a is replaced with each element of the CAN communication module 200b. ”Is replaced with“ transmission buffer 220a ”, which is a reception process when a frame received from the bus 106 is acquired from the reception MB 212b and stored in the transmission buffer 220a.

本処理は、ゲートウェイ装置10の電源が投入されたときに開始する。
処理を開始すると、まず、処理装置202は、CAN通信モジュール200aを介してバス104よりフレームを受信したか否かを判断する(S100)。この判断は、例えば、処理装置202がCAN通信モジュール200aのステータスレジスタ218aを参照し、受信MB212aにフレームが格納されているか否かを判断することにより行うことができる。
This process starts when the gateway device 10 is powered on.
When the processing is started, first, the processing device 202 determines whether or not a frame is received from the bus 104 via the CAN communication module 200a (S100). This determination can be made, for example, when the processing device 202 refers to the status register 218a of the CAN communication module 200a and determines whether or not a frame is stored in the reception MB 212a.

そして、バス104からフレームを受信していないときは(S100、No)、ステップS100に戻ってフレームが受信されるのを待機し、一方、フレームを受信したときは(S100、Yes)、周期指定検出ユニット230は、受信MB212aから受信フレームを読み出し、当該受信フレームがFCフレームか否かを判断する(S102)。この判断は、上述したように、受信フレームに含まれるフレーム識別コードを参照することにより行うことができる。   If no frame is received from the bus 104 (S100, No), the process returns to step S100 to wait for a frame to be received. On the other hand, if a frame is received (S100, Yes), the cycle is designated. The detection unit 230 reads the received frame from the reception MB 212a, and determines whether the received frame is an FC frame (S102). This determination can be made by referring to the frame identification code included in the received frame as described above.

ステップS102において受信フレームがFCフレームであったときは(S102、Yes)、周期指定検出ユニット230は、当該FCフレームに含まれるデータからフレーム送信周期の下限値の指定を取得し、当該取得した下限値を、処理装置202が備える記憶装置(不図示)に記憶する(S104)。その後、周期指定検出ユニット230は、上記受信フレームを、記憶装置204の送信バッファ220bに時系列に保存する(S106)。この時系列の保存は、上述したように、例えば送信バッファ220b内に最後に保存されたフレームの後ろの記憶領域に、上記受信フレームを保存することにより行うことができる。   When the received frame is an FC frame in step S102 (S102, Yes), the cycle designation detection unit 230 obtains designation of the lower limit value of the frame transmission cycle from the data included in the FC frame, and obtains the obtained lower limit. The value is stored in a storage device (not shown) included in the processing device 202 (S104). Thereafter, the cycle designation detection unit 230 saves the received frame in the transmission buffer 220b of the storage device 204 in time series (S106). As described above, this time-series storage can be performed by storing the received frame in a storage area after the last frame stored in the transmission buffer 220b, for example.

ステップS106において受信フレームを送信バッファ220bに保存した後は、ステップS100に戻って処理を繰り返す。なお、本処理は、ゲートウェイ装置10の電源が断になったときに終了する。   After storing the received frame in the transmission buffer 220b in step S106, the process returns to step S100 and the process is repeated. This process ends when the gateway device 10 is powered off.

一方、ステップS102において受信フレームがFCフレームでないときは(S102、No)、周期指定検出ユニット230は、ステップS106に処理を移し、受信フレームを送信バッファ220bに保存する。   On the other hand, when the received frame is not an FC frame in step S102 (S102, No), the cycle designation detection unit 230 moves the process to step S106 and stores the received frame in the transmission buffer 220b.

〔送信処理〕
次に、処理装置202が行う送信処理の手順について、図5に示すフロー図に従って説明する。以下の説明では、一例として送信バッファ220aに格納されたフレームを送信MB216aへ転送する送信処理について説明する。
[Transmission process]
Next, the procedure of transmission processing performed by the processing device 202 will be described with reference to the flowchart shown in FIG. In the following description, a transmission process for transferring a frame stored in the transmission buffer 220a to the transmission MB 216a will be described as an example.

なお、送信バッファ220bに格納されたフレームを送信MB216bへ転送する場合の送信処理は、以下に示す送信バッファ220aに格納されたフレームを送信MB216aへ転送する送信処理と同様である。   Note that the transmission process when the frame stored in the transmission buffer 220b is transferred to the transmission MB 216b is the same as the transmission process for transferring the frame stored in the transmission buffer 220a shown below to the transmission MB 216a.

すなわち、以下に示す送信処理は、「バス104」との記載を「バス106」に置き換えると共に、CAN通信モジュール200aの各要素についての記載をCAN通信モジュール200bの各要素に置き換え、「送信バッファ220a」との記載を「送信バッファ220b」に置き換えることにより、送信バッファ220bに格納されたフレームを送信MB216bへ転送する送信処理となる。   That is, in the transmission process shown below, the description of “bus 104” is replaced with “bus 106”, and the description of each element of the CAN communication module 200a is replaced with each element of the CAN communication module 200b. ”Is replaced with“ transmission buffer 220b ”, and the frame stored in the transmission buffer 220b is transmitted to the transmission MB 216b.

本処理は、ゲートウェイ装置10の電源が投入されたときに開始する。
処理を開始すると、まず、処理装置202の送信間隔調整ユニット232は、CAN通信モジュール200aの送信MB216aに空きがあるか否か、すなわち、フレームを格納していない送信MB216aがあるか否かを判断し(S200)、空きがないときは(S200、No)、ステップS200を繰り返して、送信MB216aに空きが発生するのを待機する。
This process starts when the gateway device 10 is powered on.
When the processing is started, first, the transmission interval adjustment unit 232 of the processing device 202 determines whether or not there is a vacancy in the transmission MB 216a of the CAN communication module 200a, that is, whether there is a transmission MB 216a that does not store a frame. However, if there is no space (S200, No), step S200 is repeated to wait for the space to be generated in the transmission MB 216a.

ここで、送信MB216aに空きが発生するのは、送信MB216aに格納されているフレームが送信機214aからバス104へ送出された場合であり、したがって、送信MB216aに空きが発生するのを待機することは、いずれかの送信MB216aに格納されているフレームがバス104へ送出されるのを待機することと等価である。なお、送信MB216aに空きがあるか否かは、例えば、送信間隔調整ユニット232がステータスレジスタ218が記憶するステータスデータを参照することにより、当該ステータスデータから判断することができる。   Here, the transmission MB 216a is vacant when the frame stored in the transmission MB 216a is sent from the transmitter 214a to the bus 104, and therefore waiting for the transmission MB 216a to occur. Is equivalent to waiting for a frame stored in any transmission MB 216 a to be sent to the bus 104. Whether or not the transmission MB 216a is available can be determined from the status data by the transmission interval adjustment unit 232 referring to the status data stored in the status register 218, for example.

一方、ステップS200において送信MB216aに空きがあるときは(S200、Yes)、送信間隔調整ユニット232は、記憶装置204が備える送信バッファ220aの先頭の格納領域に保存されているフレームが、CFフレームであるか否かを判断し(S202)、CFフレームでないときは(S202、No)、送信バッファ220aの先頭に保存されているフレームを、空いている送信MB216aへ転送した後(S204)、ステップS200に戻って処理を繰り返す。   On the other hand, when the transmission MB 216a is free in step S200 (S200, Yes), the transmission interval adjustment unit 232 indicates that the frame stored in the top storage area of the transmission buffer 220a included in the storage device 204 is a CF frame. If it is not a CF frame (S202, No), the frame stored at the head of the transmission buffer 220a is transferred to an empty transmission MB 216a (S204), and then step S200. Return to and repeat the process.

一方、ステップS202において送信バッファ220aの先頭に保存されているフレームがCFフレームであるときは(S202、Yes)、当該CFフレームが最初のCFフレームであるか否かを判断する(S206)。そして、送信バッファ220aの先頭に保存されているCFフレームが最初のCFフレームであるときは(S206、Yes)、送信バッファ220aの先頭に保存されている当該最初のCFフレームを、空いている送信MB216aへ転送し(S208)、処理装置202が備えるタイマ(不図示)による時間計測を開始した後(S210)、ステップS200に戻って処理を繰り返す。これにより、最初のCFフレームを送信MB216aへ転送した後の経過時間の計測が開始される。   On the other hand, when the frame stored at the head of the transmission buffer 220a in step S202 is a CF frame (S202, Yes), it is determined whether or not the CF frame is the first CF frame (S206). When the CF frame stored at the top of the transmission buffer 220a is the first CF frame (S206, Yes), the first CF frame stored at the top of the transmission buffer 220a is used as an empty transmission. The data is transferred to the MB 216a (S208), and time measurement by a timer (not shown) provided in the processing device 202 is started (S210). Then, the process returns to step S200 to repeat the process. Thereby, the measurement of the elapsed time after the first CF frame is transferred to the transmission MB 216a is started.

一方、ステップS206において送信バッファ220aの先頭に保存されているCFフレームが最初のCFフレームでないときは(S206、No)、上記タイマにより計測されている経過時間が、上述の受信処理において周期指定検出ユニット230が記憶したフレーム送信周期の下限値(図4のステップS104)を超えているか否かを判断する(S212)。   On the other hand, when the CF frame stored at the head of the transmission buffer 220a is not the first CF frame in step S206 (No in S206), the elapsed time measured by the timer is detected as the cycle designation in the reception process described above. It is determined whether or not the lower limit value of the frame transmission cycle stored in the unit 230 (step S104 in FIG. 4) is exceeded (S212).

そして、超えているときは(S212、Yes)、上記タイマによる経過時間の計測を終了してから(S214)、送信バッファ220aの先頭に保存されているCFフレームを、空いている送信MB216aへ転送する(S216)。また、当該CFフレームが最後のCFフレームであるか否かを判断し(S218)、最後のCFフレームであるときは(S218、Yes)、受信処理において周期指定検出ユニット230が記憶したフレーム送信周期の下限値(図4のステップS104)を消去した後(S222)、ステップS200に戻って処理を繰り返す。   If it exceeds (S212, Yes), the measurement of the elapsed time by the timer is finished (S214), and then the CF frame stored at the head of the transmission buffer 220a is transferred to an empty transmission MB 216a. (S216). Further, it is determined whether or not the CF frame is the last CF frame (S218). If the CF frame is the last CF frame (S218, Yes), the frame transmission cycle stored by the cycle designation detection unit 230 in the reception process is determined. (S222), the process returns to step S200 and the process is repeated.

なお、図4及び図5に示すフロー図には明示的に記載されていないが、最初のCFフレームか否か、及び最後のCFフレームか否かの判断は、例えば、診断装置130からFFフレームを受信した際に当該FFフレームに含まれるデータ長(後続する診断情報全体の長さ)を記憶しておき、CFフレームを送信バッファ220aから送信MB216aに転送する毎に、転送したCFフレームのテータ長を積算するものとして、当該積算した値が0であれば最初のCFフレームであるものと判断し、当該積算値が上記データ長と一致すれば最後のCFフレームであるものと判断するものとすることができる。なお、当該積算値は、FFフレームを受信したときにリセットするものとする。   Although not explicitly described in the flowcharts shown in FIGS. 4 and 5, whether or not it is the first CF frame and whether or not it is the last CF frame is determined from, for example, the FF frame from the diagnostic device 130. The data length included in the FF frame (the length of the entire subsequent diagnostic information) is stored when the CF frame is received, and each time the CF frame is transferred from the transmission buffer 220a to the transmission MB 216a, the data of the transferred CF frame is stored. If the integrated value is 0, it is determined that the first CF frame is integrated, and if the integrated value matches the data length, it is determined that the length is integrated. can do. The integrated value is reset when an FF frame is received.

一方、ステップS216において送信MB216aへ転送したCFフレームが最後のCFフレームでないときは(S218、No)、上記タイマにより新たに経過時間の計測を開始した後(S220)、ステップS200に戻って処理を繰り返す。これにより、ステップS216において送信MB216aにCFフレームを転送した後の経過時間の計測が新たに開始される。   On the other hand, when the CF frame transferred to the transmission MB 216a in step S216 is not the last CF frame (No in S218), the elapsed time is newly started by the timer (S220), and then the process returns to step S200 to perform the process. repeat. Thereby, the measurement of the elapsed time after transferring the CF frame to the transmission MB 216a in step S216 is newly started.

また一方、ステップS212において、上記タイマが計測した経過時間が、上記下限値を超えていないときは(S212、No)、送信バッファ220a内の、CFフレーム以外のフレームのうち受信時刻が最も古いフレームを、空いている送信MB216aへ転送した後(S224)、ステップS200に戻って処理を繰り返す。なお、上記「送信バッファ220a内の、CFフレーム以外のフレームのうち受信時刻が最も古いフレーム」は、“送信バッファ220aに保存されているCFフレーム以外のフレームのうち、送信バッファ220aの先頭に最も近い記憶領域に保存されているフレーム”として特定することができる。   On the other hand, when the elapsed time measured by the timer does not exceed the lower limit value in step S212 (No in S212), the frame having the oldest reception time among frames other than the CF frame in the transmission buffer 220a. Is transferred to the empty transmission MB 216a (S224), the process returns to step S200 to repeat the process. Note that “the frame other than the CF frame in the transmission buffer 220a having the oldest reception time” is “the frame other than the CF frame stored in the transmission buffer 220a that is the first in the transmission buffer 220a”. It can be specified as “a frame stored in a near storage area”.

上記送信処理により、送信間隔調整ユニット232は、受信処理において周期指定検出ユニット230が記憶したフレーム送信周期の下限値を用い、連続するCFフレームを当該下限値以上の時間間隔で送信MB216aに格納することとなる。その結果、当該連続するCFフレームは、当該下限値以上の時間間隔で送信機214aからバス104へ送出されることとなる。   Through the above transmission process, the transmission interval adjustment unit 232 uses the lower limit value of the frame transmission cycle stored by the cycle designation detection unit 230 in the reception process, and stores consecutive CF frames in the transmission MB 216a at time intervals equal to or greater than the lower limit value. It will be. As a result, the continuous CF frames are sent from the transmitter 214a to the bus 104 at time intervals equal to or greater than the lower limit value.

なお、送信間隔調整ユニット232は、ステップS204、S208、S216、及びS222において、送信バッファ220aから送信MB216aへフレームを転送したときは、その都度、送信バッファ220a内においてフレームが受信時刻の古い順に連続して保存されている状態となるように、送信バッファ220a内に保存されているフレームをソートするものとする。   Note that the transmission interval adjustment unit 232, in steps S204, S208, S216, and S222, every time frames are transferred from the transmission buffer 220a to the transmission MB 216a, the frames are successively stored in the transmission buffer 220a in order of oldest reception time. It is assumed that the frames stored in the transmission buffer 220a are sorted so that the stored state is obtained.

なお、本実施形態では、診断装置130と1つのECU110との間で診断通信が行われるものとしたが、これに限らず、診断装置130は、複数のECUに対して同じ診断情報を同時に送信するものとすることもできる。すなわち、診断装置130は、例えば、当該複数のECUに対してFFフレームを送信すると共に、当該FFフレームを受信したことに応じて当該複数のECUから送信される各FCフレームを受信し、当該各FCフレームで指定されたフレーム送信周期の下限値のうち最も長い周期を指定する下限値を用いて、後続のCFフレームを送信するものとすることができる。   In the present embodiment, diagnostic communication is performed between the diagnostic apparatus 130 and one ECU 110. However, the present invention is not limited to this, and the diagnostic apparatus 130 transmits the same diagnostic information to a plurality of ECUs simultaneously. It can also be done. That is, for example, the diagnostic device 130 transmits FF frames to the plurality of ECUs, receives each FC frame transmitted from the plurality of ECUs in response to reception of the FF frames, and Subsequent CF frames can be transmitted using a lower limit value that specifies the longest period among the lower limit values of the frame transmission periods specified in the FC frame.

この場合、ゲートウェイ装置10の周期指定検出ユニット230は、上記複数のECUから送信される各FCフレームを受信して、当該各FCフレームで指定されたフレーム送信周期の下限値のうち最も長い周期を指定する下限値を記憶するものとし、送信間隔調整ユニット232は、当該記憶された下限値を用いて、送信バッファ220aから送信MB214aへのCFフレームの転送間隔を制御するものとすることができる。   In this case, the cycle designation detection unit 230 of the gateway apparatus 10 receives each FC frame transmitted from the plurality of ECUs, and sets the longest cycle among the lower limit values of the frame transmission cycles designated by the FC frames. The lower limit value to be designated is stored, and the transmission interval adjustment unit 232 can control the transfer interval of the CF frame from the transmission buffer 220a to the transmission MB 214a using the stored lower limit value.

また、本実施形態では、一度に診断装置130と一のECU(例えばECU110)との間での診断通信のみが中継されるものとしたが、場合によっては、診断装置130と一のECU(例えばECU110)との間で一の診断通信が開始された後、当該一の診断通信の中継動作が完了しないうちに、診断装置130と他の一のECU(例えばECU112)との間での他の診断通信が開始される場合があり得る。この場合、ゲートウェイ装置10内に、一の診断通信に係るCFフレームと、他の診断通信に係るCFフレームとが蓄積されることとなるので、いずれのCFフレームにいずれの送信周期下限値を適用するかを管理する必要がある。   In the present embodiment, only the diagnostic communication between the diagnostic device 130 and one ECU (for example, ECU 110) is relayed at a time. After the start of one diagnostic communication with the ECU 110), before the relay operation of the one diagnostic communication is completed, the other communication between the diagnostic device 130 and another ECU (for example, the ECU 112) is performed. Diagnostic communication may be initiated. In this case, since the CF frame related to one diagnostic communication and the CF frame related to another diagnostic communication are accumulated in the gateway device 10, any transmission cycle lower limit value is applied to any CF frame. You need to manage what to do.

したがって、このような場合には、ゲートウェイ装置10の周期指定検出ユニット230は、FCフレームに含まれるフレーム送信周期下限値を、当該FCフレームの送信先情報及び送信元情報と対応付けて記憶するものとし、送信間隔調整ユニット232は、CFフレームを送信バッファ220aから送信MB216aに転送する際に、上記記憶された送信周期下限値のうち、当該CFフレームの送信元及び送信先に対応付けられている下限値を用いて、当該転送動作を制御するものとすればよい。   Therefore, in such a case, the cycle designation detection unit 230 of the gateway device 10 stores the frame transmission cycle lower limit value included in the FC frame in association with the transmission destination information and the transmission source information of the FC frame. When the transmission interval adjustment unit 232 transfers the CF frame from the transmission buffer 220a to the transmission MB 216a, the transmission interval adjustment unit 232 is associated with the transmission source and the transmission destination of the CF frame among the stored transmission cycle lower limit values. The transfer operation may be controlled using the lower limit value.

〔第2実施形態〕
次に、本発明の第2の実施形態に係るゲートウェイ装置について説明する。
本ゲートウェイ装置は、診断装置からECUへ向けて送信されたFFフレームを受信すると、当該FFフレームを受信してから当該FFフレームを転送先のバスへ送出するまでの経過時間を計測する。そして、本ゲートウェイ装置は、当該計測した経過時間が所定時間を超えていた場合において、上記FFフレームに応答して上記ECUが診断装置へ送信したFCフレームに含まれるフレーム送信周期の下限値が所定の閾値以下であるときは、当該FCフレームの上記下限値を所定値に書き換えてから当該FCフレームを診断装置へ転送する。
[Second Embodiment]
Next, a gateway device according to a second embodiment of the present invention will be described.
When the gateway apparatus receives the FF frame transmitted from the diagnostic apparatus to the ECU, the gateway apparatus measures an elapsed time from when the FF frame is received until the FF frame is transmitted to the transfer destination bus. Then, when the measured elapsed time exceeds a predetermined time, the gateway device has a predetermined lower limit value of the frame transmission cycle included in the FC frame transmitted from the ECU to the diagnostic device in response to the FF frame. When the value is equal to or less than the threshold value, the FC frame is transferred to the diagnosis apparatus after the lower limit value of the FC frame is rewritten to a predetermined value.

一般に、ゲートウェイ装置がFFフレームを受信してから当該FFフレームを転送先バスへ送出するまでの時間、すなわち、ゲートウェイ装置内におけるFFフレームの滞留時間は、転送先バスにおける高優先度フレーム(より具体的には、診断情報に係るフレームよりも高い優先度のフレーム)の存在により当該FFフレームを転送先バスへ送出できなかった時間が含まれている。そして、上記FFフレームの滞留時間は、転送先バスにおける状態、より具体的には、転送先バスにおける上記高優先度フレームの存在頻度(送出頻度)に依存し、当該存在頻度が高いほど長くなる。また、このようなFFフレーム転送時における転送先バスの状態は、その後に続くCFフレームの転送時においても継続していると考えることができる。   In general, the time from when the gateway device receives the FF frame to when the FF frame is sent to the transfer destination bus, that is, the residence time of the FF frame in the gateway device is a high priority frame (more specifically, Specifically, the time when the FF frame could not be sent to the transfer destination bus due to the presence of a frame having a higher priority than the frame related to the diagnostic information is included. The residence time of the FF frame depends on the state in the transfer destination bus, more specifically, the presence frequency (sending frequency) of the high priority frame in the transfer destination bus, and becomes longer as the presence frequency is higher. . Further, it can be considered that the state of the transfer destination bus at the time of such FF frame transfer continues even when the subsequent CF frame is transferred.

したがって、ゲートウェイ装置内でのFFフレームの滞留時間は、その後に続くCFフレームの、当該ゲートウェイ装置内における滞留時間を予測的に表わすものと捉えることができる。   Therefore, the residence time of the FF frame in the gateway device can be regarded as a predictive representation of the residence time of the subsequent CF frame in the gateway device.

この場合、FFフレームを受信したECUが、当該FFフレームを受信したことに応じてFCフレームを診断装置へ送信し、上記FFフレームの滞留時間よりも短いフレーム送信周期の下限値を指定した場合、その後に続くCFフレームは、ゲートウェイ装置内での滞留時間よりも短い時間間隔で診断装置から送信されることとなり、当該送信されたCFフレームはゲートウェイ装置内で多量に蓄積されてしまうことが予測される。   In this case, when the ECU that has received the FF frame transmits an FC frame to the diagnostic device in response to the reception of the FF frame, and specifies a lower limit value of the frame transmission cycle that is shorter than the residence time of the FF frame, Subsequent CF frames are transmitted from the diagnostic device at a time interval shorter than the residence time in the gateway device, and it is predicted that a large amount of the transmitted CF frames will be accumulated in the gateway device. The

本実施形態に係るゲートウェイ装置によれば、FFフレームの滞留時間が所定時間より長く、かつFCフレームに含まれるフレーム送信周期の下限値が所定の閾値以下であるときは、当該下限値を所定値(より具体的には、当該閾値よりも長い値)に書き換えて、当該書き換え後のFCフレームを診断装置へ転送することができる。このため、本ゲートウェイ装置では、その後のCFフレーム転送時における当該ゲートウェイ装置内でのCFフレームの多量な蓄積を回避して、当該蓄積に要する記憶装置の容量を低減し、当該記憶装置の利用効率を高めることができる。   According to the gateway device according to the present embodiment, when the residence time of the FF frame is longer than the predetermined time and the lower limit value of the frame transmission cycle included in the FC frame is equal to or less than the predetermined threshold value, the lower limit value is set to the predetermined value. It can be rewritten to (more specifically, a value longer than the threshold value), and the rewritten FC frame can be transferred to the diagnostic apparatus. For this reason, this gateway device avoids the accumulation of a large amount of CF frames in the gateway device at the time of subsequent CF frame transfer, reduces the capacity of the storage device required for the accumulation, and uses the storage device efficiently. Can be increased.

図6は、本発明の第2の実施形態に係るゲートウェイ装置の構成を示す図である。
本ゲートウェイ装置60は、第1の実施形態に係るゲートウェイ装置10と同様の構成を有するが、処理装置202に代えて、処理装置602を有する点が異なる。なお、図6において、図2に示す第1の実施形態に係るゲートウェイ装置10と同じ構成要素については、図2に示す符号と同じ符号を用いて示し、上述した図2についての説明を援用する。
FIG. 6 is a diagram showing the configuration of the gateway device according to the second embodiment of the present invention.
The gateway device 60 has the same configuration as that of the gateway device 10 according to the first embodiment, except that a processing device 602 is provided instead of the processing device 202. 6, the same components as those of the gateway device 10 according to the first embodiment illustrated in FIG. 2 are denoted by the same reference numerals as those illustrated in FIG. 2, and the above-described description of FIG. 2 is cited. .

処理装置602は、第1の実施形態に係る処理装置202と同様の構成を有するが、周期指定検出ユニット230に代えて周期指定検出ユニット630を備えると共に、新たに滞留時間計測ユニット634を備える点が異なる。ここで、周期指定検出ユニット630及び滞留時間計測ユニット634は、コンピュータである処理装置602がプログラムを実行することにより実現される仮想マシンであり、機能実現手段である。ただし、周期指定検出ユニット630及び滞留時間計測ユニット634は、ハードウェアにより構成することもできる。   The processing device 602 has the same configuration as the processing device 202 according to the first embodiment, but includes a cycle designation detection unit 630 instead of the cycle designation detection unit 230 and a new residence time measurement unit 634. Is different. Here, the cycle designation detection unit 630 and the residence time measurement unit 634 are virtual machines realized by the processing device 602 being a computer executing a program, and are function realizing means. However, the cycle designation detection unit 630 and the residence time measurement unit 634 can also be configured by hardware.

処理装置602についての理解を容易にするため、以下の説明においては、本ゲートウェイ装置60が、図1に示す車載ネットワークシステム1においてゲートウェイ装置10に代えて用いられており、かつ、バス104に接続されたECU110と診断装置130との間で、ゲートウェイ装置60を介した診断通信が行われるものとする。   In order to facilitate understanding of the processing device 602, in the following description, the gateway device 60 is used in place of the gateway device 10 in the in-vehicle network system 1 shown in FIG. It is assumed that diagnostic communication is performed between the ECU 110 and the diagnostic device 130 via the gateway device 60.

滞留時間計測ユニット634は、CAN通信モジュール200bによりFFフレームが受信されたときに、ゲートウェイ装置60内での当該FFフレームの滞留時間を計測する。すなわち、滞留時間計測ユニット634は、CAN通信モジュール200bによりFFフレームが受信されてから、CAN通信モジュール200aにより当該FFフレームが送信されるまでの滞留時間を計測して、当該計測した滞留時間を処理装置602が備えるRAM等の記憶装置(不図示)に記憶する。   The residence time measurement unit 634 measures the residence time of the FF frame in the gateway device 60 when the FF frame is received by the CAN communication module 200b. That is, the residence time measuring unit 634 measures the residence time from when the FF frame is received by the CAN communication module 200b until the FF frame is transmitted by the CAN communication module 200a, and processes the measured residence time. It memorize | stores in memory | storage devices (not shown), such as RAM with which the apparatus 602 is provided.

周期指定検出ユニット630は、第1の実施形態に係る周期指定検出ユニット230と同様の機能を有するが、CAN通信モジュール200aからFCフレームを受信したときに、所定の条件が成立していれば、当該受信したFCフレームに含まれるフレーム送信周期の下限値を所定値に書き換え、当該書き換え後のFCフレームを送信バッファ220bに保存する点が異なる。   The cycle designation detection unit 630 has the same function as the cycle designation detection unit 230 according to the first embodiment, but when a predetermined condition is satisfied when an FC frame is received from the CAN communication module 200a, The difference is that the lower limit value of the frame transmission cycle included in the received FC frame is rewritten to a predetermined value, and the rewritten FC frame is stored in the transmission buffer 220b.

より詳細には、周期指定検出ユニット630は、FCフレームを受信すると、滞留時間計測ユニット634が記憶したFFフレームの滞留時間を参照し、当該滞留時間が所定時間を超えており、かつ受信したFCフレームに含まれるフレーム送信周期の下限値が所定の閾値以下であるときは、当該FCフレームに含まれる上記下限値を所定値(上記閾値よりも大きな値)に書き換えた後、当該書き換え後のFCフレームを送信バッファ220bに保存する。   More specifically, when the cycle designation detection unit 630 receives the FC frame, the cycle designation detection unit 630 refers to the residence time of the FF frame stored by the residence time measurement unit 634, the residence time exceeds the predetermined time, and the received FC frame When the lower limit value of the frame transmission cycle included in the frame is equal to or less than a predetermined threshold value, the lower limit value included in the FC frame is rewritten to a predetermined value (a value greater than the threshold value), and then the FC after the rewriting is performed. The frame is stored in the transmission buffer 220b.

次に、図7及び図8を用いて本実施形態に係るゲートウェイ装置60の作用について説明する。図7は、バス104に高優先度フレームが頻繁に送出される状態における、第1の実施形態に係るゲートウェイ装置10の動作の例を示す図、図8は、図7と同じ状態における本実施形態に係るゲートウェイ装置60の動作の例を示す図である。   Next, the operation of the gateway device 60 according to the present embodiment will be described with reference to FIGS. 7 and 8. FIG. 7 is a diagram illustrating an example of the operation of the gateway device 10 according to the first embodiment in a state in which high priority frames are frequently transmitted to the bus 104, and FIG. 8 is a diagram illustrating the present embodiment in the same state as FIG. It is a figure which shows the example of operation | movement of the gateway apparatus 60 which concerns on a form.

図7には、図3と同様に、診断通信を構成する通信イベントが図示上方から下方に向かって時系列に示されている。図示の例では、ゲートウェイ装置10を介して、診断装置130とECU110との間で診断通信が行われている。   In FIG. 7, similarly to FIG. 3, communication events constituting diagnostic communication are shown in time series from the upper side to the lower side in the drawing. In the illustrated example, diagnostic communication is performed between the diagnostic device 130 and the ECU 110 via the gateway device 10.

符号700及び702により示された図示縦方向の2つのラインは、ネットワーク102のバス106に接続された各装置の時間の経過を表しており、より具体的には、診断装置130における時間の経過及びゲートウェイ装置10のCAN通信モジュール200bにおける時間の経過をそれぞれ表している。また、符号704及び706により示された図示縦方向の2つのラインは、ネットワーク100のバス104に接続された各装置の時間の経過を表しており、より具体的には、ゲートウェイ装置10のCAN通信モジュール200aにおける時間の経過及びECU110における時間の経過をそれぞれ表わしている。   Two lines in the illustrated vertical direction indicated by reference numerals 700 and 702 represent the passage of time of each device connected to the bus 106 of the network 102, and more specifically, the passage of time in the diagnostic device 130. And the passage of time in the CAN communication module 200b of the gateway device 10 respectively. In addition, two lines in the illustrated vertical direction indicated by reference numerals 704 and 706 represent the passage of time of each device connected to the bus 104 of the network 100, and more specifically, the CAN of the gateway device 10 The passage of time in the communication module 200a and the passage of time in the ECU 110 are respectively shown.

ライン700〜706のうち互いに隣接するライン間に描かれた図示横方向の実線矢印は、それぞれ通信イベントを表わしている。より詳細には、ライン700とライン702との間の実線矢印はバス106における通信イベントを表わし、ライン704とライン706との間の実線矢印はバス104における通信イベントを表わしている。また、ライン702とライン704との間の破線矢印は、ゲートウェイ装置10内部を通過する受信フレームの流れを、模式的に示している。   Of the lines 700 to 706, solid horizontal arrows depicted between adjacent lines represent communication events, respectively. More specifically, the solid arrow between line 700 and line 702 represents a communication event on bus 106 and the solid arrow between line 704 and line 706 represents a communication event on bus 104. A broken line arrow between the line 702 and the line 704 schematically shows the flow of the received frame that passes through the gateway device 10.

ここで、ゲートウェイ装置10とECU110とが接続されているバス104には、診断情報に係るフレーム(例えば、FFフレーム710、FCフレーム712、CFフレーム720〜730)より高い優先度を持つフレーム(以下、高優先度フレーム)が頻繁に送出されているものとする。より具体的には、時刻t3〜t4の期間740及び、時刻t5〜t6の期間742において、上記高優先度フレームがバス104に送出され、ゲートウェイ装置10は、診断情報に係るフレームの送出を待機しなければならないものとする。   Here, in the bus 104 to which the gateway device 10 and the ECU 110 are connected, a frame (hereinafter referred to as a frame) having a higher priority than a frame (for example, FF frame 710, FC frame 712, CF frame 720 to 730) related to diagnostic information. , High priority frames) are frequently transmitted. More specifically, in the period 740 from time t3 to t4 and the period 742 from time t5 to t6, the high priority frame is transmitted to the bus 104, and the gateway device 10 waits for transmission of a frame related to diagnostic information. Shall be done.

まず、診断装置130は、ECU110に向けてFFフレーム710をバス106へ送出し、当該FFフレーム710はゲートウェイ装置10に受信される。ゲートウェイ装置10は、当該受信したFFフレーム710をバス104へ送出しようとするが、期間740において高優先度フレームがバス104上に送出されていることから、当該高優先度フレームの送信の終了を待機する。そして、ゲートウェイ装置10は、上記高優先度フレームの送信が終了する時刻t4の後に、FFフレーム710をバス104へ送出し、当該FFフレーム710はECU110に受信される。   First, the diagnostic device 130 sends the FF frame 710 to the bus 106 toward the ECU 110, and the FF frame 710 is received by the gateway device 10. The gateway device 10 tries to send the received FF frame 710 to the bus 104. However, since the high priority frame is sent on the bus 104 in the period 740, the gateway device 10 finishes the transmission of the high priority frame. stand by. The gateway device 10 then sends the FF frame 710 to the bus 104 after the time t4 when the transmission of the high priority frame ends, and the FF frame 710 is received by the ECU 110.

ECU110は、FFフレーム710を受信したことに応じて、送信周期の下限値T2を指定するFCフレーム712を、診断装置130に向けてバス104へ送出する。当該FCフレーム712は、ゲートウェイ装置10により中継されて、診断装置130に受信される。そして、診断装置130は、例えば、FCフレーム712により指定された下限値T2よりも大きい時間間隔であって、かつT2とほぼ等しい時間間隔で、CFフレーム720〜730をバス106へ送出し、当該CFフレーム720〜730は、ゲートウェイ装置10に受信される。   In response to receiving FF frame 710, ECU 110 sends FC frame 712 specifying lower limit value T 2 of the transmission cycle to bus 104 toward diagnostic device 130. The FC frame 712 is relayed by the gateway device 10 and received by the diagnostic device 130. Then, for example, the diagnostic device 130 sends out the CF frames 720 to 730 to the bus 106 at a time interval that is larger than the lower limit value T2 specified by the FC frame 712 and is approximately equal to T2. The CF frames 720 to 730 are received by the gateway device 10.

ゲートウェイ装置10は、各CFフレーム720〜730を受信する毎に、当該受信したCFフレームをバス104へ送出しようとするが、期間742において高優先度フレームがバス104上に送出されていることから、CFフレーム720〜730の送信を行うことなく当該高優先度フレームの送信の終了を待機する。これにより、診断装置130から送信されたCFフレーム720〜730は、全て、ゲートウェイ装置10の記憶装置204が備える送信バッファ220bに保存され蓄積される。このため、記憶装置204の記憶領域は、多くのCFフレーム(図7の例では、6個のCFフレーム720〜730)により占有され、記憶領域の利用効率が低下する。   Each time the gateway apparatus 10 receives each of the CF frames 720 to 730, the gateway apparatus 10 tries to send the received CF frame to the bus 104, but the high priority frame is sent on the bus 104 in the period 742. , Without waiting for the transmission of the CF frames 720 to 730, the end of the transmission of the high priority frame is awaited. As a result, all the CF frames 720 to 730 transmitted from the diagnostic device 130 are stored and accumulated in the transmission buffer 220b included in the storage device 204 of the gateway device 10. For this reason, the storage area of the storage device 204 is occupied by many CF frames (six CF frames 720 to 730 in the example of FIG. 7), and the use efficiency of the storage area decreases.

そして、バス104における高優先度フレームの送信が終了する時刻t6の後に、ゲートウェイ装置10は、送信バッファ220bに保存されたCFフレーム720〜730を、FCフレーム712により指定されたフレーム送信周期の下限値T2以上の時間間隔でバス104へ送出する。これにより、ECU110は、当該T2以上の時間間隔で、CFフレーム720〜730を受信することとなる。   Then, after time t6 when the transmission of the high priority frame on the bus 104 ends, the gateway device 10 uses the CF frames 720 to 730 stored in the transmission buffer 220b as the lower limit of the frame transmission cycle specified by the FC frame 712. The data is sent to the bus 104 at time intervals equal to or greater than the value T2. As a result, the ECU 110 receives the CF frames 720 to 730 at time intervals equal to or greater than T2.

一方、第2の実施形態に係るゲートウェイ装置60の場合には、図8に示すように、図7と同様の状況下においても、送信バッファ220bに蓄積されるCFフレームの数を低減して、記憶装置204の記憶領域の利用効率を高めることができる。   On the other hand, in the case of the gateway device 60 according to the second embodiment, as shown in FIG. 8, the number of CF frames stored in the transmission buffer 220b is reduced even under the same situation as in FIG. The utilization efficiency of the storage area of the storage device 204 can be increased.

図8には、図7と同じ表記方法を用いて、診断装置130とECU110との間の診断通信における、ゲートウェイ装置60の中継動作の態様が示されている。図8では、図7におけるライン702及び704に代えて、ゲートウェイ装置60のCAN通信モジュール200b及び200aの時間経過がライン802及び804により、それぞれ示されている。なお、図8において、図7に示すフレームや時間軸と同じフレーム及び時間軸については、図7と同じ符号を用いて示すものとし、上述した図7についての説明を援用する。   FIG. 8 shows an aspect of the relay operation of gateway device 60 in the diagnostic communication between diagnostic device 130 and ECU 110 using the same notation method as in FIG. In FIG. 8, the passage of time of the CAN communication modules 200b and 200a of the gateway device 60 is shown by lines 802 and 804, respectively, instead of the lines 702 and 704 in FIG. In FIG. 8, the same frame and time axis as those shown in FIG. 7 are denoted by the same reference numerals as those in FIG. 7, and the description of FIG. 7 described above is used.

図8において、診断装置130から送信されたFFフレーム710が、時刻t4の後にバス104へ送出される点は、図7と同様である。ただし、図8においては、ゲートウェイ装置60は、滞留時間計測ユニット634により、バス106からFFフレーム710を受信した後、当該FFフレーム710をバス104へ送出するまでの時間、すなわちゲートウェイ装置60内でのFFフレーム710の滞留時間Tmを計測する。   In FIG. 8, the point that the FF frame 710 transmitted from the diagnostic device 130 is sent to the bus 104 after time t4 is the same as in FIG. However, in FIG. 8, the gateway device 60 receives the FF frame 710 from the bus 106 by the residence time measuring unit 634 and then transmits the FF frame 710 to the bus 104, that is, within the gateway device 60. The residence time Tm of the FF frame 710 is measured.

そして、ECU110は、図7と同様に、FFフレーム710を受信したことに応じて、フレーム送信周期の下限値T2を指定するFCフレーム712をバス104へ送出する。   Then, in the same way as in FIG. 7, ECU 110 sends FC frame 712 specifying frame transmission cycle lower limit value T2 to bus 104 in response to receiving FF frame 710.

ゲートウェイ装置60は、当該FCフレーム712を受信すると、周期指定検出ユニット630により当該FCフレームに含まれているフレーム送信周期の下限値T2を記憶する。また、周期指定検出ユニット630は、滞留時間計測ユニット634が測定したFFフレーム710の滞留時間Tmを参照し、当該滞留時間Tmが所定時間Tthmよりも長く、上記FCフレーム712に含まれている上記下限値T2が所定の閾値Tthaより短いときは、当該FCフレームに含まれている上記下限値の値T2を予め定められたより大きな値T3(より具体的には、上記所定の閾値Tthaより大きな値)に書き換え、新たなFCフレーム712´を生成する。さらに、ゲートウェイ装置60は、当該書き換え後の新たなFCフレーム712´をバス106へ送出し、当該FCフレーム712´は診断装置130により受信される。   When the gateway device 60 receives the FC frame 712, the cycle designation detection unit 630 stores the lower limit value T2 of the frame transmission cycle included in the FC frame. Further, the cycle designation detection unit 630 refers to the residence time Tm of the FF frame 710 measured by the residence time measurement unit 634, and the residence time Tm is longer than the predetermined time Tthm and is included in the FC frame 712. When the lower limit value T2 is shorter than the predetermined threshold value Ttha, the lower limit value T2 included in the FC frame is set to a larger value T3 (more specifically, a value larger than the predetermined threshold value Ttha). ) To generate a new FC frame 712 ′. Further, the gateway device 60 sends out the rewritten new FC frame 712 ′ to the bus 106, and the FC frame 712 ′ is received by the diagnostic device 130.

これにより、診断装置130は、FCフレーム712´で指定されたフレーム送信周期の下限値T3以上の時間間隔で、CFフレームをバス106へ送出する。ここで、FCフレーム712´により指定されたT3は元のFCフレーム712に含まれる下限値T2よりも大きいため、バス104において高優先度フレームが送出されている時刻t5からt6までの期間742の間に、ゲートウェイ装置60は、CFフレーム720〜730の総数6
よりも少ない数のCFフレーム、例えば4個のCFフレーム720〜726を受信して、当該4個のCFフレーム720〜726を送信バッファ220bに保存する。
As a result, the diagnostic apparatus 130 sends the CF frame to the bus 106 at a time interval equal to or greater than the lower limit value T3 of the frame transmission cycle specified by the FC frame 712 ′. Here, since T3 specified by the FC frame 712 ′ is larger than the lower limit value T2 included in the original FC frame 712, the period 742 from time t5 to time t6 when the high priority frame is transmitted on the bus 104 is displayed. In the meantime, the gateway device 60 has a total of 6 CF frames 720 to 730.
A smaller number of CF frames, for example, four CF frames 720 to 726 are received, and the four CF frames 720 to 726 are stored in the transmission buffer 220b.

そして、時刻t6を過ぎた後は、ゲートウェイ装置60は、上記記憶した下限値T2に従って、送信バッファ220b内に保存したCFフレーム720〜726をバス104へ送出し、診断装置130は、下限値T3に従って後続のCFフレーム728及び730をバス106へ送出する。すなわち、ゲートウェイ装置60は、後続のCFフレーム728、730を受信する間隔(下限値T3に従う時間間隔)よりも短い時間間隔(下限値T2(<T3)に従う時間間隔)で、蓄積したCFフレーム720〜726をバス104へ送出することとなるので、ゲートウェイ装置60の送信バッファ220bに同時に保存されている(すなわち、蓄積されている)CFフレームの数は4個から減少していくこととなる。   After the time t6, the gateway device 60 sends the CF frames 720 to 726 stored in the transmission buffer 220b to the bus 104 according to the stored lower limit value T2, and the diagnostic device 130 sets the lower limit value T3. Then, the subsequent CF frames 728 and 730 are sent to the bus 106. That is, the gateway device 60 stores the CF frames 720 accumulated at a time interval (time interval according to the lower limit value T2 (<T3)) shorter than an interval (time interval according to the lower limit value T3) at which the subsequent CF frames 728 and 730 are received. ˜726 are sent to the bus 104, and the number of CF frames simultaneously stored (that is, accumulated) in the transmission buffer 220b of the gateway device 60 decreases from four.

このように、図7に示すゲートウェイ装置10の中継動作では、送信バッファ220bに蓄積されるCFフレームの数は最大6個であるのに対し、図8に示すゲートウェイ装置60の中継動作では、これよりも少ない数、例えば最大4個のフレームだけを送信バッファ220bに蓄積すればよいこととなる。したがって、ゲートウェイ装置60では、送信バッファ220bの記憶容量の低減が可能となり、記憶装置204の記憶領域の利用効率を高めることができる。   As described above, in the relay operation of the gateway device 10 shown in FIG. 7, the maximum number of CF frames stored in the transmission buffer 220b is 6, whereas in the relay operation of the gateway device 60 shown in FIG. Only a smaller number, for example, a maximum of four frames, needs to be stored in the transmission buffer 220b. Therefore, in the gateway device 60, the storage capacity of the transmission buffer 220b can be reduced, and the use efficiency of the storage area of the storage device 204 can be increased.

次に、ゲートウェイ装置60の処理装置602の動作手順について説明する。一例として、以下の説明では、ゲートウェイ装置60は、図1に示す車載ネットワークシステム1においてゲートウェイ装置10に置き換えて用いられているものとする。   Next, an operation procedure of the processing device 602 of the gateway device 60 will be described. As an example, in the following description, it is assumed that the gateway device 60 is used in place of the gateway device 10 in the in-vehicle network system 1 shown in FIG.

処理装置602は、バス104及びバス106から受信されたフレームを、それぞれ、受信MB212a及び212bから取得して送信バッファ220b及び220aに格納する受信処理と、送信バッファ220b及び220aに格納されたフレームを、それぞれ送信MB216b及び216aへ転送する送信処理と、を行う。以下、受信処理及び送信処理の手順を、順に説明する。   The processing device 602 obtains the frames received from the bus 104 and the bus 106 from the reception MBs 212a and 212b and stores them in the transmission buffers 220b and 220a, and the frames stored in the transmission buffers 220b and 220a, respectively. , And transmission processing to transfer to the transmission MBs 216b and 216a, respectively. Hereinafter, procedures of the reception process and the transmission process will be described in order.

〔受信処理〕
まず、処理装置602が行う受信処理の手順について、図9に示すフロー図に従って説明する。以下の説明では、一例としてバス104から受信されたフレームを受信MB212aから取得して送信バッファ220bに格納する場合の受信処理について説明する。
[Reception processing]
First, the procedure of reception processing performed by the processing device 602 will be described with reference to the flowchart shown in FIG. In the following description, a reception process when a frame received from the bus 104 is acquired from the reception MB 212a and stored in the transmission buffer 220b will be described as an example.

なお、バス106から受信されたフレームを受信MB212bから取得して送信バッファ220aに格納する場合の受信処理は、以下に示すバス104から受信されたフレームを受信MB212aから取得して送信バッファ220bに格納する場合の受信処理と同様である。   In addition, the reception process in the case of acquiring the frame received from the bus 106 from the reception MB 212b and storing it in the transmission buffer 220a is as follows. The frame received from the bus 104 shown below is acquired from the reception MB 212a and stored in the transmission buffer 220b. It is the same as the reception process when

すなわち、以下に示す受信処理は、「バス104」との記載を「バス106」に置き換えると共に、CAN通信モジュール200aの各要素についての記載をCAN通信モジュール200bの各要素に置き換え、「送信バッファ220b」との記載を「送信バッファ220a」に置き換えることにより、バス106から受信されたフレームを受信MB212bから取得して送信バッファ220aに格納する場合の受信処理となる。   That is, in the following reception processing, the description of “bus 104” is replaced with “bus 106”, and the description of each element of the CAN communication module 200a is replaced with each element of the CAN communication module 200b. ”Is replaced with“ transmission buffer 220a ”, which is a reception process when a frame received from the bus 106 is acquired from the reception MB 212b and stored in the transmission buffer 220a.

本処理は、ゲートウェイ装置60の電源が投入されたときに開始する。
処理を開始すると、まず、処理装置602は、CAN通信モジュール200aを介してバス104よりフレームを受信したか否かを判断する(S300)。この判断は、例えば、処理装置602がステータスレジスタ218aを参照し、受信MB212aにフレームが格納されているか否かを判断することにより行うことができる。
This process starts when the gateway device 60 is powered on.
When the processing is started, first, the processing device 602 determines whether or not a frame has been received from the bus 104 via the CAN communication module 200a (S300). This determination can be made, for example, when the processing device 602 refers to the status register 218a and determines whether or not a frame is stored in the reception MB 212a.

そして、バス104からフレームを受信していないときは(S300、No)、ステップS300に戻ってフレームが受信されるのを待機する。一方、バス104からフレームを受信したときは(S300、Yes)、滞留時間計測ユニット634は、受信MB212aから受信フレームを読み出し、当該受信フレームがFFフレームか否かを判断する(S302)。この判断は、上述したように、受信フレームに含まれるフレーム識別コードを参照することにより行うことができる。   When no frame is received from the bus 104 (S300, No), the process returns to step S300 and waits for the reception of the frame. On the other hand, when a frame is received from the bus 104 (S300, Yes), the residence time measurement unit 634 reads the received frame from the reception MB 212a, and determines whether the received frame is an FF frame (S302). This determination can be made by referring to the frame identification code included in the received frame as described above.

そして、受信フレームがFFフレームであったときは(S302、Yes)、処理装置602が備えるタイマ(不図示)を起動して、FFフレームの滞留時間(以下、FF滞留時間)の計測を開始した後(S304)、当該受信フレームを送信バッファ220bに保存する(S314)。   When the received frame is an FF frame (S302, Yes), a timer (not shown) provided in the processing device 602 is activated and measurement of the FF frame residence time (hereinafter referred to as FF residence time) is started. Later (S304), the received frame is stored in the transmission buffer 220b (S314).

なお、上記ステップS304で開始したFF滞留時間の計測は、後述する送信処理において、上記FFフレームが送信バッファ220bから読み出されて、送信機214bからバス104へ送出されたときに終了し、当該計測されたFF滞留時間は、滞留時間計測ユニット634により処理装置602の記憶装置(不図示)に記憶される(図10のステップS404)。   Note that the measurement of the FF residence time started in step S304 ends when the FF frame is read from the transmission buffer 220b and transmitted from the transmitter 214b to the bus 104 in the transmission process described later. The measured FF residence time is stored in a storage device (not shown) of the processing device 602 by the residence time measurement unit 634 (step S404 in FIG. 10).

一方、受信フレームがFFフレームでないときは(S302、No)、周期指定検出ユニット630は、当該受信フレームがFCフレームか否かを判断し(S306)、FCフレームでないときは(S306、No)、ステップS314に処理を移す。   On the other hand, when the received frame is not an FF frame (S302, No), the cycle designation detection unit 630 determines whether the received frame is an FC frame (S306), and when it is not an FC frame (S306, No), The process moves to step S314.

一方、受信フレームがFCフレームであるときは(S306、Yes)、周期指定検出ユニット630は、当該FCフレームに含まれるデータからフレーム送信周期の下限値の指定を取得し、当該取得した下限値を処理装置602が備える記憶装置(不図示)に記憶する(S308)。また、周期指定検出ユニット630は、後述する送信処理のステップS404(図10)において記憶されたFF滞留時間Tmを参照し、当該FF滞留時間Tmが所定時間Tthmを超えており、かつ、上記記憶した下限値が所定の閾値Ttha未満であるか否かを判断する(S310)。   On the other hand, when the received frame is an FC frame (S306, Yes), the cycle designation detection unit 630 acquires the designation of the lower limit value of the frame transmission cycle from the data included in the FC frame, and uses the obtained lower limit value. It memorize | stores in the memory | storage device (not shown) with which the processing apparatus 602 is provided (S308). Further, the cycle designation detection unit 630 refers to the FF residence time Tm stored in step S404 (FIG. 10) of the transmission process described later, the FF residence time Tm exceeds the predetermined time Tthm, and the storage It is determined whether or not the lower limit value is less than a predetermined threshold value Ttha (S310).

そして、周期指定検出ユニット630は、FF滞留時間が所定時間Tthmを超えており、かつ、上記下限値が所定の閾値Ttha未満であるときは(S310、Yes)、受信フレームであるFCフレームに含まれているフレーム送信周期の下限値を、予め定めた所定の値に書き換えた後(S312)、ステップS316に処理を移す。これにより、上記書き換え後のFCフレームは、送信バッファ220bに保存される。   When the FF residence time exceeds the predetermined time Tthm and the lower limit value is less than the predetermined threshold Ttha (S310, Yes), the cycle designation detection unit 630 is included in the FC frame that is the reception frame. After the lower limit value of the frame transmission cycle is rewritten to a predetermined value (S312), the process proceeds to step S316. Thus, the rewritten FC frame is stored in the transmission buffer 220b.

ステップS314において、バス104からの受信フレームが送信バッファ220bに保存された後は、処理装置602は、ステップS300に戻って処理を繰り返す。なお、本処理は、ゲートウェイ装置60の電源が断になっときに終了する。   In step S314, after the received frame from the bus 104 is stored in the transmission buffer 220b, the processing device 602 returns to step S300 and repeats the processing. This process ends when the gateway device 60 is powered off.

〔送信処理〕
次に、処理装置602が行う送信処理の手順について、図10に示すフロー図に従って説明する。以下の説明では、一例として送信バッファ220aに格納されたフレームを送信MB216aへ転送する送信処理について説明する。
[Transmission process]
Next, the procedure of transmission processing performed by the processing device 602 will be described with reference to the flowchart shown in FIG. In the following description, a transmission process for transferring a frame stored in the transmission buffer 220a to the transmission MB 216a will be described as an example.

なお、送信バッファ220bに格納されたフレームを送信MB216bへ転送する場合の送信処理は、以下に示す送信バッファ220aに格納されたフレームを送信MB216aへ転送する送信処理と同様である。   Note that the transmission process when the frame stored in the transmission buffer 220b is transferred to the transmission MB 216b is the same as the transmission process for transferring the frame stored in the transmission buffer 220a shown below to the transmission MB 216a.

すなわち、以下に示す送信処理は、「バス104」との記載を「バス106」に置き換えると共に、CAN通信モジュール200aの各要素についての記載をCAN通信モジュール200bの各要素に置き換え、「送信バッファ220a」との記載を「送信バッファ220b」に置き換えることにより、送信バッファ220bに格納されたフレームを送信MB216bへ転送する送信処理となる。   That is, in the transmission process shown below, the description of “bus 104” is replaced with “bus 106”, and the description of each element of the CAN communication module 200a is replaced with each element of the CAN communication module 200b. ”Is replaced with“ transmission buffer 220b ”, and the frame stored in the transmission buffer 220b is transmitted to the transmission MB 216b.

本処理は、ゲートウェイ装置60の電源が投入されたときに開始する。
処理を開始すると、まず、処理装置602の滞留時間計測ユニット634は、いずれかの送信MB216aにFFフレームが格納されていることを示すフラグであるFLAGが1であるか否かを判断する(S400)。ここで、FLAG=0は、いずれの送信MB216aにもFFフレームが格納されていないことを示し、FLAG=1は、いずれかの送信MB216aにFFフレームが格納されていることを示すものとする。このFLAGは、FFフレームを送信バッファ220aから送信MB216aへ転送したときに、後述するステップS412において1にセットされ、送信MB216aから送信機214aを介してバス104へ送出されたことが検知されたときに、後述するステップS406により0にリセットされる。また、FLAGは、ゲートウェイ装置60の電源が投入されたときにも、その初期化動作の際に0にリセットされるものとする。
This process starts when the gateway device 60 is powered on.
When the processing is started, first, the residence time measuring unit 634 of the processing device 602 determines whether or not FLAG, which is a flag indicating that the FF frame is stored in any of the transmission MBs 216a, is “1” (S400). ). Here, FLAG = 0 indicates that no FF frame is stored in any transmission MB 216a, and FLAG = 1 indicates that an FF frame is stored in any transmission MB 216a. This FLAG is set to 1 in step S412 to be described later when the FF frame is transferred from the transmission buffer 220a to the transmission MB 216a, and when it is detected that the FLAG frame has been transmitted from the transmission MB 216a to the bus 104 via the transmitter 214a. In step S406, which will be described later, the value is reset to zero. The FLAG is also reset to 0 during the initialization operation when the gateway device 60 is powered on.

続いて、ステップS400においてFLAG=1であるときは(S400、Yes)、送信MB216aに格納されているFFフレームが送信されたか否かを判断する(S402)。ここで、FFフレームが送信されたか否かの判断は、例えば、滞留時間計測ユニット634がゲートウェイ装置600aのステータスレジスタ218aを参照し、ステップS416において記憶された情報に基づき、FFフレームを格納している送信MB216aが空になったか否かを判断することにより行うことができる。   Subsequently, when FLAG = 1 in Step S400 (S400, Yes), it is determined whether or not the FF frame stored in the transmission MB 216a has been transmitted (S402). Here, the determination as to whether or not the FF frame has been transmitted is made, for example, by the residence time measuring unit 634 referring to the status register 218a of the gateway device 600a and storing the FF frame based on the information stored in step S416. This determination can be made by determining whether or not the transmitted MB 216a is empty.

そして、送信MB216aに格納されていたFFフレームが送信されたときは(S402、Yes)、FF滞留時間の計測を終了し、計測したFF滞留時間を記憶する(S404)。また、FLAGを0にリセットした後(S406)、送信MB216aに空きがあるか否かを判断する(S408)。   Then, when the FF frame stored in the transmission MB 216a is transmitted (S402, Yes), the measurement of the FF residence time is terminated and the measured FF residence time is stored (S404). Further, after FLAG is reset to 0 (S406), it is determined whether or not there is a vacancy in the transmission MB 216a (S408).

一方、ステップS400においてFLAGが1でないとき(S400、No)、及び、ステップS402において送信MB216aに格納されているFFフレームが未だ送信されていないときは(S402、No)、ステップS408に処理を移す。   On the other hand, when FLAG is not 1 in step S400 (S400, No), and when the FF frame stored in the transmission MB 216a is not yet transmitted in Step S402 (S402, No), the process proceeds to Step S408. .

次に、ステップS408においていずれの送信MB216aにも空きがないときは(S408、No)、ステップS408を繰り返して、いずれかの送信MB216aに空きができるのを待機する。   Next, when there is no vacancy in any transmission MB 216a in step S408 (No in S408), step S408 is repeated to wait for any transmission MB 216a to be vacant.

一方、ステップS408においていずれかの送信MB216aに空きがあるときは(S408、Yes)、送信バッファ220aの先頭に保存されているフレームがFFフレームであるか否かを判断する(S410)。そして、先頭に保存されているフレームがFFフレームであるときは(S410、Yes)、FLAGを1にセットすると共に(S412)、当該先頭に保存されているFFフレームを空いている送信MB216aへ転送し(S414)、当該FFフレームの転送先である送信MB216a(すなわち、当該FFフレームを格納した送信MB216a)を特定するための情報を、処理装置602が備えるRAM等の記憶装置(不図示)に記憶した後(S416)、ステップS400に戻って処理を繰り返す。   On the other hand, when any of the transmission MBs 216a is free in step S408 (S408, Yes), it is determined whether or not the frame stored at the head of the transmission buffer 220a is an FF frame (S410). If the frame stored at the head is an FF frame (S410, Yes), FLAG is set to 1 (S412) and the FF frame stored at the head is transferred to an empty transmission MB 216a. (S414), information for specifying the transmission MB 216a that is the transfer destination of the FF frame (that is, the transmission MB 216a storing the FF frame) is stored in a storage device (not shown) such as a RAM provided in the processing device 602. After storing (S416), the process returns to step S400 to repeat the process.

一方、ステップS410において送信バッファ220aの先頭に保存されているフレームがFFフレームでないときは(S410、No)、ステップS418に処理を移す。   On the other hand, when the frame stored at the head of the transmission buffer 220a is not the FF frame in step S410 (S410, No), the process proceeds to step S418.

図10における上記以外のステップS418〜S440は、図5のステップS202〜S224と同様であるので、上述した図5についての説明を援用する。   Steps S418 to S440 other than the above in FIG. 10 are the same as steps S202 to S224 in FIG. 5, and thus the description of FIG. 5 described above is cited.

以上、説明したように、第1及び第2の実施形態に係るゲートウェイ装置は、一のネットワークのバス(例えばバス104)に接続された一の端末装置(例えばECU)から他のネットワークのバス(例えばバス106)に接続された他の端末装置(例えば診断装置)への、データ送信間隔を指定する信号(例えばFCフレーム)を上記2つのネットワーク間で中継(転送)すると共に、当該信号に含まれたデータ送信間隔の指定を記憶する。   As described above, the gateway device according to the first and second embodiments is configured so that a terminal device (for example, ECU) connected to a bus (for example, the bus 104) of one network and a bus (for another network) (for example, an ECU). For example, a signal designating a data transmission interval (for example, an FC frame) to another terminal device (for example, a diagnostic device) connected to the bus 106) is relayed (transferred) between the two networks and included in the signal. The designated data transmission interval is stored.

そして、本ゲートウェイ装置は、その後に上記他の端末装置が送信したデータを上記他のバスから受信すると、上記記憶したデータ送信間隔の指定に従った時間間隔で、当該受信したデータを上記一の端末装置へ向けて上記一のバスへ送出する。   Then, when the gateway device receives the data transmitted from the other terminal device from the other bus, the gateway device receives the received data at the time interval according to the specification of the stored data transmission interval. The data is sent to the one bus toward the terminal device.

これにより、本ゲートウェイ装置は、異なる2つのネットワークを跨いで上記一の端末装置が上記他の端末装置に対して指定したデータ送信間隔の条件を損なうことなく、上記他の端末装置から送信されるデータを上記一の端末装置へ、当該2つのネットワークを跨いで中継(転送)することができる。   As a result, the gateway device is transmitted from the other terminal device without damaging the data transmission interval specified by the one terminal device to the other terminal device across two different networks. Data can be relayed (transferred) to the one terminal device across the two networks.

なお、上述した実施形態では、一例として車載ネットワークシステムにおいて診断装置とECUとの間で行われる診断通信を中継するゲートウェイ装置を示したが、これに限らず、本発明に係るゲートウェイ装置は、車載ネットワークシステム以外の一般的なネットワークシステムにおいて、互いの間でデータ送信間隔を動的に決定することのできる端末装置間のデータ通信を中継する際にも、同様に適用することができる。   In the above-described embodiment, the gateway device that relays the diagnostic communication performed between the diagnostic device and the ECU in the in-vehicle network system is shown as an example. However, the present invention is not limited thereto, and the gateway device according to the present invention is In a general network system other than the network system, the present invention can be similarly applied to relaying data communication between terminal devices that can dynamically determine a data transmission interval between each other.

1・・・車載ネットワークシステム、10、60、1102・・・ゲートウェイ装置、100、102・・・ネットワーク、104、106・・・バス、110、112、114、116、120、122、124、1004・・・ECU、130、1100・・診断装置、200a、200b・・・CAN通信モジュール、202、602・・・処理装置、204・・・記憶装置、210a、210b・・・受信機、212a、212b・・・受信MB、214a、214b・・・送信機、216a、216b・・・送信MB、218a、218b・・・ステータスレジスタ、220a、220b・・・送信バッファ、230、630・・・周期指定検出ユニット、232・・・送信間隔調整ユニット、634・・・滞留時間計測ユニット。   DESCRIPTION OF SYMBOLS 1 ... In-vehicle network system 10, 60, 1102 ... Gateway apparatus, 100, 102 ... Network, 104, 106 ... Bus, 110, 112, 114, 116, 120, 122, 124, 1004 ... ECU, 130, 1100 ... Diagnostic device, 200a, 200b ... CAN communication module, 202, 602 ... Processing device, 204 ... Storage device, 210a, 210b ... Receiver, 212a, 212b ... Receive MB, 214a, 214b ... Transmitter, 216a, 216b ... Send MB, 218a, 218b ... Status register, 220a, 220b ... Send buffer, 230, 630 ... Cycle Designated detection unit, 232 ... Transmission interval adjustment unit, 634 ... Residence time measurement unit

Claims (13)

一のネットワークを構成する一のバスに接続された第一バス端末装置と、他のネットワークを構成する他のバスに接続された他の端末装置との間の通信を、前記一及び他のネットワーク間で中継するゲートウェイ装置であって、
前記一のバスから受信したデータの前記他のバスへの送信を管理すると共に、前記他のバスから受信したデータの前記一のバスへの送信を管理する処理装置を備え、
前記処理装置は、
前記第一バス端末装置から前記他の端末装置へ向けて送信された、前記第一バス端末装置が指定するデータ送信間隔情報を含む第1の所定の信号を検出して、当該情報を記憶し、
前記他の端末装置から受信したデータを記憶装置に保存し、当該保存したデータを、前記記憶した情報が表すデータ送信間隔の指定に従って、前記第一バス端末装置へ送信するよう構成されている、
ゲートウェイ装置。
Communication between the first bus terminal device connected to one bus constituting one network and another terminal device connected to another bus constituting another network is performed by the communication between the one and other networks. A gateway device that relays between,
A processor for managing transmission of data received from the one bus to the other bus and managing transmission of data received from the other bus to the one bus;
The processor is
Wherein the first bus terminal device is transmitted to the another terminal apparatus detects the first predetermined signal containing information of the data transmission interval first bus terminal apparatus specifies, stores the information And
The data received from the other terminal device is stored in a storage device, and the stored data is configured to be transmitted to the first bus terminal device in accordance with a data transmission interval specified by the stored information.
Gateway device.
前記処理装置は、さらに、
前記他のバスから受信して前記一のバスへ送出する第2の所定の信号の、自装置である前記ゲートウェイ装置内での滞留時間を計測し、
前記計測した滞留時間が所定時間を超えており、かつ、前記第一バス端末装置から受信した前記第1の所定の信号に含まれる前記情報から特定されるデータ送信間隔が所定の時間間隔より短い間隔を含むときは、当該情報を予め定めた所定の時間間隔以上のデータ送信間隔を指定する内容に書き換えて、当該書き換え後の前記第1の所定の信号を前記他の端末装置へ送信するよう構成されている、
請求項1に記載のゲートウェイ装置。
The processing apparatus further includes:
Measuring the residence time of the second predetermined signal received from the other bus and sent to the one bus in the gateway device as its own device;
The measured residence time exceeds a predetermined time, and the data transmission interval specified from the information included in the first predetermined signal received from the first bus terminal device is shorter than the predetermined time interval. When the interval is included, the information is rewritten to a content specifying a data transmission interval equal to or greater than a predetermined time interval, and the first predetermined signal after the rewriting is transmitted to the other terminal device. It is configured,
The gateway device according to claim 1.
一のネットワークを構成する一のバスに接続された第一バス端末装置と、他のネットワークを構成する他のバスに接続された他の端末装置との間の通信を、前記一及び他のネットワーク間で中継するゲートウェイ装置であって、Communication between the first bus terminal device connected to one bus constituting one network and another terminal device connected to another bus constituting another network is performed by the communication between the one and other networks. A gateway device that relays between,
前記一のバスから受信したデータの前記他のバスへの送信を管理すると共に、前記他のバスから受信したデータの前記一のバスへの送信を管理する処理装置を備え、A processor for managing transmission of data received from the one bus to the other bus and managing transmission of data received from the other bus to the one bus;
前記処理装置は、The processor is
前記第一バス端末装置から前記他の端末装置へ向けて送信された、前記第一バス端末装置が指定するデータ送信間隔の情報を含む第1の所定の信号を検出して、当該情報を記憶し、A first predetermined signal that is transmitted from the first bus terminal device to the other terminal device and includes information on a data transmission interval designated by the first bus terminal device is detected and stored. And
前記他のバスから受信して前記一のバスへ送出する第2の所定の信号の、自装置である前記ゲートウェイ装置内での滞留時間を計測し、Measuring the residence time of the second predetermined signal received from the other bus and sent to the one bus in the gateway device as its own device;
前記計測した滞留時間が所定時間を超えており、かつ、前記第一バス端末装置から受信した前記第1の所定の信号に含まれる前記情報から特定されるデータ送信間隔が所定の時間間隔より短い間隔を含むときは、当該情報を予め定めた所定の時間間隔以上のデータ送信間隔を指定する内容に書き換えて、当該書き換え後の前記第1の所定の信号を前記他の端末装置へ送信し、The measured residence time exceeds a predetermined time, and the data transmission interval specified from the information included in the first predetermined signal received from the first bus terminal device is shorter than the predetermined time interval. When the interval is included, the information is rewritten to a content designating a data transmission interval that is equal to or greater than a predetermined time interval, and the first predetermined signal after the rewriting is transmitted to the other terminal device,
前記他の端末装置から受信したデータを記憶装置に保存し、当該保存したデータを、前記記憶した情報が表すデータ送信間隔の指定に従って、前記第一バス端末装置へ送信する、Storing data received from the other terminal device in a storage device, and transmitting the stored data to the first bus terminal device in accordance with a data transmission interval specified by the stored information;
よう構成されている、Configured as
ゲートウェイ装置。Gateway device.
前記第2の所定の信号は、前記他の端末装置から前記第一バス端末装置に向けてデータを連続送信する旨の通知を含むものである、
請求項2又は3に記載のゲートウェイ装置。
The second predetermined signal includes a notification that data is continuously transmitted from the other terminal device to the first bus terminal device.
The gateway device according to claim 2 or 3 .
前記第1の所定の信号に含まれる前記情報が表すデータ送信間隔の指定は、前記第2の所定の信号により通知される連続送信に係るデータに対して適用される、
請求項に記載のゲートウェイ装置。
The designation of the data transmission interval represented by the information included in the first predetermined signal is applied to data related to continuous transmission notified by the second predetermined signal.
The gateway device according to claim 4 .
前記一のネットワーク及び前記他のネットワークは、共に車両に搭載された車載ネットワークであり、
前記ゲートウェイ装置は、車両に搭載されて上記車載ネットワーク間の通信を中継するものである、
請求項1ないしのいずれか一項に記載のゲートウェイ装置。
The one network and the other network are both in-vehicle networks mounted on a vehicle,
The gateway device is mounted on a vehicle and relays communication between the in-vehicle networks.
The gateway apparatus as described in any one of Claims 1 thru | or 5 .
前記第一バス端末装置は、前記車両の動作を制御する電子制御装置(ECU)であり、
前記他の端末装置は、前記車両の外部から前記他のネットワークに接続される、車両動作を診断するための診断装置である、
請求項に記載のゲートウェイ装置。
The first bus terminal device is an electronic control unit (ECU) that controls the operation of the vehicle,
The other terminal device is a diagnostic device for diagnosing vehicle operation, which is connected to the other network from the outside of the vehicle.
The gateway device according to claim 6 .
前記第1の所定の信号を受信しないとき、又は、前記第1の所定の信号が含む情報により特定されるデータ送信間隔の下限値が0であるときは、前記他の端末装置から受信したデータを前記第一バス端末装置に向けて任意の送信間隔で送信する、
請求項1ないしのいずれか一項に記載のゲートウェイ装置。
Data received from the other terminal device when the first predetermined signal is not received or when the lower limit value of the data transmission interval specified by the information included in the first predetermined signal is 0 Is transmitted to the first bus terminal device at an arbitrary transmission interval,
The gateway apparatus as described in any one of Claim 1 thru | or 7 .
前記処理装置は、The processor is
前記他の端末装置から受信し前記記憶装置に保存した前記データの全てを前記第一バス端末装置へ送信した場合に、前記情報の記憶を消去するWhen storing all the data received from the other terminal device and stored in the storage device to the first bus terminal device, the storage of the information is deleted.
よう構成されているIs configured as
請求項1ないし8のいずれか一項に記載のゲートウェイ装置。The gateway apparatus as described in any one of Claim 1 thru | or 8.
前記処理装置は、The processor is
前記第1の所定の信号の送信元情報と対応付けて前記情報を記憶し、Storing the information in association with the transmission source information of the first predetermined signal;
前記保存したデータを、当該データの送信先に対応付けられている前記情報が表すデータ送信間隔の指定に従って、前記第一バス端末装置へ送信するThe stored data is transmitted to the first bus terminal device in accordance with a data transmission interval designated by the information associated with the transmission destination of the data.
よう構成されているIs configured as
請求項1ないし9のいずれか一項に記載のゲートウェイ装置。The gateway apparatus as described in any one of Claim 1 thru | or 9.
前記処理装置は、The processor is
複数の前記第一バス端末装置から前記他の端末装置へ前記第1の所定の信号が送信された場合には、前記複数の前記第一バス端末装置がそれぞれ指定するデータ送信間隔の情報のうち最も長いデータ送信間隔を指定する情報を前記情報として記憶するWhen the first predetermined signal is transmitted from a plurality of the first bus terminal devices to the other terminal device, the data transmission interval information respectively designated by the plurality of first bus terminal devices. Information specifying the longest data transmission interval is stored as the information
よう構成されている、Configured as
請求項1ないし10のいずれか一項に記載のゲートウェイ装置。The gateway apparatus as described in any one of Claims 1 thru | or 10.
一のネットワークを構成する一のバスに接続された第一バス端末装置と、他のネットワークを構成する他のバスに接続された他の端末装置との間の通信を、前記一及び他のネットワーク間で中継するゲートウェイ装置であって、
前記第一バス端末装置から前記他の端末装置へ向けて送信された、前記第一バス端末装置が指定するデータ送信間隔情報を含む第1の所定の信号を検出して、当該情報を記憶する手段と、
前記他の端末装置から受信したデータを記憶装置に保存し、当該保存したデータを、前記記憶した情報が表すデータ送信間隔の指定に従って、前記第一バス端末装置へ送信する手段と、
を備えるゲートウェイ装置。
Communication between the first bus terminal device connected to one bus constituting one network and another terminal device connected to another bus constituting another network is performed by the communication between the one and other networks. A gateway device that relays between,
Wherein the first bus terminal device is transmitted to the another terminal apparatus detects the first predetermined signal containing information of the data transmission interval first bus terminal apparatus specifies, stores the information Means to
Means for storing data received from the other terminal device in a storage device, and transmitting the stored data to the first bus terminal device in accordance with a specification of a data transmission interval represented by the stored information;
A gateway device comprising:
一のネットワークを構成する一のバスに接続された第一バス端末装置と、他のネットワークを構成する他のバスに接続された他の端末装置との間の通信を、前記一及び他のネットワーク間で中継するゲートウェイ装置が備える処理装置により行われるデータ転送処理の方法であって、
前記第一バス端末装置から前記他の端末装置へ向けて送信された、前記第一バス端末装置が指定するデータ送信間隔情報を含む第1の所定の信号を検出して、当該情報を記憶するステップと、
前記他の端末装置から受信したデータを記憶装置に記憶させるステップと、
当該記憶させたデータを、前記記憶した情報が表すデータ送信間隔の指定に従って、前記第一バス端末装置へ送信するステップと、
を含む、データ転送処理方法。
Communication between the first bus terminal device connected to one bus constituting one network and another terminal device connected to another bus constituting another network is performed by the communication between the one and other networks. A data transfer processing method performed by a processing device provided in a gateway device that relays between,
Wherein the first bus terminal device is transmitted to the another terminal apparatus detects the first predetermined signal containing information of the data transmission interval first bus terminal apparatus specifies, stores the information And steps to
Storing data received from the other terminal device in a storage device;
Transmitting the stored data to the first bus terminal device in accordance with a specification of a data transmission interval represented by the stored information;
Including a data transfer processing method.
JP2013124783A 2013-06-13 2013-06-13 Gateway device Expired - Fee Related JP5767277B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013124783A JP5767277B2 (en) 2013-06-13 2013-06-13 Gateway device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013124783A JP5767277B2 (en) 2013-06-13 2013-06-13 Gateway device

Publications (2)

Publication Number Publication Date
JP2015000597A JP2015000597A (en) 2015-01-05
JP5767277B2 true JP5767277B2 (en) 2015-08-19

Family

ID=52295399

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013124783A Expired - Fee Related JP5767277B2 (en) 2013-06-13 2013-06-13 Gateway device

Country Status (1)

Country Link
JP (1) JP5767277B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6137033B2 (en) * 2014-04-16 2017-05-31 株式会社デンソー In-vehicle network system and in-vehicle relay device
JP2018090007A (en) * 2016-11-30 2018-06-14 トヨタ自動車株式会社 Vehicle communication system
KR102456630B1 (en) * 2018-05-15 2022-10-18 현대자동차주식회사 In-vehicle controller and method of controlling data transmission for the same
JP7110070B2 (en) 2018-11-22 2022-08-01 日立Astemo株式会社 Data transfer device, data transfer method
JP7347182B2 (en) * 2019-12-10 2023-09-20 株式会社デンソー relay device
WO2023119720A1 (en) * 2021-12-23 2023-06-29 日立Astemo株式会社 Transfer apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009017154A (en) * 2007-07-04 2009-01-22 Mitsubishi Fuso Truck & Bus Corp On-vehicle gateway device
JPWO2010079538A1 (en) * 2009-01-08 2012-06-21 三菱電機株式会社 Data transmission equipment

Also Published As

Publication number Publication date
JP2015000597A (en) 2015-01-05

Similar Documents

Publication Publication Date Title
JP5767277B2 (en) Gateway device
JP2006333438A (en) Gateway apparatus and routing method
JP4926648B2 (en) In-vehicle gateway device
JP6760199B2 (en) In-vehicle communication system, in-vehicle relay device and message relay method
JP2002026957A (en) Multiplex communication system
JP4621837B2 (en) Relay device, communication system, and communication method
JP2009253557A (en) On-board relay connection unit
JP2014072673A (en) Relay device
JP4917669B2 (en) In-vehicle relay connection unit
JP5110998B2 (en) Distribution device, communication system, and communication method
JP2008227741A (en) On-vehicle communication system
US20110007897A1 (en) Communication node and network system
EP1458143B1 (en) Data repeater and multiplex communication system using the same
CN113545012B (en) Communication device, communication system, and message arbitration method
KR102303424B1 (en) Direct memory access control device for at least one processing unit having a random access memory
JP5900198B2 (en) COMMUNICATION SYSTEM, RELAY DEVICE, AND COMMUNICATION DEVICE
JP6508092B2 (en) Vehicle gateway device and program
JP2006253922A (en) Gateway apparatus and data transfer method for the gateway apparatus
JP5728043B2 (en) Gateway device
CN102100037A (en) Subscriber nodes of a communication system having a functionally separate transmission event memory
JP6200734B2 (en) Communication control device
JP2003244180A (en) Data relaying apparatus and multiplex communication system
JP4361540B2 (en) Gateway device, data transfer method, and program
JP2009089286A (en) Relay connection unit
JP6276738B2 (en) CAN communication unit and CAN communication program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150424

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: 20150527

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150618

R150 Certificate of patent or registration of utility model

Ref document number: 5767277

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees