JP6745106B2 - Gateway device and sensor network system - Google Patents

Gateway device and sensor network system Download PDF

Info

Publication number
JP6745106B2
JP6745106B2 JP2015250218A JP2015250218A JP6745106B2 JP 6745106 B2 JP6745106 B2 JP 6745106B2 JP 2015250218 A JP2015250218 A JP 2015250218A JP 2015250218 A JP2015250218 A JP 2015250218A JP 6745106 B2 JP6745106 B2 JP 6745106B2
Authority
JP
Japan
Prior art keywords
controller
memory
data
communication unit
network
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
JP2015250218A
Other languages
Japanese (ja)
Other versions
JP2017117098A (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.)
Rohm Co Ltd
Original Assignee
Rohm 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 Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP2015250218A priority Critical patent/JP6745106B2/en
Publication of JP2017117098A publication Critical patent/JP2017117098A/en
Application granted granted Critical
Publication of JP6745106B2 publication Critical patent/JP6745106B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Arrangements For Transmission Of Measured Signals (AREA)
  • Information Transfer Systems (AREA)

Description

この開示は、センサネットワークシステムに関し、さらに、センサネットワークにおいて複数のセンサノードからのデータを収集するためのゲートウェイ装置に関する。 The present disclosure relates to a sensor network system, and further to a gateway device for collecting data from a plurality of sensor nodes in a sensor network.

近年、多数のセンサ付き無線端末を散在させて、現実世界の様々な情報を収集して活用するセンサネットワーク技術が現実のものとなりつつある。センサネットワークでは、多数のセンサ付き無線端末(「センサノード」とも称する)からのデータを収集し、収集したデータをインターネットなどの他のネットワークに送信するためのゲートウェイ装置(「コントロールノード」とも称する)が設けられている。ゲートウェイ装置(コントロールノード)は、階層的に設けられる場合もある。 In recent years, a sensor network technology in which a large number of wireless terminals with sensors are scattered to collect and utilize various information in the real world is becoming a reality. In a sensor network, a gateway device (also called “control node”) for collecting data from a large number of wireless terminals with sensors (also called “sensor node”) and transmitting the collected data to another network such as the Internet. Is provided. The gateway device (control node) may be provided hierarchically.

コントロールノードが障害を起こした場合、特に下位のコントロールノードを束ねる上位のコントロールノードが障害を起こした場合には、配下にある多数のセンサノードが通信経路を失うことになる。したがって、コントロールノードの可用性を確保することが重要な問題となる。 When a control node fails, particularly when a higher control node that bundles lower control nodes fails, a large number of sensor nodes under its control lose their communication paths. Therefore, ensuring the availability of the control node is an important issue.

一般的なサーバなどでは可用性を確保するためにフェイルオーバーシステムが広く採用されている。具体的には、複数のサーバによってサーバ・クラスタが構成され、あるサーバの障害時には、クラスタを構成する他のサーバにアプリケーションおよびサービスの実行が切り替えられるものである。一方、センサネットワークにおいては、サーバほど潤沢なリソース(大容量記憶装置、広帯域通信、電源等)が確保できないため、サーバが使用するようなフェイルオーバーシステムを用いることは難しい。 A failover system is widely adopted for general servers to ensure availability. Specifically, a server cluster is configured by a plurality of servers, and when a certain server fails, execution of applications and services is switched to another server that configures the cluster. On the other hand, in a sensor network, it is difficult to use a failover system such as that used by a server because it cannot secure as many resources as a server (mass storage device, broadband communication, power supply, etc.).

特開2009−260778号公報(特許文献1)は、フェイルオーバを可能にするためにゲートウェイをマスタとスレーブの2台で構成した例を開示している(図5〜図7および関連する段落を参照)。具体的には、マスタゲートウェイとスレーブゲートウェイとを識別するために、マスタとスレーブには異なるID(Identification)および異なるIP(Internet Protocol)アドレスが与えられる。センサノードは、マスタへのデータ伝送に失敗した場合、データの送り先のIDをマスタからスレーブに切替える。上位のネットワークを介してマスタおよびスレーブゲートウェイと接続される上位計算機は、センサノードごとに対応するゲートウェイ(マスタまたはスレーブ)にデータ収集コマンドを発行する。一方のゲートウェイが故障などによって停止した場合に備えて、マスタゲートウェイとスレーブゲートウェイとは、一定周期ごとにLAN(Local Area Network)または上位計算機を介して互いが保持している計測データの交換を行う。 Japanese Patent Laying-Open No. 2009-260778 (Patent Document 1) discloses an example in which a gateway is configured with two masters and slaves to enable failover (see FIGS. 5 to 7 and related paragraphs). ). Specifically, in order to identify the master gateway and the slave gateway, different IDs (Identification) and different IP (Internet Protocol) addresses are given to the master and the slave. The sensor node switches the ID of the data transmission destination from the master to the slave when the data transmission to the master fails. The host computer connected to the master and slave gateways via the host network issues a data collection command to the corresponding gateway (master or slave) for each sensor node. The master gateway and the slave gateway exchange measurement data held by each other via a LAN (Local Area Network) or a host computer at regular intervals, in case one gateway stops due to a failure or the like. ..

特開2009−260778号公報JP, 2009-260778, A

上記文献の技術における問題点の1つは、マスタゲートウェイとスレーブゲートウェイとの間でのデータ交換(メモリの同期)を行う際の通信量がかなり大きくなってしまうことである。 One of the problems in the technique of the above-mentioned document is that the communication amount at the time of exchanging data (memory synchronization) between the master gateway and the slave gateway becomes considerably large.

他の問題点の1つは、マスタゲートウェイが受信データをメモリに周期的に保存しかつマスタおよびスレーブのゲートウェイ間でメモリを同期するため、異常発生の直前の同期から異常発生時までの間にマスタが正常受信したデータが欠損してしまうことである。例えば、複数回の過去データを必要とするデジタルフィルタ処理などを実施している場合には、上記文献に記載の技術に従うと、異常発生時にメモリに保存されていたデータは無視され、フェイルオーバ後に取得されたデータからデジタルフィルタ処理が再開することになる。 One of the other problems is that the master gateway periodically saves the received data in the memory and synchronizes the memory between the master and slave gateways. This means that the data normally received by the master will be lost. For example, when performing digital filter processing that requires past data multiple times, according to the technique described in the above document, the data saved in the memory at the time of an abnormality is ignored and acquired after failover. The digital filtering process is restarted from the processed data.

さらにこの文献にあるZigBee(登録商標)のように、パケットを正常受信したときにACK(Acknowledge)返送を行うプロトコルの場合は、ACK受信のタイムアウトなどによってパケットの受信失敗を検知することが可能であり、これに基づいて、センサ装置は、送信先ゲートウェイをマスタからスレーブに切換える処理が可能である。しかしながら、低消費電力動作を目的としてACK返送を行わないプロトコルの場合には、異常が起きてもセンサノードもしくは中継器側がマスタとスレーブを切換することができない。 Further, in the case of a protocol that returns ACK (Acknowledge) when a packet is normally received, such as ZigBee (registered trademark) in this document, it is possible to detect a packet reception failure by a timeout of ACK reception. Based on this, the sensor device can perform processing for switching the transmission destination gateway from the master to the slave. However, in the case of a protocol that does not return ACK for the purpose of low power consumption operation, even if an abnormality occurs, the sensor node or the repeater cannot switch the master and slave.

この発明は、上記の問題点を考慮してされたものであり、その目的の1つは、フェイルオーバが可能なセンサネットワーク用のゲートウェイ装置において、マスタとスレーブとの間でデータ同期を行う際の通信量を抑制することである。その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。 The present invention has been made in consideration of the above problems, and one of the objects thereof is to perform data synchronization between a master and a slave in a gateway device for a sensor network capable of failover. It is to suppress the amount of communication. Other problems and novel features will be apparent from the description of the present specification and the accompanying drawings.

この発明は一局面において、複数のセンサノードと無線通信を行うゲートウェイ装置であって、第1のコントローラと第2のコントローラとを備える。第1のコントローラは、第1のメモリを含み、各センサノードからの計測データを受信して、受信した計測データを第1のメモリに格納する。第2のコントローラは、第2のメモリを含み、第1のコントローラが受信する計測データを同時に受信して、受信した計測データを第2のメモリに格納する。第1および第2のコントローラは、第1のメモリおよび第2のメモリのメモリ空間のうち、互いに異なる記憶データを含む一部の領域のみデータ同期を行う。 In one aspect, the present invention is a gateway device that performs wireless communication with a plurality of sensor nodes, and includes a first controller and a second controller. The first controller includes a first memory, receives measurement data from each sensor node, and stores the received measurement data in the first memory. The second controller includes a second memory, simultaneously receives the measurement data received by the first controller, and stores the received measurement data in the second memory. The first and second controllers perform data synchronization only in some areas of the memory spaces of the first memory and the second memory that contain different storage data.

上記構成によれば、各センサノードからの計測データは第1のコントローラおよび第2のコントローラによって同時受信されるので、センサノードからの計測データに関しては通常はメモリ間でデータ同期を行う必要がない。このため、データ同期を行う際の第1および第2のコントローラ間の通信量を大幅に削減することができる。 According to the above configuration, since the measurement data from each sensor node is simultaneously received by the first controller and the second controller, it is not usually necessary to perform data synchronization between memories for the measurement data from the sensor node. .. Therefore, the amount of communication between the first and second controllers when performing data synchronization can be significantly reduced.

好ましくは、第1のコントローラは、データ同期を行う際に、第1のメモリのメモリ空間を複数の領域に区分したときの各領域に対して誤り検出符号を算出する。第2のコントローラは、データ同期を行う際に、第2のメモリの対応する各領域に対して誤り検出符号を算出する。第1のコントローラは、データ同期を行う際に、誤り検出符号が異なる領域のデータのみを第2のコントローラに送信する。 Preferably, when performing data synchronization, the first controller calculates an error detection code for each area when the memory space of the first memory is divided into a plurality of areas. The second controller calculates an error detection code for each corresponding area of the second memory when performing data synchronization. When performing data synchronization, the first controller transmits only the data in the areas having different error detection codes to the second controller.

上記構成によれば、データの同時受信によりメモリ間の差異が最小化され、かつデータ同期を行う際にまず誤り検出符号の比較を行い、誤り検出符号が異なる領域のデータのみデータ転送するので、第1および第2のコントローラ間の通信量を大幅に削減することができる。 According to the above configuration, the difference between the memories is minimized by the simultaneous reception of the data, and when the data synchronization is performed, the error detection codes are first compared, and only the data in the area where the error detection codes are different is transferred. The amount of communication between the first and second controllers can be significantly reduced.

好ましくは、ゲートウェイ装置は、第1のコントローラと第2のコントローラとを接続する有線バスをさらに備える。第1メモリと第2のメモリとの間でのデータ同期は、この有線バスを介して行われる。 Preferably, the gateway device further includes a wired bus connecting the first controller and the second controller. Data synchronization between the first memory and the second memory is performed via this wired bus.

好ましくは、ゲートウェイ装置は、通信経路を切替えることによって、第1コントローラおよび第2のコントローラのうちの一方と上位側ネットワークとの間で通信経路を確立する上位側通信部をさらに備える。上位側通信部は、第1のコントローラが故障していない場合には、第1のコントローラと上位側ネットワークとの間で通信経路を確立する。上位側通信部は、第1のコントローラが故障している場合には、第2のコントローラと上位側ネットワークとの間で通信経路を確立する。これは例えばイーサネット(登録商標)の場合、IPアドレスを両コントローラでスワップすることで実現される。 Preferably, the gateway device further includes an upper communication unit that establishes a communication path between one of the first controller and the second controller and the upper network by switching the communication path. The high-order side communication unit establishes a communication path between the first controller and the high-order side network when the first controller has not failed. The upper-level communication unit establishes a communication path between the second controller and the higher-level network when the first controller is out of order. For example, in the case of Ethernet (registered trademark), this is realized by swapping the IP address between both controllers.

上記構成によれば、上位側ネットワークと第1のコントローラとの間の通信と、上位側ネットワークと第2のコントローラとの間の通信とを個別に行う必要はないので、コントローラ間のフェイルオーバのための特別なプログラムを上位側の計算機において動作させる必要はない。 According to the above configuration, it is not necessary to separately perform communication between the upper network and the first controller and communication between the upper network and the second controller, so that failover between the controllers can be performed. It is not necessary to run the special program of (1) on the host computer.

好ましくは、第1のコントローラは、ハートビートを第2のコントローラに定期的に送信する。第2のコントローラは、ハートビートを定期的に受信しなくなった場合に、上位側ネットワークとの間の通信経路を第1のコントローラから第2のコントローラに切替えるように第1のコントローラに指令する。 Preferably, the first controller periodically sends a heartbeat to the second controller. The second controller commands the first controller to switch the communication path to the higher-level network from the first controller to the second controller when the heartbeats are not regularly received.

好ましくは、第1のコントローラは、オペレーティングシステム上で動作するアプリケーションプログラムに従って上位側ネットワークとの間で通信を行う。オペレーティングシステムは、アプリケーションプログラムがフリーズしたことまたは第1のコントローラにおけるシステムの異常を検出した場合には、上位側ネットワークとの間の通信経路を第1のコントローラから第2のコントローラに切替えるように第2のコントローラに指令する。 Preferably, the first controller communicates with the upper network according to an application program running on the operating system. When the operating system detects that the application program is frozen or the system is abnormal in the first controller, the operating system switches the communication path to the upper network from the first controller to the second controller. Command the controller 2

上記のようにハートビートを監視したり、プログラムのフリーズまたはシステムの異常を監視したりすることによって、第1のコントローラから第2のコントローラへのフェイルオーバを実行することができる。 By monitoring the heartbeat, the program freeze, or the system abnormality as described above, the failover from the first controller to the second controller can be executed.

好ましくは、第1のメモリおよび第2のメモリの各々は、各センサノードからの計測データおよび計測データに基づく演算結果を格納するための第1のデータ領域と、上位側ネットワークを介して上位計算機から受信したデータを格納するための第2のデータ領域とを含む。第1のメモリの第1のデータ領域と第2のメモリの第1のデータ領域との間で同期を行う頻度は、第1のメモリの第2のデータ領域と第2のメモリの第2のデータ領域との間で同期を行う頻度と異なる。 Preferably, each of the first memory and the second memory has a first data area for storing measurement data from each sensor node and a calculation result based on the measurement data, and a host computer via a host network. A second data area for storing data received from the. The frequency of synchronization between the first data area of the first memory and the first data area of the second memory depends on the second data area of the first memory and the second data area of the second memory. It differs from the frequency of synchronization with the data area.

上記のようにデータ領域ごとに異なる頻度でデータ同期を行うことによって、メモリ間のデータ同期を行う際の通信量をさらに削減することができる。 By performing data synchronization at different frequencies for each data area as described above, it is possible to further reduce the amount of communication when performing data synchronization between memories.

この発明は他の局面において、センサネットワークシステムであって、各々が計測データを無線送信する複数のセンサノードと、ゲートウェイ装置とを備える。ゲートウェイ装置は、第1のコントローラと第2のコントローラとを含む。第1のコントローラは、第1のメモリを含み、各センサノードからの計測データを受信して、受信した計測データを第1のメモリに格納する。第2のコントローラは、第2のメモリを含み、第1のコントローラが受信した計測データを同時に受信して、受信した計測データを第2のメモリに格納する。第1および第2のコントローラは、第1のメモリおよび第2のメモリのメモリ空間のうち、互いに異なる記憶データを含む一部の領域のみデータ同期を行う。 In another aspect, the present invention is a sensor network system including a plurality of sensor nodes, each of which wirelessly transmits measurement data, and a gateway device. The gateway device includes a first controller and a second controller. The first controller includes a first memory, receives measurement data from each sensor node, and stores the received measurement data in the first memory. The second controller includes a second memory, simultaneously receives the measurement data received by the first controller, and stores the received measurement data in the second memory. The first and second controllers perform data synchronization only in some areas of the memory spaces of the first memory and the second memory that contain different storage data.

したがって、この発明によれば、フェイルオーバが可能なセンサネットワーク用のゲートウェイ装置において、マスタとスレーブとの間でデータ同期を行う際の通信量を抑制することができる。 Therefore, according to the present invention, in the gateway device for the sensor network capable of failover, it is possible to suppress the communication amount when data synchronization is performed between the master and the slave.

無線センサネットワークシステムの概略的構成を示すブロック図である。It is a block diagram showing a schematic structure of a wireless sensor network system. 図1のゲートウェイ装置のより詳細な構成を示すブロック図である。It is a block diagram which shows the more detailed structure of the gateway apparatus of FIG. センサ装置から送信されたデータがゲートウェイ装置を経由して上位計算機41によって受信されるまでの手順を示すフローチャートである。6 is a flowchart showing a procedure until data transmitted from a sensor device is received by a host computer 41 via a gateway device. 上位計算機41からのデータがゲートウェイ装置のメモリに格納されるまでの手順を示すフローチャートである。6 is a flowchart showing a procedure until data from the host computer 41 is stored in the memory of the gateway device. 第1および第2のコントロールユニット間での同期処理を行う手順の一例を示すフローチャートである。It is a flow chart which shows an example of the procedure which performs the synchronous processing between the 1st and 2nd control units. フェイルオーバの手順の一例を示すフローチャートである。9 is a flowchart showing an example of a failover procedure. フェイルオーバ後に上位計算機41から送信されたデータが第2のコントローラのメモリに格納されるまでの手順を示すフローチャートである。7 is a flowchart showing a procedure until data transmitted from the host computer 41 is stored in the memory of the second controller after failover. 上位側通信部のアドレス切替えに失敗した場合において、フェイルオーバ後に上位計算機41から送信されたデータが第2のコントローラのメモリに格納されるまでの手順を示すフローチャートである。7 is a flowchart showing a procedure until data transmitted from the host computer 41 is stored in the memory of the second controller after failover when address switching of the host communication unit fails. フェイルオーバ後において、センサ装置から送信されたデータがゲートウェイ装置を経由して上位計算機41によって受信されるまでの手順を示すフローチャートである。9 is a flowchart showing a procedure after the failover until data transmitted from the sensor device is received by the host computer 41 via the gateway device. フェイルオーバの手順の他の例を示すフローチャートである。It is a flowchart which shows the other example of a procedure of failover. 第2の実施形態によるゲートウェイの構成を示すブロック図である。It is a block diagram which shows the structure of the gateway by 2nd Embodiment. 第3の実施形態のゲートウェイ装置においてメモリ間の同期方法について説明するための図である。It is a figure for demonstrating the synchronizing method between memories in the gateway apparatus of 3rd Embodiment.

この明細書において「ゲートウェイ装置」は、センサノードからの計測データを上位のネットワークに中継する機能だけでなく、計測データの記憶および演算を行う機能も備えるものとする。 In this specification, the “gateway device” is assumed to have not only the function of relaying the measurement data from the sensor node to the higher level network, but also the function of storing and calculating the measurement data.

以下、実施形態について図面を参照して詳しく説明する。なお、同一または相当する部分には同一の参照符号を付して、その説明を繰返さない。 Hereinafter, embodiments will be described in detail with reference to the drawings. Note that the same or corresponding portions will be denoted by the same reference symbols and description thereof will not be repeated.

<第1の実施形態>
[センサネットワークの構成]
図1は、無線センサネットワークシステムの概略的構成を示すブロック図である。無線センサネットワークシステム(Wireless Sensor Network System)(この明細書では、センサネットワークシステムとも称する)1は、多数のセンサ装置10とゲートウェイ装置20とを含む。センサ装置10はセンサノードとも称し、ゲートウェイ装置20はコントロールノードとも称する。
<First Embodiment>
[Configuration of sensor network]
FIG. 1 is a block diagram showing a schematic configuration of a wireless sensor network system. A wireless sensor network system (also referred to as a sensor network system in this specification) 1 includes a large number of sensor devices 10 and gateway devices 20. The sensor device 10 is also called a sensor node, and the gateway device 20 is also called a control node.

各センサ装置10は、周囲の物理量などを検出するためのセンサ素子を内蔵する。各センサ装置10は、内蔵のセンサ素子の検出値についてフィルタ処理およびA/D変換処理などを行い、これらの処理によって得られた計測データを送信するための無線通信端末として構成される。各センサ装置10とゲートウェイ装置20との間の通信11には、ZigBee(登録商標)またはSub−GHz帯を利用した通信プロトコルなどが利用される。 Each sensor device 10 has a built-in sensor element for detecting a physical quantity of the surroundings. Each sensor device 10 is configured as a wireless communication terminal for performing a filtering process, an A/D conversion process, and the like on a detection value of a built-in sensor element and transmitting the measurement data obtained by these processes. For communication 11 between each sensor device 10 and the gateway device 20, a communication protocol using the ZigBee (registered trademark) or Sub-GHz band is used.

各センサ装置10は、他のセンサ装置10からの計測データをゲートウェイ装置20へ送信するための中継ルーティング機能を有していてもよい。さらに、各センサ装置10は、互いに直接通信するためのアドホック機能を有していてもよい。また、センサネットワークを構成する複数のセンサ装置10は、ツリー型のネットワークを構成していてもよいし、メッシュ型のネットワークを構成していてもよい。 Each sensor device 10 may have a relay routing function for transmitting measurement data from another sensor device 10 to the gateway device 20. Further, each sensor device 10 may have an ad hoc function for directly communicating with each other. Further, the plurality of sensor devices 10 configuring the sensor network may configure a tree type network, or may configure a mesh type network.

ゲートウェイ装置20は、複数のセンサ装置10の各々から送信された計測データを受信し、受信した計測データをインターネットなどの上位側ネットワーク40を介して上位計算機(パーソナルコンピュータ、サーバなど)41に送信する。さらに、ゲートウェイ装置20は、制御命令および設定情報などを上位計算機41から上位側ネットワーク40を介して受信する。ゲートウェイ装置20と上位側ネットワーク40との間の通信31には、有線LAN(Local Area Network)、WiFi(登録商標)、Bluetooth(登録商標)などが用いられる。 The gateway device 20 receives the measurement data transmitted from each of the plurality of sensor devices 10, and transmits the received measurement data to a host computer (personal computer, server, etc.) 41 via a host network 40 such as the Internet. .. Furthermore, the gateway device 20 receives control commands, setting information, and the like from the host computer 41 via the host network 40. A wired LAN (Local Area Network), WiFi (registered trademark), Bluetooth (registered trademark), or the like is used for communication 31 between the gateway device 20 and the upper network 40.

ゲートウェイ装置20は、単に計測データを中継するだけでなく、計測データに基づく演算を行い、演算結果を上位計算機41に送信するように構成されていてもよい。たとえば、ゲートウェイ装置20は、単一のセンサ装置10から複数の時点で送られてきた計測データのデジタルフィルタ処理を行ったり、複数のセンサ装置10から送られてきた複数の計測データの複合演算処理を行ったりする。ゲートウェイ装置20は、これらの演算が行われた計測データを上位計算機41に送信するように構成されてもよい。 The gateway device 20 may be configured not only to simply relay the measurement data, but also to perform a calculation based on the measurement data and send the calculation result to the host computer 41. For example, the gateway device 20 performs digital filter processing of measurement data sent from a single sensor device 10 at a plurality of times, or performs complex arithmetic processing of a plurality of measurement data sent from a plurality of sensor devices 10. To go. The gateway device 20 may be configured to transmit the measurement data obtained by performing these calculations to the host computer 41.

以下に詳しく説明するように、ゲートウェイ装置20は、可用性を高めるために複数コントロールユニットを含み、コントロールユニット間でフェイルオーバが可能な構成となっている。 As will be described in detail below, the gateway device 20 includes a plurality of control units in order to enhance availability, and has a configuration capable of performing failover between the control units.

[ゲートウェイ装置の詳細な構成および通常動作]
図2は、図1のゲートウェイ装置のより詳細な構成を示すブロック図である。図2を参照して、ゲートウェイ装置20は、2個以上のコントロールユニットを含む。図2の例では、ゲートウェイ装置20は2個のコントロールユニット21A,21Bを含み、各コントロールユニット21A,21Bは同一の構成を有している。第1のコントロールユニット21Aをマスタユニット21Aとも称し、第2のコントロールユニット21Bをスレーブユニットとも称する。
[Detailed configuration of gateway device and normal operation]
FIG. 2 is a block diagram showing a more detailed configuration of the gateway device of FIG. Referring to FIG. 2, gateway device 20 includes two or more control units. In the example of FIG. 2, the gateway device 20 includes two control units 21A and 21B, and each control unit 21A and 21B has the same configuration. The first control unit 21A is also called a master unit 21A, and the second control unit 21B is also called a slave unit.

具体的に、第1のコントロールユニット21Aは、下位側(センサ側)の各センサ装置10と通信するための通信部22Aと、CPU(Central Processing Unit)24Aと、メモリ25Aと、上位側ネットワーク40と通信するための通信部26Aと、電源27Aとを含む。電源27Aは、第1のコントロールユニット21Aの各構成要素22A,24A,25A,26Aに駆動電圧を供給する。同様に、第2のコントロールユニット21Bは、下位側(センサ側)の通信部22Bと、CPU24Bと、メモリ25Bと、上位側の通信部26Bと、電源27Bとを含む。通信部26Aは通信路31と介してネットワーク40と接続され、通信部26Bは通信路32を介してネットワーク40と接続される。 Specifically, the first control unit 21A includes a communication unit 22A for communicating with each sensor device 10 on the lower side (sensor side), a CPU (Central Processing Unit) 24A, a memory 25A, and an upper side network 40. It includes a communication unit 26A for communicating with and a power source 27A. The power supply 27A supplies a drive voltage to each of the constituent elements 22A, 24A, 25A, 26A of the first control unit 21A. Similarly, the second control unit 21B includes a lower side (sensor side) communication section 22B, a CPU 24B, a memory 25B, an upper side communication section 26B, and a power supply 27B. The communication unit 26A is connected to the network 40 via the communication path 31, and the communication unit 26B is connected to the network 40 via the communication path 32.

この明細書では、マスタユニット21AのCPU24Aとメモリ25Aとを併せて第1のコントローラ23Aと称する場合がある。スレーブユニット21BのCPU24Bとメモリ25Bと併せて第2のコントローラ23Bと称する場合がある。さらに、マスタユニット21Aの下位側通信部22Aとスレーブユニット21Bの下位側通信部22Bをまとめて1つの下位側通信部22を構成すると見てもよく、マスタユニット21Aの上位側通信部26Aとスレーブユニット21Bの上位側通信部26Bをまとめて1つの上位側通信部26を構成すると見てもよい。 In this specification, the CPU 24A and the memory 25A of the master unit 21A may be collectively referred to as a first controller 23A. The CPU 24B and the memory 25B of the slave unit 21B may be collectively referred to as a second controller 23B. Further, it may be considered that the lower-side communication unit 22A of the master unit 21A and the lower-side communication unit 22B of the slave unit 21B are combined to form one lower-side communication unit 22, and the upper-side communication unit 26A of the master unit 21A and the slave unit It may be considered that the upper side communication unit 26B of the unit 21B is integrated to form one upper side communication unit 26.

基本的には、各センサ装置10はマスタユニット21Aとの間で通信を行い、上位計算機41はマスタユニット21Aとの間で通信を行う。言い替えると、マスタユニット21Aに設けられたコントローラ23A(CPU24A)は、通信部22Aを介して受信した計測データをメモリ25Aに格納するとともに、その計測データまたはそれに基づく演算結果を、通信部26Aを介して上位計算機41に送信する。 Basically, each sensor device 10 communicates with the master unit 21A, and the host computer 41 communicates with the master unit 21A. In other words, the controller 23A (CPU 24A) provided in the master unit 21A stores the measurement data received via the communication unit 22A in the memory 25A, and the measurement data or the calculation result based on the measurement data is transmitted via the communication unit 26A. And transmits it to the host computer 41.

一方、スレーブユニット21Bに設けられたコントローラ23B(CPU24B)は、各センサ装置10から送信された計測データを直接的には受信できないはずである。ところが、本実施形態の場合には、各センサ装置10から送信された計測データが無線信号であることを利用して、マスタユニット21Aの通信部22Aに向けて送信された計測データを、スレーブユニット21Bの通信部22Bにおいて傍受(同時受信)する。傍受を可能にするために下位側のネットワークの通信プロトコルを多少変更する必要がある。通信部22Bによって傍受された計測データは、スレーブユニット21BのCPU24Bによってメモリ25Bに格納される。さらに、CPU24Bは、受信した計測データに基づいてCPU24Aと同じ演算を行い、演算結果をメモリ25Bに格納する。 On the other hand, the controller 23B (CPU 24B) provided in the slave unit 21B should not be able to directly receive the measurement data transmitted from each sensor device 10. However, in the case of the present embodiment, the measurement data transmitted from each sensor device 10 is a wireless signal, and the measurement data transmitted to the communication unit 22A of the master unit 21A is transmitted to the slave unit. The communication section 22B of 21B intercepts (simultaneously receives). It is necessary to slightly change the communication protocol of the lower network to enable the interception. The measurement data intercepted by the communication unit 22B is stored in the memory 25B by the CPU 24B of the slave unit 21B. Further, the CPU 24B performs the same calculation as the CPU 24A based on the received measurement data, and stores the calculation result in the memory 25B.

このように、各センサ装置10からの送信データをマスタユニット21Aとスレーブユニット21Bとで同時受信することによって、計測データおよびそれに基づく演算データのレプリケーション(複製処理)が必要でなくなる。共通鍵または公開暗号鍵による秘匿通信を行う際にも、鍵データを各コントロールユニット21A,21Bで共有することによって計測データの同時受信は可能である。 As described above, the master unit 21A and the slave unit 21B simultaneously receive the transmission data from each sensor device 10, thereby eliminating the need for replication of the measurement data and the operation data based on the measurement data. Even when the secret communication using the common key or the public encryption key is performed, the measurement data can be simultaneously received by sharing the key data among the control units 21A and 21B.

これに対して、上位計算機41から上位側ネットワーク40を介してマスタユニット21Aの通信部26Aに向けて送信されたデータ(制御指令および設定情報など)は、スレーブユニット21Bの通信部26Bによって傍受(同時受信)はしない。傍受を可能にしようとすると、上位側ネットワークの通信プロトコルの変更が必要になってしまうために、その影響が上位側ネットワーク40に接続された他の通信機器にも及んでしまうからである。 On the other hand, the data (control command and setting information) transmitted from the host computer 41 to the communication unit 26A of the master unit 21A via the host network 40 is intercepted by the communication unit 26B of the slave unit 21B ( (Simultaneous reception) is not done. This is because, if an attempt is made to enable interception, it is necessary to change the communication protocol of the higher-level network, and the effect will also affect other communication devices connected to the higher-level network 40.

したがって、上位計算機41から受信してマスタユニット21Aのメモリ25Aに格納されたデータに関しては、レプリケーション(複製処理)が必要になる。通常は、通信部26Aが上位計算機41から受信した信号を、その宛先を通信部26Bに変更してネットワーク40を介して通信部26Bに転送する。コントローラ23Bは、通信部26Bによって受信した信号をメモリ25Bに格納する。これによって、メモリ25Aとメモリ25Bとの同一状態を保つことができる。 Therefore, the data received from the host computer 41 and stored in the memory 25A of the master unit 21A needs to be replicated. Normally, the communication unit 26A changes the destination of the signal received from the host computer 41 to the communication unit 26B and transfers the signal to the communication unit 26B via the network 40. The controller 23B stores the signal received by the communication unit 26B in the memory 25B. Thereby, the same state of the memory 25A and the memory 25B can be maintained.

上記の同時受信およびレプリケーションとは別に、メモリ25Aの記憶内容とメモリ25Bの記憶内容とが一致しているかどうかを確認し、不一致の箇所についてのみデータ転送を行うことによって同一状態を保つ処理(以下、「同期処理」と称する)が行われる。図2の場合、この同期処理のために、CPU24AとCPU24Bとの間に有線バス30が設けられている。データ同期に必要な通信量が大幅に削減されているので、有線バス30の通信容量を格段に大きくする必要はない。有線バス30に代えて、有線LANまたは無線LANなどの通信路31および通信路32を用いてデータの同期を行ってもよい。 In addition to the above-mentioned simultaneous reception and replication, a process of maintaining the same state by confirming whether the stored contents of the memory 25A and the stored contents of the memory 25B match, and performing data transfer only at the unmatched portions (hereinafter , "Synchronization process") is performed. In the case of FIG. 2, a wired bus 30 is provided between the CPU 24A and the CPU 24B for this synchronization processing. Since the amount of communication required for data synchronization is greatly reduced, it is not necessary to increase the communication capacity of the wired bus 30 significantly. Instead of the wired bus 30, data communication may be performed using a communication path 31 and a communication path 32 such as a wired LAN or a wireless LAN.

同期処理では、まず、メモリ25Aおよびメモリ25Bの各々について所定の領域ごとに誤り検出符号が算出される。誤り検出符号として、たとえば、チェックサム、巡回冗長検査(CRC:Cyclic Redundancy Check)、MD5などのハッシュ関数を用いることができる。次に、上記の所定の領域ごとに算出した誤り検出符号が比較され、両者が異なる領域について、メモリ25Aからメモリ25Bにデータがコピーされる。これによって、同期処理に必要な通信量をさらに削減することができる。以下、ゲートウェイ装置20の通常時の動作手順(センサ装置からのデータ受信、上位計算機からのデータ受信、および同期処理)についてフローチャートを参照して具体的に説明する。 In the synchronization processing, first, the error detection code is calculated for each of the predetermined areas in each of the memory 25A and the memory 25B. As the error detection code, for example, a checksum, a Cyclic Redundancy Check (CRC), or a hash function such as MD5 can be used. Next, the error detection codes calculated for each of the above-described predetermined areas are compared, and data is copied from the memory 25A to the memory 25B for areas where the error detection codes differ. As a result, the amount of communication required for synchronization processing can be further reduced. Hereinafter, a normal operation procedure of the gateway device 20 (data reception from the sensor device, data reception from the host computer, and synchronization processing) will be specifically described with reference to a flowchart.

[ゲートウェイ装置の通常時の動作手順]
(1.センサ装置からのデータ受信)
図3は、センサ装置から送信されたデータがゲートウェイ装置を経由して上位計算機41によって受信されるまでの手順を示すフローチャートである。図3では、マスタユニット21Aに設けられた第1のコントローラ23A(CPU24A)の動作と、スレーブユニット21Bに設けられた第2のコントローラ23B(CPU24B)の動作とが示されている。
[Normal operation procedure of gateway device]
(1. Data reception from the sensor device)
FIG. 3 is a flowchart showing a procedure until the data transmitted from the sensor device is received by the host computer 41 via the gateway device. In FIG. 3, the operation of the first controller 23A (CPU 24A) provided in the master unit 21A and the operation of the second controller 23B (CPU 24B) provided in the slave unit 21B are shown.

図2、図3を参照して、まず、センサ装置10は、内蔵のセンサ素子によって検出された計測データについてフィルタ処理およびA/D変換処理を行ってゲートウェイ装置20に送信する(ステップS100)。センサ装置10からの計測データは、第1の通信部22Aおよび第2の通信部22Bによって同時受信され、第1のコントローラ23Aおよび第2のコントローラ23Bにそれぞれ取り込まれる。第1のコントローラ23Aは受信した計測データをメモリ25Aに記憶し(ステップS200)、第2のコントローラ23Bは受信した計測データをメモリ25Bに記憶する(ステップS300)。 With reference to FIGS. 2 and 3, first, the sensor device 10 performs a filtering process and an A/D conversion process on the measurement data detected by the built-in sensor element, and transmits the measurement data to the gateway device 20 (step S100). The measurement data from the sensor device 10 is simultaneously received by the first communication unit 22A and the second communication unit 22B, and fetched by the first controller 23A and the second controller 23B, respectively. The first controller 23A stores the received measurement data in the memory 25A (step S200), and the second controller 23B stores the received measurement data in the memory 25B (step S300).

さらに、第1のコントローラ23Aは、プログラムに従って、受信データに対して所定の演算を行い、演算結果をメモリ25Aに記憶するようにしてもよい(ステップS205)。たとえば、第1のコントローラ23Aは、複数の時点での計測データをデジタルフィルタ処理したり、複数のセンサからの計測データを複合演算したりする。この場合、第2のコントローラ23Bも、プログラムに従って、受信データに対して第1のコントローラ23Aと同じ演算を行い、演算結果をメモリ25Bに記憶するのが望ましい(ステップS305)。 Further, the first controller 23A may perform a predetermined calculation on the received data according to the program and store the calculation result in the memory 25A (step S205). For example, the first controller 23A performs digital filter processing on the measurement data at a plurality of time points and performs a composite operation on the measurement data from a plurality of sensors. In this case, it is desirable that the second controller 23B also perform the same calculation as the first controller 23A on the received data according to the program and store the calculation result in the memory 25B (step S305).

次に、第1のコントローラ23Aは、メモリ25Aに格納されている計測データおよび/または演算結果を、通信部26Aを介して上位側ネットワーク40に送信する(ステップS210)。送信されたデータは、ネットワーク40を介して上位計算機41によって受信される(ステップS400)。第2のコントローラ23Bのメモリ25Bに格納されたデータはフェイルオーバのためのものであるので、上位計算機41に送信されない。なお、第1のコントローラ23Aは、複数の時点での計測データまたは複数の時点での演算結果をまとめてデータ送信するようにしてもよい。 Next, the first controller 23A transmits the measurement data and/or the calculation result stored in the memory 25A to the upper network 40 via the communication unit 26A (step S210). The transmitted data is received by the host computer 41 via the network 40 (step S400). Since the data stored in the memory 25B of the second controller 23B is for failover, it is not transmitted to the host computer 41. In addition, the first controller 23A may collectively transmit the measurement data at a plurality of time points or the calculation results at a plurality of time points together.

(2.上位計算機からのデータ受信)
図4は、上位計算機41からのデータがゲートウェイ装置のメモリに格納されるまでの手順を示すフローチャートである。
(2. Receive data from host computer)
FIG. 4 is a flowchart showing a procedure until data from the host computer 41 is stored in the memory of the gateway device.

図2および図4を参照して、まず、上位計算機41からデータ(たとえば、設定情報)がゲートウェイ装置20に向けて送信される(ステップS405)。上位計算機41からの信号は、マスタユニット21Aの通信部26Aによって受信される(ステップS510)。通信部26Aによって受信されたデータ(設定情報)は、第1のコントローラ23Aのメモリ25Aに書込まれる(ステップS220)。 Referring to FIGS. 2 and 4, first, data (for example, setting information) is transmitted from host computer 41 to gateway device 20 (step S405). The signal from the host computer 41 is received by the communication unit 26A of the master unit 21A (step S510). The data (setting information) received by the communication unit 26A is written in the memory 25A of the first controller 23A (step S220).

通常は、通信部26Aは、上位計算機41から受信した信号を、その宛先をスレーブユニット21Bの通信部26Bに変更してネットワーク40に向けて出力する(ステップS520)。すなわち、通信部26Aは、上位計算機41からの受信信号を、ネットワーク40を介してスレーブユニット21Bの通信部26Bに転送する。転送された信号(設定情報)は、スレーブユニット21Bの通信部26Bによって受信され、第2のコントローラ23Bのメモリ25Bに書込まれる(ステップS320)。これによって、マスタユニット21Aのメモリ25Aとスレーブユニット21Bのメモリ25Bとが同一状態を保つ。通常の場合、上位計算機41からの通信量は、多数のセンサノード10からの通信量に比べて少ないため通信容量を圧迫することはない。ネットワーク40における有線LANまたは無線LANなどに代えて、有線バス30を用いてデータの転送を行ってもよい。 Normally, the communication unit 26A changes the destination of the signal received from the host computer 41 to the communication unit 26B of the slave unit 21B and outputs it to the network 40 (step S520). That is, the communication unit 26A transfers the received signal from the host computer 41 to the communication unit 26B of the slave unit 21B via the network 40. The transferred signal (setting information) is received by the communication unit 26B of the slave unit 21B and written in the memory 25B of the second controller 23B (step S320). As a result, the memory 25A of the master unit 21A and the memory 25B of the slave unit 21B maintain the same state. In a normal case, the communication volume from the host computer 41 is smaller than the communication volume from a large number of sensor nodes 10, and therefore the communication capacity is not overwhelmed. Data may be transferred using the wired bus 30 instead of the wired LAN or the wireless LAN in the network 40.

(3.同期処理)
図5は、第1および第2のコントロールユニット間での同期処理を行う手順の一例を示すフローチャートである。メモリ25Aとメモリ25Bとの間のデータ同期の周期は計測データ送信の周期と同じである必要はなく、通常は計測データの送信の周期よりも長い。
(3. Synchronous processing)
FIG. 5 is a flowchart showing an example of a procedure for performing a synchronization process between the first and second control units. The cycle of data synchronization between the memory 25A and the memory 25B does not need to be the same as the cycle of measurement data transmission, and is usually longer than the cycle of measurement data transmission.

図2および図5を参照して、まず、第1のコントローラ23Aはメモリ25Aの所定の領域ごとに誤り検出符号を計算し(ステップS230)、第2のコントローラ23Bはメモリ25Bの対応する所定の領域ごとに誤り検出符号を計算する(ステップS330)。第2のコントローラ23Bは、誤り検出符号の計算結果を第1のコントローラ23Aに送信する。 Referring to FIGS. 2 and 5, first, the first controller 23A calculates an error detection code for each predetermined area of the memory 25A (step S230), and the second controller 23B determines the corresponding predetermined area of the memory 25B. An error detection code is calculated for each area (step S330). The second controller 23B sends the calculation result of the error detection code to the first controller 23A.

次に、第1のコントローラ23Aは上記の所定の領域ごとに、算出された誤り検出符号を照合する(ステップS235)。上記の図3および図4で説明した手順のみが繰り返して複数回行われた後にメモリ25Aとメモリ25Bの同期が行われた場合には、エラーが生じない限りメモリ25Aの記憶内容とメモリ25Bの記憶内容とは同じである。したがって、この場合には、第1のコントローラ23Aは、誤り検出符号がメモリ25Aとメモリ25Bで一致する(不一致箇所はない)と判定して同期処理を終了する(ステップS240でNO)。 Next, the first controller 23A collates the calculated error detection code for each of the above-mentioned predetermined areas (step S235). If the memory 25A and the memory 25B are synchronized after the procedure described with reference to FIGS. 3 and 4 is repeated a plurality of times and repeated, the stored contents of the memory 25A and the memory 25B are stored unless an error occurs. It is the same as the stored content. Therefore, in this case, the first controller 23A determines that the error detection code matches between the memory 25A and the memory 25B (there is no mismatched part), and ends the synchronization process (NO in step S240).

一方、第1のコントローラ23Aが上記の所定の領域ごとに、算出された誤り検出符号を照合し、誤り検出符号の不一致を検出した場合(ステップS240でYES)について説明する。この場合、第1のコントローラ23Aは、メモリ25Aの記憶領域のうち誤り検出符号が一致しない一部の領域のデータを、有線バス30(または、通信路31,ネットワーク40、通信路32の経路)を介して第2のコントローラ23Bに送信する(ステップS245)。第2のコントローラ23Bは、第1のコントローラ23Aからメモリデータを受信した場合には(ステップS340でYES)、受信したデータをメモリ25Bの対応する領域に書込む(ステップS345)。これによって、メモリの同期が完了する。有線バス30に代えて、有線LANまたは無線LANなどの通信路31および通信路32を用いてデータの同期を行ってもよい。 On the other hand, a case will be described in which the first controller 23A collates the calculated error detection codes for each of the above-described predetermined areas and detects a mismatch of the error detection codes (YES in step S240). In this case, the first controller 23A transfers the data of a part of the storage area of the memory 25A where the error detection codes do not match to the wired bus 30 (or the communication path 31, the network 40, the communication path 32). To the second controller 23B via (step S245). When the second controller 23B receives the memory data from the first controller 23A (YES in step S340), the second controller 23B writes the received data in the corresponding area of the memory 25B (step S345). This completes memory synchronization. Instead of the wired bus 30, data communication may be performed using a communication path 31 and a communication path 32 such as a wired LAN or a wireless LAN.

[フェイルオーバの具体的手順]
次に、第1のコントロールユニット(マスタユニット)21Aが異常の場合に、第2のコントロールユニット(スレーブユニット21B)にその後の処理の実行が切替わるフェイルオーバについて説明する。例えば、マスタユニット21AのCPU24Aで動作しているプログラムのフリーズがOS(Operating System)によって検出された場合、または、通信部22Aやメモリ25A、通信部26A、電源27Aなどシステム上の問題が検知された場合に、マスタユニット21Aからスレーブユニット21Bへのフェイルオーバが実行される。さらには、ハートビートの観測結果に基づいてCPU24Aのハングアップが検出された場合に、マスタユニット21Aからスレーブユニット21Bへのフェイルオーバが行われる。以下、図面を参照してフェイルオーバの手順を具体的に説明する。
[Specific procedure for failover]
Next, a failover in which execution of subsequent processing is switched to the second control unit (slave unit 21B) when the first control unit (master unit) 21A is abnormal will be described. For example, when the OS (Operating System) detects a freeze of a program running on the CPU 24A of the master unit 21A, or a system problem such as the communication unit 22A, the memory 25A, the communication unit 26A, or the power supply 27A is detected. In this case, failover from the master unit 21A to the slave unit 21B is executed. Furthermore, when a hang-up of the CPU 24A is detected based on the result of heartbeat observation, failover from the master unit 21A to the slave unit 21B is performed. Hereinafter, the failover procedure will be specifically described with reference to the drawings.

図6は、フェイルオーバの手順の一例を示すフローチャートである。図6のフローチャートは、アプリケーションプログラムのフリーズなどが検出された場合に、マスタユニット21Aに設けられた第1のコントローラ23A(CPU24A)の動作と、スレーブユニット21Bに設けられた第2のコントローラ23B(CPU24B)の動作とを示している。 FIG. 6 is a flowchart showing an example of a failover procedure. The flowchart of FIG. 6 shows the operation of the first controller 23A (CPU 24A) provided in the master unit 21A and the operation of the second controller 23B (provided in the slave unit 21B when the freeze of the application program is detected. The operation of the CPU 24B) is shown.

図2および図6を参照して、第1のコントローラ23A(CPU24A)において動作しているアプリケーションプログラムがフリーズしたことなどが、OS(オペレーティングシステム)によって検出されたとする(ステップS250)。この場合、第1のコントローラ23Aは、第2のコントローラ23Bに対して、ゲートウェイ動作の開始ならびに上位側通信部26Bのアドレス変更を要求する(ステップS255)。これとともに、第1のコントローラ23Aは、上位側通信部26Aにアドレス変更指令または停止指令を発行する(ステップS260)。第2のコントローラ23Bは、第1のコントローラ23Aからの要求に従って、通信部26Bにアドレス変更指令を発行する。 Referring to FIGS. 2 and 6, it is assumed that the OS (operating system) detects that the application program operating in first controller 23A (CPU 24A) is frozen (step S250). In this case, the first controller 23A requests the second controller 23B to start the gateway operation and change the address of the upper communication unit 26B (step S255). At the same time, the first controller 23A issues an address change command or a stop command to the higher-level communication unit 26A (step S260). The second controller 23B issues an address change command to the communication unit 26B in accordance with the request from the first controller 23A.

本実施形態では、通信部26A,26Bの各々にプログラム可能な制御回路が内蔵されているとする。この制御回路は対応するコントローラ23A,23Bからの指令に従って、上位側ネットワーク40との間の通信に用いられるアドレスの変更ならびに動作の停止が可能である。具体的に、上位通信がイーサネットの場合、IPアドレスが両コントローラでスワップされる(IPアドレスが入れ替えられる)。ただし、通信部26A,26Bのアドレスのスワップができない場合、もしくは、通信経路の切替え(通信部26Aの動作停止および通信部26Bのアドレス変更)ができない場合には、通信部26A,26Bのアドレスは現状のまま維持される。 In the present embodiment, it is assumed that each of the communication units 26A and 26B has a programmable control circuit built therein. This control circuit can change the address used for communication with the upper network 40 and stop the operation thereof in accordance with commands from the corresponding controllers 23A and 23B. Specifically, when the upper communication is Ethernet, the IP addresses are swapped between the controllers (the IP addresses are exchanged). However, when the addresses of the communication units 26A and 26B cannot be swapped, or when the communication path cannot be switched (the operation of the communication unit 26A is stopped and the address of the communication unit 26B is changed), the addresses of the communication units 26A and 26B are It will be maintained as it is.

さらに、第1のコントローラ23Aは、ゲートウェイとしての動作を停止する(もしくは、障害発生により既に動作停止中である)(ステップS265)。第2のコントローラ23Bは、第1のコントローラ23Aからの要求に従って、ゲートウェイとしてその後の動作を引き継ぐ(ステップS365)。 Further, the first controller 23A stops the operation as the gateway (or the operation is already stopped due to the failure occurrence) (step S265). The second controller 23B takes over the subsequent operation as a gateway according to the request from the first controller 23A (step S365).

[フェイルオーバ後の通信経路]
図7は、フェイルオーバ後に上位計算機41から送信されたデータが第2のコントローラのメモリに格納されるまでの手順を示すフローチャートである。
[Communication route after failover]
FIG. 7 is a flowchart showing a procedure until the data transmitted from the host computer 41 is stored in the memory of the second controller after the failover.

フェイルオーバが行われる前の正常状態では、上位計算機41からの送信データは、通信路31、通信部26A、通信路31、ネットワーク40、通信路32、通信部26Bの通信経路を順に経由して第2のコントローラ23Bによって受信される(図4参照)。一方、図2および図7を参照して、フェイルオーバ後には、通信経路の切替えによって、上位計算機41から送信されたデータ(ステップS405)は、ネットワーク40から通信路32を介して直に通信部26Bによって受信され(ステップS610)、第2のコントローラ23Bに取り込まれる(ステップS320)。逆に、第2のコントローラ23Bから上位計算機41に送信されるデータは、上記の逆順で、通信部26Bから通信路32およびネットワーク40を介して上位計算機41に伝達される。 In the normal state before the failover is performed, the transmission data from the host computer 41 passes through the communication paths of the communication path 31, the communication unit 26A, the communication path 31, the network 40, the communication path 32, and the communication unit 26B in order. It is received by the second controller 23B (see FIG. 4). On the other hand, referring to FIG. 2 and FIG. 7, after the failover, the data (step S405) transmitted from the host computer 41 due to the switching of the communication path is directly transmitted from the network 40 via the communication path 32 to the communication unit 26B. Is received by (step S610) and is taken in by the second controller 23B (step S320). On the contrary, the data transmitted from the second controller 23B to the host computer 41 is transmitted from the communication unit 26B to the host computer 41 via the communication path 32 and the network 40 in the reverse order.

図8は、上位側通信部のアドレス切替えに失敗した場合(もしくは切換不可能な場合)において、フェイルオーバ後に上位計算機41から送信されたデータが第2のコントローラのメモリに格納されるまでの手順を示すフローチャートである。 FIG. 8 shows a procedure until the data transmitted from the host computer 41 after the failover is stored in the memory of the second controller when the address switching of the host communication unit fails (or when switching is not possible). It is a flowchart shown.

図2および図8を参照して、アドレス切替えに失敗した場合には、上位計算機41から送信されたデータは、フェイルオーバ前の通信経路を経由して第2のコントローラ23Bによって受信される。すなわち、上位計算機41から送信されたデータ(たとえば、設定情報)は(ステップS405)、ネットワーク40を介して通信部26Aによって一旦受信される(ステップS510)。通信部26Aは、ネットワーク40を介して受信データを通信部26Bに転送する(ステップS520)。通信部26Bによって受信されたデータは(ステップS610)、第2のコントローラ23Bによって取り込まれ、メモリ25Bに格納される(ステップS320)。逆に、第2のコントローラ23Bから上記計算機41に送信されたデータは、フェイルオーバ前の通信経路(図8のデータ伝送手順と同じ)を逆順に経由して上位計算機41によって受信される。 Referring to FIGS. 2 and 8, when the address switching fails, the data transmitted from the host computer 41 is received by the second controller 23B via the communication path before failover. That is, the data (for example, setting information) transmitted from the host computer 41 (step S405) is once received by the communication unit 26A via the network 40 (step S510). The communication unit 26A transfers the received data to the communication unit 26B via the network 40 (step S520). The data received by the communication unit 26B (step S610) is fetched by the second controller 23B and stored in the memory 25B (step S320). On the contrary, the data transmitted from the second controller 23B to the computer 41 is received by the host computer 41 via the communication path before failover (the same as the data transmission procedure of FIG. 8) in reverse order.

図9は、フェイルオーバ後において、センサ装置から送信されたデータが上位計算機41によって受信されるまでの手順を示すフローチャートである。 FIG. 9 is a flowchart showing a procedure until the data transmitted from the sensor device is received by the host computer 41 after the failover.

フェイルオーバが行われた後に、センサ装置10から計測データが送信された場合(ステップS100)、この計測データは、マスタユニット21Aの通信部22Aとスレーブユニット21Bの通信部22Bとに送信される点は同じである。しかしながら、マスタ側は正常な動作ができず動作停止されているので、スレーブ側の通信部22Bで受信された計測データのみが、第2のコントローラ23Bに取り込まれ、メモリ25Bに格納される(ステップS300)。第2のコントローラ23Bは、受信データに対して所定の演算を行い、演算結果をメモリ25Bに記憶するようにしてもよい(ステップS305)。第2のコントローラ23Bは、メモリ25Bに格納されている計測データおよび/または上記の演算結果を、上位側ネットワーク40を介して上位計算機41に送信する(ステップS310)。この送信データは、ネットワーク40を介して上位計算機41によって受信される(ステップS400)。第2のコントローラ23Bから上位計算機41までの具体的なデータ伝送手順は、図7および図8に関連して既に説明したとおりである。 When the measurement data is transmitted from the sensor device 10 after the failover is performed (step S100), this measurement data is transmitted to the communication unit 22A of the master unit 21A and the communication unit 22B of the slave unit 21B. Is the same. However, since the master side cannot operate normally and is stopped, only the measurement data received by the communication section 22B on the slave side is taken into the second controller 23B and stored in the memory 25B (step S300). The second controller 23B may perform a predetermined calculation on the received data and store the calculation result in the memory 25B (step S305). The second controller 23B transmits the measurement data stored in the memory 25B and/or the above calculation result to the host computer 41 via the host network 40 (step S310). This transmission data is received by the host computer 41 via the network 40 (step S400). The specific data transmission procedure from the second controller 23B to the host computer 41 is as already described with reference to FIGS. 7 and 8.

[フェイルオーバの手順の他の例]
図10は、フェイルオーバの手順の他の例を示すフローチャートである。図10のフローチャートは、ハートビートが検出できなくなった場合における、マスタユニット21Aに設けられた第1のコントローラ23A(CPU24A)の動作と、スレーブユニット21Bに設けられた第2のコントローラ23B(CPU24B)の動作とを示している。
[Other example of failover procedure]
FIG. 10 is a flowchart showing another example of the failover procedure. The flowchart of FIG. 10 shows the operation of the first controller 23A (CPU 24A) provided in the master unit 21A and the second controller 23B (CPU 24B) provided in the slave unit 21B when the heartbeat cannot be detected. And the operation of.

図2および図10を参照して、第1のコントローラ23A(CPU24A)で動作しているOSがハングアップするなどの異常で、第1のコントローラ23Aからのハートビートが第2のコントローラ23B(CPU24B)によって受信できなくなったとする(ステップS370)。ここで、ハートビートは第1のコントローラ23Aから第2のコントローラ23Bに定期的に送信されるパルス信号もしくはパケットである。 With reference to FIG. 2 and FIG. 10, the heartbeat from the first controller 23A causes the second controller 23B (CPU 24B) to malfunction due to an abnormality such as the OS running on the first controller 23A (CPU 24A) hanging up. ), it becomes impossible to receive (step S370). Here, the heartbeat is a pulse signal or packet that is periodically transmitted from the first controller 23A to the second controller 23B.

この場合、第2のコントローラ23Bは、上位側の通信部26Bにアドレス変更指令を発行する(S380)。これとともに、第2のコントローラ23Bは、第1コントローラ23Aにゲートウェイとしての動作の停止ならびに上位側通信部26Aのアドレス変更または停止を要求する(ステップS375)。第1のコントローラ23Aは、上記要求に従って、通信部26Aにアドレス変更指令または停止指令を発行し(ステップS280)、ゲートウェイとしての動作を停止する(ステップS285)。ただし、第1コントローラ23Aが上記要求に従って実際に動作するか否かは不確定である。一方、第2のコントローラ23Bは、ゲートウェイとしての動作を開始する(ステップS385)。 In this case, the second controller 23B issues an address change command to the upper communication unit 26B (S380). At the same time, the second controller 23B requests the first controller 23A to stop the operation as a gateway and to change or stop the address of the upper communication unit 26A (step S375). According to the above request, the first controller 23A issues an address change command or a stop command to the communication unit 26A (step S280) and stops the operation as a gateway (step S285). However, it is uncertain whether the first controller 23A actually operates according to the above request. On the other hand, the second controller 23B starts the operation as a gateway (step S385).

図7および図8で説明したように、通信部26A,26BのIPアドレスのスワップ、もしくは、通信経路の切替え(通信部26Aの動作停止および通信部26Bのアドレス変更)に成功した場合は、第2のコントローラ23Bは、通信路32、ネットワーク40を介して上位計算機41と直接通信を行う。失敗した場合は、上位計算機41からの送信データは、通信路31、通信部26A、通信路32、通信部26Bの通信経路を順に経由して第2のコントローラ23Bによって受信される。第2のコントローラ23Bから上位計算機41に向けて出力されたデータは、上記の通信経路を逆順に経由して上位計算機41によって受信される。 As described with reference to FIGS. 7 and 8, if the IP addresses of the communication units 26A and 26B are swapped or the communication path is switched (the operation of the communication unit 26A is stopped and the address of the communication unit 26B is changed), the The second controller 23B directly communicates with the host computer 41 via the communication path 32 and the network 40. In the case of failure, the transmission data from the host computer 41 is received by the second controller 23B via the communication path 31, the communication unit 26A, the communication path 32, and the communication path of the communication unit 26B in order. The data output from the second controller 23B to the host computer 41 is received by the host computer 41 via the above communication path in reverse order.

[効果]
以上のとおり、第1の実施形態のゲートウェイ装置は、複数のコントローラ23A,23Bを備える。コントローラ23A,23Bは、メモリ25A,25Bをそれぞれ含む。コントローラ23A,23Bは、センサ装置10からの計測データを同時受信するように構成されている。コントローラ23A,23Bは受信したデータをメモリ25A,25Bに格納する。
[effect]
As described above, the gateway device according to the first embodiment includes the plurality of controllers 23A and 23B. The controllers 23A and 23B include memories 25A and 25B, respectively. The controllers 23A and 23B are configured to simultaneously receive the measurement data from the sensor device 10. The controllers 23A and 23B store the received data in the memories 25A and 25B.

一方、上位計算機41からのデータは、マスタとして用いられるコントローラ23Aで受信され、メモリ25Aに格納されると共にレプリケーションによりコントローラ23Bにも受信される。この場合、メモリ25Aおよびメモリ25Bの記憶データは、上位計算機からの指示およびさらにその指示に基づくCPUの演算によって同様に変化する。このため、メモリ25Aとメモリ25Bの中身は基本的に同じ内容となる。なお、センサネットワークでの通信の大部分は、各センサノードからゲートウェイ装置への計測データの通信であり、この計測データはメモリ25Aとメモリ25Bの両方に既に取り込まれているので、レプリケーションに伴う通信量は少ない。これらにより基本的には同じ内容を保持する状態が保たれているため、データの同期に必要な通信量を大幅に削減することができる。 On the other hand, the data from the host computer 41 is received by the controller 23A used as a master, stored in the memory 25A, and also received by the controller 23B by replication. In this case, the data stored in the memory 25A and the memory 25B similarly change according to the instruction from the host computer and the operation of the CPU based on the instruction. Therefore, the contents of the memories 25A and 25B basically have the same contents. Most of the communication in the sensor network is communication of measurement data from each sensor node to the gateway device. Since this measurement data is already stored in both the memory 25A and the memory 25B, communication associated with replication is performed. The quantity is small. Since these basically keep the same contents, the amount of communication required for data synchronization can be significantly reduced.

さらに、本実施形態の場合には、フェイルオーバの前後で上位計算機の動作を変更する必要がない。 Furthermore, in the case of this embodiment, there is no need to change the operation of the host computer before and after failover.

本実施形態の方法と異なり、各センサノードからマスタとして用いられるコントローラ23Aにのみ計測データを送信し、マスタコントローラ23Aからスレーブコントローラ23Bに計測データを転送した場合には、マスタコントローラ23Aとスレーブコントローラ23Bとの間の通信トラフィックが過剰になってしまう。 Unlike the method of this embodiment, when the measurement data is transmitted from each sensor node only to the controller 23A used as a master and the measurement data is transferred from the master controller 23A to the slave controller 23B, the master controller 23A and the slave controller 23B The communication traffic between and becomes excessive.

さらに、本実施形態のゲートウェイ装置では、両コントローラ23A,23B間でメモリが同期しているかを確認するために、誤り検出符号(チェックサム、CRC、MD5など)が利用される。この誤り検出符号が両コントローラ23A,23B間で送受信されることによってメモリデータの一致または不一致が検証される。この検証の結果、誤り検出符号の不一致が見つかったメモリ領域のみメモリデータが送受信されることによってメモリデータの同期が実現される。この結果、コントローラ23A,23B間の通信トラフィックを削減することができる。本実施形態の方法と異なり、両コントローラ23A,23Bのメモリデータを直接照合した場合には、両コントローラ23A,23B間の通信トラフィックが過剰になってしまう。 Furthermore, in the gateway device of this embodiment, an error detection code (checksum, CRC, MD5, etc.) is used to confirm whether the memories are synchronized between the controllers 23A and 23B. The error detection code is transmitted and received between the two controllers 23A and 23B to verify the match or mismatch of the memory data. As a result of this verification, the memory data is transmitted and received only in the memory area in which the mismatch of the error detection code is found, whereby the synchronization of the memory data is realized. As a result, the communication traffic between the controllers 23A and 23B can be reduced. Unlike the method of this embodiment, when the memory data of both controllers 23A and 23B are directly collated, the communication traffic between both controllers 23A and 23B becomes excessive.

<第2の実施形態>
第1の実施形態では、図2に示すように、同じハードウェア構成を有するコントロールユニットを2個設けることによってゲートウェイが構成されていた。このようなコントロールユニットのハードウェア構成の共通化によって製造コストを抑制することができ、さらには、コントロールユニットの個数をさらに増加させることも容易にできるようになる。
<Second Embodiment>
In the first embodiment, as shown in FIG. 2, the gateway is configured by providing two control units having the same hardware configuration. By making the hardware configuration of the control unit common, the manufacturing cost can be suppressed, and the number of control units can be easily increased.

第2の実施形態では、図2のゲートウェイ装置20において部品点数を減らすために、下位側通信部22A,22B、上位側通信部26A,26B、および電源27A,27Bの各々を共通化したものである。以下、図面を参照して詳しく説明する。 In the second embodiment, in order to reduce the number of parts in the gateway device 20 of FIG. 2, each of the lower side communication units 22A and 22B, the upper side communication units 26A and 26B, and the power sources 27A and 27B is made common. is there. Hereinafter, a detailed description will be given with reference to the drawings.

図11は、第2の実施形態によるゲートウェイの構成を示すブロック図である。図11を参照して、ゲートウェイ装置20は、下位側の通信部22と、第1のコントローラ23Aと、第2のコントローラ23Bと、上位側の通信部26と、電源27とを含む。図2で説明したように、第1のコントローラ23AはCPU24Aおよびメモリ25Aを含み、第2のコントローラ23BはCPU24Bおよびメモリ25Bを含む。電源27は、ゲートウェイ装置20を構成する各構成要素に駆動電圧を供給する。 FIG. 11 is a block diagram showing the configuration of the gateway according to the second embodiment. Referring to FIG. 11, gateway device 20 includes a lower communication unit 22, a first controller 23A, a second controller 23B, an upper communication unit 26, and a power supply 27. As described with reference to FIG. 2, the first controller 23A includes the CPU 24A and the memory 25A, and the second controller 23B includes the CPU 24B and the memory 25B. The power supply 27 supplies a drive voltage to each component of the gateway device 20.

下位側の通信部22は、各センサ装置10から送信された計測データを受信する。通信部22によって受信された計測データは、基本的には第1のコントローラ23Aに取り込まれるが、第2のコントローラ23Bによっても受信可能なようになっている。 The communication unit 22 on the lower side receives the measurement data transmitted from each sensor device 10. The measurement data received by the communication unit 22 is basically taken in by the first controller 23A, but can also be received by the second controller 23B.

上位側の通信部26は、上位計算機41から上位側ネットワーク40を介して送信された制御指令および設定情報等を受信する。通信部26の受信データは、第1のコントローラ23Aによって受信され、第2のコントローラ23Bによっても受信可能なようになっている。第1のコントローラ23Aは、計測データまたはそれに基づく演算結果を、上位側ネットワーク40を介して上位計算機41に送信する。フェイルオーバ時には、上位側通信部26によって第1のコントローラ23Aから第2のコントローラに上位側の通信経路が切替わる。なお、この構成ではCPU24Aからメモリ25Aとメモリ25Bに並行して書き込みを行ってもよい。CPU24Bの電源は停止することができより低消費電力を少なくできるが、その場合にはハードビート信号はやり取りしない。CPU24Aで異常を検知した際に、CPU24Bを起動して第1の実施例と同様の切換処理を行う。 The upper communication unit 26 receives the control command, the setting information, and the like transmitted from the upper computer 41 via the upper network 40. The reception data of the communication unit 26 is received by the first controller 23A and can also be received by the second controller 23B. The first controller 23A transmits the measurement data or the calculation result based on the measurement data to the host computer 41 via the host network 40. Upon failover, the upper communication unit 26 switches the upper communication path from the first controller 23A to the second controller. In this configuration, the CPU 24A may perform writing in parallel to the memory 25A and the memory 25B. The power supply of the CPU 24B can be stopped and the low power consumption can be reduced, but in that case, the hard beat signal is not exchanged. When the CPU 24A detects an abnormality, the CPU 24B is activated to perform the same switching process as in the first embodiment.

上記の変形例として、図2の下位側通信部22A,22Bおよび上位側通信部26A,26Bのうちいずれか一方のみが共通化されて1個の部品として構成することもできる。 As a modification of the above, only one of the lower side communication units 22A and 22B and the upper side communication units 26A and 26B of FIG. 2 can be shared and configured as one component.

<第3の実施形態>
第3の実施形態では、第1および第2の実施形態において、メモリ25A,25B間の同期のために用いる通信回線の通信量がかなり制限されている場合について説明する。たとえば、無線LAN回線を用いた場合において十分な帯域が取れない場合などが該当する。この場合には、メモリ間のデータ同期の際のデータ通信量をさらに削減する必要がある。
<Third Embodiment>
In the third embodiment, a case will be described in which the communication amount of the communication line used for synchronization between the memories 25A and 25B in the first and second embodiments is considerably limited. For example, the case where a sufficient band cannot be obtained when a wireless LAN line is used is applicable. In this case, it is necessary to further reduce the data communication amount at the time of data synchronization between the memories.

図12は、第3の実施形態のゲートウェイ装置においてメモリ間の同期方法について説明するための図である。 FIG. 12 is a diagram for explaining a synchronization method between memories in the gateway device according to the third embodiment.

図2および図12を参照して、第1のコントローラ23Aのメモリ25Aのメモリ空間は、システム領域50A、設定情報が格納されるデータ領域51A、および計測データなどが格納される他のデータ領域52Aに分割されているものとする。システム領域50Aは、OS(オペレーティングシステム)およびアプリケーションプログラムなどが格納される。データ領域51Aは、上位計算機41から送信された設定情報などが格納される。データ領域52Aは、各センサ装置10からの計測データおよび計測データに基づく演算結果などが格納される。第2のコントローラ23Bのメモリ25Bのメモリ空間も、同様にシステム領域50B、データ領域51B、およびデータ領域52Bに分割されているものとする。なお、図12のメモリ領域の分割は一例であって、さらに細かく分割されていてもよい。 2 and 12, the memory space of the memory 25A of the first controller 23A includes a system area 50A, a data area 51A for storing setting information, and another data area 52A for storing measurement data and the like. It is assumed to be divided into. The system area 50A stores an OS (operating system) and application programs. The data area 51A stores the setting information transmitted from the host computer 41. The data area 52A stores measurement data from each sensor device 10 and a calculation result based on the measurement data. The memory space of the memory 25B of the second controller 23B is similarly divided into a system area 50B, a data area 51B, and a data area 52B. It should be noted that the division of the memory area in FIG. 12 is an example, and may be divided into smaller pieces.

ここで、第3の実施形態のゲートウェイ装置では、領域ごとに異なる頻度で同期処理が行われる。データの変更がほとんどないシステム領域50A,50Bは、初期起動時にしか同期が行われない。データ領域51A,51Bは、上位計算機41からのデータを受信したときのみ同期が行われる。データ領域52A,52Bは定期的に同期が行われる。ただし、データ領域52A,52Bについては、誤り検出符号のみが転送され、実際にデータが送信されることはほとんどない。 Here, in the gateway device of the third embodiment, the synchronization processing is performed at different frequencies for each area. The system areas 50A and 50B in which data is hardly changed are synchronized only at the initial startup. The data areas 51A and 51B are synchronized only when data is received from the host computer 41. The data areas 52A and 52B are regularly synchronized. However, for the data areas 52A and 52B, only the error detection code is transferred, and the data is hardly actually transmitted.

今回開示された実施形態はすべての点で例示であって制限的なものでないと考えられるべきである。この発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiments disclosed this time are to be considered as illustrative in all points and not restrictive. The scope of the present invention is shown not by the above description but by the scope of the claims, and is intended to include meanings equivalent to the scope of the claims and all modifications within the scope.

10 センサ装置、20 ゲートウェイ装置、21A 第1のコントロールユニット(マスタユニット)、21B 第2のコントロールユニット(スレーブユニット)、22,22A,22B 下位側通信部、23A 第1のコントローラ(マスタコントローラ)、23B 第2のコントローラ(スレーブコントローラ)、24A,24B CPU、25A,25B メモリ、26,26A,26B 上位側通信部、27,27A,27B 電源、30 有線バス、40 上位側ネットワーク、41 上位計算機、50A,50B システム領域、51A,51B,52A,52B データ領域。 10 sensor device, 20 gateway device, 21A 1st control unit (master unit), 21B 2nd control unit (slave unit), 22, 22A, 22B lower side communication part, 23A 1st controller (master controller), 23B 2nd controller (slave controller), 24A, 24B CPU, 25A, 25B memory, 26, 26A, 26B upper side communication unit, 27, 27A, 27B power supply, 30 wired bus, 40 upper side network, 41 upper computer, 50A, 50B system area, 51A, 51B, 52A, 52B data area.

Claims (9)

複数のセンサノードと無線通信を行うゲートウェイ装置であって、
第1の下位側通信部および第1のメモリを含み、各前記センサノードからの計測データを前記第1の下位側通信部によって受信して、受信した計測データを前記第1のメモリに格納する第1のコントローラと、
前記第1の下位側通信部および前記第1のメモリと異なる第2の下位側通信部および第2のメモリを含み、前記第1のコントローラが受信する計測データを前記第2の下位側通信部によって同時に受信して、受信した計測データを前記第2のメモリに格納する第2のコントローラと、
通信経路を切替えることによって、前記第1のコントローラおよび前記第2のコントローラのうちの一方と上位側ネットワークとの間で通信経路を確立することが可能な上位側通信部とを備え、
前記第1および第2のコントローラは、前記第1のメモリおよび前記第2のメモリのメモリ空間のうち、互いに異なる記憶データを含む一部の領域のみデータ同期を行う、ゲートウェイ装置。
A gateway device that performs wireless communication with a plurality of sensor nodes,
A first lower side communication unit and a first memory are included, the measurement data from each of the sensor nodes is received by the first lower side communication unit, and the received measurement data is stored in the first memory. A first controller,
A second lower communication unit and a second memory different from the first lower communication unit and the first memory, and the measurement data received by the first controller is the second lower communication unit; A second controller for simultaneously receiving the measurement data and storing the received measurement data in the second memory;
A higher-order side communication unit capable of establishing a communication path between one of the first controller and the second controller and a higher-order side network by switching the communication path,
The gateway device, wherein the first and second controllers perform data synchronization only in a part of the memory spaces of the first memory and the second memory that include stored data different from each other.
複数のセンサノードと無線通信を行うゲートウェイ装置であって、
各前記センサノードから計測データを受信する下位側通信部と、
第1のメモリを含み、前記下位側通信部によって受信した前記計測データを前記第1のメモリに格納する第1のコントローラと、
前記第1のメモリと異なる第2のメモリを含み、前記下位側通信部によって受信した前記計測データを前記第2のメモリに格納する第2のコントローラと、
通信経路を切替えることによって、前記第1のコントローラおよび前記第2のコントローラのうちの一方と上位側ネットワークとの間で通信経路を確立することが可能な上位側通信部とを備え、
前記通信経路を確立している前記一方のコントローラは、前記上位側通信部を介して受信した上位計算機からのデータを自メモリに格納し、前記通信経路を確立していない他方のコントローラは、前記上位計算機からのデータの複製を自メモリに格納し、
前記第1および第2のコントローラの一方は、前記第1のメモリの記憶内容と前記第2のメモリの記憶内容とが一致しているかどうかを確認し、エラーにより互いに異なる記憶データがあった場合に、前記第1のメモリおよび前記第2のメモリのメモリ空間のうち、前記互いに異なる記憶データを含む一部の領域のみデータ同期を行う、ゲートウェイ装置。
A gateway device that performs wireless communication with a plurality of sensor nodes,
A lower side communication unit that receives measurement data from each of the sensor nodes,
A first controller that includes a first memory and stores the measurement data received by the lower-level communication unit in the first memory;
A second controller that includes a second memory different from the first memory, and that stores the measurement data received by the lower-level communication unit in the second memory;
A higher-order side communication unit capable of establishing a communication path between one of the first controller and the second controller and a higher-order side network by switching the communication path,
The one controller that has established the communication path stores the data from the higher-order computer received via the higher-order communication unit in its own memory, and the other controller that has not established the communication path is Store a copy of the data from the host computer in its own memory,
If the one of the first and second controllers, where the storage contents of the first memory and the stored contents of said second memory to verify if it matches, there is different stored data by error to the one of the first memory and the memory space of the second memory, perform data synchronization only a part of the area including the different stored data, the gateway device.
前記第1のコントローラは、前記データ同期を行う際に、前記第1のメモリのメモリ空間を複数の領域に区分したときの各前記領域に対して誤り検出符号を算出し、
前記第2のコントローラは、前記データ同期を行う際に、前記第2のメモリの対応する各領域に対して前記誤り検出符号を算出し、
前記第1のコントローラは、前記データ同期を行う際に、前記誤り検出符号が異なる領域のデータのみを前記第2のコントローラに送信する、請求項1に記載のゲートウェイ装置。
The first controller calculates an error detection code for each of the areas when the memory space of the first memory is divided into a plurality of areas when performing the data synchronization,
The second controller calculates the error detection code for each corresponding area of the second memory when performing the data synchronization,
The gateway device according to claim 1, wherein the first controller transmits only data in areas having different error detection codes to the second controller when performing the data synchronization.
前記第1のコントローラと前記第2のコントローラとを接続する有線バスをさらに備え、
前記第1のメモリと前記第2のメモリとの間でのデータ同期は、前記有線バスを介して行われる、請求項3に記載のゲートウェイ装置。
Further comprising a wired bus connecting the first controller and the second controller,
The gateway device according to claim 3, wherein data synchronization between the first memory and the second memory is performed via the wired bus.
前記上位側通信部は、前記第1のコントローラが故障していない場合には、前記第1のコントローラと前記上位側ネットワークとの間で通信経路を確立し、
前記上位側通信部は、前記第1のコントローラが故障している場合には、前記第2のコントローラと前記上位側ネットワークとの間で通信経路を確立する、請求項1、3、および4のいずれか1項に記載のゲートウェイ装置。
When the first controller has not failed, the higher-level communication unit establishes a communication path between the first controller and the higher-level network,
The upper communication unit, when said first controller is faulty, establishes a communication path between said second controller and the upper network, according to claim 1, 3, and 4 The gateway device according to any one of claims.
前記上位側通信部は、
前記第1のコントローラと前記上位側ネットワークとを通信接続する第1の上位側通信部と、
前記第2のコントローラと前記上位側ネットワークとを通信接続する第2の上位側通信部とを含み、
前記第1のコントローラは、ハートビートを前記第2のコントローラに定期的に送信し、
前記第2のコントローラは、前記ハートビートを定期的に受信しなくなった場合に、前記上位側ネットワークとの間の通信経路を前記第1の上位側通信部から前記第2の上位側通信部に切替えるように前記第1のコントローラに指令し、
前記通信経路の切替えに成功した場合に、前記第2のコントローラは、前記上位側ネットワークからのデータを前記第2の上位側通信部によって直接受信し、
前記通信経路の切替えに失敗した場合に、前記第2のコントローラは、前記上位側ネットワークからのデータを、前記第1の上位側通信部を介在して前記第2の上位側通信部によって受信する、請求項5に記載のゲートウェイ装置。
The upper communication unit,
A first upper side communication unit for communicatively connecting the first controller and the upper side network;
A second upper side communication unit for communicatively connecting the second controller and the upper side network,
The first controller periodically sends a heartbeat to the second controller,
When the second controller does not regularly receive the heartbeat, the second controller sets a communication path to the upper network from the first upper communication unit to the second upper communication unit. Command the first controller to switch,
When the switching of the communication path is successful, the second controller directly receives the data from the upper network by the second upper communication unit,
When the switching of the communication path fails, the second controller receives the data from the upper network by the second upper communication unit via the first upper communication unit. The gateway device according to claim 5.
前記第1のコントローラは、オペレーティングシステム上で動作するアプリケーションプログラムに従って前記上位側ネットワークとの間で通信を行い、
前記オペレーティングシステムは、前記アプリケーションプログラムがフリーズしたことまたは前記第1のコントローラにおけるシステムの異常を検出した場合には、前記上位側ネットワークとの間の通信経路を前記第1のコントローラから前記第2のコントローラに切替えるように前記第2のコントローラに指令する、請求項5または6に記載のゲートウェイ装置。
The first controller communicates with the upper network according to an application program operating on an operating system,
When the operating system detects that the application program is frozen or a system abnormality in the first controller is detected, the operating system sets a communication path from the first controller to the second controller via the communication path to the upper network. The gateway device according to claim 5 or 6, which instructs the second controller to switch to the controller.
前記第1のメモリおよび前記第2のメモリの各々は、
各前記センサノードからの計測データおよび前記計測データに基づく演算結果を格納するための第1のデータ領域と、
前記上位側ネットワークを介して上位計算機から受信したデータを格納するための第2のデータ領域とを含み、
前記第1のメモリの前記第1のデータ領域と前記第2のメモリの前記第1のデータ領域との間で同期を行う頻度は、前記第1のメモリの前記第2のデータ領域と前記第2のメモリの前記第2のデータ領域との間で同期を行う頻度と異なる、請求項5〜7のいずれか1項に記載のゲートウェイ装置。
Each of the first memory and the second memory is
A first data area for storing measurement data from each of the sensor nodes and a calculation result based on the measurement data;
A second data area for storing data received from a host computer via the host network,
The frequency of performing synchronization between the first data area of the first memory and the first data area of the second memory depends on the frequency of the second data area of the first memory and the frequency of the second data area of the first memory. The gateway device according to any one of claims 5 to 7, which is different from a frequency of performing synchronization with the second data area of the second memory.
各々が計測データを無線送信する複数のセンサノードと、
請求項1および3〜8のいずれか1項に記載のゲートウェイ装置とを備える、センサネットワークシステム。
A plurality of sensor nodes, each of which wirelessly transmits measurement data,
A sensor network system comprising: the gateway device according to any one of claims 1 and 3 .
JP2015250218A 2015-12-22 2015-12-22 Gateway device and sensor network system Expired - Fee Related JP6745106B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015250218A JP6745106B2 (en) 2015-12-22 2015-12-22 Gateway device and sensor network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015250218A JP6745106B2 (en) 2015-12-22 2015-12-22 Gateway device and sensor network system

Publications (2)

Publication Number Publication Date
JP2017117098A JP2017117098A (en) 2017-06-29
JP6745106B2 true JP6745106B2 (en) 2020-08-26

Family

ID=59234462

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015250218A Expired - Fee Related JP6745106B2 (en) 2015-12-22 2015-12-22 Gateway device and sensor network system

Country Status (1)

Country Link
JP (1) JP6745106B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CH714256A1 (en) * 2017-10-18 2019-04-30 Elesta Gmbh Ostfildern De Zweigniederlassung Bad Ragaz Method for the serial transmission of data from a sensor to a security control device.
CN114531703B (en) * 2021-12-30 2024-01-23 浙江中控技术股份有限公司 Wireless gateway redundancy method based on TDMA

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01300363A (en) * 1988-05-30 1989-12-04 Nec Corp Multiplex processing system
JP3537666B2 (en) * 1998-04-23 2004-06-14 日本信号株式会社 Sensor terminal device
JP2009260778A (en) * 2008-04-18 2009-11-05 Hitachi High-Tech Control Systems Corp Sensor network gateway, and sensor network system
US8756412B2 (en) * 2010-04-16 2014-06-17 Honeywell International Inc. Gateway supporting transparent redundancy in process control systems and other systems and related method
US9065699B2 (en) * 2012-11-30 2015-06-23 Cognosos, Inc. Methods and systems for a distributed radio communications network
JP6558882B2 (en) * 2014-04-25 2019-08-14 富士電機株式会社 Control system and relay device

Also Published As

Publication number Publication date
JP2017117098A (en) 2017-06-29

Similar Documents

Publication Publication Date Title
TWI642282B (en) Fail recovery method and internet of things system and charging system using the same
JP5874815B2 (en) Network and method for implementing a highly available grand master clock
US20190173739A1 (en) Method, device and computer program product for managing distributed system
EP2920924B1 (en) Relaying frames
US9413609B2 (en) Communication device and method for transmitting messages in a redundantly operable industrial communication network
US9218230B2 (en) Method for transmitting messages in a redundantly operable industrial communication network and communication device for the redundantly operable industrial communication network
EP3599521B1 (en) System and method of communicating data over high availability industrial control systems
CN106685735B (en) EPA on-chip system, EPA communication system and communication method
JP2009260778A (en) Sensor network gateway, and sensor network system
JP2010525433A (en) Parallel computer system, computer-implemented method, computer-readable recording medium and computer program for dynamically rerouting node traffic on parallel computer system
WO2013121568A1 (en) Node synchronization method, network transmission system, and node device
CN108595670B (en) Data storage method and device, computer device and storage medium
EP3955520A1 (en) Iot control network planning
JP6745106B2 (en) Gateway device and sensor network system
TWI530764B (en) Programmable logic controller and programmable logic control system
JP2010098591A (en) Fault monitoring system, server device, and node device
US20170317909A1 (en) Service providing device, alternative service providing device, relaying device, service providing system, and service providing method
CN104767665A (en) Ring communication network master station redundancy method, device and system
JP2019179361A (en) Safety control system and safety control unit
JP2016119616A (en) Ring type network system, and master node thereof
JP2015215863A (en) Control system and repeating device
JP4344333B2 (en) Packet transfer apparatus, packet transfer network system, and packet transfer method
CN115794769B (en) Method for managing high-availability database, electronic equipment and storage medium
US10270655B2 (en) Method for running a computer network and computer network
JP4378205B2 (en) Blade type network relay device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181113

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190827

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191016

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200317

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200515

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200803

R150 Certificate of patent or registration of utility model

Ref document number: 6745106

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees