Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5540939B2 - Relay device and relay method - Google Patents
[go: Go Back, main page]

JP5540939B2 - Relay device and relay method - Google Patents

Relay device and relay method Download PDF

Info

Publication number
JP5540939B2
JP5540939B2 JP2010145234A JP2010145234A JP5540939B2 JP 5540939 B2 JP5540939 B2 JP 5540939B2 JP 2010145234 A JP2010145234 A JP 2010145234A JP 2010145234 A JP2010145234 A JP 2010145234A JP 5540939 B2 JP5540939 B2 JP 5540939B2
Authority
JP
Japan
Prior art keywords
data
relay
time
storage area
processing
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
JP2010145234A
Other languages
Japanese (ja)
Other versions
JP2012010167A (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.)
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries 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 Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd filed Critical Sumitomo Wiring Systems Ltd
Priority to JP2010145234A priority Critical patent/JP5540939B2/en
Publication of JP2012010167A publication Critical patent/JP2012010167A/en
Application granted granted Critical
Publication of JP5540939B2 publication Critical patent/JP5540939B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Description

本発明は、2つ以上のネットワークに接続し、一方のネットワークから受信したデータを他方のネットワークへ中継する中継装置に関し、効率的に中継処理以外の処理も実行し、多様な機能を持たせることができる中継装置及び中継方法に関する。   The present invention relates to a relay apparatus that connects to two or more networks and relays data received from one network to the other network, and efficiently executes processes other than the relay process and has various functions. The present invention relates to a relay apparatus and a relay method capable of performing the above.

複数の通信装置が夫々接続された異なる複数のネットワーク間でのデータの送受信は、ゲートウェイ(GW:Gate Way)と呼ばれる中継装置によって中継される。昨今では、メモリの容量増大、プロセッサの処理速度向上などの技術進歩により、中継装置は中継処理のみ行なう構成ではない場合がある。例えば、中継装置が異なる複数のネットワークに接続していることによって特定の処理を行なうには利点がある場合など、中継に係るデータに基づく演算処理などを併せて行なう機能を有することがある。   Data transmission / reception between a plurality of different networks to which a plurality of communication devices are respectively connected is relayed by a relay device called a gateway (GW). In recent years, the relay device may not be configured to perform only relay processing due to technological progress such as an increase in memory capacity and an improvement in processor processing speed. For example, when there is an advantage in performing specific processing by connecting the relay device to a plurality of different networks, there may be a function of performing arithmetic processing based on data related to relaying together.

特に、車載ネットワークの分野では、1つのネットワークバスに接続される通信装置の数が制限されるために複数のネットワークに分けられることが多く、また、中継装置でのデータの停滞が問題となる。更に、車載ネットワークの分野ではネットワークの軽量化のために中継装置が中継処理以外の処理を行なう構成によって部品数及び装置数を減少させるための工夫がなされている。   In particular, in the field of in-vehicle networks, the number of communication devices connected to one network bus is limited, so that it is often divided into a plurality of networks, and stagnation of data in the relay device becomes a problem. Further, in the field of in-vehicle networks, in order to reduce the weight of the network, a device for reducing the number of parts and the number of devices by a configuration in which the relay device performs processing other than relay processing has been made.

中継装置は大抵、異なるネットワーク夫々からデータを受信する受信期間と、各ネットワークへ受信したデータを送信する送信期間とを分け、受信期間と送信期間とを順次繰り返す構成としている。中継装置は、中継処理のみを行なう場合であっても、より中継処理を効率化するために、受信量又はネットワークの混雑状況に合わせて受信期間と送信期間とを一定とせずに可変とする構成も提案されている。   In general, the relay apparatus is configured to divide a reception period for receiving data from different networks and a transmission period for transmitting data received to each network, and sequentially repeat the reception period and the transmission period. Even when only relay processing is performed, the relay device has a configuration in which the reception period and the transmission period are not constant but variable in accordance with the reception amount or the network congestion state in order to make the relay processing more efficient. Has also been proposed.

特許文献1には、未送信のデータの積み残しを低減するために、受信時間及び受信データの格納処理に要する時間を測定し、測定した受信時間に基づいて送信処理が可能な期間を算出し、算出した期間内で送信を行なう中継装置の発明が開示されている。   Patent Document 1 measures the reception time and the time required for storage processing of received data in order to reduce the accumulation of unsent data, and calculates a period during which transmission processing is possible based on the measured reception time. An invention of a relay device that performs transmission within a calculated period is disclosed.

特開2006−319759号公報JP 2006-319759 A

特許文献1に開示されている発明により、受信量、送信量に応じて受信期間と送信期間とを相互に調整し、中継処理時間全体の増大を抑制し、中継処理を効率化して未送信のデータが停滞するなどの状況を回避することが可能である。なお特許文献1では、中継装置が中継処理以外の処理を行なうことを想定していない。   According to the invention disclosed in Patent Document 1, the reception period and the transmission period are mutually adjusted according to the reception amount and the transmission amount, the increase of the entire relay processing time is suppressed, the relay processing is made efficient, and the unsent It is possible to avoid situations such as data stagnation. In Patent Document 1, it is not assumed that the relay device performs processing other than relay processing.

中継装置が、中継処理以外の処理を行なうためには、当該中継処理以外の処理のための期間を与えなければならない。受信量が少ないためにプロセッサが演算可能であれば、自動的に他の処理が行なわれるが、受信量が多く、受信したデータが送信されずに停滞している場合は、プロセッサはしばらく中継処理以外の処理を行なうことが不可能となる。この場合、中継処理以外の演算機能の低下を招き、ネットワーク全体の機能の低下を招きかねない。   In order for the relay device to perform a process other than the relay process, a period for a process other than the relay process must be provided. If the processor can calculate because the received amount is small, other processing is performed automatically. However, if the received amount is large and the received data is stagnant without being transmitted, the processor performs relay processing for a while. It becomes impossible to perform other processes. In this case, a calculation function other than the relay process may be deteriorated, and the function of the entire network may be deteriorated.

本発明は、斯かる事情に鑑みてなされたものであり、効率的に中継処理以外の処理も実行し、多様な機能を持たせることができる中継装置及び中継方法を提供することを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a relay device and a relay method that can efficiently execute processes other than the relay process and have various functions. .

第1発明に係る中継装置は、複数のネットワークに接続され、1つのネットワークからデータを受信して受信用記憶領域に記憶する受信手段と、送信用記憶領域に記憶してあるデータを読み出して他のネットワークへ送信する送信手段と、前記受信用記憶領域に受信したデータが在る場合に、該データを送信用記憶領域へ移動させる移動手段とを備え、複数のネットワーク間でデータを中継する中継装置において、計時手段と、該計時手段で測定した第1の時間内での前記移動手段によるデータの移動回数を測定する手段と、該手段が測定した移動回数が所定値以上か否かを判断する手段と、該手段が所定値以上であると判断した場合、第2の時間が経過するまで前記移動手段による移動を中断する手段とを備えることを特徴とする。 The relay device according to the first invention is connected to a plurality of networks, receives data from one network and stores it in a reception storage area, reads out data stored in the transmission storage area, and others A relay unit that relays data between a plurality of networks, and a transmission unit that transmits the data to the network, and a moving unit that moves the data to the transmission storage area when the received storage area is present in the device, timing means, means for measuring the number of mobile times of the data by the moving means in a first time measured by the regimen time unit, the number of mobile times of said means was measured whether more than a predetermined value And means for interrupting movement by the moving means until a second time elapses when the means is determined to be greater than or equal to a predetermined value.

第2発明に係る中継装置は、第2の時間内では、中継処理以外の他の処理を実行するようにしてあることを特徴とする。   The relay device according to the second invention is characterized in that processing other than relay processing is executed within the second time.

第3発明に係る中継装置は、データに対し演算処理を実行させる手段を備え、前記移動が中断中であることを前記手段へ通知するようにしてあることを特徴とする。   A relay device according to a third aspect of the invention is characterized by comprising means for executing arithmetic processing on data, and notifying the means that the movement is suspended.

第4発明に係る中継装置は、第1及び第2の時間、並びに前記移動回数の設定を受け付ける手段を更に備えることを特徴とする。 Relay apparatus according to the fourth invention, the first and second time, and characterized by further comprising means for receiving setting of the number of mobile times.

第5発明に係る中継方法は、異なる複数のネットワークに接続され、1つのネットワークからデータを受信して受信用記憶領域に記憶する受信手段と、送信用記憶領域に記憶してあるデータを読み出して他のネットワークへ送信する送信手段と、前記受信用記憶領域に受信したデータが在る場合に、該データを送信用記憶領域へ移動させる移動手段とを備える中継装置が、複数のネットワーク間でデータを中継する方法において、第1の時間を計時し、第1の時間内での前記移動手段によるデータの移動回数を測定し、測定した移動回数が所定値以上であるか否かを判断し、所定値上であると判断した場合、第2の時間が経過するまで前記受信用記憶領域から送信用記憶領域へのデータの移動を中断することを特徴とする。 A relay method according to a fifth aspect of the present invention is a receiving method connected to a plurality of different networks, receiving data from one network and storing it in a receiving storage area, and reading out the data stored in the transmitting storage area. A relay device comprising: a transmission means for transmitting to another network; and a moving means for moving the data to the transmission storage area when the received data is in the reception storage area. a method of relaying, the first time by counting the number of mobile times of the data by the moving means in the first time were measured, the number of mobile gyrus was measured determines whether more than a predetermined value and, if it is determined that the on predetermined value or more, characterized by interrupting the movement of data to the transmission storage area from the reception memory area until the second time elapses.

本発明では、送信先のネットワークが混雑しデータを送信できない一方で、受信量が多く受信用記憶領域に残るデータ量が増大した後、送信先のネットワークの混雑が緩和した場合に、第1の時間内に中継による受信用記憶領域から送信用記憶領域への移動回数が多くなったときでも、第2の期間分だけ移動が中断される。これにより、中継装置では、中継処理の負荷が重い期間であっても第2の期間で他の処理を行なうことが可能となる。 In the present invention, when the destination network is congested and data cannot be transmitted, the amount of received data increases and the amount of data remaining in the reception storage area increases. Even when the number of times of movement from the reception storage area to the transmission storage area by relay increases within the time, the movement is interrupted for the second period. As a result, the relay device can perform other processing in the second period even if the relay processing load is heavy.

本発明では、中断中は中継処理以外の処理が行なわれる。これにより、中継装置であっても中継処理以外の多様な機能を実現することが可能となる。   In the present invention, processing other than relay processing is performed during interruption. Accordingly, various functions other than the relay processing can be realized even in the relay device.

本発明では、中断中はアプリケーション処理を実行させる手段へ中断が通知され、アプリケーション処理が実行される。これにより、中継装置であっても中継処理以外の演算処理が可能となる。   In the present invention, the interruption is notified to the means for executing the application process during the interruption, and the application process is executed. Thereby, even if it is a relay apparatus, arithmetic processing other than relay processing is attained.

本発明では、中断を行なうための規準となる第1の時間、中断中に他の処理を行なうことができる第2の時間、並びに前記移動回数の設定が任意に可能となる。これにより、中継処理以外の処理内容に合わせて処理を効率化することが可能となる。 In the present invention, the first time as a criterion for performing the interruption, second time that can perform other processing during the interruption, and the moving times number setting is arbitrarily. This makes it possible to improve the processing efficiency according to the processing content other than the relay processing.

本発明による場合、中継処理の負荷が重いときでも中継処理期間の増大を防ぎ、中継処理以外の他の処理を行なう猶予が与えられるので、中継装置のアプリケーション機能の低下を招くことが回避される。これにより中継装置は、多様な機能を効率的に実行させることができる。   According to the present invention, it is possible to prevent an increase in the relay processing period even when the load of the relay processing is heavy, and to give a grace to perform other processing than the relay processing, thereby avoiding a decrease in the application function of the relay device. . Thereby, the relay device can efficiently execute various functions.

本実施の形態における車載通信システムの構成を示す構成図である。It is a block diagram which shows the structure of the vehicle-mounted communication system in this Embodiment. 本実施の形態における車載通信システムを構成するGW装置の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the GW apparatus which comprises the vehicle-mounted communication system in this Embodiment. GW装置のCPUにより実現される機能を示す機能ブロック図である。It is a functional block diagram which shows the function implement | achieved by CPU of GW apparatus. GW装置のCPUにより実行される中断処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the interruption process procedure performed by CPU of GW apparatus. GW装置のCPUにて受け付けられる設定処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the setting process procedure received in CPU of GW apparatus.

以下、本発明をその実施の形態を示す図面に基づき具体的に説明する。
なお、以下に説明する実施の形態では、本発明を、車両に搭載される複数のECU(Electronic Control Unit)を接続する通信システムにおける中継装置に適用する例を挙げて説明する。
Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof.
In the embodiments described below, the present invention will be described with reference to an example in which the present invention is applied to a relay device in a communication system that connects a plurality of ECUs (Electronic Control Units) mounted on a vehicle.

図1は、本実施の形態における車載通信システムの構成を示す構成図である。本実施の形態における車載通信システムは、複数のECU1a,ECU1a,…、ECU1b,ECU1b,…が夫々接続されているCAN(Controller Area Network)バス2a,CANバス2bと、CANバス2a及びCANバス2b間のデータの送受信を中継するGW装置3とで構成される。   FIG. 1 is a configuration diagram showing the configuration of the in-vehicle communication system in the present embodiment. The in-vehicle communication system in the present embodiment includes a CAN (Controller Area Network) bus 2a, a CAN bus 2b, a CAN bus 2a, and a CAN bus 2b to which a plurality of ECUs 1a, 1a,. It is comprised with the GW apparatus 3 which relays transmission / reception of data between.

各ECU1a,ECU1a,…、ECU1b,ECU1b,…は夫々、CANバス2a、又はCANバス2bにバス型に接続している。各ECU1a,ECU1a,…、ECU1b,ECU1b,…は夫々、CANプロトコルに基づき相互の通信を実現する。なお、接続形態はこれに限らず、スター型、ディジーチェーン型等のいずれの接続形態でもよい。   Each ECU 1a, ECU 1a,..., ECU 1b, ECU 1b,... Is connected to the CAN bus 2a or the CAN bus 2b in a bus form. Each ECU 1a, ECU 1a,..., ECU 1b, ECU 1b,... Realizes mutual communication based on the CAN protocol. The connection form is not limited to this, and any connection form such as a star type or a daisy chain type may be used.

各ECU1a,ECU1a,…、ECU1b,ECU1b,…は夫々、測定値、計算値、制御値等の各種物理量の数値情報を含むデータの送信又はエンジン、ブレーキ等のマイクロコンピュータによる制御が可能な装置である。例えば、CANバス2aに接続されている一のECU1aは、ABS(Antilock Brake System)として機能し、車輪の回転速度(車輪速)を検知する図示しないセンサと接続されている。当該ECU1aは、車両の制動時にセンサを介して検知した車輪速に基づいてブレーキを制御すると共に、車輪速の測定値をデータとしてGW装置3を経由してECU1bへ送信する。   Each of the ECU 1a, ECU 1a,..., ECU 1b, ECU 1b,. is there. For example, one ECU 1a connected to the CAN bus 2a functions as an ABS (Antilock Brake System) and is connected to a sensor (not shown) that detects the rotational speed (wheel speed) of the wheel. The ECU 1a controls the brake based on the wheel speed detected via the sensor during braking of the vehicle, and transmits the measured value of the wheel speed as data to the ECU 1b via the GW device 3.

GW装置3は、ECU1a又はECU1bから送信されたデータを受信し、CANプロトコルに基づきデータに付与されているIDを識別し、他方のECU1b又はECU1aへ中継すべきか否かを判断し、中継すべき場合に他方へ送信する中継機能を実現する。   The GW apparatus 3 receives the data transmitted from the ECU 1a or ECU 1b, identifies the ID given to the data based on the CAN protocol, determines whether or not to relay to the other ECU 1b or ECU 1a, and should relay In some cases, a relay function for transmitting to the other is realized.

図2は、本実施の形態における車載通信システムを構成するGW装置3の内部構成を示すブロック図である。GW装置3は、CPU(Central Processing Unit)31、ROM(Read Only Memory)32、RAM(Random Access Memory)33及びCANコントローラ34を有するマイクロコンピュータ(図2中では「μC」と記載)30と、第1トランシーバ35と、第2トランシーバ36とを備える。   FIG. 2 is a block diagram showing an internal configuration of the GW apparatus 3 constituting the in-vehicle communication system according to the present embodiment. The GW apparatus 3 includes a microcomputer (described as “μC” in FIG. 2) 30 having a CPU (Central Processing Unit) 31, a ROM (Read Only Memory) 32, a RAM (Random Access Memory) 33, and a CAN controller 34. A first transceiver 35 and a second transceiver 36 are provided.

CPU31は、ROM32に記憶されているアプリケーションプログラム37及び中継プログラム38をRAM33に読み出して実行し、後述する各処理を実行する。CPU31はMPUであってもよい。   The CPU 31 reads the application program 37 and the relay program 38 stored in the ROM 32 into the RAM 33 and executes them, and executes each process described later. The CPU 31 may be an MPU.

ROM32は、マスクROM、EPROM(Erasable Programmable ROM)、EEPROM(Electrically EPROM)、フラッシュメモリ等の不揮発性メモリを利用する。ROM32には、アプリケーションプログラム37及び中継プログラム38が記憶されている。またROM32には、下記の処理で参照する第1及び第2の時間、並びに移動回数又は移動データ量に対する所定値が記憶されている。   The ROM 32 uses a non-volatile memory such as a mask ROM, an EPROM (Erasable Programmable ROM), an EEPROM (Electrically EPROM), or a flash memory. In the ROM 32, an application program 37 and a relay program 38 are stored. Further, the ROM 32 stores first and second times referred to in the following processing, and predetermined values for the number of movements or the amount of movement data.

RAM33は、DRAM(Dynamic Random Access Memory)、SRAM(Static Random Access Memory)等の揮発性メモリを利用する。RAM33は、CPU31の処理により発生する各種情報を一時的に記憶する。またRAM33は、後述するように、受信したデータを記憶する受信バッファ44、送信するデータが蓄積される送信メッセージボックス45として利用される。   The RAM 33 uses volatile memory such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory). The RAM 33 temporarily stores various information generated by the processing of the CPU 31. The RAM 33 is used as a reception buffer 44 for storing received data and a transmission message box 45 for storing data to be transmitted, as will be described later.

CANコントローラ34は、CANに基づく通信を実現する。CANコントローラ34は、CANプロトコルに基づき受信されたデータを解釈してCPU31へ通知すると共に、CPU31から与えられたデータをCANプロトコルに基づくデータとして送信する機能を有する。   The CAN controller 34 realizes communication based on CAN. The CAN controller 34 has a function of interpreting data received based on the CAN protocol and notifying the CPU 31 of data received from the CPU 31 as data based on the CAN protocol.

第1トランシーバ35及び第2トランシーバ36は夫々、CANバス2a及びCANバス2bにおけるCANプロトコルに基づくデータの送受信を物理層で実現する。第1トランシーバ35及び第2トランシーバ36は、CANバス2a及びCANバス2bに送信されたデータをCANコントローラ34へ渡し、CANコントローラ34から与えられたデータをCANバス2a及びCANバス2bへ送出する。   The first transceiver 35 and the second transceiver 36 implement data transmission / reception based on the CAN protocol in the CAN bus 2a and the CAN bus 2b in the physical layer, respectively. The first transceiver 35 and the second transceiver 36 pass the data transmitted to the CAN bus 2a and the CAN bus 2b to the CAN controller 34, and send the data given from the CAN controller 34 to the CAN bus 2a and the CAN bus 2b.

このように構成されるGW装置3は、ROM32に記憶されている中継プログラム38に基づき、CANコントローラ34、第1トランシーバ35及び第2トランシーバ36を用いてCANバス2a及びCANバス2b間のデータの中継処理を行なう。更に、GW装置3は、中継処理の合間に、ROM32に記憶されているアプリケーションプログラム37に基づき、アプリ処理を行なう。   The GW apparatus 3 configured as described above uses the CAN controller 34, the first transceiver 35, and the second transceiver 36 based on the relay program 38 stored in the ROM 32 to transfer data between the CAN bus 2a and the CAN bus 2b. Perform relay processing. Furthermore, the GW apparatus 3 performs application processing based on the application program 37 stored in the ROM 32 between relay processing.

図3は、GW装置3のCPU31により実現される機能を示す機能ブロック図である。CPU31は、中継プログラム38及びアプリケーションプログラム37に基づき、管理部41、複数のアプリケーション42,42,…、中継処理部43としての機能を実現する。   FIG. 3 is a functional block diagram showing functions realized by the CPU 31 of the GW apparatus 3. Based on the relay program 38 and the application program 37, the CPU 31 realizes functions as a management unit 41, a plurality of applications 42, 42,.

管理部41は、中継処理部43の機能による処理の実行状態に基づき、複数のアプリケーション42,42,…を夫々起動する。中継処理部43による処理が行なわれていないか、又はCPU31自身の負荷が所定値よりも軽い場合に、適宜、アプリケーション42,42,…を起動してアプリ処理を実行させる。また管理部41は、中継処理部43から中継の中断中であることの通知を受けた場合も、適宜、アプリケーション42,42,…を起動してアプリ処理を実行させる。   The management unit 41 activates a plurality of applications 42, 42,... Based on the execution state of the processing by the function of the relay processing unit 43, respectively. When the processing by the relay processing unit 43 is not performed, or when the load of the CPU 31 itself is lighter than a predetermined value, the applications 42, 42,. In addition, even when the management unit 41 receives a notification from the relay processing unit 43 that the relay is interrupted, the management unit 41 appropriately activates the applications 42, 42,.

アプリケーション42,42,…は、アプリケーションプログラム37により定義される演算処理などを含む。アプリケーション42,42,…の内のいずれかは、CANバス2a又はCANバス2bを介してECU1a又はECU1bから受信したデータに対する演算処理を行なうものであってもよい。   The applications 42, 42,... Include arithmetic processing defined by the application program 37. Any of the applications 42, 42,... May perform arithmetic processing on data received from the ECU 1a or the ECU 1b via the CAN bus 2a or the CAN bus 2b.

中継処理部43は、第1トランシーバ35にてCANバス2aから受信したデータをRAM33に確保された受信バッファ44に記憶する。これにより、送信メッセージボックス45に空きがない状態であっても、受信データが消失することが回避される。中継処理部43は、送信メッセージボックス45内に記憶されているデータをCANコントローラ34が第2トランシーバ36へ渡して送信が完了し、送信メッセージボックス45が空となったことを検知し、受信バッファ44から送信メッセージボックス45へのデータの受け渡しと、送信メッセージボックス45へ渡されたデータの送信要求の処理を行なう。このとき中継処理部43は、受信バッファ44に記憶されているデータのIDから、中継の要否を判断し、中継要と判断されたデータのみ送信メッセージボックス45へのデータの受け渡し及び送信要求処理を行なってもよい。   The relay processing unit 43 stores the data received from the CAN bus 2 a by the first transceiver 35 in the reception buffer 44 secured in the RAM 33. This prevents the received data from being lost even if the transmission message box 45 is empty. The relay processing unit 43 detects that the transmission message box 45 is empty when the CAN controller 34 passes the data stored in the transmission message box 45 to the second transceiver 36 and the transmission is completed. Data is transferred from the transmission message box 45 to the transmission message box 45 and a transmission request for the data transferred to the transmission message box 45 is processed. At this time, the relay processing unit 43 determines whether or not relaying is necessary based on the data ID stored in the reception buffer 44, and passes only data determined to be relayed to the transmission message box 45 and transmission request processing. May be performed.

更に中継処理部43は、図示しないCPU31の計時機能により、第1の一定時間内におけるデータの受け渡し及び送信要求処理の回数を計数する。中継処理部43は、計数した回数が所定の回数以上である場合、データの受け渡しと送信メッセージボックス45へ渡されたデータの送信要求の処理を、第2の一定期間の間停止する。このとき中継処理部43は中継の中断中であることを管理部41へ通知する。   Further, the relay processing unit 43 counts the number of times of data transfer and transmission request processing within the first predetermined time by using a clock function of the CPU 31 (not shown). When the counted number is equal to or greater than the predetermined number, the relay processing unit 43 stops the data transfer and the processing of the data transmission request passed to the transmission message box 45 for the second predetermined period. At this time, the relay processing unit 43 notifies the management unit 41 that the relay is being interrupted.

なお、受信バッファ44及び送信メッセージボックス45は、RAM33内に確保される構成には限らない。   The reception buffer 44 and the transmission message box 45 are not limited to the configuration secured in the RAM 33.

なお、図3に示した機能は、CANバス2aに接続されているECU1aから受信したデータをCANバス2bに接続されているECU1bへ中継する場合の機能を示している。逆に、ECU1bから送信されたデータをECU1aへ中継する場合の機能は、同様であるので図示及び詳細な説明を省略する。   The function shown in FIG. 3 is a function in the case where data received from the ECU 1a connected to the CAN bus 2a is relayed to the ECU 1b connected to the CAN bus 2b. On the contrary, since the function in the case of relaying the data transmitted from the ECU 1b to the ECU 1a is the same, the illustration and detailed description are omitted.

中継処理部43が、中継処理を中断する過程を、フローチャートを参照して説明する。図4は、GW装置3のCPU31により実行される中断処理手順の一例を示すフローチャートである。   A process in which the relay processing unit 43 interrupts the relay processing will be described with reference to a flowchart. FIG. 4 is a flowchart illustrating an example of an interruption processing procedure executed by the CPU 31 of the GW apparatus 3.

中継処理部43は、CPU31の計時機能による第1の時間の計測を開始する(ステップS1)。中継処理部43は、計測を開始してから第1の時間が経過したか否かを判断する(ステップS2)。中継処理部43は、第1の時間が未経過であると判断した場合(S2:NO)、送信メッセージボックス45が空か否かを判断する(ステップS3)。中継処理部43は、送信メッセージボックス45が空でないと判断した場合(S3:NO)、受信バッファ44に未送信のデータが有るか否かを判断する(ステップS4)。中継処理部43は、受信バッファ44にデータが有ると判断した場合(S4:YES)、データを送信メッセージボックス45へ移動させる前に、データの移動回数又は移動量はROM32に記憶してある所定値以上であるか否かを判断する(ステップS5)。中継処理部43は、所定値未満であると判断した場合(S5:NO)、受信バッファ44から送信メッセージボックス45への未送信のデータの受け渡しを指示し(ステップS6)、送信メッセージボックス45からの送信要求を行なう(ステップS7)。中継処理部43は、移動回数又は移動量をカウントし(ステップS8)、処理をステップS2へ戻す。   The relay processing unit 43 starts measuring the first time by the time measuring function of the CPU 31 (step S1). The relay processing unit 43 determines whether or not the first time has elapsed since the start of measurement (step S2). When it is determined that the first time has not elapsed (S2: NO), the relay processing unit 43 determines whether or not the transmission message box 45 is empty (step S3). When it is determined that the transmission message box 45 is not empty (S3: NO), the relay processing unit 43 determines whether there is untransmitted data in the reception buffer 44 (step S4). When the relay processing unit 43 determines that there is data in the reception buffer 44 (S4: YES), the number of movements or the amount of movement of data is stored in the ROM 32 before moving the data to the transmission message box 45. It is determined whether or not the value is greater than or equal to the value (step S5). When the relay processing unit 43 determines that the value is less than the predetermined value (S5: NO), the relay processing unit 43 instructs delivery of untransmitted data from the reception buffer 44 to the transmission message box 45 (step S6). Is transmitted (step S7). The relay processing unit 43 counts the number of movements or the movement amount (step S8), and returns the process to step S2.

中継処理部43は、ステップS2にて第1の時間が経過したと判断した場合(S2:YES)、第1の時間の計測をリセットし(ステップS9)、移動回数又は移動量のカウントをリセットし(ステップS10)、処理をステップS2へ戻して新たな第1の時間を計測する。   When the relay processing unit 43 determines that the first time has elapsed in step S2 (S2: YES), the relay processing unit 43 resets the measurement of the first time (step S9), and resets the number of movements or the movement amount. (Step S10), the process returns to Step S2 to measure a new first time.

中継処理部43は、ステップS3にて送信メッセージボックス45は空であると判断した場合(S3:YES)、処理をステップS2へ戻す。中継処理部43は、ステップS4にて受信バッファ44にデータが無いと判断した場合も(S4:NO)、処理をステップS2へ戻す。   When the relay processing unit 43 determines in step S3 that the transmission message box 45 is empty (S3: YES), the relay processing unit 43 returns the process to step S2. When the relay processing unit 43 determines that there is no data in the reception buffer 44 in step S4 (S4: NO), the relay processing unit 43 returns the process to step S2.

中継処理部43は、ステップS5にてカウントされた移動回数又は移動量が所定値以上であると判断した場合(ステップS5:YES)、第1の時間内での移動回数又は移動量が所定値以上であるから、まず第1の時間の計測を停止し(ステップS11)、第2の時間の計測を開始する(ステップS12)。中継処理部43は、中継処理の中断中であることを管理部41へ通知し(ステップS13)、計測が開始されてから第2の時間が経過したか否かを判断する(ステップS14)。中継処理部43は、第2の時間が未経過であると判断した場合(S14:NO)、処理をステップS14へ戻して待機する。中継処理部43は、第2の時間が経過したと判断した場合(S14:YES)、移動回数又は移動量のカウントをリセットし(ステップS15)、処理をステップS1へ戻す。   When the relay processing unit 43 determines that the number of movements or the movement amount counted in step S5 is greater than or equal to a predetermined value (step S5: YES), the number of movements or movement amount within the first time is a predetermined value. Since it is above, measurement of the 1st time is stopped first (Step S11), and measurement of the 2nd time is started (Step S12). The relay processing unit 43 notifies the management unit 41 that the relay processing is being interrupted (step S13), and determines whether or not the second time has elapsed since the measurement was started (step S14). When it is determined that the second time has not elapsed (S14: NO), the relay processing unit 43 returns the process to step S14 and waits. When the relay processing unit 43 determines that the second time has elapsed (S14: YES), the relay processing unit 43 resets the number of times of movement or the amount of movement (step S15), and returns the process to step S1.

ステップS13で中継処理部43が中断中であることを通知したとき、管理部41はこれを受けて、アプリケーション42,42,…を起動させることが可能となる。一方、管理部41は、受信バッファ44にも送信メッセージボックス45にもデータがなく、中継処理が行なわれていないときアプリケーション42,42,…を起動させる。そして中継処理部43によるステップS13は必須ではない。管理部41は、第2の時間が経過するまでの間、中継処理が行なわれていないことを検知してアプリケーション42,42,…を起動してもよい。   When it is notified in step S13 that the relay processing unit 43 is interrupted, the management unit 41 can receive this and activate the applications 42, 42,. On the other hand, the management unit 41 activates the applications 42, 42,... When there is no data in the reception buffer 44 or the transmission message box 45 and relay processing is not performed. And step S13 by the relay process part 43 is not essential. The management unit 41 may activate the applications 42, 42,... By detecting that the relay process is not performed until the second time elapses.

このような処理により、GW装置3では、中継処理のみならずアプリケーションプログラム38に基づく演算処理をも実行することができる。しかも、中継処理が頻繁となったときでもアプリケーションプログラム38に基づく演算処理の実行を妨げず、猶予を設けて演算処理を実行させることができる。   By such processing, the GW apparatus 3 can execute not only relay processing but also arithmetic processing based on the application program 38. In addition, even when the relay processing becomes frequent, the execution of the arithmetic processing based on the application program 38 is not hindered, and the arithmetic processing can be executed with a delay.

なお図4のフローチャートに示した処理手順では、中継処理部43はROM32に記憶されている第1及び第2の時間、並びに所定値に基づき各判断を行なった。このような判断の基準となる第1及び第2の時間、並びに所定値は、固定ではなく事後的に変更が可能である。   In the processing procedure shown in the flowchart of FIG. 4, the relay processing unit 43 makes each determination based on the first and second times stored in the ROM 32 and a predetermined value. The first and second times and the predetermined values that are the criteria for such determination are not fixed but can be changed later.

図5は、GW装置3のCPU31にて受け付けられる設定処理手順の一例を示すフローチャートである。以下説明する処理手順は、例えばGW装置3のμC30とシリアル通信、又はCANバス2a,2bを介して接続され、表示装置及び入力装置を有する装置から、ユーザが情報を入力できる状態で実行される。   FIG. 5 is a flowchart illustrating an example of a setting process procedure accepted by the CPU 31 of the GW apparatus 3. The processing procedure described below is executed in a state in which a user can input information from a device having a display device and an input device connected to the μC 30 of the GW device 3 via serial communication or CAN buses 2a and 2b, for example. .

CPU31は、第1の時間を受け付ける(ステップS21)。第1の時間として例えば50ミリ秒などの数値が入力される。CPU31は、第2の時間を受け付ける(ステップS22)。第2の時間として例えば100ミリ秒などの数値が入力される。CPU31は更に、データの移動回数又は移動量を受け付ける(ステップS23)。CPU31は、受け付けた第1及び第2の時間、並びに移動回数又は移動量をRAM33に記憶し、以後、これらを判断の基準とするように設定し(ステップS24)、処理を終了する。   CPU31 receives 1st time (step S21). A numerical value such as 50 milliseconds is input as the first time. CPU31 receives 2nd time (step S22). For example, a numerical value such as 100 milliseconds is input as the second time. The CPU 31 further receives the number of movements or the amount of movement of data (step S23). The CPU 31 stores the received first and second times, the number of movements or the movement amount in the RAM 33, and thereafter sets them as a criterion for determination (step S24), and ends the process.

このように、GW装置3では、アプリケーション42,42,…を実行するための猶予を設ける判断基準となる情報の設定を受け付けることが可能である。GW装置3に中継処理以外の役割を与えるためのアプリケーション42,42,…の内容によって、実行に要する時間が変わることを考慮し、適宜変更することが可能となる。これにより、GW装置3は中継処理以外でも、CPU31の負荷に余裕がある限り、他の多様な機能を持つことができる。   As described above, the GW apparatus 3 can accept setting of information serving as a determination criterion for providing a grace period for executing the applications 42, 42,. The GW apparatus 3 can be appropriately changed in consideration of the time required for execution depending on the contents of the applications 42, 42,... For giving a role other than relay processing. Thereby, the GW apparatus 3 can have other various functions as long as there is a margin in the load of the CPU 31 other than the relay process.

なお、本実施の形態に示した中継処理部43は、その機能をCPU31により実現するとは限らず、ハードウェア化されてもよい。   Note that the relay processing unit 43 shown in the present embodiment is not necessarily realized by the CPU 31 and may be implemented in hardware.

また本実施の形態では、CPU31は管理部41として機能し、中継処理部43における処理の合間にアプリケーション42,42,…を起動させる構成として説明した。しかしながらこれに限らず、管理部41の機能がなくともよい。この場合、CPU31はアプリケーション42,42,…を反復的に自動的起動させ、他の処理を行なっているときは起動させないようにする。このときも中継処理が頻繁となったとしても第2の時間だけ中断されるので、アプリケーション42,42,…は次の機会に起動できる可能性が高くなり、中継処理によって中継処理以外の演算機能の低下を招くことを回避することができる。   Further, in the present embodiment, the CPU 31 functions as the management unit 41 and has been described as a configuration in which the applications 42, 42,... Are activated between processes in the relay processing unit 43. However, the present invention is not limited to this, and the function of the management unit 41 may not be provided. In this case, the CPU 31 automatically and repeatedly activates the applications 42, 42,... So that they are not activated when other processes are being performed. Even at this time, even if the relay processing becomes frequent, it is interrupted only for the second time, so that it is highly possible that the applications 42, 42,... Can be activated at the next opportunity. Can be avoided.

なお、開示された実施の形態は、全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上述の説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。   The disclosed embodiments should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1a,1b ECU
2a,2b CANバス(ネットワーク)
3 GW装置(中継装置)
32 ROM
33 RAM
38 中継プログラム
4 マイクロコンピュータ
42 アプリケーション
43 中継処理部
44 受信バッファ(受信用記憶領域)
45 送信メッセージボックス(送信用記憶領域)
1a, 1b ECU
2a, 2b CAN bus (network)
3 GW equipment (relay equipment)
32 ROM
33 RAM
38 Relay Program 4 Microcomputer 42 Application 43 Relay Processing Unit 44 Reception Buffer (Reception Storage Area)
45 Transmission message box (transmission storage area)

Claims (5)

複数のネットワークに接続され、1つのネットワークからデータを受信して受信用記憶領域に記憶する受信手段と、送信用記憶領域に記憶してあるデータを読み出して他のネットワークへ送信する送信手段と、前記受信用記憶領域に受信したデータが在る場合に、該データを送信用記憶領域へ移動させる移動手段とを備え、複数のネットワーク間でデータを中継する中継装置において、
計時手段と、
該計時手段で測定した第1の時間内での前記移動手段によるデータの移動回数を測定する手段と、
該手段が測定した移動回数が所定値以上か否かを判断する手段と、
該手段が所定値以上であると判断した場合、第2の時間が経過するまで前記移動手段による移動を中断する手段と
を備えることを特徴とする中継装置。
A receiving unit connected to a plurality of networks, receiving data from one network and storing the data in a receiving storage area; and transmitting means for reading out data stored in the transmitting storage area and transmitting the data to another network; In a relay device for relaying data between a plurality of networks, comprising moving means for moving the data to the transmission storage area when the received data is in the reception storage area,
Timekeeping means,
Means for measuring the number of mobile times of the data by the first of said moving means in a time measured by the regimen time unit,
Means the number of mobile of times that said means was measured to determine whether more than a predetermined value,
And a means for interrupting movement by the moving means until a second time elapses when it is determined that the means is equal to or greater than a predetermined value.
第2の時間内では、中継処理以外の他の処理を実行するようにしてあること
を特徴とする請求項1に記載の中継装置。
The relay apparatus according to claim 1, wherein processing other than relay processing is executed within the second time period.
データに対し演算処理を実行させる手段を備え、
前記移動が中断中であることを前記手段へ通知するようにしてあること
を特徴とする請求項1に記載の中継装置。
Means for performing arithmetic processing on the data,
The relay apparatus according to claim 1, wherein the means is notified that the movement is suspended.
第1及び第2の時間、並びに前記移動回数の設定を受け付ける手段
を更に備えることを特徴とする請求項1乃至3のいずれかに記載の中継装置。
The first and second time, and a relay device according to any one of claims 1 to 3, further comprising means for receiving setting of the number of mobile times.
異なる複数のネットワークに接続され、1つのネットワークからデータを受信して受信用記憶領域に記憶する受信手段と、送信用記憶領域に記憶してあるデータを読み出して他のネットワークへ送信する送信手段と、前記受信用記憶領域に受信したデータが在る場合に、該データを送信用記憶領域へ移動させる移動手段とを備える中継装置が、複数のネットワーク間でデータを中継する方法において、
第1の時間を計時し、
第1の時間内での前記移動手段によるデータの移動回数を測定し、
測定した移動回数が所定値以上であるか否かを判断し、
所定値上であると判断した場合、第2の時間が経過するまで前記受信用記憶領域から送信用記憶領域へのデータの移動を中断する
ことを特徴とする中継方法。
Receiving means connected to a plurality of different networks, receiving data from one network and storing the data in a receiving storage area; and transmitting means for reading data stored in the transmitting storage area and transmitting the data to another network; In the method of relaying data between a plurality of networks, a relay device comprising a moving means for moving the data to the transmission storage area when the received data is in the reception storage area,
Time the first time,
Measuring the number of mobile times of the data by the moving means in a first time,
Number of mobile times of measurement is determined whether a predetermined value or more,
If it is determined that the predetermined value or more, a relay and wherein the interrupting movement of data to the transmission storage area from the reception memory area until the second time elapses.
JP2010145234A 2010-06-25 2010-06-25 Relay device and relay method Expired - Fee Related JP5540939B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010145234A JP5540939B2 (en) 2010-06-25 2010-06-25 Relay device and relay method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010145234A JP5540939B2 (en) 2010-06-25 2010-06-25 Relay device and relay method

Publications (2)

Publication Number Publication Date
JP2012010167A JP2012010167A (en) 2012-01-12
JP5540939B2 true JP5540939B2 (en) 2014-07-02

Family

ID=45540194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010145234A Expired - Fee Related JP5540939B2 (en) 2010-06-25 2010-06-25 Relay device and relay method

Country Status (1)

Country Link
JP (1) JP5540939B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4337720B2 (en) * 2004-12-06 2009-09-30 株式会社デンソー Electronic control unit
JP2007096835A (en) * 2005-09-29 2007-04-12 Matsushita Electric Ind Co Ltd CPU load control method and load control apparatus

Also Published As

Publication number Publication date
JP2012010167A (en) 2012-01-12

Similar Documents

Publication Publication Date Title
JP4953861B2 (en) In-vehicle gateway device and data transfer method
JP6525109B2 (en) Control device, transfer method, and computer program
JP2006134203A (en) Distributed control system
JP5843020B2 (en) Communication apparatus and communication method
CN104170326A (en) Communication device and communication method
JP2010027062A (en) Distributed control system
JP2011505038A5 (en)
CN104541480B (en) Data transmission device, communication control method, and communication control program
CN113545012B (en) Communication device, communication system, and message arbitration method
CN113760559A (en) Dual-core communication method and electronic equipment
JP2008283386A (en) Data relay device, in-vehicle communication system
JP5540939B2 (en) Relay device and relay method
JP2020022019A (en) Vehicle system
JP2018046509A (en) Gateway device
JP7338586B2 (en) In-vehicle network system
JP2011250098A (en) Network system
JP6137033B2 (en) In-vehicle network system and in-vehicle relay device
JP2006340099A (en) Gateway device
JP7815964B2 (en) Electronic control unit
JP7746909B2 (en) Electronic control unit
JP7592510B2 (en) COMMUNICATION DEVICE AND COMMUNICATION METHOD
JP6729347B2 (en) Communication relay device and program
US20130094516A1 (en) Control Protocol System
US20250344172A1 (en) Time synchronization communication system, relay node, and storage medium storing message transfer control program
KR20160140038A (en) Vehicle Terminal System for Freight Transport Safety

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131011

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131022

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131211

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20131211

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140421

R150 Certificate of patent or registration of utility model

Ref document number: 5540939

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees