JP2021164121A - Communication device, communication method, and program - Google Patents
Communication device, communication method, and program Download PDFInfo
- Publication number
- JP2021164121A JP2021164121A JP2020066987A JP2020066987A JP2021164121A JP 2021164121 A JP2021164121 A JP 2021164121A JP 2020066987 A JP2020066987 A JP 2020066987A JP 2020066987 A JP2020066987 A JP 2020066987A JP 2021164121 A JP2021164121 A JP 2021164121A
- Authority
- JP
- Japan
- Prior art keywords
- master
- time synchronization
- processing unit
- clock
- time
- 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.)
- Pending
Links
Images
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本発明は、ネットワークを使用して時刻同期を行う通信装置に関する。 The present invention relates to a communication device that synchronizes time using a network.
時刻同期のマスタまたはスレーブとして機能可能なネットワーク機器は、特許文献1に開示がある。
特許文献1に開示された技術では、当該ネットワーク機器がスレーブである場合にマスタからの定期的な時刻同期パケットの受信が絶たれると、当該時刻同期パケットの受信タイムアウトを実行しない。このとき、マスタ通信異常通知パケットを当該ネットワーク機器のネットワークに属する他のスレーブに通知する一方、当該ネットワークに属するスレーブの群から新たなマスタを選定する。
A network device capable of functioning as a time synchronization master or slave is disclosed in
In the technique disclosed in
しかしながら、当該ネットワークに属するスレーブの群から新たなマスタを選定する場合、送信する時刻同期パケットの時刻の精度はスレーブのクロックの精度となる。このため、マスタが送信する時刻同期パケットの時刻同期情報と、スレーブの群から選定された新たなマスタが送信する時刻同期情報とがずれる。この結果、マスタと通信できる装置と通信できない装置が混在し、マスタと同期している機器と、スレーブの群から選定された新たなマスタと同期している機器とで時刻が異なるおそれがある。 However, when a new master is selected from the group of slaves belonging to the network, the time accuracy of the time synchronization packet to be transmitted is the accuracy of the slave clock. Therefore, the time synchronization information of the time synchronization packet transmitted by the master and the time synchronization information transmitted by the new master selected from the group of slaves deviate from each other. As a result, devices that can communicate with the master and devices that cannot communicate with the master coexist, and the time may differ between the device that is synchronized with the master and the device that is synchronized with the new master selected from the group of slaves.
本発明は、上述の課題を鑑み、ネットワークを使用して同期される時刻のずれを低減することを目的とする。 In view of the above problems, an object of the present invention is to reduce a time lag that is synchronized using a network.
本発明の一つの態様による通信装置は、時刻を計数するクロックをそれぞれ持つ複数のネットワークインタフェースをそれぞれ介し、基準となる時刻に基づく複数の第1時刻同期情報を取得可能か否かを判定する判定手段と、前記第1時刻同期情報を取得できないネットワークインタフェースのクロックを、前記第1時刻同期情報を取得可能なネットワークインタフェースのクロックに同期させる同期手段と、前記同期手段にて同期されたクロックに基づく第2時刻同期情報を、前記第1時刻同期情報を取得できないネットワークインタフェースから送信する通信手段と、を備える。 The communication device according to one aspect of the present invention determines whether or not a plurality of first time synchronization information based on a reference time can be acquired via each of a plurality of network interfaces having clocks for counting time. Based on the means, the synchronization means that synchronizes the clock of the network interface that cannot acquire the first time synchronization information with the clock of the network interface that can acquire the first time synchronization information, and the clock synchronized by the synchronization means. A communication means for transmitting the second time synchronization information from a network interface on which the first time synchronization information cannot be acquired is provided.
本発明によれば、ネットワークを使用して同期される時刻のずれを低減することができる。 According to the present invention, it is possible to reduce the time lag that is synchronized using a network.
以下、添付図面を参照して本発明の実施形態を詳細に説明する。なお、以下の実施形態は本発明を限定するものではなく、また、実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。実施形態の構成は、本発明が適用される装置の仕様や各種条件(使用条件、使用環境等)によって適宜修正または変更され得る。本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the following embodiments do not limit the present invention, and not all combinations of features described in the embodiments are essential for the means for solving the present invention. The configuration of the embodiment may be appropriately modified or changed depending on the specifications of the apparatus to which the present invention is applied and various conditions (use conditions, use environment, etc.). The technical scope of the present invention is determined by the claims and is not limited by the following individual embodiments.
<第1実施形態>
図1は、第1実施形態に係る時刻同期境界装置の構成例を示すブロック図である。
図1に示す時刻同期境界装置1の各機能モジュールのうち、ソフトウェアにより実現される機能については、各機能モジュールの機能を提供するためのプログラムがROM(Read Only Memory)等のメモリに記憶される。そして、そのプログラムをRAM(Random Access Memory)に読み出してCPU(Central Processing Unit)が実行することにより実現される。ハードウェアにより実現される機能については、例えば、所定のコンパイラを用いることで、各機能モジュールの機能を実現するためのプログラムからFPGA上に自動的に専用回路を生成すればよい。FPGAとは、Field Programmable Gate Arrayの略である。また、FPGAと同様にしてゲートアレイ回路を形成し、ハードウェアとして実現するようにしてもよい。また、ASIC(Application Specific Integrated Circuit)により実現するようにしてもよい。なお、図1に示した機能ブロックの構成は一例であり、複数の機能ブロックが1つの機能ブロックを構成するようにしてもよいし、いずれかの機能ブロックが複数の機能を行うブロックに分かれてもよい。
<First Embodiment>
FIG. 1 is a block diagram showing a configuration example of a time synchronization boundary device according to the first embodiment.
Of the functional modules of the time
以下の説明では、IEEE1588規格であるPTP(Precision Time Protocol)に基づく時刻同期を例にとる。この規格では、正確な時刻を持つPTPマスタ装置が時刻同期マスタとしてPTPパケットにその時刻の情報を格納して送信し、PTPスレーブ装置が時刻同期装置としてPTPパケットを受信することで時刻同期を行うものである。PTPスレーブ装置またはPTPパケットを中継する装置は正確な時刻をPTPパケットに書き込むため、もしくは得るため、イーサネットインタフェースに時刻を計数するためのクロックを持つ。そして、このクロックを時刻同期部として時刻を同期させる。
また、以下の説明では、時刻同期装置として、IEEE1588のBC(バウンダリ・クロック)として動作する時刻同期境界装置を例にとる。
In the following description, time synchronization based on PTP (Precision Time Protocol), which is an IEEE1588 standard, will be taken as an example. In this standard, a PTP master device having an accurate time stores and transmits the time information in a PTP packet as a time synchronization master, and a PTP slave device receives a PTP packet as a time synchronization device to perform time synchronization. It is a thing. A PTP slave device or a device that relays a PTP packet has a clock on an Ethernet interface for counting the time in order to write or obtain an accurate time in the PTP packet. Then, the time is synchronized using this clock as the time synchronization unit.
Further, in the following description, as the time synchronization device, a time synchronization boundary device that operates as a BC (boundary clock) of IEEE1588 is taken as an example.
図1において、時刻同期境界装置1は、CPU102、ROM103、DRAM(Dynamic Random Access Memory)104、ファイルシステム105およびコネクタ106〜108を備える。各コネクタ106〜108は、時刻同期部であるクロック113〜115を備える。各コネクタ106〜108は、時刻同期パケット送信の際のパケットへのタイムスタンプの書き込みおよび送受信の時刻の取得などにクロック113〜115を使用する。
In FIG. 1, the time
CPU102は、1つ以上のCPUまたはMPU(Micro−processing unit)等のプロセッサにより構成される。CPUおよびMPUは、コンピュータとして機能する。CPU102は、GPU(Graphics Processing Unit)であってもよい。CPU102は、シングルコアプロセッサであってもよいし、マルチコアプロセッサであってもよい。CPU102は、ROM103に記憶されたコンピュータプログラムを実行することにより、時刻同期境界装置1全体を制御する。
The
ROM103は、ROMまたはRAM等の1以上のメモリにより構成される。ROM103は、後述する各種動作を行うためのコンピュータプログラムおよび通信パラメータ等の各種情報を記憶する。ROM103には、ファイルシステム105からOS(Operating System)120などのシステムプログラムをブートするためのプログラムが格納される。
なお、ROM103として、ROMまたはRAM等のメモリの他に、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカードまたはDVDなどの記憶媒体を用いてもよい。また、ROM103は、複数のメモリ等を備えていてもよい。
The
As the
DRAM104は、ワーキングメモリとして利用される。DRAM104は、1以上のDRAMによって構成してもよい。DRAM104は、DRAMに代えてもしくは加えて、SRAM(Static Random Access Memory)またはその他のRAMによって構成されてもよい。
ファイルシステム105は、OSなどのシステムプログラムおよびアプリケーションプログラムを格納する。
コネクタ106〜108は、イーサネット規格に準拠した有線通信を行うためのコネクタである。コネクタ106〜108は、イーサネットインタフェースなどのネットワークインタフェースとして動作可能である。各コネクタ106〜108には、イーサネットケーブル110〜112が接続される。
The
The
The
時刻同期境界装置1は、各コネクタ106〜108を介して他の通信装置と通信する。また、時刻同期境界装置1ではOS120が動作する。CPU102は、そのOS120上のプロセスとして、マスタ側第1同期通信処理部121、マスタ側第2同期通信処理部122およびスレーブ側同期通信処理部123を実行する。また、CPU102は、そのOS120上のプロセスとして、マスタ側クロック同期処理部124、スレーブ側クロック同期処理部125およびマスタ監視処理部126を実行する。マスタ側第1同期通信処理部121、マスタ側第2同期通信処理部122、スレーブ側同期通信処理部123、マスタ側クロック同期処理部124、スレーブ側クロック同期処理部125およびマスタ監視処理部126は、PTP規格に準拠することができる。
The time
マスタ側第1同期通信処理部121は、PTPスレーブとしてコネクタ106を通じてPTPマスタ装置と通信を行い、PTPマスタ装置からPTPパケットを取得する。そして、マスタ側第1同期通信処理部121は、そのPTPパケットに格納された時刻情報に基づいて、コネクタ106のクロック113の時刻を同期させる。マスタ側第1同期通信処理部121は、PTPマスタ装置と通信できない場合、PTPマスタとしてクロック113の時刻を使用してPTPパケットを送受信する。
The first synchronous
マスタ側第2同期通信処理部122も、PTPスレーブとしてコネクタ107を通じてPTPマスタ装置と通信を行い、PTPマスタ装置からPTPパケットを取得する。そして、マスタ側第2同期通信処理部122は、そのPTPパケットに格納された時刻情報に基づいて、コネクタ107のクロック114の時刻を同期させる。マスタ側第2同期通信処理部122は、PTPマスタ装置と通信できない場合、PTPマスタとしてクロック114の時刻を使用してPTPパケットを送受信する。
マスタ側第1同期通信処理部121とマスタ側第2同期通信処理部122が、PTPスレーブおよびPTPマスタのどちらで動作するかは、マスタ監視処理部126が指定する。
The second synchronous
The master
スレーブ側同期通信処理部123は、PTPマスタとしてクロック115の時刻を使用し、コネクタ108を通じてPTPパケットを送受信する。
マスタ側クロック同期処理部124は、PTPマスタ装置と通信できないイーサネットインタフェースのクロックの同期を行う。例えば、マスタ側第1同期通信処理部121がコネクタ106を通じてPTPマスタ装置と通信できない場合、マスタ側クロック同期処理部124は、コネクタ107のクロック114の時刻情報を使用してクロック113の時刻を同期させる。また、マスタ側第2同期通信処理部122がコネクタ107を通じてPTPマスタ装置と通信できない場合は、マスタ側クロック同期処理部124は、コネクタ106のクロック113の時刻情報を使用してクロック114の時刻を同期させる。
The slave-side synchronous
The master side clock
スレーブ側クロック同期処理部125は、クロック113またはクロック114の時刻情報を使用してクロック115の時刻を同期させる。スレーブ側クロック同期処理部125がクロック115の時刻同期にクロック113、114のどちらを使用するかは、マスタ監視処理部126が指定する。
The slave-side clock
マスタ監視処理部126は、マスタ側第1同期通信処理部121から図2のグランドマスタ装置3−1との同期の情報および同期の状態を取得する。また、マスタ監視処理部126は、マスタ側第2同期通信処理部122から図2のグランドマスタ装置3−2との同期の情報および同期の状態を取得する。そして、マスタ監視処理部126は、BMCA(Best Clock Master Algorithm)を使用し、クロック113とクロック114のどちらとクロック115を同期させるかを決定する。そして、マスタ監視処理部126は、その決定に応じて、スレーブ側クロック同期処理部125を再起動する。
The master
また、マスタ監視処理部126は、マスタ側第1同期通信処理部121からグランドマスタ装置3−1との通信状況を取得する。また、マスタ監視処理部126は、マスタ側第2同期通信処理部122からグランドマスタ装置3−2との通信状況を取得する。そして、マスタ監視処理部126は、グランドマスタ装置3−1、3−2から基準となる時刻に基づく複数の時刻同期情報を取得可能か否かを判定する。そして、マスタ監視処理部126は、グランドマスタ装置3−1、3−2のどちらかと通信できず、クロック113またはクロック114の同期が行われない場合は、マスタ側クロック同期処理部124を起動する。
Further, the master
また、マスタ監視処理部126は、グランドマスタ装置3−1、3−2のどちらかと通信できない場合は、マスタ側第1同期通信処理部121またはマスタ側第2同期通信処理部122をPTPマスタとして再起動する。
If the master
マスタ側第1同期通信処理部121は、コネクタ106を通じてPTPマスタと通信し、クロック113を同期させる。マスタ側第2同期通信処理部122は、コネクタ107を通じてPTPマスタと通信し、クロック114を同期させる。そして、スレーブ側クロック同期処理部125は、同期しているクロック113またはクロック114の時刻を使用して、クロック115を同期させる。スレーブ側同期通信処理部123は、PTPマスタとしてクロック115の時刻情報を使用し、コネクタ108を通じてPTPパケットを送信する。
The first synchronous
図2は、図1の時刻同期境界装置を適用した通信システムの一例を示すブロック図である。なお、eh1〜eh3は、イーサネットインタフェースとして動作可能なコネクタである。eh1は、図1のコネクタ106に対応し、eh2は、図1のコネクタ107に対応し、eh3は、図1のコネクタ108に対応する。
図2において、通信システムは、グランドマスタ装置3−1、3−2、TC(Transparent Clock)ハブ4−1、4−2、時刻同期境界装置1−1〜1−3および通信装置5−1〜5−9を備える。グランドマスタ装置3−1、3−2、TCハブおよび時刻同期境界装置1−1〜1−3は、PTP規格に準拠して動作することができる。
FIG. 2 is a block diagram showing an example of a communication system to which the time synchronization boundary device of FIG. 1 is applied. Note that eh1 to eh3 are connectors that can operate as Ethernet interfaces. eh1 corresponds to the
In FIG. 2, the communication system includes grand master devices 3-1 and 3-2, TC (Transient Clock) hubs 4-1 and 4-2, time synchronization boundary devices 1-1 to 1-3, and communication devices 5-1. It is equipped with ~ 5-9. The ground master devices 3-1 and 3-2, the TC hub and the time synchronization boundary devices 1-1 to 1-3 can operate in accordance with the PTP standard.
画像配信サーバシステム9は、画像サーバ11、配信サーバ12、制御装置13、DHCP(Dynamic Host Configuration Protocol)サーバ14およびハブ15を備える。各通信装置5−1〜5−9は、カメラ6−1〜6−9に接続可能である。配信サーバ12は、インターネット7を介して表示装置8に接続されている。
The image distribution server system 9 includes an
GPS(Global Positioning System)2は、時刻情報を配信する衛星である。
各グランドマスタ装置3−1、3−2は、高精度に時刻同期可能な時刻同期情報を配信する。時刻同期情報は、クロック106、107との同期に用いられる基準となる時刻の情報を含む。各グランドマスタ装置3−1、3−2は、GPS2から時刻情報を取得し、内部の高精度なクロックに同期させ、このクロックの情報を使用してPTPマスタとして時刻同期情報を配信する。各グランドマスタ装置3−1、3−2は、GPS2の時刻に同期しているので、どちらのグランドマスタ装置3−1、3−2のPTPパケットを使用して時刻同期しても、同じ時刻に高精度に時刻同期可能である。
GPS (Global Positioning System) 2 is a satellite that distributes time information.
Each grand master device 3-1 and 3-2 distributes time synchronization information capable of time synchronization with high accuracy. The time synchronization information includes information on a reference time used for synchronization with the
各時刻同期境界装置1−1〜1−3は、図1の時刻同期境界装置1と同様の構成を持つ。各時刻同期境界装置1−1〜1−3は、グランドマスタ装置3−1、3−2の時刻同期情報に基づいて時刻同期させる。
時刻同期境界装置1−1〜1−3の各コネクタ106(eh1)は、TCハブ4−1を介してグランドマスタ装置3−1に接続される。時刻同期境界装置1−1〜1−3の各コネクタ107(eh2)は、TCハブ4−2を介してPTPグランドマスタ3−2に接続される。時刻同期境界装置1−1〜1−3が2つのグランドマスタ装置3−1、3−2と通信することで、グランドマスタ装置3−1、3−2の1台と通信できなくなっても、時刻同期することができる。
また、時刻同期境界装置1−1〜1−3の各コネクタ108(eh3)は、通信装置5−1、5−4、5−7にそれぞれ接続される。
Each time synchronization boundary device 1-1 to 1-3 has the same configuration as the time
Each connector 106 (eh1) of the time synchronization boundary devices 1-1 to 1-3 is connected to the ground master device 3-1 via the TC hub 4-1. Each connector 107 (eh2) of the time synchronization boundary devices 1-1 to 1-3 is connected to the PTP ground master 3-2 via the TC hub 4-2. Even if the time synchronization boundary devices 1-1 to 1-3 communicate with the two ground master devices 3-1 and 3-2 and cannot communicate with one of the grand master devices 3-1 and 3-2, Time can be synchronized.
Further, each connector 108 (eh3) of the time synchronization boundary devices 1-1 to 1-3 is connected to the communication devices 5-1, 5-4, and 5-7, respectively.
各TCハブ4−1、4−2は、PTPトランスペアレントクロック機能を持つハブである。各TCハブ4−1、4−2は、PTPパケットの中継にかかる時間を補正してPTPパケットを中継する。 Each TC hub 4-1 and 4-2 is a hub having a PTP transparent clock function. Each TC hub 4-1 and 4-2 relays the PTP packet by correcting the time required for relaying the PTP packet.
各通信装置5−1〜5−9は、各時刻同期境界装置1−1〜1−3の時刻同期情報に基づいて時刻同期させることができる。各通信装置5−1〜5−9は、自装置に接続されたカメラ6−1〜6−9で撮像された同時刻の画像を画像サーバ11に送信し、画像サーバ11が受信した情報を配信サーバ12を通じて配信する。また、各通信装置5−1〜5−9は、自装置に接続されたカメラ6−1〜6−9によって得た画像データを他の通信装置5−1〜5−9に送信することができる。なお、通信装置5−3、通信装置5−6および通信装置5−9のコネクタ108(eh3)は、ハブ203と接続されている。通信装置5−1〜5−9には、DHCPクライアントとしての機能が搭載される。
Each communication device 5-1 to 5-9 can synchronize the time based on the time synchronization information of each time synchronization boundary device 1-1 to 1-3. Each communication device 5-1 to 5-9 transmits an image at the same time captured by the cameras 6-1 to 6-9 connected to the own device to the
各通信装置5−1〜5−9は、2つのコネクタ(eh1、eh3)を持ち、各通信装置5−1〜5−9の各コネクタが別の通信装置と接続する。例えば、通信装置5−1のコネクタ108(eh3)は、イーサネットケーブルを介して通信装置5−2のコネクタ106(eh1)に接続される。通信装置5−2のコネクタ108(eh3)は、イーサネットケーブルを介して通信装置5−3のコネクタ106(eh1)に接続される。このように、通信装置5−1〜5−3、通信装置5−4〜5−6および通信装置5−7〜5−9は、それぞれ直列に接続される。このように複数の通信装置を直列に接続する接続方法を、デイジーチェーンと呼ぶ。 Each communication device 5-1 to 5-9 has two connectors (eh1, eh3), and each connector of each communication device 5-1 to 5-9 connects to another communication device. For example, the connector 108 (eh3) of the communication device 5-1 is connected to the connector 106 (eh1) of the communication device 5-2 via an Ethernet cable. The connector 108 (eh3) of the communication device 5-2 is connected to the connector 106 (eh1) of the communication device 5-3 via an Ethernet cable. In this way, the communication devices 5-1 to 5-3, the communication devices 5-4 to 5-6, and the communication devices 5-7 to 5-9 are connected in series, respectively. A connection method for connecting a plurality of communication devices in series in this way is called a daisy chain.
画像サーバ11は、ハブ15を介して通信装置5−1〜5−9から受信した画像データの蓄積および処理を行う。
制御装置13は、画像サーバ11および配信サーバ12の制御を行う。
配信サーバ12は、画像サーバ11に蓄積された画像データを、表示装置8からの要求に応じてインターネット7を介して配信する。
The
The
The distribution server 12 distributes the image data stored in the
DHCPサーバ14は、通信装置5−1〜5−9から受信したDHCP要求パケットに対する応答としてDHCP応答パケットを送信し、通信装置5−1〜5−9に通信装置のIP(Internet Protocol)アドレスを通知する。なお、DHCP要求パケットとは、IPアドレスの設定を要求するパケットである。通信装置5−1〜5−9は、DHCPサーバ14から通知されたIPアドレスを自身のアドレスとして設定する。 The DHCP server 14 transmits a DHCP response packet as a response to the DHCP request packet received from the communication devices 5-1 to 5-9, and sends the communication device IP (Internet Protocol) address to the communication devices 5-1 to 5-9. Notice. The DHCP request packet is a packet that requests the setting of an IP address. The communication devices 5-1 to 5-9 set the IP address notified from the DHCP server 14 as their own address.
図3は、マスタ装置と時刻同期境界装置のPTP通信のシーケンスを示す図である。なお、図3では、図2のグランドマスタ装置3−1と時刻同期境界装置1−1〜1−3のPTP通信を例にとるが、グランドマスタ装置3−2と時刻同期境界装置1−1〜1−3のPTP通信についても同様に実施することができる。 FIG. 3 is a diagram showing a sequence of PTP communication between the master device and the time synchronization boundary device. In FIG. 3, PTP communication between the grand master device 3-1 and the time synchronization boundary device 1-1 to 1-3 in FIG. 2 is taken as an example, but the grand master device 3-2 and the time synchronization boundary device 1-1 The same can be applied to the PTP communication of ~ 1-3.
図3において、グランドマスタ装置3−1は、時刻同期のためのパケットであるPTPのSyncパケットとFollow_upパケットを定期的に(例えば、1秒毎に)送信する。グランドマスタ装置3−1が送信したPTPのSyncパケットとFollow_upパケットは、TCハブ4−1を経由して、時刻同期境界装置1−1〜1−3のコネクタ106(eh1)で受信される。 In FIG. 3, the grand master device 3-1 periodically (for example, every second) transmits a PTP Sync packet and a Follow_up packet, which are packets for time synchronization. The PTP Sync packet and Follow_up packet transmitted by the grand master device 3-1 are received by the connector 106 (eh1) of the time synchronization boundary devices 1-1 to 1-3 via the TC hub 4-1.
各時刻同期境界装置1−1〜1−3は、グランドマスタ装置3−1が送信したSyncパケットの受信時刻と、Follow_upパケットに格納されているSyncパケットの送信時刻を使用し、コネクタ106のクロック113の時刻を調整する。
また、各時刻同期境界装置1−1〜1−3は、グランドマスタ装置3−1にDelay_Requestパケットを送信し、グランドマスタ装置3−1は、Delay_Responseパケットを送信する。そして、時刻同期境界装置1−1〜3は、Delay_Responseパケットを受信することで、その受信までの往復遅延時間を計測し、その計測結果を時刻調整に使用する。
Each time synchronization boundary device 1-1 to 1-3 uses the reception time of the Sync packet transmitted by the grand master device 3-1 and the transmission time of the Sync packet stored in the Follow_up packet, and clocks the
Further, each time synchronization boundary device 1-1 to 1-3 transmits a Delay_Request packet to the grand master device 3-1 and the grand master device 3-1 transmits a Delay_Response packet. Then, the time synchronization boundary devices 1-1 to 3 receive the Delay_Response packet, measure the round-trip delay time until the reception, and use the measurement result for the time adjustment.
同様に、グランドマスタ装置3−2は、各時刻同期境界装置1−1〜1−3のコネクタ107(eh2)とPTPパケットを送受することで、各時刻同期境界装置1−1〜1−3のコネクタ107(eh2)のクロック114の時刻を調整する。
このように、グランドマスタ装置3−1と時刻同期境界装置1−1〜1−3のコネクタ106(eh1)のクロック113が同期し、グランドマスタ装置3−2と時刻同期境界装置1−1〜1−3のコネクタ107(eh2)のクロック114が同期する。
グランドマスタ装置3−1、3−2は、図示しているPTPのSyncパケットおよびFollow_upパケットの他に、Announceパケットも定期的に送信し、Announceパケットは、BMCA実行の際に利用される。
Similarly, the grand master device 3-2 sends and receives PTP packets to and from the connector 107 (eh2) of each time synchronization boundary device 1-1 to 1-3, so that each time synchronization boundary device 1-1 to 1-3 The time of the
In this way, the
In addition to the PTP Sync packet and Follow_up packet shown in the figure, the grand master devices 3-1 and 3-2 periodically transmit the Announce packet, and the Announce packet is used when executing the BMCA.
図4は、時刻同期境界装置と通信装置のPTP通信のシーケンスを示す図である。なお、図4では、図2の時刻同期境界装置1−1と通信装置5−1〜5−3間でのPTP通信を例にとる。時刻同期境界装置1−2と通信装置5−4〜5−6間でのPTP通信および時刻同期境界装置1−3と通信装置5−7〜5−9間でのPTP通信についても同様に実施することができる。 FIG. 4 is a diagram showing a sequence of PTP communication between the time synchronization boundary device and the communication device. In FIG. 4, PTP communication between the time synchronization boundary device 1-1 and the communication devices 5-1 to 5-3 in FIG. 2 is taken as an example. The same applies to PTP communication between the time synchronization boundary device 1-2 and the communication devices 5-4 to 5-6 and PTP communication between the time synchronization boundary device 1-3 and the communication devices 5-7 to 5-9. can do.
図4において、時刻同期境界装置1−1は、クロック115の時刻を用いてPTPのSyncパケットとFollow_upパケットをコネクタ108から送信する。通信装置5−1は、時刻同期境界装置1−1から受信したPTPのSyncパケットとFollow_upパケットを使用して自身の時刻を調整し、同時に、それらのパケットを通信装置5−2に中継する。通信装置5−2は、通信装置5−1が中継したPTPのSyncパケットとFollow_upパケットを使用して自身の時刻を調整し、同時に、それらのパケットを通信装置5−3に中継する。通信装置5−3は、通信装置5−2が中継したPTPのSyncパケットとFollow_upパケットを使用して自身の時刻を調整する。
In FIG. 4, the time synchronization boundary device 1-1 transmits a PTP Sync packet and a Follow_up packet from the
また、通信装置5−3は、Delay_Requestパケットを送信し、通信装置5−2、5−1は、Delay_Requestパケットを中継し、時刻同期境界装置1−1は、Delay_Requestパケットを受信する。そして、時刻同期境界装置1−1は、Delay_Responseパケットを送信し、通信装置5−1、5−2は、Delay_Responseパケットを中継し、通信装置5−3は、Delay_Responseパケットを受信する。そして、通信装置5−3は、Delay_Responseパケットの受信までの往復遅延時間を計測し、その計測結果を時刻調整に使用する。
なお、図4の例では、通信装置5−3がDelay_Responseパケットを受信した場合を示したが、PTPのパケットを中継する通信装置5−1、5−2も、Delay_Requestを送信し、Delay_Responseを受信する。
Further, the communication device 5-3 transmits the Delay_Request packet, the communication device 5-2, 5-1 relays the Delay_Request packet, and the time synchronization boundary device 1-1 receives the Delay_Request packet. Then, the time synchronization boundary device 1-1 transmits the Delay_Response packet, the communication devices 5-1 and 5-2 relay the Delay_Response packet, and the communication device 5-3 receives the Delay_Response packet. Then, the communication device 5-3 measures the round-trip delay time until the reception of the Delay_Response packet, and uses the measurement result for the time adjustment.
In the example of FIG. 4, the case where the communication device 5-3 receives the Delay_Response packet is shown, but the communication devices 5-1 and 5-2 that relay the PTP packet also transmit the Delay_Request and receive the Delay_Response. do.
このように、マスタ側第1同期通信処理部121は、各時刻同期境界装置1−1〜1−3のクロック113をグランドマスタ装置3−1の時刻に同期させる。マスタ側第2同期通信処理部122は、各時刻同期境界装置1−1〜1−3のクロック114をグランドマスタ装置3−2の時刻に同期させる。そして、スレーブ側クロック同期処理部125は、クロック113またはクロック114の時刻情報を使用してクロック115を同期させる。各時刻同期境界装置1−1〜1−3は、自身の各クロック115の時刻を使用してPTPのSyncパケットおよびFollow_upパケットを送信することで、各通信装置5−1〜5−3、5−4〜5−6、5−7〜5−9の時刻を同期させる。
In this way, the first synchronous
図5は、図2の通信システムの設置例を示す平面図である。
図5において、通信装置5−1〜5−9は、スタジアム10を一周するように配置されている。スタジアム10の外部には、時刻同期境界装置1−1〜1−3、グランドマスタ装置3−1、3−2、TCハブ4−1、4−2および画像配信サーバシステム9が配置されている。各通信装置5−1〜5−9は、自身に接続された各カメラ6−1〜6−9が撮影した画像データを画像配信サーバシステム9に伝送する。
FIG. 5 is a plan view showing an installation example of the communication system of FIG.
In FIG. 5, the communication devices 5-1 to 5-9 are arranged so as to go around the
図5に示すような大規模なスタジアム10では、グランドマスタ装置3−1、3−2と通信装置5−1〜5−9を接続するケーブルが長くなり、ケーブルの断線の危険性が高くなる。このとき、複数のグランドマスタ装置3−1、3−2を設置し、複数の時刻境界装置1−1〜1−3を設置することで冗長化を図れる。
グランドマスタ装置と通信できない機器がある場合、これまでPTPスレーブとして動作していた機器がPTPマスタとして動作することで、冗長化を高めることができる。例えば、図1の時刻同期境界装置1を使用する図2の通信システムに、このような冗長化を適用するものとする。この場合、PTPスレーブとして動作していた時刻同期境界装置1−1〜1−3がグランドマスタ装置3−1、3−2と通信できない場合、時刻同期境界装置1−1〜1−3は、PTPマスタとして動作する。
In a large-
When there is a device that cannot communicate with the ground master device, the device that has been operating as a PTP slave so far operates as a PTP master, so that redundancy can be enhanced. For example, it is assumed that such redundancy is applied to the communication system of FIG. 2 using the time
図6は、第1実施形態に係る通信システムの断線例を示すブロック図である。
図6において、グランドマスタ装置3−1とTCハブ4−1の間が断線し、TCハブ4−2と時刻同期境界装置1−3が断線したものとする。この場合、時刻同期境界装置1−1〜1−3は、グランドマスタ装置3−1と通信できない。時刻同期境界装置1−1、1−2は、グランドマスタ装置3−2と通信できるが、時刻同期境界装置1−3は、グランドマスタ装置3−2と通信できない。
FIG. 6 is a block diagram showing an example of disconnection of the communication system according to the first embodiment.
In FIG. 6, it is assumed that the ground master device 3-1 and the TC hub 4-1 are disconnected, and the TC hub 4-2 and the time synchronization boundary device 1-3 are disconnected. In this case, the time synchronization boundary devices 1-1 to 1-3 cannot communicate with the ground master device 3-1. The time synchronization boundary devices 1-1 and 1-2 can communicate with the ground master device 3-2, but the time synchronization boundary devices 1-3 cannot communicate with the ground master device 3-2.
各時刻同期境界装置1−1、1−2のマスタ側第1同期通信処理部121がコネクタ106を通じて通信しているグランドマスタ装置3−1と通信できなくなり、クロック113を同期できなくなったものとする。このとき、グランドマスタ装置3−2と通信できる各時刻同期境界装置1−1、1−2のスレーブ側クロック同期処理部125は、グランドマスタ装置3−2と同期しているクロック114にクロック115を同期させる。そして、各時刻同期境界装置1−1、1−2のスレーブ側クロック同期処理部125は、マスタ側第1同期通信処理部121をPTPマスタとして動作させる。スレーブ側同期通処理部123は、クロック115の時刻を使用してPTP通信を行うため、通信装置5−1〜5−3および通信装置5−4〜5−6は、グランドマスタ装置3−2と同期して動作する。
The first synchronous
一方、グランドマスタ装置3−1、3−2と通信できない時刻同期境界装置1−3のスレーブ側クロック同期処理部125は、グランドマスタ装置3−1、3−2と同期していない自身のクロックに通信装置5−7〜5−9を同期させる。この場合、通信装置5−1〜5−6と通信装置5−7〜5−9が異なる時刻を参照して同期しているため、異なる同期となり、時間経過に従って、各通信装置5−1〜5−6の時刻と各通信装置5−7〜5−9の時刻がずれる。
On the other hand, the slave side clock
このとき、グランドマスタ装置3−1、3−2と通信できない時刻同期境界装置1−3は、グランドマスタ装置3−2と通信できる各時刻同期境界装置1−1、1−2を介して、グランドマスタ装置3−2と同期する。具体的には、時刻同期境界装置1−1、1−2のマスタ側クロック同期処理部124は、グランドマスタ装置3−2と同期しているコネクタ107のクロック114にクロック113を同期させる。そして、時刻同期境界装置1−1、1−2のマスタ側第1同期通信処理部121はPTPのマスタとして動作し、クロック114に同期されたクロック113の時刻を使用してPTPの時刻同期のためのパケットをコネクタ106から送信する。時刻同期境界装置1−3は、コネクタ106からグランドマスタ装置3−2と同期したPTPパケットを受信し、グランドマスタ装置3−2と同期する。
At this time, the time synchronization boundary devices 1-3 that cannot communicate with the ground master devices 3-1 and 3-2 pass through the time synchronization boundary devices 1-1 and 1-2 that can communicate with the ground master devices 3-2. Synchronize with the ground master device 3-2. Specifically, the master side clock
図7は、図1のマスタ監視処理の動作を示すフローチャートである。なお、図7の各ステップは、時刻同期境界装置1の記憶部に記憶されたプログラムをCPU102が読み出し、実行することで実現される。また、図7に示すフローチャートの少なくとも一部をハードウェアにより実現してもよい。ハードウェアにより実現する場合、例えば、所定のコンパイラを用いることで、各ステップを実現するためのプログラムからFPGA上に自動的に専用回路を生成すればよい。また、FPGAと同様にしてゲートアレイ回路を形成し、ハードウェアとして実現するようにしてもよい。また、ASICにより実現するようにしてもよい。
この場合、図7に示すフローチャートにおける各ブロックは、ハードウェアブロックと見做すことができる。なお、複数のブロックをまとめて1つのハードウェアブロックとして構成してもよく、1つのブロックを複数のハードウェアブロックとして構成してもよい。
FIG. 7 is a flowchart showing the operation of the master monitoring process of FIG. Each step of FIG. 7 is realized by the
In this case, each block in the flowchart shown in FIG. 7 can be regarded as a hardware block. A plurality of blocks may be collectively configured as one hardware block, or one block may be configured as a plurality of hardware blocks.
図7において、図1のマスタ監視処理部126は、1秒間スリープする(S402)。この例では、マスタ監視処理部126は、1秒間に1回動作する。
次に、マスタ監視処理部126は、マスタ側第1同期通信処理部121から、同期の状態およびグランドマスタ装置3−1が不通であるかどうかなどの情報を取得する(S403)。
In FIG. 7, the master
Next, the master
次に、マスタ監視処理部126は、マスタ側第2同期通信処理部122から、同期の状態およびグランドマスタ装置3−2が不通であるかどうかなどの情報を取得する(S404)。
次に、マスタ監視処理部126は、グランドマスタ装置3−1、3−2が共に不通か共に導通かを判断する(S405)。マスタ監視処理部126は、グランドマスタ装置3−1、3−2のどちらか片方とだけ通信できれば(S405のNO)、S406に進む。マスタ監視処理部126は、グランドマスタ装置3−1と3−2のどちらとも通信できないか、またはどちらとも通信できれば(S406のYES)、S413に進む。S413については、図8で説明する。
Next, the master
Next, the master
次に、マスタ監視処理部126は、グランドマスタ装置3−1と不通かどうかを判断する(S406)。マスタ監視処理部126は、グランドマスタ装置3−1と不通でなければ(S406のNO)、S407に進む。マスタ監視処理部126は、グランドマスタ装置3−1と不通であれば(S406のYES)、S414に進む。S414については、図9で説明する。
次に、マスタ監視処理部126は、グランドマスタ装置3−2と不通かどうかを判断する(S407)。マスタ監視処理部126は、グランドマスタ装置3−2と不通でなければ(S407のNO)、S408に進む。マスタ監視処理部126は、グランドマスタ装置3−2と不通であれば(S407のYES)、S415に進む。S415については、図10で説明する。
Next, the master
Next, the master
次に、マスタ監視処理部126は、スレーブ側クロック同期処理部125がコネクタ108のクロック115を同期させるために参照しているクロックを取得する(S408)。
次に、マスタ監視処理部126は、S403とS404で取得した情報に基づいてBMCAを行い、コネクタ106のクロック113とコネクタ107のクロック114のどちらと同期させた方がいいかを調べ、クロックを選択する(S409)。
Next, the master
Next, the master
次に、マスタ監視処理部126は、S408で取得したクロックとS409で選択したクロックが同じかどうかを判断する(S410)。マスタ監視処理部126は、S408で取得したクロックとS409で選択したクロックが同じならば(S410のYES)、S402に戻る。S408で取得したクロックとS409で選択したクロックが異なっていたら、マスタ監視処理部126は、スレーブ側クロック同期処理部125を終了させる(S411)。
次に、マスタ監視処理部126は、コネクタ108のクロック115を選択したクロック(クロック113、114の選択した方)に同期させるように設定し、スレーブ側クロック同期処理部125を起動し(S412)、S402に戻る。
Next, the master
Next, the master
図8は、図7のS413の処理を示すフローチャートである。
図8において、マスタ監視処理部126は、マスタ側クロック同期処理部124が実行中かどうかを判断する(S501)。マスタ監視処理部126は、マスタ側クロック同期処理部124が実行中でなければ(S501のNO)、図7のS408に進む。マスタ監視処理部126は、マスタ側クロック同期処理部124が実行中であれば(S501のYES)、マスタ側クロック同期処理部124を停止し(S502)、図7のS408に進む。S502の処理は、後述の図9のS601または図10のS701の処理を先に実行していた場合に行われる。
FIG. 8 is a flowchart showing the process of S413 of FIG.
In FIG. 8, the master
図9は、図7のS414の処理を示すフローチャートである。
図9において、マスタ監視処理部126は、マスタ側クロック同期処理部124を起動し、コネクタ106のクロック113をコネクタ107のクロック114に同期させる(S601)。
次に、マスタ監視処理部126は、グランドマスタ装置3−1から時刻を取得し、クロック113の同期を行っていたマスタ側第1同期通信処理部121を停止させる(S602)。
次に、マスタ監視処理部126は、マスタ側第1同期通信処理部121をPTPのマスタとして起動する(S603)。マスタ側第1同期通信処理部121は、PTPのマスタとしてクロック113の時刻を使用し、コネクタ106を通じてPTPパケットを送受信する。
FIG. 9 is a flowchart showing the process of S414 of FIG.
In FIG. 9, the master
Next, the master
Next, the master
図10は、図7のS415の処理を示すフローチャートである。
図10において、マスタ監視処理部126は、マスタ側クロック同期処理部124を起動し、コネクタ107のクロック114をコネクタ106のクロック113に同期させる(S701)。
FIG. 10 is a flowchart showing the process of S415 of FIG.
In FIG. 10, the master
次に、マスタ監視処理部126は、グランドマスタ装置3−2から時刻を取得し、クロック114の同期を行っていたマスタ側第2同期通信処理部122を停止させる(S702)。
次に、マスタ監視処理部126は、マスタ側第2同期通信処理部122をPTPのマスタとして起動する(S703)。マスタ側第2同期通信処理部122は、PTPのマスタとしてクロック114の時刻を使用し、コネクタ107を通じてPTPパケットを送受信する。
Next, the master
Next, the master
図7〜図10で説明したように、マスタ監視処理部126は、コネクタ106のクロック113の同期ができない場合、マスタ側クロック同期処理部124を使用してコネクタ107のクロック114をコネクタ106のクロック113に同期させる。そして、コネクタ108のクロック115がコネクタ106のクロック113に同期していた場合は、スレーブ側クロック同期処理部125を再起動し、コネクタ107のクロック114をコネクタ108のクロック113に同期させる。
As described with reference to FIGS. 7 to 10, when the
これにより、グランドマスタ装置3−1とクロック113の同期ができない場合、PTPマスタとして動作するマスタ側第1同期通信処理部121は、グランドマスタ装置3−2と同期した時刻を使用してPTPパケットを送受信できる。コネクタ107のクロック114の同期ができない場合も同様である。
As a result, when the ground master device 3-1 and the
図11は、図1のマスタ側同期通信処理のスレーブ動作を示すフローチャートである。
図11において、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPパケットを受信するまで待つ(S802)。
次に、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、受信したPTPパケットがAnnounceパケットかどうかを判断する(S803)。受信したPTPパケットがAnnounceパケットだったら(S803のYES)、BMCAを行い、現在選択しているPTPマスタと比較する(S804)。
FIG. 11 is a flowchart showing a slave operation of the master side synchronous communication process of FIG.
In FIG. 11, the master-side first synchronous
Next, the master-side first synchronous
次に、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、比較されたPTPマスタが現在選択しているPTPマスタよりも精度が良いかどうかを判断する(S805)。比較されたPTPマスタが現在の選択しているPTPマスタよりも精度が良くなければ(S805のNO)、S802に戻る。比較されたPTPマスタが現在の選択しているPTPマスタよりも精度が良ければ(S805のYES)、PTPパケットを受信するPTPマスタを変更し(S806)、S802に戻る。
Next, the master-side first synchronous
一方、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、受信したパケットがPTPのAnnounceパケットでなければ(S803のNO)、選択したマスタからのPTPパケットであるかどうかを判断する(S807)。選択したPTPマスタからのPTPパケットでなければ(S807のNO)、S802に戻る。選択したPTPマスタからのPTPパケットであれば(S807のYES)、PTPパケットの受信処理および同期処理を行い(S808)、S802に戻る。この同期処理は、マスタ側第1同期通信処理部121であれば、クロック113を同期させ、マスタ側第2同期通信処理部122であれば、クロック114を同期させる。
On the other hand, if the received packet is not a PTP Announcement packet (NO in S803), the master-side first synchronous
このように、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、スレーブ動作時において、PTPのAnnounceパケットを受信すると、BMCAを使用してPTPマスタを選択する。
As described above, when the master-side first synchronous
図12は、図1のマスタ側同期通信処理のマスタ動作を示すフローチャートである。
図12において、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、時刻同期境界装置1−1、1−2がグランドマスタ装置3−1、3−2と不通となった場合、PTPマスタとして動作する。
FIG. 12 is a flowchart showing the master operation of the master-side synchronous communication process of FIG.
In FIG. 12, in the master side first synchronous
マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPパケットを受信するか、またはSyncパケットおよびFollow_upパケットを前回送信してから1秒経過するまで待つ(S902)。
次に、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPパケットを受信したかどうかを判断する(S903)。マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPパケットを受信したら(S903のYES)、PTPのAnnounceパケットかどうかを判断する(S904)。
マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、Announceパケットであれば(S904のYES)、BMCAを使用する。そして、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、自分が送信するAnnounceパケットの情報と、受信したAnnounceパケットの情報を比較する(S905)。
The master-side first synchronous
Next, the master-side first synchronous
The master-side first synchronous
次に、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、時刻同期情報の優先順位が自分より高いかを判断する(S906)。自分より優先順位が高くない場合(S906のNO)、S902の処理に戻る。一方、自分より優先順位が高い場合(S906のYES)、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、動作をPTPスレーブに切り替えるため、図11のスレーブ動作時の処理へ進む(S907)。
Next, the first synchronous
一方、S904において、PTPのAnnounceパケットでなければ(S904のNO)、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPパケット受信処理を行い(S909)、S902に戻る。このPTPパケット受信処理は、PTPのDelay_Requestパケットに対するDelay_Responseパケットを送信するなどの受信したパケットに対する処理である。
On the other hand, in S904, if it is not a PTP Announce packet (NO in S904), the master-side first synchronous
一方、S903において、PTPパケットの受信でなければ(S903のNO)、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPのSyncとFollow_upパケットを送信する(S910)。
次に、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPのAnnounceパケットを前回送信してから2秒経過したかどうかを判断する(S911)。PTPのAnnounceパケットを前回送信してから2秒経過していなかったら(S911のNO)、S902に戻る。一方、PTPのAnnounceパケットを前回送信してから2秒経過していたら(S911のYES)、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、PTPのAnnounceパケットを送信し(S912)、S902に戻る。
On the other hand, in S903, if the PTP packet is not received (NO in S903), the master-side first synchronous
Next, the master-side first synchronous
このように、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、マスタ動作時において、PTPのAnnounceパケットを受信すると、BMCAを使用して自分の優先順位を比較する。そして、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、自分の優先順位が低い場合は、PTPスレーブとして動作する。
In this way, when the master-side first synchronous
また、図6に示すように断線し、時刻同期境界装置1−3がグランドマスタ装置3−1、3−2のどちらとも不通となった場合、時刻同期境界装置1−1、1−2のマスタ側第1同期通信処理部121がPTPのマスタとして動作する。そして、時刻同期境界装置1−1、1−2のマスタ側クロック同期処理部124がグランドマスタ装置3−2と同期しているコネクタ107のクロック114をクロック113に同期させる。そして、時刻同期境界装置1−1、1−2のマスタ側第1同期通信処理部121は、クロック113の時刻を使用してPTPの時刻同期のためのパケットをコネクタ106から送信する。これにより、時刻同期境界装置1−3は、グランドマスタ装置3−1、3−2のどちらとも不通となった場合においても、コネクタ106からグランドマスタ装置3−2と同期したPTPパケットを受信でき、グランドマスタ装置3−2と同期できる。
Further, when the wire is broken as shown in FIG. 6 and the time synchronization boundary devices 1-3 are disconnected from both the ground master devices 3-1 and 3-2, the time synchronization boundary devices 1-1 and 1-2 The first synchronous
なお、本実施形態では、2台のグランドマスタ装置3−1、3−2と、各グランドマスタ装置3−1、3−2と同期する時刻同期境界装置1のネットワークインタフェースとして2つのコネクタ106、107がある場合を例にとった。
グランドマスタ装置は2以上あればよく、時刻同期境界装置1のネットワークインタフェースが2以上、同期するクロックが2以上の場合であってもよい。そして、2以上のグランドマスタ装置のいずれかが不通と判断された場合、不通と判断されたネットワークインタフェースのクロックを、不通と判断されてないいずれかのクロックと同期させてもよい。
In the present embodiment, the two
The number of ground master devices may be two or more, and the network interface of the time
以上説明したように、上述した第1実施形態によれば、マスタ側クロック同期処理にて同期されたクロックの情報を、時刻同期情報を取得できないネットワークインタフェースから送信させる。これにより、時刻同期境界装置は、グランドマスタ装置のいずれとも不通となった場合においても、グランドマスタ装置と同期したPTPパケットを受信でき、グランドマスタ装置と同期することができる。 As described above, according to the first embodiment described above, the clock information synchronized by the master side clock synchronization process is transmitted from the network interface from which the time synchronization information cannot be acquired. As a result, the time synchronization boundary device can receive the PTP packet synchronized with the grand master device and can synchronize with the grand master device even when the communication with any of the grand master devices is interrupted.
<第2実施形態>
以下、第2実施形態に係る時刻同期境界装置について説明する。なお、第2実施形態において、第1実施形態と同様の構成および機能については、その詳細な説明は省略し、異なる点についてのみ説明する。第1実施形態との相違は、第2実施形態では、時刻同期境界装置が送信するPTPマスタのパケットに優先順位に基づいて、クロックの情報を選択する点である。
<Second Embodiment>
Hereinafter, the time synchronization boundary device according to the second embodiment will be described. In the second embodiment, detailed description of the same configuration and function as that of the first embodiment will be omitted, and only the differences will be described. The difference from the first embodiment is that in the second embodiment, clock information is selected based on the priority of the PTP master packet transmitted by the time synchronization boundary device.
図13は、第2実施形態に係る通信システムの断線例を示すブロック図である。
図13において、グランドマスタ装置3−1が不通となったとする。そして、BMCAの結果、時刻同期境界装置1−1がPTPマスタとなり、時刻同期境界装置1−2、1−3がPTPスレーブとなって動作したものとする。時刻同期境界装置1−2、1−3は、時刻同期境界装置1−1が送信するPTPマスタのパケットをコネクタ106から受信し、クロック113を同期させる。一方、時刻同期境界装置1−2、1−3は、グランドマスタ装置3−2が送信するPTPマスタのパケットをコネクタ107から受信し、クロック114を同期させる。
FIG. 13 is a block diagram showing an example of disconnection of the communication system according to the second embodiment.
In FIG. 13, it is assumed that the ground master device 3-1 is interrupted. Then, as a result of BMCA, it is assumed that the time synchronization boundary device 1-1 becomes the PTP master and the time synchronization boundary devices 1-2 and 1-3 operate as PTP slaves. The time synchronization boundary devices 1-2 and 1-3 receive the PTP master packet transmitted by the time synchronization boundary device 1-1 from the
このとき、時刻同期境界装置1−2、1−3のスレーブ側クロック同期処理部125がクロック115をクロック113に同期させる可能性がある。クロック113も、結果的にはグランドマスタ装置3−2に同期しているが、グランドマスタ装置3−2と直接同期しているクロック114に同期する方が望ましい。
At this time, the slave side clock
このため、時刻同期境界装置1−1がグランドマスタ装置3−1と不通になり、PTPマスタとして動作したものとする。この場合、時刻同期境界装置1−1が送信するPTPマスタのパケットの優先順位をグランドマスタ装置3−2が送信するPTPマスタのパケットより低くする。そして、時刻同期境界装置1−2、1−3のマスタ監視処理部126は、優先順位が高いコネクタ107のクロック114を選択し、グランドマスタ装置3−2と直接同期しているクロック114の時刻にクロック115を同期させる。
Therefore, it is assumed that the time synchronization boundary device 1-1 is disconnected from the ground master device 3-1 and operates as a PTP master. In this case, the priority of the PTP master packet transmitted by the time synchronization boundary device 1-1 is set lower than that of the PTP master packet transmitted by the grand master device 3-2. Then, the master
このように、時刻同期境界装置101のマスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122がPTPマスタとして動作する場合、そのPTPマスタの優先順位を低くする。これにより、時刻同期境界装置101のマスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122がPTPマスタとして動作している場合においても、グランドマスタ装置3−2と直接同期しているクロックを選択することができる。
In this way, when the master-side first synchronous
図14は、第2実施形態に係るマスタ監視処理の動作を示すフローチャートである。
図7のマスタ監視処理部126に対し、図14のマスタ監視処理部126では、図7のS414およびS415の処理の代わりにS1304およびS1305の処理が設けられ、S1301およびS1302の処理が追加される。
FIG. 14 is a flowchart showing the operation of the master monitoring process according to the second embodiment.
In the master
S1301では、マスタ監視処理部126は、S403およびS404で取得したグランドマスタ装置3−1、3−2の情報からBMCAで使用する情報を抜き出し、参照マスタの優先順位の低い方を選択する。
S1302では、マスタ監視処理部126は、選択した優先順位の低い参照マスタの情報をDRAM104などに記憶する。
In S1301, the master
In S1302, the master
図15は、図14のS1304の処理を示すフローチャートである。
図9のS414の処理に対し、図15のS1304では、図9のS603の処理の代わりにS1401およびS1402の処理が設けられている。
S1401では、マスタ監視処理部126は、S1302で記憶した優先順位より低い優先順位を計算する。
S1402では、マスタ監視処理部126は、マスタ側第1同期通信処理部121を、S1401で計算した優先順位でPTPマスタとして起動する。
FIG. 15 is a flowchart showing the process of S1304 of FIG.
In contrast to the process of S414 in FIG. 9, in S1304 of FIG. 15, the processes of S1401 and S1402 are provided instead of the process of S603 of FIG.
In S1401, the master
In S1402, the master
図16は、図14のS1305の処理を示すフローチャートである。
図9のS414の処理に対し、図16のS1305では、図9のS603の処理の代わりにS1501およびS1502の処理が設けられている。
S1501では、マスタ監視処理部126は、S1302で記憶していた優先順位より低い優先順位を計算する。
S1502では、マスタ監視処理部126は、マスタ側第2同期通信処理部122を、S1501で計算した優先順位でPTPマスタとして起動する。
FIG. 16 is a flowchart showing the process of S1305 of FIG.
In contrast to the process of S414 in FIG. 9, in S1305 of FIG. 16, the processes of S1501 and S1502 are provided instead of the process of S603 of FIG.
In S1501, the master
In S1502, the master
以上説明したように、上述した第2実施形態によれば、クロックとの同期に用いられる基準となる時刻の情報を含む時刻同期情報を取得できないネットワークインタフェースがあるものとする。この場合、マスタ監視処理は、そのネットワークインタフェースから送信させるクロックの情報の優先順位を、クロックとの同期に用いられる基準となる時刻の情報を含む時刻同期情報の優先順位より低くする。これにより、スレーブは、他の時刻同期境界装置を介してグランドマスタ装置に同期しているクロックと、グランドマスタ装置と直接同期しているクロックのうち、グランドマスタ装置と直接同期しているクロックを選択することができる。 As described above, according to the second embodiment described above, it is assumed that there is a network interface that cannot acquire time synchronization information including reference time information used for synchronization with the clock. In this case, the master monitoring process lowers the priority of the clock information transmitted from the network interface to the priority of the time synchronization information including the reference time information used for synchronization with the clock. As a result, the slave sets the clock that is synchronized with the ground master device via another time synchronization boundary device and the clock that is directly synchronized with the ground master device among the clocks that are directly synchronized with the ground master device. You can choose.
<第3実施形態>
以下、第3実施形態に係る時刻同期境界装置について説明する。なお、第3実施形態において、第1実施形態と同様の構成および機能については、その詳細な説明は省略し、異なる点についてのみ説明する。第1実施形態との相違は、第3実施形態では、いずれのマスタからも時刻同期情報を取得できないネットワークインタフェースから送信されるクロックの情報の優先順位を最も低くする。そして、そのネットワークインタフェースの同期通信処理をスレーブとして動作させる。
<Third Embodiment>
Hereinafter, the time synchronization boundary device according to the third embodiment will be described. In the third embodiment, detailed description of the same configuration and function as that of the first embodiment will be omitted, and only the differences will be described. The difference from the first embodiment is that in the third embodiment, the priority of the clock information transmitted from the network interface, which cannot acquire the time synchronization information from any master, is the lowest. Then, the synchronous communication process of the network interface is operated as a slave.
図17は、第3実施形態に係る通信システムの断線例を示すブロック図である。
図17において、時刻同期境界装置1−1〜1−3がグランドマスタ装置3−1、3−2のどちらとも通信できないものとする。この場合でも、通信装置5−1〜5−9は、同一時刻のカメラ画像を取得するため、通信装置5−1〜5−9の時刻同期を行うことが望ましい。
このため、コネクタ106、107が共にグランドマスタ装置3−1、3−2と通信できない場合、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122を最も低い優先順位でPTPマスタとして動作させる。
FIG. 17 is a block diagram showing an example of disconnection of the communication system according to the third embodiment.
In FIG. 17, it is assumed that the time synchronization boundary devices 1-1 to 1-3 cannot communicate with either of the ground master devices 3-1 and 3-2. Even in this case, since the communication devices 5-1 to 5-9 acquire camera images at the same time, it is desirable to synchronize the times of the communication devices 5-1 to 5-9.
Therefore, when both the
図18は、図13のS413の処理を示すフローチャートである。
第3実施形態では、マスタ監視処理部126は、図13のS413の処理の代わりに図18のS413の処理を実行する。
このとき、マスタ監視処理部126は、グランドマスタ装置3−1、3−2のどちらとも不通かどうか判断する(S1700)。どちらとも不通でない場合(S1700のNO)、マスタ監視処理部126は、図18の処理を終了する。どちらとも不通である場合(S1700のYES)、マスタ監視処理部126は、マスタ側クロック同期処理部124を起動し、コネクタ107のクロック114をコネクタ106のクロック113に同期させる(S1701)。
FIG. 18 is a flowchart showing the process of S413 of FIG.
In the third embodiment, the master
At this time, the master
次に、マスタ監視処理部126は、マスタ側第1同期通信処理部121を最も低い優先順位でPTPマスタとして起動する(S1702)。
次に、マスタ監視処理部126は、マスタ側第2同期通信処理部122を最も低い優先順位でPTPマスタとして起動する(S1703)。
Next, the master
Next, the master
これにより、図17に示すように、グランドマスタ装置3−1、3−2のどちらとも通信できなくなっても、各時刻同期境界装置1−1〜1−3のマスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122がPTPマスタとして動作する。また、マスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、図12のS905のBMCAを行う。このとき、BMCAは、同じ優先順位の場合でも、IDを使用してどのPTPマスタを使用するかを一意に選択するので、時刻同期境界装置1−1〜1−3のいずれかが選択される。
As a result, as shown in FIG. 17, even if communication with neither of the ground master devices 3-1 and 3-2 becomes possible, the master-side first synchronous communication processing unit of each time synchronization boundary device 1-1 to 1-3 121 and the second synchronous
また、マスタ側クロック同期処理部124は、図18のS1701の処理により、時刻同期境界装置1のコネクタ106、107から同じ時刻を配信する。このため、PTPスレーブとなった時刻同期境界装置1の内部のクロック115は、クロック113、114のどちらに同期してもよい。図18のS1701の処理は、コネクタ106のクロック113をコネクタ107のクロック104に同期させてもよい。
Further, the master side clock
このような構成において、図6のような断線が発生したものとする。各時刻同期境界装置1−1、1−2のマスタ側第1同期通信処理部121は、PTPマスタとしてコネクタ106からPTPパケットを送信する。いずれのグランドマスタ装置3−1、3−2とも同期できない時刻同期境界装置1−3のマスタ側第1同期通信処理部121もPTPパケットを送信する。
In such a configuration, it is assumed that the disconnection as shown in FIG. 6 occurs. The master-side first synchronous
このとき、時刻同期境界装置1−3のマスタ側第1同期通信処理部121およびマスタ側第2同期通信処理部122は、図18のS1702、S1703に示すように、最も低い優先順位でPTPマスタとして動作する。このため、図12のS905およびS906の処理により、時刻同期境界装置1−3のマスタ側第1同期通信処理部121は、PTPスレーブとして動作し、時刻同期境界装置1−1、1−2のいずれかが送信する時刻同期パケットに同期する。
At this time, the master-side first synchronous
このように、図17のような断線が発生し、時刻同期境界装置1−1〜1−3がすべてのグランドマスタ装置3−1、3−2と不通となった場合においても、時刻同期境界装置1−1〜1−3は、通信装置5−1〜5−9を同期できる。また、図6のような断線線が発生し、時刻同期境界装置1−3だけがすべてのグランドマスタ装置3−1、3−2と不通となった場合においても、時刻同期境界装置1−3は、グランドマスタ装置3−2の時刻と同期できる。 In this way, even when the disconnection as shown in FIG. 17 occurs and the time synchronization boundary devices 1-1 to 1-3 are disconnected from all the ground master devices 3-1 and 3-2, the time synchronization boundary Devices 1-1 to 1-3 can synchronize communication devices 5-1 to 5-9. Further, even when a disconnection line as shown in FIG. 6 occurs and only the time synchronization boundary device 1-3 is disconnected from all the ground master devices 3-1 and 3-2, the time synchronization boundary device 1-3 Can be synchronized with the time of the grand master device 3-2.
なお、本実施形態では、図18のS1702およびS1703の処理において、グランドマスタ装置3−1、3−2と不通の場合に、最も低い優先順位を使用してPTPマスタとして実行した。グランドマスタ装置3−1、3−2と不通の場合に、図15のS1401および図16の1501で計算した優先順位より低い優先順位を使用してPTPマスタとして実行してもよい。 In the present embodiment, in the processes of S1702 and S1703 of FIG. 18, when the ground master devices 3-1 and 3-2 are not connected, the process is executed as the PTP master using the lowest priority. In the case of non-communication with the ground master devices 3-1 and 3-2, the PTP master may be executed using a priority lower than the priority calculated in S1401 of FIG. 15 and 1501 of FIG.
以上説明したように、上述した第3実施形態によれば、いずれのマスタからも時刻同期情報を取得できないネットワークインタフェースから送信されるクロックの情報の優先順位を最も低くする。これにより、いずれのマスタからも時刻同期情報を取得できないネットワークインタフェースの同期通信処理はスレーブとして動作することができる。このため、いずれのマスタからも時刻同期情報を取得できない時刻同期境界装置は、時刻同期境界装置のいずれかが送信する時刻同期パケットに同期することができる。 As described above, according to the third embodiment described above, the priority of the clock information transmitted from the network interface whose time synchronization information cannot be acquired from any master is set to the lowest. As a result, the synchronous communication process of the network interface whose time synchronization information cannot be acquired from any master can operate as a slave. Therefore, the time synchronization boundary device whose time synchronization information cannot be acquired from any master can be synchronized with the time synchronization packet transmitted by any of the time synchronization boundary devices.
<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワークまたは記憶媒体を介してシステムまたは装置に供給してもよい。そして、上述の実施形態の1以上の機能は、そのシステムまたは装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。
<Other Embodiments>
The present invention may provide a system or device via a network or storage medium with a program that realizes one or more of the functions of the above embodiments. Then, one or more functions of the above-described embodiment can also be realized by a process in which one or more processors in the computer of the system or apparatus reads and executes a program.
1 時刻同期境界装置、121 マスタ側第1同期通信処理部、122 マスタ側第2同期通信処理部、123 スレーブ側同期通信処理部、124 マスタ側クロック同期処理部、125 スレーブ側クロック同期処理部、126 マスタ監視処理、106、107、108 コネクタ、113、114、115 クロック 1 Time synchronization boundary device, 121 Master side first synchronization communication processing unit, 122 Master side second synchronization communication processing unit, 123 Slave side synchronization communication processing unit, 124 Master side clock synchronization processing unit, 125 Slave side clock synchronization processing unit, 126 Master monitoring process, 106, 107, 108 connectors, 113, 114, 115 clocks
Claims (9)
前記第1時刻同期情報を取得できないネットワークインタフェースのクロックを、前記第1時刻同期情報を取得可能なネットワークインタフェースのクロックに同期させる同期手段と、
前記同期手段にて同期されたクロックに基づく第2時刻同期情報を、前記第1時刻同期情報を取得できないネットワークインタフェースから送信する通信手段と、
を備えることを特徴とする通信装置。 A determination means for determining whether or not a plurality of first time synchronization information based on a reference time can be acquired via each of a plurality of network interfaces having clocks for counting the time.
A synchronization means for synchronizing the clock of the network interface from which the first time synchronization information cannot be acquired with the clock of the network interface from which the first time synchronization information can be acquired, and
A communication means for transmitting the second time synchronization information based on the clock synchronized by the synchronization means from a network interface in which the first time synchronization information cannot be acquired, and a communication means.
A communication device characterized by comprising.
前記複数のネットワークインタフェースのいずれも前記第1時刻同期情報を取得できない場合、前記ネットワークインタフェースを介して前記第2時刻同期情報を取得し、
前記第2時刻同期情報に基づいて、前記第1時刻同期情報を取得できないネットワークインタフェースのクロックを同期させることを特徴とする請求項1に記載の通信装置。 The synchronization means
If none of the plurality of network interfaces can acquire the first time synchronization information, the second time synchronization information is acquired via the network interface.
The communication device according to claim 1, wherein the clock of a network interface that cannot acquire the first time synchronization information is synchronized based on the second time synchronization information.
前記通信手段は、前記同期手段にて同期された第2クロックに基づく第2時刻同期情報を前記第1ネットワークインタフェースから送信することを特徴とする請求項1または2に記載の通信装置。 The synchronization means synchronizes the first clock of the first network interface, which cannot acquire the first time synchronization information, with the second clock of the second network interface, which can acquire the first time synchronization information.
The communication device according to claim 1 or 2, wherein the communication means transmits second time synchronization information based on the second clock synchronized by the synchronization means from the first network interface.
前記通信手段は、前記第1時刻同期情報を取得できないネットワークインタフェースから送信させるクロックの情報の優先順位を、前記第1時刻同期情報の優先順位より低くすることを特徴とする請求項1から3のいずれか1項に記載の通信装置。 An acquisition means for acquiring the priority of the first time synchronization information is provided.
The communication means according to claims 1 to 3, wherein the priority of the clock information transmitted from the network interface from which the first time synchronization information cannot be acquired is lower than the priority of the first time synchronization information. The communication device according to any one item.
前記第1時刻同期情報を取得できないネットワークインタフェースのクロックを、前記第1時刻同期情報を取得可能なネットワークインタフェースのクロックに同期させるステップと、
前記第1時刻同期情報を取得可能なネットワークインタフェースのクロックに同期されたクロックに基づく第2時刻同期情報を、前記第1時刻同期情報を取得できないネットワークインタフェースから送信するステップと、
を備えることを特徴とする通信方法。 A step of determining whether or not a plurality of first time synchronization information based on a reference time can be acquired via each of a plurality of network interfaces having clocks for counting the time, and a step of determining whether or not a plurality of first time synchronization information can be acquired.
A step of synchronizing the clock of the network interface from which the first time synchronization information cannot be acquired with the clock of the network interface from which the first time synchronization information can be acquired, and
A step of transmitting the second time synchronization information based on the clock synchronized with the clock of the network interface capable of acquiring the first time synchronization information from the network interface in which the first time synchronization information cannot be acquired, and a step of transmitting the second time synchronization information.
A communication method characterized by comprising.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020066987A JP2021164121A (en) | 2020-04-02 | 2020-04-02 | Communication device, communication method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020066987A JP2021164121A (en) | 2020-04-02 | 2020-04-02 | Communication device, communication method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021164121A true JP2021164121A (en) | 2021-10-11 |
Family
ID=78003785
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020066987A Pending JP2021164121A (en) | 2020-04-02 | 2020-04-02 | Communication device, communication method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021164121A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023175857A1 (en) * | 2022-03-17 | 2023-09-21 | 三菱電機株式会社 | Relay device, communication system, and storage medium |
-
2020
- 2020-04-02 JP JP2020066987A patent/JP2021164121A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023175857A1 (en) * | 2022-03-17 | 2023-09-21 | 三菱電機株式会社 | Relay device, communication system, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11609598B2 (en) | Network card, time synchronization methods and devices, and computer storage media | |
KR101109980B1 (en) | Facilitating synchronization of servers in a coordinated timing network | |
JP5569299B2 (en) | COMMUNICATION SYSTEM, COMMUNICATION INTERFACE DEVICE, AND SYNCHRONIZATION METHOD | |
TWI608326B (en) | Apparatus, method and system for measuring time offsets between devices with independent silicon clocks | |
US7146516B2 (en) | Time synchronization schemes wherein at least one data message associates a hardware pulse with a future time | |
JP2001221874A (en) | Time synchronization system | |
CN102752065B (en) | A kind of method for synchronizing time and system | |
CN104378193A (en) | Time synchronization system and method, exchanger and embedded interface board | |
CN102421187A (en) | High-accuracy clock synchronization method of wireless sensor network | |
JP2010517189A (en) | Method, system, and computer program for facilitating recovery within an agreement timing network | |
JP2014236443A (en) | Communication device, communication system, and communication method | |
JP2010528345A (en) | Method, system, and computer program for defining a tier 1 configuration in an agreement timing network | |
EP3812875B1 (en) | Time synchronization over redundant and deterministic switch-based avionics networks | |
CN112003768A (en) | Multi-node test system and method for executing multi-node test | |
JP2021164121A (en) | Communication device, communication method, and program | |
CN109471588A (en) | A kind of synchronous method and equipment | |
US20190229885A1 (en) | Computing device and control system | |
CN111769895B (en) | Multi-device timing method and system and device timing method and device | |
JP5845771B2 (en) | Information transmission system and information transmission method | |
CN112511255B (en) | Time synchronization method and device | |
JP7545099B2 (en) | Measuring instrument, measuring method and time synchronization system | |
CN113259039A (en) | Time synchronization method and device, computer equipment and storage medium | |
JP2022133624A (en) | Information processing apparatus, method and program | |
CN111638749A (en) | Simulation system synchronization method, simulation device and system | |
EP4387130A1 (en) | Time synchronization monitoring method |