JP2009017145A - Communicating method, program, and communication terminal - Google Patents
Communicating method, program, and communication terminal Download PDFInfo
- Publication number
- JP2009017145A JP2009017145A JP2007175637A JP2007175637A JP2009017145A JP 2009017145 A JP2009017145 A JP 2009017145A JP 2007175637 A JP2007175637 A JP 2007175637A JP 2007175637 A JP2007175637 A JP 2007175637A JP 2009017145 A JP2009017145 A JP 2009017145A
- Authority
- JP
- Japan
- Prior art keywords
- data
- transmission
- transmitted
- transmission data
- communication
- 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
- Small-Scale Networks (AREA)
Abstract
Description
本発明は、通信方法、プログラムおよび通信端末の技術に関する。 The present invention relates to a communication method, a program, and a technology of a communication terminal.
従来、トークンパッシング方式を用いたネットワークにおける、伝送周期の異なる複数のデータを管理する技術として、以下のような技術が開示されている(例えば、特許文献1参照)。すなわち、一定周期で伝送が必要な周期データを扱う周期データ伝送モードと、非周期に伝送が必要な非周期データを扱う非周期データ伝送モードとの、2つの動作モードを定める。そして、トークンに動作モードの情報を付加することで、ネットワーク中の全てのノードが同一の動作モードで伝送を行うデータ制御装置が開示されている。 Conventionally, as a technique for managing a plurality of data having different transmission cycles in a network using a token passing system, the following technique is disclosed (for example, see Patent Document 1). That is, two operation modes are defined: a periodic data transmission mode that handles periodic data that needs to be transmitted at a constant period, and an aperiodic data transmission mode that handles aperiodic data that needs to be transmitted aperiodically. A data control device is disclosed in which all nodes in a network perform transmission in the same operation mode by adding operation mode information to a token.
また、トークンパッシング方式を使用したネットワークにおいて、トークンを得た場合に、ノードが送信することのできるデータのサイズを一定にすることで、各ノードにトークンが周回する時間を明確にし、ネットワークのスループットを維持する技術もある。
特許文献1に記載の技術では、全ノードが動作モードを共有しており、かつ、各ノードがトークンを得た場合に伝送できるデータサイズが一定でないために、他のノードの伝送に影響を受けて、意図した周期に従った伝送が困難な場合がある。
また、ノードが送信することのできるデータのサイズを一定にすることで、ネットワークのスループットを維持する技術では、該一定のサイズを超えたデータを、具体的にどのようにして伝送するかが明確にされていない。
In the technique described in
In addition, the technology that maintains the throughput of the network by making the size of data that can be transmitted by the node constant makes it clear how the data exceeding the certain size is transmitted. Not been.
このような背景に鑑みて本発明がなされたのであり、本発明は、各ノードである通信端末の伝送が、ネットワーク中の他の通信端末の伝送、および自通信端末の他の伝送から影響を受けて、意図した伝送タイミングが変動することを抑制することを目的とする。 The present invention has been made in view of such a background, and the present invention has an effect that the transmission of a communication terminal which is each node is affected by the transmission of another communication terminal in the network and the other transmission of the own communication terminal. Accordingly, it is intended to suppress fluctuations in intended transmission timing.
前記課題を解決するため、本発明の一の手段は、複数の通信端末を有し、トークンパッシング方式を用いるネットワークにおいて、通信端末は、通信端末自身が、送信しようとしているデータを、記憶部から取得し、送信しようとしているデータのサイズが、予め設定されている規定サイズより大きい場合、送信しようとするデータを、規定サイズ以下のデータに分割した後、トークンを周回させつつ、複数回にわたって送信することを特徴とする。 In order to solve the above-described problem, one means of the present invention includes a plurality of communication terminals, and in a network using a token passing system, the communication terminal transmits data to be transmitted by the communication terminal itself from the storage unit. If the size of the data to be acquired and transmitted is larger than the specified size set in advance, the data to be transmitted is divided into data smaller than the specified size, and then transmitted multiple times while circulating the token. It is characterized by doing.
また、本発明の他の手段は、データには、送信の優先度が予め付されており、通信端末は、優先度の高いデータを、優先的に送信することを特徴とする。 Another means of the present invention is characterized in that transmission priority is given in advance to data, and the communication terminal preferentially transmits high priority data.
本発明によれば、各ノードである通信端末の伝送が、ネットワーク中の他の通信端末の伝送、および自通信端末の他の伝送から影響を受けて、意図した伝送タイミングが変動することを抑制することができる。 According to the present invention, transmission of a communication terminal that is each node is affected by transmissions of other communication terminals in the network and other transmissions of the own communication terminal, thereby suppressing intended transmission timing from fluctuating. can do.
次に、本発明を実施するための最良の形態(「実施形態」という)について、適宜図面を参照しながら詳細に説明する。 Next, the best mode for carrying out the present invention (referred to as “embodiment”) will be described in detail with reference to the drawings as appropriate.
図1は、本実施形態に係る通信システムの構成の一例を示す図である。
本実施形態では、通信システム100は、ホスト端末1と、シミュレーション端末2と、クライアント端末3とを有してなる。ここで、ホスト端末1、シミュレーション端末2およびクライアント端末3は、それぞれ通信システム100におけるノードである。また、ホスト端末1、シミュレーション端末2およびクライアント端末3を総称して、端末10と記載する。本実施形態におけるネットワーク4は、物理トポロジがバス型で、論理トポロジがリング型となっているネットワーク4を想定しているが、これに限らず、論理トポロジがリング型であればよく、例えば、物理トポロジがスター型となっていてもよい。
ホスト端末1は、クライアント端末3から受信した入力情報を基に、入力状況に従った演算を実行し、演算により求めた出力の有無および出力内容を定期的にクライアント端末3に伝送する機能を有する。
FIG. 1 is a diagram illustrating an example of a configuration of a communication system according to the present embodiment.
In the present embodiment, the communication system 100 includes a
Based on the input information received from the
また、ホスト端末1は、入出力状況と、演算に使用しているパラメータに関する情報を、定期的にシミュレーション端末2に伝送し、シミュレーション端末2は、受信したパラメータに関する情報を基に、複数回のシミュレーションを実行し、最適なパラメータを決定し、ネットワーク4を介して、ホスト端末1に伝送する。ホスト端末1とシミュレーション端末2との間の伝送は、ホスト端末1とクライアント端末3との間の入出力情報に影響を与えない様に実行する。ホスト端末1は、システムの動作履歴を蓄積し、1日に1度の頻度でクライアント端末3に実装された外部記憶装置に格納する。この場合、蓄積した動作履歴は、他の端末10の動作、例えばクライアント端末3の入出力動作に影響を与えない様、クライアント端末3に対して伝送する。
In addition, the
クライアント端末3は、図示しないクライアント端末3の入出力部からの入力を監視して、入力の有無および入力内容を定期的にホスト端末1に伝送する機能を有する。
また、クライアント端末3の図示しない入出力部への入力に応じた出力が要求されるため、クライアント端末3が入力を検出し、入力情報をホスト端末1に伝送するまでの時間と、ホスト端末1が入力情報に応じた出力情報を作成し、クライアント端末3に伝送後、実際にクライアント端末3が外部に出力するまでの時間とは、明確に決まっており、かつ通信システム100全体への影響がない範囲で保障されている必要がある。
The
Further, since an output corresponding to an input to an input / output unit (not shown) of the
なお、ホスト端末1、クライアント端末3およびシミュレーション端末2は、通信システム100中に複数存在し、それぞれがノードを構成してもよい。また、ホスト端末1、クライアント端末3およびシミュレーション端末2のうち、少なくとも1種類の端末10が、2つ以上ネットワーク4内にあればよい。
また、ホスト端末1、クライアント端末3およびシミュレーション端末2は、図2を参照して後記する機能を有し、トークンパッシング方式を用いる端末10であればよく、図1を参照して説明した機能を有していなくてもよい。
Note that a plurality of
Further, the
図2は、本実施形態に係る端末の構成例を示す機能ブロック図である。
図2における端末10(通信端末)は、ホスト端末1、クライアント端末3およびシミュレーション端末2に共通の構成である。
端末10は、制御部11、通信コントロール部12、記憶部13、データバス14、アドレスバス15、送受信通知バス16および通信回路17を有してなる。
制御部11は、図示しないタイマを有しており、伝送開始条件が成立した伝送データの検索を、例えば、10ms周期で実行し、その他の各種演算、およびシミュレーションなどを端末10ごとに必要に応じて実行する機能を有する。ここで、伝送データとは、端末10がネットワーク4に対して伝送しようとしているデータである。また、制御部11は、データバス14と、アドレスバス15とを介して、通信コントロール部12に対する所定の操作を行い、トークンパッシング方式のネットワーク4に参加する機能を有する。制御部11が、伝送すべきデータを有している場合は、データバス14と、アドレスバス15を介して、通信コントロール部12に対する所定の操作を行うと、通信コントロール部12は、トークンパッシング方式に従って、例えば、規定サイズとしての256バイトのデータを送信する。通信コントロール部12が256バイトのデータを送信完了したとき、または、ネットワーク4中の他のノードからの受信を、通信回路17が、検出したときは、通信コントロール部12は、送受信通知バス16により、制御部11に対する通知を行なう。受信検出時、制御部11は、所定の操作により通信コントロール部12から受信データを読み出す。
記憶部13は、伝送データや、送信待ち行列を格納している。
FIG. 2 is a functional block diagram illustrating a configuration example of the terminal according to the present embodiment.
A terminal 10 (communication terminal) in FIG. 2 has a configuration common to the
The
The
The
制御部11および通信コントロール部12は、ROM(Read Only Memory)や、HD(Hard Disk)に格納されたプログラムが、RAM(Random Access Memory)に展開され、CPU(Central Processing Unit)によって実行されることによって具現化したり、ROMに格納されたプログラムが、直接CPUによって実行されることによって具現化したりする。
なお、制御部11と、通信コントロール部12は、同一のCPUで実行されてもよいし、異なるCPUで実行されてもよい。すなわち、制御部11と、通信コントロール部11は、ハードウェア的に独立していてもよいし、独立していなくてもよい。
また、本実施形態では、制御部11と、通信コントロール部12とを同一の端末10に内蔵されているものとしたが、それぞれが別の装置に内蔵されていてもよい。
また、通信コントロール部12は、前記したようにプログラムによって具現化する以外にも、電子部品によって構成されているハードウェアによって具現化していてもよい。
In the
Note that the
Moreover, in this embodiment, although the
Further, the
図3は、本実施形態に係る伝送データの一覧の例を示す表である。
図3に示す表には、本実施形態で用いられる伝送データの種類ごとに、ネットワーク4(図1参照)内の各伝送データに対し一意に付される識別番号、送信元、送信先、伝送データの内容(データ内容)、データサイズ、伝送開始条件および優先度が記載されている。すなわち、本実施形態に係る通信システム100(図1参照)では、識別番号「1」〜「5」で区別される5種類の伝送データを用いるものとするが、伝送データは、これらに限られないことは当然である。
ここで、伝送開始条件とは、図5に示す送信待ち行列の作成処理を始めるタイミングである。また、優先度については、図4を参照して後記する。
例えば、1項目の伝送データは、識別番号「1」、送信元「ホスト端末1」、送信先「クライアント端末3」、データ内容は、「外部への出力データ」、データサイズは、「348バイト」、伝送開始条件は、「100ms周期」および優先度は、「高」である。これらの各情報のうち、実際に伝送データに付されている情報は、識別番号、送信元、送信先、データサイズ、伝送開始条件および優先度である。図3におけるデータサイズは、全データサイズである。本実施形態では、規定サイズを256バイトとする。すなわち、識別番号「1」の伝送データは、256バイトと、92バイトとのデータに分割されてネットワーク内に送出される。
以下、2項目以降の伝送データは、図3に示されている通りであるため、説明を省略する。
FIG. 3 is a table showing an example of a list of transmission data according to the present embodiment.
In the table shown in FIG. 3, for each type of transmission data used in the present embodiment, an identification number uniquely assigned to each transmission data in the network 4 (see FIG. 1), transmission source, transmission destination, transmission Data contents (data contents), data size, transmission start conditions, and priority are described. That is, in the communication system 100 (see FIG. 1) according to the present embodiment, five types of transmission data distinguished by the identification numbers “1” to “5” are used, but the transmission data is limited to these. Of course not.
Here, the transmission start condition is a timing at which the process of creating a transmission queue shown in FIG. 5 is started. The priority will be described later with reference to FIG.
For example, the transmission data of one item is the identification number “1”, the transmission source “
Hereinafter, the transmission data after the second item is as shown in FIG.
ここで、識別番号「1」〜「3」および識別番号「5」の伝送開始条件は、ホスト端末1や、シミュレーション端末2や、クライアント端末3の制御部11に備えられているタイマによって管理されている。これらの伝送データでは、同じ識別番号を有する他の伝送データ(同一種の伝送データ)の送信後、定められた伝送開始条件の時間が経過しなければ、送信を開始することができない。例えば、識別番号「1」を有するが、異なる内容である伝送データA,Bが存在すると、伝送データBは、伝送データAの送信開始後、100ms経過しなければ、送信を開始することができない。ここで、伝送データAおよび伝送データBのように、識別番号が同じであるが、異なる内容である伝送データを同一種の伝送データとする。また、伝送データAおよび伝送データBは、同時に存在することはない。
また、識別番号「4」の伝送開始条件は、「シミュレーション終了」となっている。すなわち、シミュレーション端末2におけるシミュレーションが終了すると、このシミュレーションの終了を、契機としてシミュレーション端末2の制御部11が、図5で後記する伝送データの検出を行う。
なお、本実施形態では、優先度を「高」、「中」および「低」の3段階に分けているが、これに限らず、例えば、「0」〜「4」の5段階に分け、値が大きいほど、優先度が高いなど、数値による優先度の設定を行ってもよい。
Here, the transmission start conditions of the identification numbers “1” to “3” and the identification number “5” are managed by a timer provided in the
The transmission start condition of the identification number “4” is “simulation end”. That is, when the simulation in the
In the present embodiment, the priority is divided into three levels of “high”, “medium”, and “low”. However, the priority is not limited to this, and is divided into, for example, five levels of “0” to “4”. The priority may be set numerically, for example, the higher the value, the higher the priority.
図4は、伝送データの送信待ち行列の例を示す図である。
図4に示すように、送信待ち行列は、データの識別番号と、残りデータサイズとが対となった情報である。ここで、識別番号は、図3を参照して説明した識別番号であり、送信待ち行列中の伝送データを識別するために用いられる。残りデータサイズは、送信待ち行列中の各識別番号の伝送データを、残り何バイト送信するべきかを記録する。
また、図4の例では、N個のデータが送信待ち行列に登録されており、送信中のデータである1番目の伝送データから順に、送信までの時間が長くなるよう、設定されている。
FIG. 4 is a diagram illustrating an example of a transmission queue for transmission data.
As shown in FIG. 4, the transmission queue is information in which the data identification number and the remaining data size are paired. Here, the identification number is the identification number described with reference to FIG. 3, and is used for identifying transmission data in the transmission queue. The remaining data size records how many remaining bytes of transmission data of each identification number in the transmission queue should be transmitted.
In the example of FIG. 4, N pieces of data are registered in the transmission queue, and are set so that the time until transmission increases in order from the first transmission data that is data being transmitted.
次に、図2を参照しつつ、図5および図6に沿って、本実施形態に係る伝送データ送出の処理を説明する。なお、図5および図6では、送信待ち行列において、n番目(nは所定の値)に位置する識別番号に相当する伝送データを、N個の送信待ち行列におけるn番目の伝送データと記載することとする。
図5は、本実施形態に係る送信待ち行列の作成処理の流れを説明するための図であり、(a)は、送信待ち行列の作成処理の流れを示すフローチャートであり、(b)は、伝送データ同士の優先度の比較を模式的に示した図である。
なお、図5に示す処理(S102〜S110)は、各端末10の制御部11が、記憶部13を参照して、伝送開始条件の成立した伝送データの検出処理を10ms周期で実行した結果、伝送開始条件の成立した伝送データの検出を契機として実行され、端末10の電源をOFFにしたときに終了する。以下、ここで検出した伝送データを、「検出した伝送データ」と記載する。
次に、制御部11は、記憶部13を参照して、送信待ち行列を参照することによって、送信待ちの伝送データ数を取得し、これを変数Nに代入する(S102)。なお、変数Nには、検出した伝送データは含めない数である。
そして、制御部11は、Nが「0」であるか否かを判定する(S103)。
Next, transmission data transmission processing according to the present embodiment will be described with reference to FIG. 2 and FIGS. 5 and 6. 5 and 6, the transmission data corresponding to the identification number located at the nth (n is a predetermined value) in the transmission queue is described as the nth transmission data in the N transmission queues. I will do it.
FIG. 5 is a diagram for explaining the flow of processing for creating a transmission queue according to the present embodiment, (a) is a flowchart showing the flow of processing for creating a transmission queue, and (b) It is the figure which showed typically the comparison of the priority of transmission data.
In addition, the process (S102-S110) shown in FIG. 5 is a result of the
Next, the
Then, the
ステップS103の結果、Nが「0」であった場合(S103→Yes)、すなわち、送信待ちの伝送データ数が「0」であった場合、制御部11は、検出した伝送データを、1番目の伝送データに設定する(S104)。すなわち、送信待ち行列の最初に、検出した伝送データの識別番号と残りデータサイズ(ここでは、検出した伝送データの全データサイズ)を登録する。
そして、制御部11は、図6を参照して後記する送信処理を行った(S105)後、再び、記憶部13を参照して、伝送開始条件の成立した伝送データの検出処理を10ms周期で実行し、伝送開始条件の成立した伝送データを検出すると、ステップS102の処理を行う。
As a result of step S103, when N is “0” (S103 → Yes), that is, when the number of transmission data waiting to be transmitted is “0”, the
Then, the
ステップS103の結果、Nが「0」でない場合(S103→No)、制御部11は、「1」を変数nに代入する(S106)。ここで、変数nは、伝送データと優先度を比較する送信待ち行列における伝送データの順番である。
そして、制御部11は、記憶部13を参照して、送信待ち行列におけるN個の伝送データのうちのn番目(現在は、1番目)の伝送データの優先度と、検出した伝送データの優先度とを比較し、検出した伝送データが、n番目の伝送データ以下の優先度を有するか否かを判定する(S107)。n番目の伝送データの優先度は、制御部11が、送信待ち行列の識別番号を基に、記憶部13に保持されている伝送データを参照することによって取得する。
ステップS107の結果、検出した伝送データが、n番目の伝送データ以下の優先度を有さない場合(S107→No)、すなわち、検出した伝送データの優先度が、n番目の伝送データより高い場合、制御部11は、ステップS110の処理へ進む。
If N is not “0” as a result of step S103 (S103 → No), the
Then, the
As a result of step S107, when the detected transmission data does not have a priority lower than the nth transmission data (S107 → No), that is, when the priority of the detected transmission data is higher than the nth transmission data. The
ステップS107の結果、検出した伝送データが、n番目の伝送データ以下の優先度を有する場合(S107→Yes)、すなわち、検出した伝送データの優先度が、n番目の伝送データの優先度と同じか、n番目の伝送データの優先度より低い場合、制御部11は、変数nの値を「1」加算した値を、変数nに代入する(S108)。このような手順を行うことにより、例えば、送信待ち行列の1番目の伝送データ(送信中)と同じ優先度を有する伝送データが伝送開始条件を満たしたとき、送信中の1番目の伝送データの送信が完了した後に、1番目の伝送データと同じ優先度を有する伝送データの送信を行うことができる。
As a result of step S107, when the detected transmission data has a priority equal to or lower than the nth transmission data (S107 → Yes), that is, the priority of the detected transmission data is the same as the priority of the nth transmission data. If the priority is lower than the priority of the nth transmission data, the
次に、制御部11は、nの値がNの値より大きいか否かを判定する(S109)。
ステップS109の結果、nの値がNの値より大きくない場合(S109→No)、制御部11は、ステップS107の処理へ戻る。
ステップS109の結果、nの値がNの値より大きい場合(S109→Yes)、制御部11は、検出した伝送データをn番目の伝送データに設定する(S110)。すなわち、検出した伝送データの情報(識別番号および残りデータサイズ(この時点では、全データサイズ))をn番目の送信待ち行列に登録する。そして、制御部11は、再び、記憶部13を参照して、伝送開始条件の成立した伝送データの検出処理を10ms周期で実行し、伝送開始条件の成立した伝送データを検出すると、ステップS102の処理を行う。ここで、ステップS110の時点において、n=1であった場合(検出した伝送データの優先度が、1番目の伝送データの優先度より高い場合)、1番目の伝送データは、ステップS105の処理により、送信中の状態となっている。したがって、n=1の場合、ステップS110において、制御部11は、通信コントロール12へ現在送信中の伝送データの送信を一時的に中断する旨の指示を送った後、現出したデータを1番目の伝送データとする。この場合、現在送信中の伝送データは、2番目の伝送データとなる。
Next, the
As a result of step S109, when the value of n is not larger than the value of N (S109 → No), the
As a result of step S109, when the value of n is larger than the value of N (S109 → Yes), the
ここで、ステップS106からステップS110の処理を、図5(b)を参照して説明する。
符号50〜53は、送信待ち行列における伝送データである。符号50は、1番目の伝送データであり、符号51は、2番目の伝送データであり、符号52は、3番目の伝送データであり、符号53は、N番目の伝送データである。そして、符号54は、伝送開始条件が成立することによって、検出された伝送データである。ステップS106でn=1とすることによって、ステップS107で、制御部11は、1(=n)番目の伝送データ50と、検出した伝送データ54の優先度を比較する。ステップS107の結果、検出した伝送データ54が、1番目の伝送データ50より高い優先度を有するとき、制御部11は、通信コントロール部12に前記したように現在送信中の伝送データを一時的に中断させた後、検出した伝送データ54を1番目の伝送データとする。すなわち、伝送データ50の前に、検出した伝送データ54をセットする。
Here, the processing from step S106 to step S110 will be described with reference to FIG.
ステップS107の結果、検出した伝送データ54が、1番目の伝送データ50より低い優先度を有しているとき、ステップS108によって、nが1加算される。これにより、次のステップS107では、制御部11が、2(=n)番目の伝送データ51と、検出した伝送データ54との優先度の比較を行う。検出した伝送データ54が、2番目の伝送データ51より高い優先度を有していれば、ステップS110により、検出した伝送データを2番目の伝送データとする。すなわち、伝送データ51の前に、検出した伝送データをセットする(送信待ち行列に識別番号と残りデータサイズとを登録する)。
ステップS107の結果、検出した伝送データ54が、2番目の伝送データ50より低い優先度を有しているとき、ステップS108によって、nが1加算される。これにより、次のステップS107では、制御部11が、3(=n)番目の伝送データ52と、検出した伝送データ54との優先度の比較を行う。
以下、同様にして、制御部は、n番目の伝送データと、検出した伝送データ54との優先度を比較していく。
When the detected
As a result of step S107, when the detected
Hereinafter, similarly, the control unit compares the priority of the n-th transmission data with the detected
そして、ステップS109で「Yes」となったとき、すなわち、ステップS107で、N番目の伝送データ53より、検出した伝送データ54の優先度が低いと判定されたとき、制御部11は、検出した伝送データ54をN+1番目の伝送データ、すなわち、N番目の伝送データ53の後に、検出した伝送データ54をセットする(送信待ち行列に識別番号と残りデータサイズとを登録する)。
And when it becomes "Yes" at Step S109, that is, when it is determined at Step S107 that the priority of the detected
図6は、本実施形態に係る送信処理の流れを示すフローチャートである。
図6に示す送信処理は、図5のステップS105において行われる処理である。
なお、制御部11は、図6に示す送信処理と、図5の処理とを平行して行っている。すなわち、送信待ち行列における1番目の伝送データを送信している間にも、他に伝送条件が成立している伝送データが記憶部13に存在する場合には、送信待ち行列に次々と伝送データの情報が加えられることなる。
本実施形態では、ネットワーク4の送信することのできるデータの規定サイズを256バイトとするが、規定サイズが256バイトに限られないことは当然である。
まず、制御部11は、記憶部13における送信待ち行列の1番目の伝送データの残りデータサイズを変数Bに代入する(S201)。
続いて、制御部11は、Bの値が、規定サイズの値である256バイトより大きいか否かを判定する(S202)。
ステップS202の結果、Bの値が、規定サイズの値である256バイトより大きくない場合(S202→No)、制御部11は、この時点における変数Bの値が、「0」であるか否かを判定する(S202a)。なお、ステップS202aの処理を行う理由は、図6の説明の最後で後記する。
ステップS202aの結果、変数Bが「0」である場合(S202a→Yes)、制御部11は、ステップS212の処理へ進む。
ステップS202aの結果、変数Bが「0」でない場合(S202a→No)、制御部11は、ステップS203の処理へ進む。
そして、制御部11は、変数bに変数Bの値を代入し(S203)、変数Bに「0」を代入した(S204)後、ステップS207の処理へ進む。
FIG. 6 is a flowchart showing a flow of transmission processing according to the present embodiment.
The transmission process shown in FIG. 6 is a process performed in step S105 of FIG.
The
In this embodiment, the prescribed size of data that can be transmitted by the
First, the
Subsequently, the
As a result of step S202, when the value of B is not larger than the prescribed size of 256 bytes (S202 → No), the
If the variable B is “0” as a result of step S202a (S202a → Yes), the
When the variable B is not “0” as a result of step S202a (S202a → No), the
Then, the
ステップS202の結果、Bの値が、256バイトより大きい場合(S202→Yes)、制御部11は、変数bに256バイトを代入し(S205)、変数Bに、変数Bの値から、256バイトを減算した値を代入する(S206)。
そして、制御部11は、1番目の伝送データのうち、データサイズb分の伝送データを記憶部13から取得した後、すなわち、規定サイズの値である256バイト(S205,S206を経由した場合)または256バイト以下(S203,S204を経由した場合)の伝送データを、制御部11が、記憶部13から取得した後、データバス14を介して、通信コントロール部12に送り(S207)、送信待ち行列の1番目の伝送データの残りデータサイズを変数Bの値とする(S208)。つまり、ステップS203およびステップS204を経由したときは、送信待ち行列の1番目の伝送データの残りデータサイズの値は、「0」となり、ステップS205およびステップS206を経由したときは、送信待ち行列の1番目の伝送データの残りデータサイズは、256バイト以下となる。
そして、制御部11は、ステップS207で通信コントロール部12に送った伝送データを、ネットワーク4に送信するよう、通信コントロール部12に指令し(S209)、通信コントロール部12からの送信完了通知を待機する(S210)。通信コントロール部12は、通信回路17を介して、ネットワーク4を周回しているトークンを取得すると、制御部11により送られた伝送データを、通信回路17を介してネットワーク4に送出し、その後、通信回路17を介することによって、再びトークンをネットワーク4に送出すると、送受信通知バス16を介して、制御部11へ通信完了通知を送る。
本実施形態では、分割された個々の伝送データを送信する毎に、通信コントロール部12が、制御部11へ送信完了通知を送っているが、これに限らず、送信先の端末10から肯定応答(Ack(Acknowledgement)信号)が得られるプロトコルを用いている場合は、通信コントロール部12が、送信先の端末10からの該肯定応答を受信した後に、送信完了通知を送ってもよい。
If the value of B is larger than 256 bytes as a result of step S202 (S202 → Yes), the
Then, the
Then, the
In this embodiment, every time the divided transmission data is transmitted, the
通信コントロール部12からの通信完了通知を受信した制御部11は、記憶部13の送信待ち行列を参照して、送信待ち行列の1番目の伝送データの残りデータサイズが、「0」であるか否かを判定する(S211)。
ステップS211の結果、送信待ち行列の1番目に相当する伝送データの残りデータサイズが、「0」ではない場合(S211→No)、すなわち、ステップS202で「Yes」だった場合、制御部11は、ステップS201の処理へ戻る。
ステップS211の結果、送信待ち行列の1番目に相当する伝送データの残りデータサイズが、「0」である場合(S211→Yes)、すなわち、ステップS202で「No」だった場合、制御部11は、送信待ち行列の1番目の情報を削除して、送信待ち行列の順番を繰り上げる(S212)。
そして、制御部11は、順番を繰り上げた送信待ち行列に伝送データがあるか否かを判定する(S213)。すなわち、制御部11は、記憶部13の送信待ち行列を参照し、送信待ち行列に情報があるか否かを判定する。
ステップS213の結果、送信待ち行列に伝送データがある場合(S213→Yes)、制御部11は、ステップS201の処理へ戻る。
ステップS213の結果、送信待ち行列に伝送データがない場合(S213→No)、制御部11は、処理を終了する。
The
As a result of step S211, if the remaining data size of the transmission data corresponding to the first in the transmission queue is not “0” (S211 → No), that is, if “Yes” in step S202, the
As a result of step S211, if the remaining data size of the transmission data corresponding to the first in the transmission queue is “0” (S211 → Yes), that is, if “No” in step S202, the
Then, the
As a result of step S213, when there is transmission data in the transmission queue (S213 → Yes), the
If there is no transmission data in the transmission queue as a result of step S213 (S213 → No), the
ここで、ステップS202aの処理について説明する。前記したように、図5に示す送信待ち行列の作成処理と、図6に示す送信処理とは、並行で行われている。従って、ステップS208で、1番目の伝送データ(伝送データCとする)の残りデータサイズとして「0」が登録された後、例えば、ステップS210における送信完了通知待機の間に、新たな伝送データが1番目の伝送データとして登録されることがあり得る。新たな伝送データ(伝送データDとする)のデータサイズを仮に128バイトとすると、このとき、送信待ち行列の残りデータサイズは、「128」,「0」・・・の順となっている。この後、伝送データDに対して、ステップS201〜ステップS211の処理が行われると、ステップS212で、伝送データCが、再び1番目の伝送データとなり、送信待ち行列の残りデータサイズは、「0」・・・となる。すると、次の、ステップS201において、「B=0」となる。すでに、「B=0」となっている伝送データに対し、ステップS203〜ステップS211を行うことは効率的ではない。従って、ステップS202aの時点で「B=0」である場合、制御部11は、ステップS212の処理へ進むことで、効率的な処理を行うことができる。
Here, the process of step S202a will be described. As described above, the transmission queue creation process shown in FIG. 5 and the transmission process shown in FIG. 6 are performed in parallel. Accordingly, after “0” is registered as the remaining data size of the first transmission data (referred to as transmission data C) in step S208, for example, during the waiting for the transmission completion notification in step S210, new transmission data is received. It may be registered as the first transmission data. Assuming that the data size of new transmission data (referred to as transmission data D) is 128 bytes, the remaining data size of the transmission queue is in the order of “128”, “0”. Thereafter, when the processing of step S201 to step S211 is performed on the transmission data D, the transmission data C becomes the first transmission data again in step S212, and the remaining data size of the transmission queue is “0”. "... Then, in the next step S201, “B = 0”. It is not efficient to perform steps S203 to S211 on transmission data that is already “B = 0”. Therefore, when “B = 0” at the time of step S202a, the
なお、分割する際のデータサイズは、設定されている規定サイズ以下であればよいが、規定サイズに合わせた方が送信回数を減らすことができ、伝送データを効率的に送信することができる。 Note that the data size at the time of division may be equal to or smaller than the set specified size, but the number of transmissions can be reduced according to the specified size, and transmission data can be transmitted efficiently.
図7は、ある時点における各端末の送信タイムチャートの例を示す図である。
上段は、ホスト端末1から送信される伝送データの送信タイムチャートを示し、下段は、クライアント端末3から送信される伝送データの送信タイムチャートを示す図である。
図7において符号101a〜101dは、ホスト端末1から送信される動作履歴データであり、優先度は、「低」に設定されている。なお、符号101a〜101dは、図3の識別番号「2」の伝送データである。
また、符号102a〜102dは、ホスト端末1から送信される外部への出力データであり、優先度は、「高」に設定されている。なお、符号102a〜102dは、図3の識別番号「1」の伝送データである。
さらに、符号103a〜103fは、ホスト端末1から送信される入出力状況、演算パラメータのデータであり、優先度は、「中」に設定されている。なお、符号103a〜103fは、図3の識別番号「3」の伝送データである。
そして、符号104a〜104dは、クライアント端末3から送信される外部からの入力データであり、優先度は、「高」に設定されている。なお、符号104a〜104dは、図3の識別番号「5」の伝送データである。
FIG. 7 is a diagram illustrating an example of a transmission time chart of each terminal at a certain point in time.
The upper part shows a transmission time chart of transmission data transmitted from the
In FIG. 7,
ホスト端末1は、最初、動作履歴データ101a,101bを送信している。そして、優先度「高」である外部への出力データ102a,102bにおいて伝送開始条件が成立すると、ホスト端末1は、優先度が、「低」である動作履歴データ101cの送信を中断し、外部への出力データ102a,102bの送信を開始する。優先度が、「高」の外部への出力データの送信が、符号102bで完了すると、ホスト端末1は、中断していた動作履歴データ101c〜101dの送信を再開する。ところが、動作履歴データ101dの送信後、優先度が、「中」の入出力状況、演算パラメータ103a〜103fの伝送開始条件が成立したため、優先度が、「低」である動作履歴データの送信を中断し、入出力状況、演算パラメータ103a〜103fの送信を開始する。
さらに、演算パラメータ103dの送信後、すでに送信した外部への出力データ102a,102bとは異なる外部への出力データ102c,102d(優先度「高」)の伝送開始条件(すなわち、外部への出力データ102aから、L=100msが経過:図3参照)が成立したため、ホスト端末1は、優先度が、「中」の入出力状況、演算パラメータ103eの伝送を中断し、優先度が、「高」の外部への出力データ102c,102dを送信した後、入出力状況、演算パラメータ103e,103fの送信を再開する。
The
Further, after the
また、クライアント端末3は、外部からの入力データ104a,104bを送信開始し、外部からの入力データ104bの送信を完了すると、一時的に送信待ちデータ無しで送信休止状態となる。そして、外部からの入力データの伝送開始条件である100ms(図3参照)が経過すると、符号104a,104bとは異なる外部からの入力データ104c,104dを送信する。
In addition, the
(効果)
本実施形態によれば、通信プロトコルで規定されたデータサイズ(規定サイズ)を超えた伝送データの伝送方法を提供することにより、各ノードである通信端末の伝送が、ネットワーク中の他の通信端末の伝送、および自通信端末の他の伝送から影響を受けて、意図した伝送タイミングが変動することを抑制することができる。
本実施形態によれば、複数の端末10で構成するネットワーク4で、内容および優先度の異なる伝送データを取り扱うシステムにおいて、優先度の高い伝送データほど、事前に取り決めた伝送開始条件に基づいた伝送時期を保障することができる。このため、利用者への応答性を確保しながら、配車制御や最適化シミュレーションなどの高負荷な処理を行う群管理エレベーターなどに適している。
また、一定以上の頻度でデータを伝送し続けなくてはならないデータ、例えば映像や音声のデータと、多少時間を要しても、最終的に全てのデータを伝送すれば、目的を達成できるデータ、例えばテキストや画像のデータを、同一のネットワーク4上で取り扱うことができる。
(effect)
According to the present embodiment, by providing a transmission method of transmission data exceeding the data size (specified size) specified by the communication protocol, the transmission of the communication terminal that is each node is transmitted to other communication terminals in the network. It is possible to prevent the intended transmission timing from fluctuating due to the influence of other transmissions and other transmissions of the own communication terminal.
According to this embodiment, in a system that handles transmission data having different contents and priorities in a
In addition, data that must continue to be transmitted at a certain frequency or more, such as video and audio data, and data that can achieve the objective if all data is finally transmitted even if it takes some time. For example, text and image data can be handled on the
1 ホスト端末
2 シミュレーション端末
3 クライアント端末
4 ネットワーク
10 端末(通信端末)
11 制御部
12 通信コントロール部
13 記憶部
14 データバス
15 アドレスバス
16 送受信通知バス
17 通信回路
100 通信システム
1
DESCRIPTION OF
Claims (7)
前記通信端末は、
前記通信端末自身が、送信しようとしているデータを、記憶部から取得し、
前記送信しようとしているデータのサイズが、前記規定サイズより大きい場合、前記送信しようとするデータを、前記規定サイズ以下のデータに分割した後、トークンを周回させつつ、複数回にわたって送信することを特徴とする通信方法。 In a network having a plurality of communication terminals, a communication terminal that has acquired a token is a communication method in a communication terminal that uses a token passing method in which data of a specified size set in advance is transmitted,
The communication terminal is
The communication terminal itself acquires data to be transmitted from the storage unit,
When the size of the data to be transmitted is larger than the specified size, the data to be transmitted is divided into data equal to or smaller than the specified size, and then transmitted multiple times while circulating the token. Communication method.
前記通信端末は、前記伝送開始条件の成立を監視し、
前記伝送開始条件が成立すると前記データの送信を行うことを特徴とする請求項1に記載の通信方法。 Transmission start conditions are set in advance in the data,
The communication terminal monitors establishment of the transmission start condition,
The communication method according to claim 1, wherein the data is transmitted when the transmission start condition is satisfied.
前記伝送開始条件は、同一種の伝送データにおける前回の送信条件成立から、所定の時間が経過したか否かであることを特徴とする請求項2に記載の通信方法。 The communication terminal has time measuring means,
3. The communication method according to claim 2, wherein the transmission start condition is whether or not a predetermined time has elapsed since the previous transmission condition was established for the same type of transmission data.
前記通信端末は、前記優先度の高いデータを、優先的に送信することを特徴とする請求項1に記載の通信方法。 The data is pre-assigned a transmission priority,
The communication method according to claim 1, wherein the communication terminal preferentially transmits the high priority data.
記憶部に送信しようとしているデータを保持しており、
前記通信端末自身が、前記送信しようとしているデータを、前記記憶部から取得し、
前記送信しようとしているデータのサイズが、前記規定サイズより大きい場合、前記送信しようとするデータを、前記規定サイズ以下のデータに分割した後、トークンを周回させつつ、複数回にわたって送信することを特徴とする通信端末。 In a network having a plurality of communication terminals, a communication terminal that has acquired a token is a communication terminal that uses a token passing method for transmitting data of a predetermined size set in advance,
Holds the data to be sent to the storage
The communication terminal itself acquires the data to be transmitted from the storage unit,
When the size of the data to be transmitted is larger than the specified size, the data to be transmitted is divided into data equal to or smaller than the specified size, and then transmitted multiple times while circulating the token. Communication terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007175637A JP2009017145A (en) | 2007-07-03 | 2007-07-03 | Communicating method, program, and communication terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007175637A JP2009017145A (en) | 2007-07-03 | 2007-07-03 | Communicating method, program, and communication terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009017145A true JP2009017145A (en) | 2009-01-22 |
Family
ID=40357502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007175637A Pending JP2009017145A (en) | 2007-07-03 | 2007-07-03 | Communicating method, program, and communication terminal |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009017145A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2219375A2 (en) | 2009-01-28 | 2010-08-18 | Nintendo Co., Ltd. | Storage medium for storing program involved with content distribution and information processing device |
-
2007
- 2007-07-03 JP JP2007175637A patent/JP2009017145A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2219375A2 (en) | 2009-01-28 | 2010-08-18 | Nintendo Co., Ltd. | Storage medium for storing program involved with content distribution and information processing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8917742B2 (en) | Mechanism to save system power using packet filtering by network interface | |
US8239868B2 (en) | Computer system, servers constituting the same, and job execution control method and program | |
US6480473B1 (en) | Verification of active nodes in an open network | |
JP3922070B2 (en) | Distributed control method and apparatus | |
US9853906B2 (en) | Network prioritization based on node-level attributes | |
EP3575979B1 (en) | Query priority and operation-aware communication buffer management | |
WO2020238989A1 (en) | Method and apparatus for scheduling task processing entity | |
JP2011065645A (en) | Multi-core processor system | |
US7310803B2 (en) | Method and system for executing multiple tasks in a task set | |
JP6265058B2 (en) | Network transmission system, its master node, slave node | |
US9652294B2 (en) | Cross-platform workload processing | |
JP2008152618A (en) | Job assignment program, method and device | |
JP6039694B2 (en) | Wireless scanning and advertisement in electronic devices | |
JP2014186624A (en) | Migration processing method and processing device | |
JP2006217494A (en) | Communication system and method | |
JP2009017145A (en) | Communicating method, program, and communication terminal | |
JP2011128989A (en) | Data processing apparatus, data processing method, and program | |
CN108833532B (en) | Service processing method, device and system based on Internet of things | |
JP5526748B2 (en) | Packet processing device, packet distribution device, control program, and packet distribution method | |
US9626226B2 (en) | Cross-platform workload processing | |
JP2016201795A (en) | Sink node status monitoring method, device and system | |
US20160239443A1 (en) | Dma controller | |
JP2006012065A (en) | Resource load adjustment management system | |
JP2000259430A (en) | Processing method for computer system | |
EP2998864B1 (en) | Method, device and system for deciding on a distribution path of a task |