JP2005159568A - Gateway apparatus - Google Patents

Gateway apparatus Download PDF

Info

Publication number
JP2005159568A
JP2005159568A JP2003392904A JP2003392904A JP2005159568A JP 2005159568 A JP2005159568 A JP 2005159568A JP 2003392904 A JP2003392904 A JP 2003392904A JP 2003392904 A JP2003392904 A JP 2003392904A JP 2005159568 A JP2005159568 A JP 2005159568A
Authority
JP
Japan
Prior art keywords
data
transmission
priority
cpu
ram
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.)
Withdrawn
Application number
JP2003392904A
Other languages
Japanese (ja)
Inventor
Hideaki Onda
秀明 恩田
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.)
Marelli Corp
Original Assignee
Calsonic Kansei Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Calsonic Kansei Corp filed Critical Calsonic Kansei Corp
Priority to JP2003392904A priority Critical patent/JP2005159568A/en
Publication of JP2005159568A publication Critical patent/JP2005159568A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a gateway apparatus capable of surely transmitting data with ID of higher priority when a transmission timing is delayed due to a transmission error or the like in communication carried out between different in-vehicle networks via the gateway apparatus. <P>SOLUTION: The gateway apparatus 1 for interconnecting differently formed networks A, B, temporarily storing and converting data received from one of the networks, and transmitting the resulting data to the other network so that on-vehicle apparatuses connected to the different networks make data communication with each other, is provided with a RAM 24 for storing priorities of ID codes denoting a transmission destination included in the data subjected to relay transmission, and a CPU 2 carries out priority discrimination processing for discriminating transmission priority on the basis of the priority of the ID code stored in the RAM 24 when there are a plurality of data to be transmitted next after the end of data transmission. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、異なるネットワーク間に属する機器の通信を行うゲートウェイ装置の技術分野に属し、特に車載装置間の異なる通信ネットワーク間の通信を可能にするものに有用である。   The present invention belongs to the technical field of gateway devices that perform communication of devices belonging to different networks, and is particularly useful for enabling communication between different communication networks between in-vehicle devices.

従来においては、CANネットワークに接続される機器の通信では、送信エラーにより送信できない状態が続くと、送信しようとするデータが蓄積されることになる(例えば、特許文献1参照。)。
このような車両内のネットワーク同士を接続するために、従来のゲートウェイ装置では、プロトコルを変換する手段としてCPUを備え、また、送信される側のネットワークに対しては接続されている1つの機器となるため、受信したデータ及び送信するデータを一時的に保存しておくためのデータバッファを備えて、ネットワークに接続した車載機器が、車両内の異なるネットワークの車載機器とデータのやりとりができるようにしている(例えば、特許文献2参照。)。
特開2003−115852号公報(第2−7頁、全図) 特開2002−243591号公報(第2−10頁、全図)
Conventionally, in communication between devices connected to a CAN network, if a state in which transmission cannot be performed due to a transmission error continues, data to be transmitted is accumulated (for example, see Patent Document 1).
In order to connect such networks in the vehicle, the conventional gateway apparatus includes a CPU as a means for converting a protocol, and one device connected to the network on the transmission side. Therefore, it is equipped with a data buffer for temporarily storing received data and data to be transmitted, so that in-vehicle devices connected to the network can exchange data with in-vehicle devices in different networks in the vehicle. (For example, refer to Patent Document 2).
JP 2003-115852 A (page 2-7, full view) Japanese Patent Laying-Open No. 2002-243591 (page 2-10, full view)

しかしながら、従来のゲートウェイ装置にあっては、送信エラーが続くと予定のデータが溜まり、送信可能になった時優先順位の高いデータも送信まで待たされる。   However, in the conventional gateway device, when transmission errors continue, scheduled data is accumulated, and when transmission is possible, data with high priority is also waited for transmission.

本発明は、上記問題点に着目してなされたもので、その目的とするところは、異なる車内ネットワーク間でゲートウェイ装置を介して行われる通信が、送信エラー等により送信タイミングが遅れたとき、優先順位の高いIDから確実に送信することができるゲートウェイ装置を提供することにある。   The present invention has been made paying attention to the above-mentioned problems. The purpose of the present invention is that when communication performed via a gateway device between different in-vehicle networks is delayed due to a transmission error or the like, priority is given. It is an object of the present invention to provide a gateway device that can reliably transmit from a higher-rank ID.

上記目的を達成するため、本発明では、車内の車載装置で複数の車内ネットワークを形成し、形成された異なるネットワーク間を接続して、ネットワークから受信するデータを一時的に保存・変換して別のネットワークに送信するようにし、異なるネットワークに接続している車載装置間でのデータのやり取りを行う、ゲートウェイ装置において、中継送信するデータに含まれる送信先を示すIDコードの優先順位を予め記憶しておく優先ID記憶手段を設け、データの送信完了後、次に送信するデータが複数ある場合に前記優先ID記憶手段のIDコードの優先順位から、送信の優先順位を判断する優先順位判断手段を設けたことを特徴とする。   In order to achieve the above object, in the present invention, a plurality of in-vehicle networks are formed by in-vehicle devices in a vehicle, the different networks formed are connected, and data received from the network is temporarily stored and converted to be separated. In the gateway device that exchanges data between in-vehicle devices connected to different networks, the priority order of ID codes indicating the transmission destinations included in the data to be relayed is stored in advance. Priority ID storage means is provided, and when there is a plurality of data to be transmitted next after completion of data transmission, priority order determination means for determining the priority of transmission from the priority order of the ID code of the priority ID storage means It is provided.

よって、本発明にあっては、異なる車内ネットワーク間でゲートウェイ装置を介して行われる通信が、送信エラー等により送信タイミングが遅れたとき、優先順位の高いIDから確実に送信することができる。   Therefore, in the present invention, communication performed via the gateway device between different in-vehicle networks can be reliably transmitted from an ID having a high priority when the transmission timing is delayed due to a transmission error or the like.

以下、本発明のゲートウェイ装置を実現する実施の形態を、請求項1,2に係る発明に対応する実施例1に基づいて説明する。   Hereinafter, an embodiment for realizing the gateway device of the present invention will be described based on Example 1 corresponding to the first and second aspects of the invention.

まず、構成を説明する。
図1は実施例1のゲートウェイ装置を用いるCANシステムの構成を示す説明図である。図2は実施例1のゲートウェイ装置のブロック図である。図3は実施例1のゲートウェイ装置のCPUのCAN通信処理部とRAM部分の説明図である。図4は実施例1のゲートウェイ装置の受信データと送信データの関係を従来と比較した説明図である。図5は実施例1のゲートウェイ装置の送信データの一時保存するデータ構造を示す説明図である。図6は実施例1のゲートウェイ装置の受信処理の流れを示すフローチャート図である。図7は実施例1のゲートウェイ装置の送信処理の流れを示すフローチャート図である。図8は実施例1のゲートウェイ装置の送信データを優先順位にソートする処理の流れを示すフローチャート図である。図9は従来の受信処理の流れを示すフローチャート図である。図10は従来の送信処理の流れを示すフローチャート図である。
実施例1のゲートウェイ装置1は、車両内の車載機器A2〜A6をバス型通信線A1に接続して構成されるネットワークAと、車載装置B2〜B6をバス型通信線B1に接続して構成されるネットワークBとを接続するように設けられる。
First, the configuration will be described.
FIG. 1 is an explanatory diagram illustrating a configuration of a CAN system using the gateway device according to the first embodiment. FIG. 2 is a block diagram of the gateway device according to the first embodiment. FIG. 3 is an explanatory diagram of a CAN communication processing unit and a RAM portion of the CPU of the gateway device according to the first embodiment. FIG. 4 is an explanatory diagram comparing the relationship between the reception data and transmission data of the gateway device according to the first embodiment with the prior art. FIG. 5 is an explanatory diagram illustrating a data structure for temporarily storing transmission data of the gateway device according to the first embodiment. FIG. 6 is a flowchart illustrating the flow of reception processing of the gateway device according to the first embodiment. FIG. 7 is a flowchart illustrating a flow of transmission processing of the gateway device according to the first embodiment. FIG. 8 is a flowchart showing the flow of processing for sorting the transmission data of the gateway device according to the first embodiment in the priority order. FIG. 9 is a flowchart showing the flow of conventional reception processing. FIG. 10 is a flowchart showing the flow of conventional transmission processing.
The gateway device 1 according to the first embodiment is configured by connecting the in-vehicle devices A2 to A6 in the vehicle to the bus communication line A1 and the in-vehicle devices B2 to B6 to the bus communication line B1. To be connected to the network B to be connected.

ゲートウェイ装置1は、図2に示すようにCPU2(優先順位判断手段に相当する)、トランシーバ3a,3b、電源回路4、発振子5、EEPROM6、終端抵抗7a,7bを主要な構成としている。   As shown in FIG. 2, the gateway device 1 mainly includes a CPU 2 (corresponding to priority order determination means), transceivers 3a and 3b, a power supply circuit 4, an oscillator 5, an EEPROM 6, and termination resistors 7a and 7b.

トランシーバ3a,3bは、通信線A1,B1と終端抵抗7a,7bを介して接続し、かつ、CPU2と接続し、それぞれが2本の線からなる通信線A1,B1から受信したデータをCPU2と接続し、それぞれが2本の線からなる通信線A1,B1から受信したデータをCPU2が入力できる信号にしてCPU2へ出力し、CPU2が出力した信号をそれぞれが2本の線からなる通信線A1,B1を流せる信号(CANプロトコルに従った通信信号)にして通信線A1,B1へ送信する。   The transceivers 3a and 3b are connected to the communication lines A1 and B1 via the termination resistors 7a and 7b, and are connected to the CPU 2, and the data received from the communication lines A1 and B1 each consisting of two lines are connected to the CPU 2. The data received from the communication lines A1 and B1 each composed of two lines is converted into a signal that can be input by the CPU 2 and output to the CPU 2, and the signal output from the CPU 2 is each composed of the communication line A1 composed of two lines. , B1 can be sent (communication signal according to the CAN protocol) and transmitted to the communication lines A1, B1.

電源回路4は、CPU2及び周辺回路に電源を供給する。
発振子5は、CPU2での通信への同期処理、信号生成に使用する発振信号をCPU2に出力する。
The power supply circuit 4 supplies power to the CPU 2 and peripheral circuits.
The oscillator 5 outputs to the CPU 2 an oscillation signal used for synchronization processing and signal generation in the CPU 2 for communication.

EEPROM6は、ネットワークA,Bに出力するメッセージIDを登録保存し、CPU2からの指令に応じて、CPU2にメッセージデータを出力する。また、CPU2からの指令に応じて保存した内容を消去する。なお、メッセージIDの数は限られたものとする。
CPU2には、トランシーバ3a,3bとCAN通信用の送受信を行う通信部21a,21b(CAN通信処理部に相当する)を設ける。この内、通信部21aについて説明すると、CAN通信プロトコルに沿ったデータに変換するプロトコルコア部211a、通信線へのアクセスを制御するアクセス制御部212a、送受信するデータを一時的に溜めておくメッセージボックス213aを備えている。
また、CPU2には、ROM23、RAM24(優先ID記憶手段に相当する)が設けられている。
The EEPROM 6 registers and saves message IDs to be output to the networks A and B, and outputs message data to the CPU 2 in response to a command from the CPU 2. In addition, the stored contents are deleted in response to a command from the CPU 2. Note that the number of message IDs is limited.
The CPU 2 is provided with communication units 21a and 21b (corresponding to a CAN communication processing unit) that perform transmission and reception for CAN communication with the transceivers 3a and 3b. Of these, the communication unit 21a will be described. The protocol core unit 211a that converts data into the CAN communication protocol, the access control unit 212a that controls access to the communication line, and the message box that temporarily stores data to be transmitted and received 213a.
The CPU 2 is provided with a ROM 23 and a RAM 24 (corresponding to priority ID storage means).

ウォッチドッグタイマ部22は、例えば実行されるルーチンの終わりのフラグを検出するなどして、CPU2で実行される処理に異常が生じていないかどうかを監視する。
ROM23は、CPU2で行う処理の内容やデータが保存されている。
RAM24は、通信部21a,21bにより受信したデータを必要に応じてプロトコル変換して送信用データにしたものをFIFOデータ構造231として一時的に保存しておく。
The watchdog timer unit 22 monitors whether or not an abnormality has occurred in the processing executed by the CPU 2, for example, by detecting a flag at the end of the routine to be executed.
The ROM 23 stores contents and data of processing performed by the CPU 2.
The RAM 24 temporarily saves the data received by the communication units 21a and 21b as a FIFO data structure 231 by converting the protocol into data for transmission as necessary.

ここで、ゲートウェイ装置1のCPU2で受信したデータ及びRAM24で一時的に保存する際のデータ保存構造(FIFOデータ構造231)について説明する。
CAN通信で受信したデータは、図5に示すように送信先を示すIDとデータを結合した構造になっている。
この受信データのRAM24での保存構造は、受信データに加え、保存場所を示すアドレス、受信データをセーブするアドレスを示すポインタであるセーブポインタS_Po、送信するデータのアドレスを示すポインタであるトランスミットポインタT_Po、IDの優先順位判断に使用する一時的なポインタであるソートポインタSo_Poを含むように構成される。また、このデータ保存構造は、FIFO(ファーストインファーストアウト)方式によるデータの入出を行うものである。
Here, the data received by the CPU 2 of the gateway device 1 and the data storage structure (FIFO data structure 231) when temporarily stored in the RAM 24 will be described.
Data received by CAN communication has a structure in which an ID indicating a transmission destination and data are combined as shown in FIG.
The storage structure of the received data in the RAM 24 includes, in addition to the received data, an address indicating a storage location, a save pointer S_Po which is a pointer indicating the address where the received data is saved, and a transmit pointer which is a pointer indicating the address of the data to be transmitted. T_Po and sort pointer So_Po, which is a temporary pointer used for ID priority determination, are configured. In addition, this data storage structure is used to input and output data using a FIFO (first in first out) method.

次に、作用を説明する。   Next, the operation will be described.

[受信処理の流れ]
図6は実施例1のゲートウェイ装置1のCPU2で実行される受信処理の流れを示すフローチャートで、以下、各ステップについて説明する。
[Receive process flow]
FIG. 6 is a flowchart showing the flow of reception processing executed by the CPU 2 of the gateway apparatus 1 according to the first embodiment. Each step will be described below.

ステップS11では、データを受信したことにより割り込みを行う。   In step S11, an interruption is performed when data is received.

ステップS12では、受信したデータのIDを読み取る。   In step S12, the ID of the received data is read.

ステップS13では、IDの示す送信先が、ゲートウェイ処理を行う送信先になっているかどうかを判断し、ゲートウェイ処理を行うIDと判断したならばステップS14に移行し、ゲートウェイ処理を行わないIDと判断したならばステップS21に移行する。   In step S13, it is determined whether or not the transmission destination indicated by the ID is a transmission destination for performing gateway processing. If it is determined that the transmission destination is an ID for performing gateway processing, the process proceeds to step S14, where it is determined that the gateway processing is not performed. If so, the process proceeds to step S21.

ステップS14では、受信データを保存するRAM24から、セーブポインタS_Poを読み出す。   In step S14, the save pointer S_Po is read from the RAM 24 that stores the received data.

ステップS15では、読み出したセーブポインタS_Poに対応するアドレスにIDを保存する。   In step S15, the ID is stored at the address corresponding to the read save pointer S_Po.

ステップS16では、受信したデータのデータ部分を読み取る。   In step S16, the data portion of the received data is read.

ステップS17では、読み取ったデータ部分をセーブポインタS_Poに対応するアドレスにデータを保存する。   In step S17, the read data portion is stored at an address corresponding to the save pointer S_Po.

ステップS18では、セーブポインタS_Poをインクリメントする。   In step S18, the save pointer S_Po is incremented.

ステップS19では、セーブポインタS_Poがデータ構造上の最後に達したかどうかを判断する。   In step S19, it is determined whether or not the save pointer S_Po has reached the end of the data structure.

ステップS20では、セーブポインタS_Poのデータ内容をリセットする。   In step S20, the data content of the save pointer S_Po is reset.

ステップS21では、割り込みフラグをクリアする。   In step S21, the interrupt flag is cleared.

ステップS22では、割り込み処理をリターンする。   In step S22, the interrupt process is returned.

[送信処理の流れ]
図7は実施例1のゲートウェイ装置1のCPU2で実行される送信処理の流れを示すフローチャートで、以下、各ステップについて説明する。
[Transmission process flow]
FIG. 7 is a flowchart showing a flow of transmission processing executed by the CPU 2 of the gateway device 1 according to the first embodiment. Each step will be described below.

ステップS31では、送信処理をスタートさせる。   In step S31, transmission processing is started.

ステップS32では、送信処理が完了しているかどうかを判断し、送信完了ならばステップS33に移行し、送信完了でないならばステップS40に移行する。   In step S32, it is determined whether or not the transmission process is completed. If the transmission is completed, the process proceeds to step S33. If the transmission is not completed, the process proceeds to step S40.

ステップS33では、RAM24のFIFO方式による一時保存データ構造にデータが収容されているかどうかを判断し、データが収容されているならばステップS34に移行し、データが収容されていないならばステップS43に移行する。   In step S33, it is determined whether or not the data is accommodated in the temporary storage data structure of the RAM 24 by the FIFO method. If the data is accommodated, the process proceeds to step S34, and if the data is not accommodated, the process proceeds to step S43. Transition.

ステップS34では、RAM24のデータ構造に収容されているデータが複数フレームあるかどうかを判断し、複数ある場合にはステップS35に移行し、複数ない場合にはステップS36に移行する。   In step S34, it is determined whether or not there are a plurality of frames of data stored in the data structure of the RAM 24. If there are a plurality of frames, the process proceeds to step S35, and if there are not, the process proceeds to step S36.

ステップS35では、データのIDによる優先順位の処理を行う。   In step S35, priority order processing based on the data ID is performed.

ステップS36では、送信データをセットする。   In step S36, transmission data is set.

ステップS37では、送信要求をセットする。   In step S37, a transmission request is set.

ステップS38では、送信するデータのアドレスを示すトランスミットポインタT_Poに10を加えるようにして、次の送信するデータを指すようにオフセットさせる。   In step S38, 10 is added to the transmit pointer T_Po indicating the address of the data to be transmitted, and an offset is made to indicate the next data to be transmitted.

ステップS39では、送信タイマをセットし、カウントアップする。   In step S39, a transmission timer is set and counted up.

ステップS40では、カウントアップされる送信タイマがタイムアップしているかどうかを判断し、タイムアップしているならばステップS41に移行し、タイムアップしていないならばステップS43に移行する。   In step S40, it is determined whether or not the transmission timer to be counted up is timed up. If the time is up, the process proceeds to step S41. If the time is not up, the process proceeds to step S43.

ステップS41では、送信要求をリセットする。   In step S41, the transmission request is reset.

ステップS42では、タイマをクリアする。   In step S42, the timer is cleared.

ステップS43では、処理を終了する。   In step S43, the process ends.

[データのID優先処理]
図8は実施例1のゲートウェイ装置1のCPU2で実行される送信処理におけるステップS35のデータのID処理の流れを示すフローチャートで、以下、各ステップについて説明する。
[Data ID priority processing]
FIG. 8 is a flowchart showing the flow of the data ID process in step S35 in the transmission process executed by the CPU 2 of the gateway apparatus 1 according to the first embodiment. Each step will be described below.

ステップS351では、IDによる優先度の処理をスタートする。   In step S351, priority processing based on ID is started.

ステップS352では、|S_Po-T_Po|/10(10はアドレス刻み値)を演算して未送信ID数を算出してCOUNT値とする処理を行う。   In step S352, | S_Po-T_Po | / 10 (where 10 is an address step value) is calculated to calculate the number of untransmitted IDs to obtain a COUNT value.

ステップS353では、T_Po+10(アドレスオフセット)を演算してSo_Poとする処理を行う。   In step S353, T_Po + 10 (address offset) is calculated and set to So_Po.

ステップS354では、T_PoをT_PoTMPとする処理を行う。   In step S354, a process of setting T_Po to T_PoTMP is performed.

ステップS355では、T_PoTMPが指し示すアドレスのデータのIDがSo_Poが指し示すアドレスのデータのIDより、優先順位が高いかどうかを判断し、優先順位が高いと判断するならばステップS357に移行し、優先順位が低いと判断するならばステップS356に移行する。   In step S355, it is determined whether or not the data ID of the address indicated by T_PoTMP has a higher priority than the data ID of the address indicated by So_Po. If it is determined that the priority is higher, the process proceeds to step S357. If it is determined that the value is low, the process proceeds to step S356.

ステップS356では、So_Poが指し示す優先順位の高いデータをT_PoTMPが指し示すアドレスに転送する。   In step S356, high priority data indicated by So_Po is transferred to the address indicated by T_PoTMP.

ステップS357では、So_Po+10(アドレスオフセット)を行ったものをSo_Poとする更新処理を行う。   In step S357, an update process is performed in which So_Po + 10 (address offset) is set to So_Po.

ステップS358では、COUNT値をデクリメントする。   In step S358, the COUNT value is decremented.

ステップS359では、COUNT値(未送信ID数)が0になったかどうかを判断し、0になったならばステップS360に移行し、0にならないならばステップS355に移行する。   In step S359, it is determined whether or not the COUNT value (the number of untransmitted IDs) has become 0. If 0, the process proceeds to step S360. If not, the process proceeds to step S355.

ステップS360では、最も優先度の高いIDとしてT_PoTMPに残ったデータを送信データとしてセットする。   In step S360, the data remaining in T_PoTMP as the highest priority ID is set as transmission data.

ステップS361では、送信するデータを示すT_PoとID優先度の高いデータとして送信セットしたT_PoTMPが、異なるデータを示すものかどうかを判断し、異なるデータを示すならばステップS362に移行し、同じデータを示すならばステップS363に移行する。   In step S361, it is determined whether T_Po indicating the data to be transmitted and T_PoTMP set as data having high ID priority indicate different data. If different data are indicated, the process proceeds to step S362, and the same data is transferred. If it is shown, the process proceeds to step S363.

ステップS362では、T_Poが示す送信するデータをT_PoTMPが示すようにして次の最も高い優先度にセットする。   In step S362, the data to be transmitted indicated by T_Po is set to the next highest priority as indicated by T_PoTMP.

ステップS363では、T_Po+10(アドレスオフセット)を行いT_PoとするようにしてT_Poを更新する。   In step S363, T_Po is updated by performing T_Po + 10 (address offset) to be T_Po.

ステップS364では、送信処理を終了する。   In step S364, the transmission process ends.

[ゲートウェイ通信作用]
<1>送信されるデータが単数の場合
実施例1において、例えばネットワークAからネットワークBへ通信を行う場合には、ネットワークAの1つのノードとなっているゲートウェイ装置1にデータを送るようにする。
ゲートウェイ装置1に送られたデータは、ネットワークAの通信線A1に接続された終端抵抗7a、トランシーバ3aを介して、CANバス上の通信信号からCPU2で取り扱える信号に変換され、通信部21aに送られる。
[Gateway communication]
<1> When the transmitted data is single In the first embodiment, for example, when communication is performed from the network A to the network B, the data is transmitted to the gateway device 1 that is one node of the network A. .
The data sent to the gateway device 1 is converted from a communication signal on the CAN bus to a signal that can be handled by the CPU 2 via the terminating resistor 7a and the transceiver 3a connected to the communication line A1 of the network A, and sent to the communication unit 21a. It is done.

通信部21aで受信されたデータは、メッセージボックス213aに一時的に収容される。
その後、受信されたことにより行われる図6に示すステップS11〜S22の割り込み処理により、CPU2で変換処理された送信データがRAM24のFIFOデータ構造231に一時的に保存される。
送信されるデータが単数の場合には、ステップS34の判断処理によりステップS35(図8に示すステップS351〜S364)を経ずにステップS36に移行するようにし、RAM24から通信部21bのメッセージボックス213bに送られ、アクセス制御部212b、プロトコルコア部211bでCANプロトコルに沿ったデータ、通信処理によりCPU2から出力されて、トランシーバ3b、終端抵抗7bを介してネットワークBの通信線B1に送信される。
Data received by the communication unit 21a is temporarily stored in the message box 213a.
Thereafter, the transmission data converted by the CPU 2 is temporarily stored in the FIFO data structure 231 of the RAM 24 by the interrupt processing of steps S11 to S22 shown in FIG.
If the data to be transmitted is singular, the process proceeds to step S36 without passing through step S35 (steps S351 to S364 shown in FIG. 8) by the determination process in step S34, and the message box 213b of the communication unit 21b from the RAM 24. The data is transmitted from the CPU 2 by the access control unit 212b and the protocol core unit 211b according to the CAN protocol and communication processing, and transmitted to the communication line B1 of the network B via the transceiver 3b and the termination resistor 7b.

<2>送信されるデータが複数の場合
送信されるデータが複数の場合には、送信するデータがRAM24のFIFOデータ構造に図5に示すように一時的に溜められることとなる。
このデータの送信処理において、送信完了後に送信すべきデータが複数あると判断されると、ステップS35、つまり図8に示すIDの優先処理により、そのデータ構造上、ファーストアウトで出力されるべき送信するデータのアドレスを示すT_Poと、セーブするアドレスを示すアドレスを示すS_Poの間のデータについてのIDの優先度を順に比較して、最も優先度の高いデータのアドレスをT_PoTMPが示すようにする(ステップS352〜S359)。
<2> When there are a plurality of data to be transmitted When there are a plurality of data to be transmitted, the data to be transmitted is temporarily stored in the FIFO data structure of the RAM 24 as shown in FIG.
In this data transmission process, if it is determined that there is a plurality of data to be transmitted after the transmission is completed, the transmission to be output first-out in the data structure in step S35, that is, the ID priority process shown in FIG. The priority of IDs for data between T_Po indicating the address of the data to be stored and S_Po indicating the address indicating the address to be saved is sequentially compared so that T_PoTMP indicates the address of the data with the highest priority ( Steps S352 to S359).

この処理後、T_PoTMPが示すデータをステップS360の処理で送信データとしてメッセージボックスに転送し、送信されるようにする。
この際にT_Poで送信されようとしていたデータがT_PoTMPが示すデータと異なる時、T_Poが示すデータをT_PoTMPが示すアドレスに転送する(ステップS361〜S364)。
このようにすれば、送信されるデータは、複数の送信するべきデータが溜まった状態になっても、常にIDによる優先度の高いデータとなる。
よって、実際には、送信エラーなどによって、送信タイミングが遅れたときにも、優先順位の高いIDから送信がされることになる。
After this process, the data indicated by T_PoTMP is transferred to the message box as transmission data in the process of step S360 so as to be transmitted.
At this time, when the data to be transmitted by T_Po is different from the data indicated by T_PoTMP, the data indicated by T_Po is transferred to the address indicated by T_PoTMP (steps S361 to S364).
In this way, the data to be transmitted is always data with a high priority based on the ID even when a plurality of data to be transmitted are accumulated.
Therefore, actually, even when the transmission timing is delayed due to a transmission error or the like, transmission is performed from an ID having a high priority.

また、図4を用いて従来の技術と比較して説明する。従来の技術では、図4(b)に示すように複数のデータを受信すると、FIFO(ファーストインファーストアウト)方式に従って、受信したデータを受信した順番に送信することになる。
実施例1では、図4(a)に示すように複数のデータを受信すると、受信したデータ中のIDによる優先度に従って送信されることになる。
Moreover, it demonstrates compared with a prior art using FIG. In the prior art, when a plurality of data is received as shown in FIG. 4B, the received data are transmitted in the order of reception according to the FIFO (first in first out) system.
In the first embodiment, as shown in FIG. 4A, when a plurality of data is received, the data is transmitted according to the priority by the ID in the received data.

また、このようにFIFOデータ構造231において、送信するデータの優先度を判断し、最も優先度の高いデータをメッセージボックス213a,213bに送るようにすることにより、実施例1のゲートウェイ装置1ではメッセージボックス213a,213bに送信データを1つのみ配置している。このため、メッセージボックス213a,213bの残りを全て受信データ用に割り当てられる。よって、より多くのメッセージデータを受信できることになる。   Further, in this way, in the FIFO data structure 231, the priority of the data to be transmitted is determined, and the highest priority data is sent to the message boxes 213a and 213b. Only one transmission data is arranged in the boxes 213a and 213b. For this reason, the rest of the message boxes 213a and 213b are allotted for received data. Therefore, more message data can be received.

次に、効果を説明する。   Next, the effect will be described.

実施例1のゲートウェイ装置にあっては、下記に列挙する効果を得ることができる。   In the gateway device of the first embodiment, the effects listed below can be obtained.

(1)車内の車載装置で複数の車内ネットワークA,Bを形成し、形成された異なるネットワークA,B間を接続して、ネットワークから受信するデータを一時的に保存・変換して別のネットワークに送信するようにし、異なるネットワークに接続している車載装置間でのデータのやり取りを行う、ゲートウェイ装置1において、中継送信するデータに含まれる送信先を示すIDコードの優先順位を予め記憶しておくRAM24を設け、データの送信完了後、次に送信するデータが複数ある場合にRAM24のIDコードの優先順位から、送信の優先順位を判断する優先順位判断処理をCPU2で行うため、送信エラーなどが発生した際も優先順位の高いデータから送信できる。
このことは、車載機器における通信が、各装置の制御に必要なデータの重要度順に送られるため、送信エラーなどが発生した際に大きな不具合を生じなくて済むことになり、また、運転者が車載機器から得られる情報を運転者が必要と感じやすいデータを遅れや中断なく正確に伝達する車載機器のネットワークにできることになる。
(1) A plurality of in-vehicle networks A and B are formed by in-vehicle devices in the vehicle, the different networks A and B are connected, and data received from the network is temporarily stored and converted to another network. In the gateway device 1 for exchanging data between in-vehicle devices connected to different networks, the priority order of ID codes indicating the destinations included in the data to be relayed is stored in advance. A RAM 24 is provided, and after the data transmission is completed, if there is a plurality of data to be transmitted next, the CPU 2 performs priority order judgment processing for judging the transmission priority order from the priority order of the ID code of the RAM 24. Can be transmitted from data with high priority.
This means that the communication in the in-vehicle device is sent in the order of importance of the data necessary for control of each device, so that no major troubles can occur when a transmission error occurs, and the driver This makes it possible to create a network of in-vehicle devices that accurately transmits information that can be easily felt by the driver to the information obtained from the in-vehicle devices without delay or interruption.

(2)車両内に形成されるネットワークA,BがCANプロトコルを用いるものであり、中継送信するデータの変換を少なくとも行うCPU2を設け、CANプロトコルに沿った処理を行う通信部21a,21bをCPU2に設け、受信したデータと送信しようとする複数のデータを一時的に保存するメッセージボックス213a,213bを通信部21a,21bに設け、RAM24をCPU2に設け、RAM24とメッセージボックス213a,213bを通信線A1,B1で接続するようにし、送信しようとするデータをRAM24内に一時的に保存し、CPU2の処理によりRAM24内のデータを並べ替え、最も優先順位の高い送信データのみをメッセージボックス213a,213bに送るようにしたため、送信エラーなどの際に優先度の高いデータから送信でき、送信用のメッセージボックスの割り当てを1つにすることができ、メッセージボックスの他を受信用に割り当てることができる。よって、より多くのメッセージデータを受信することができ、車内のネットワーク間における通信をより自由度高く行うことができる。   (2) The networks A and B formed in the vehicle use the CAN protocol, and the CPU 2 that at least converts the data to be relayed is provided, and the communication units 21a and 21b that perform processing in accordance with the CAN protocol are connected to the CPU 2. The message boxes 213a and 213b for temporarily storing received data and a plurality of data to be transmitted are provided in the communication units 21a and 21b, the RAM 24 is provided in the CPU 2, and the RAM 24 and the message boxes 213a and 213b are connected to the communication line. The data to be transmitted is temporarily stored in the RAM 24 by connecting with A1 and B1, and the data in the RAM 24 is rearranged by the processing of the CPU 2, and only the transmission data with the highest priority is sent to the message boxes 213a and 213b. Because of this, it is possible to send data with high priority in the event of a transmission error. The assignment of the message box can be one, it is possible to assign other message boxes for reception. Therefore, more message data can be received, and communication between networks in the vehicle can be performed with a higher degree of freedom.

以上、本発明のゲートウェイ装置を実施例1に基づき説明してきたが、具体的な構成については、これらの実施例に限られるものではなく、特許請求の範囲の各請求項に係る発明の要旨を逸脱しない限り、設計の変更や追加等は許容される。   As mentioned above, although the gateway apparatus of this invention has been demonstrated based on Example 1, it is not restricted to these Examples about concrete structure, The summary of the invention which concerns on each claim of a claim Unless it deviates, design changes and additions are allowed.

例えば、実施例1では、CPUの内部記憶装置であるRAMに送信しようとするデータを一時的に保存しているが、CPUの外部記憶装置に送信しようとするデータを一時的に保存するようにしてもよい。   For example, in the first embodiment, the data to be transmitted is temporarily stored in the RAM which is the internal storage device of the CPU, but the data to be transmitted is temporarily stored in the external storage device of the CPU. May be.

実施例1のゲートウェイ装置を用いるCANシステムの構成を示す説明図である。It is explanatory drawing which shows the structure of the CAN system using the gateway apparatus of Example 1. FIG. 実施例1のゲートウェイ装置のブロック図である。It is a block diagram of the gateway apparatus of Example 1. 実施例1のゲートウェイ装置のCPUのCAN通信処理部とRAM部分の説明図である。3 is an explanatory diagram of a CAN communication processing unit and a RAM portion of the CPU of the gateway device of Embodiment 1. FIG. 実施例1のゲートウェイ装置の受信データと送信データの関係を従来と比較した説明図である。It is explanatory drawing which compared the relationship between the reception data of the gateway apparatus of Example 1, and transmission data with the past. 実施例1のゲートウェイ装置の送信データの一時保存するデータ構造を示す説明図である。It is explanatory drawing which shows the data structure of temporarily storing the transmission data of the gateway apparatus of Example 1. FIG. 実施例1のゲートウェイ装置の受信処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of the reception process of the gateway apparatus of Example 1. FIG. 実施例1のゲートウェイ装置の送信処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of the transmission process of the gateway apparatus of Example 1. FIG. 実施例1のゲートウェイ装置の送信データを優先順位にソートする処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of a process which sorts the transmission data of the gateway apparatus of Example 1 into a priority. 従来の受信処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of the conventional reception process. 従来の送信処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of the conventional transmission process.

符号の説明Explanation of symbols

1 ゲートウェイ装置
2 CPU
21a 通信部
21b 通信部
22 ウォッチドッグタイマ部
23 ROM
231 FIFOデータ構造
24 RAM
3a トランシーバ
3b トランシーバ
4 電源回路
5 発振子
6 EEPROM
7a 終端抵抗
7b 終端抵抗
A ネットワークA
B ネットワークB
A1 通信線
A2 車載機器
A3 車載機器
A4 車載機器
A5 車載機器
A6 車載機器
B1 通信線
B2 車載機器
B3 車載機器
B4 車載機器
B5 車載機器
B6 車載機器
1 Gateway device 2 CPU
21a Communication part 21b Communication part 22 Watchdog timer part 23 ROM
231 FIFO data structure 24 RAM
3a transceiver 3b transceiver 4 power supply circuit 5 oscillator 6 EEPROM
7a Terminating resistor 7b Terminating resistor A Network A
B Network B
A1 communication line A2 in-vehicle equipment A3 in-vehicle equipment A4 in-vehicle equipment A5 in-vehicle equipment A6 in-vehicle equipment B1 communication line B2 in-vehicle equipment B3 in-vehicle equipment B4 in-vehicle equipment B5 in-vehicle equipment B6 in-vehicle equipment

Claims (2)

車内の車載装置で複数の車内ネットワークを形成し、
形成された異なるネットワーク間を接続して、
ネットワークから受信するデータを一時的に保存・変換して別のネットワークに送信するようにし、
異なるネットワークに接続している車載装置間でのデータのやり取りを行う、
ゲートウェイ装置において、
中継送信するデータに含まれる送信先を示すIDコードの優先順位を予め記憶しておく優先ID記憶手段を設け、
データの送信完了後、次に送信するデータが複数ある場合に前記優先ID記憶手段のIDコードの優先順位から、送信の優先順位を判断する優先順位判断手段を設けたことを特徴とするゲートウェイ装置。
Forming multiple in-car networks with in-car devices in the car,
Connect between the different networks formed,
Temporarily save and convert data received from the network and send it to another network,
Exchange data between in-vehicle devices connected to different networks,
In the gateway device,
Provide priority ID storage means for storing in advance the priority order of ID codes indicating the destination included in the data to be relayed,
A gateway device comprising priority order judging means for judging the priority order of transmission from the priority order of ID codes of the priority ID storage means when there is a plurality of data to be transmitted next after data transmission is completed .
請求項1に記載されたゲートウェイ装置において、
車両内に形成されるネットワークがCANプロトコルを用いるものであり、
中継送信するデータの変換を少なくとも行うCPUを設け、
CANプロトコルに沿った処理を行うCAN通信処理部を前記CPUに設け、
受信したデータと送信しようとするデータを一時的に保存するメッセージボックスを前記CAN通信処理部に設け、
前記優先ID記憶手段としてRAMを前記CPUに設け、
前記RAMと前記メッセージボックスをバスで接続するようにし、
送信しようとする複数のデータを前記RAM内に一時的に保存し、前記優先順位判断手段が前記RAM内のデータを並べ替え、最も優先順位の高い送信データのみを前記メッセージボックスに送るようにしたことを特徴とするゲートウェイ装置。
The gateway device according to claim 1,
The network formed in the vehicle uses the CAN protocol,
Provide at least a CPU to convert relayed data,
A CAN communication processing unit that performs processing according to the CAN protocol is provided in the CPU,
A message box that temporarily stores received data and data to be transmitted is provided in the CAN communication processing unit,
RAM is provided in the CPU as the priority ID storage means,
The RAM and the message box are connected by a bus,
A plurality of data to be transmitted are temporarily stored in the RAM, and the priority order judging means rearranges the data in the RAM so that only the transmission data with the highest priority is sent to the message box. A gateway device characterized by that.
JP2003392904A 2003-11-21 2003-11-21 Gateway apparatus Withdrawn JP2005159568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003392904A JP2005159568A (en) 2003-11-21 2003-11-21 Gateway apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003392904A JP2005159568A (en) 2003-11-21 2003-11-21 Gateway apparatus

Publications (1)

Publication Number Publication Date
JP2005159568A true JP2005159568A (en) 2005-06-16

Family

ID=34719458

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003392904A Withdrawn JP2005159568A (en) 2003-11-21 2003-11-21 Gateway apparatus

Country Status (1)

Country Link
JP (1) JP2005159568A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007174180A (en) * 2005-12-21 2007-07-05 Nissan Motor Co Ltd Gateway apparatus and data transmission reception control method
DE112006002638T5 (en) 2005-10-12 2008-08-21 AUTONETWORKS Technologies, LTD., Yokkaichi In-vehicle database distribution node and in-vehicle database system
DE112008001963T5 (en) 2007-07-24 2010-06-02 Autonetworks Technologies, Ltd., Yokkaichi-shi Distribution device, communication system and communication method
DE112008002092T5 (en) 2007-08-03 2010-07-08 Autonetworks Technologies, Ltd., Yokkaichi-shi Vehicle communication system
DE112008002688T5 (en) 2007-10-05 2010-08-12 Autonetworks Technologies, Ltd., Yokkaichi-shi Communication system and switching device
DE112008002252T5 (en) 2007-08-22 2010-09-16 AUTONETWORKS Technologies, LTD., Yokkaichi Transmitting device, transmission method and communication system
DE112008002180T5 (en) 2007-08-22 2010-09-23 AUTONETWORKS Technologies, LTD., Yokkaichi Communication system and communication method
DE112008002193T5 (en) 2007-08-22 2010-09-23 AUTONETWORKS Technologies, LTD., Yokkaichi Distribution device, communication system and communication method
DE112009000500T5 (en) 2008-03-05 2011-02-10 AUTONETWORKS Technologies, LTD., Yokkaichi Forwarding device, communication system and communication method
DE112008002194T5 (en) 2007-08-22 2011-02-17 AUTONETWORKS Technologies, LTD., Yokkaichi Forwarding device, communication system and communication method
US8041747B2 (en) 2008-02-20 2011-10-18 Fujitsu Ten Limited Data search device and gateway device in communication apparatus
JP2012240493A (en) * 2011-05-17 2012-12-10 Denso Corp On-vehicle communication device, and communication system for vehicle
DE112009002695T5 (en) 2008-11-04 2013-04-25 Autonetworks Technologies, Ltd. Communication device, forwarding device, communication system and communication method
KR20140093998A (en) 2011-12-02 2014-07-29 가부시키가이샤 오토네트웍스 테크놀로지스 Transmission message generating device and vehicle on-board transmission system
KR101613989B1 (en) 2014-12-17 2016-04-21 울산과학기술원 Data packet processing method using LED communication in WAVE communication based vehicle and apparatus thereof
CN111953542A (en) * 2020-08-12 2020-11-17 深圳市前海澳威智控科技有限责任公司 System for ensuring gateway stable operation

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8155825B2 (en) 2005-10-12 2012-04-10 Autonetworks Technologies, Ltd. On-vehicle database distribution node and on-vehicle database system
DE112006002638T5 (en) 2005-10-12 2008-08-21 AUTONETWORKS Technologies, LTD., Yokkaichi In-vehicle database distribution node and in-vehicle database system
JP2007174180A (en) * 2005-12-21 2007-07-05 Nissan Motor Co Ltd Gateway apparatus and data transmission reception control method
DE112008001963T5 (en) 2007-07-24 2010-06-02 Autonetworks Technologies, Ltd., Yokkaichi-shi Distribution device, communication system and communication method
US8291109B2 (en) 2007-07-24 2012-10-16 Autonetworks Technologies, Ltd. Distribution apparatus, communication system and communication method
DE112008002092T5 (en) 2007-08-03 2010-07-08 Autonetworks Technologies, Ltd., Yokkaichi-shi Vehicle communication system
US8645452B2 (en) 2007-08-03 2014-02-04 Autonetworks Technologies, Ltd. In-vehicle communication system
US8310352B2 (en) 2007-08-22 2012-11-13 Autonetworks Technologies, Ltd. Relay apparatus, communication system, and communication method
US9172555B2 (en) 2007-08-22 2015-10-27 National University Corporation Nagoya University Distribution apparatus, communication system and communication method
DE112008002194T5 (en) 2007-08-22 2011-02-17 AUTONETWORKS Technologies, LTD., Yokkaichi Forwarding device, communication system and communication method
US8527601B2 (en) 2007-08-22 2013-09-03 National University Corporation Nagoya University Sending apparatus, sending method and communication system
DE112008002193T5 (en) 2007-08-22 2010-09-23 AUTONETWORKS Technologies, LTD., Yokkaichi Distribution device, communication system and communication method
US8249087B2 (en) 2007-08-22 2012-08-21 National University Corporation Nagoya University Communication system and communication method
DE112008002180T5 (en) 2007-08-22 2010-09-23 AUTONETWORKS Technologies, LTD., Yokkaichi Communication system and communication method
DE112008002252T5 (en) 2007-08-22 2010-09-16 AUTONETWORKS Technologies, LTD., Yokkaichi Transmitting device, transmission method and communication system
DE112008002688T5 (en) 2007-10-05 2010-08-12 Autonetworks Technologies, Ltd., Yokkaichi-shi Communication system and switching device
US8755387B2 (en) 2007-10-05 2014-06-17 Autonetworks Technologies, Ltd. Communication system and relay apparatus
US8041747B2 (en) 2008-02-20 2011-10-18 Fujitsu Ten Limited Data search device and gateway device in communication apparatus
US8832053B2 (en) 2008-03-05 2014-09-09 Autonetworks Technologies, Ltd. Relay device, communication system and communication method
DE112009000500T5 (en) 2008-03-05 2011-02-10 AUTONETWORKS Technologies, LTD., Yokkaichi Forwarding device, communication system and communication method
DE112009002695T5 (en) 2008-11-04 2013-04-25 Autonetworks Technologies, Ltd. Communication device, forwarding device, communication system and communication method
US8972639B2 (en) 2008-11-04 2015-03-03 Autonetworks Technologies, Ltd. Communication apparatus, relay apparatus, communication system and communication method
JP2012240493A (en) * 2011-05-17 2012-12-10 Denso Corp On-vehicle communication device, and communication system for vehicle
KR20140093998A (en) 2011-12-02 2014-07-29 가부시키가이샤 오토네트웍스 테크놀로지스 Transmission message generating device and vehicle on-board transmission system
US9614767B2 (en) 2011-12-02 2017-04-04 Autonetworks Technologies, Ltd. Transmission message generating device and vehicle-mounted communication system
KR101613989B1 (en) 2014-12-17 2016-04-21 울산과학기술원 Data packet processing method using LED communication in WAVE communication based vehicle and apparatus thereof
CN111953542A (en) * 2020-08-12 2020-11-17 深圳市前海澳威智控科技有限责任公司 System for ensuring gateway stable operation
CN111953542B (en) * 2020-08-12 2023-08-04 深圳市前海澳威智控科技有限责任公司 System for guaranteeing stable operation of gateway

Similar Documents

Publication Publication Date Title
JP2005159568A (en) Gateway apparatus
US7801173B2 (en) Communication message conversion apparatus and communication message conversion method
US10530606B2 (en) Method for transmitting data via a serial communication bus, bus interface, and computer program
US8509257B2 (en) CAN node, and communication method of communication system including CAN node
WO2014057643A1 (en) Relay device
JP4926648B2 (en) In-vehicle gateway device
JP2006333438A (en) Gateway apparatus and routing method
US20160359545A1 (en) Vehicle-mounted control device
JP2007036907A (en) Gateway apparatus
JP2014045421A (en) Network system
US11340888B2 (en) Relay device and external device
JP6544230B2 (en) Communications system
JP2006191337A (en) Gateway device for transferring message between buses and network system using the device
JP2009033251A (en) Distribution device, communication system, communication method
CN102100037B (en) The user node of the transmission event memory with function separation of communication system
JP2006253922A (en) Gateway apparatus and data transfer method for the gateway apparatus
JP2006340099A (en) Gateway unit
JP5728043B2 (en) Gateway device
US8559424B2 (en) Data communication method and communication apparatus
JP2005159769A (en) Gateway apparatus
JP4361540B2 (en) Gateway device, data transfer method, and program
JP2007036632A (en) Gateway apparatus
KR19990061216A (en) Packet bus and method of transmitting packet data using the same
JP2009165014A (en) Onboard relay connection unit
JP4581284B2 (en) Communication system and electronic control device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20051115

A621 Written request for application examination

Effective date: 20060324

Free format text: JAPANESE INTERMEDIATE CODE: A621

A761 Written withdrawal of application

Effective date: 20070802

Free format text: JAPANESE INTERMEDIATE CODE: A761