JP6217060B2 - Communication apparatus and communication program - Google Patents
Communication apparatus and communication program Download PDFInfo
- Publication number
- JP6217060B2 JP6217060B2 JP2012158673A JP2012158673A JP6217060B2 JP 6217060 B2 JP6217060 B2 JP 6217060B2 JP 2012158673 A JP2012158673 A JP 2012158673A JP 2012158673 A JP2012158673 A JP 2012158673A JP 6217060 B2 JP6217060 B2 JP 6217060B2
- Authority
- JP
- Japan
- Prior art keywords
- request
- unit
- identification information
- requested
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、通信装置及び通信プログラムに関し、例えば、それぞれ独立に作成された複数の上位レイヤの機能が、媒体アクセス制御副層(MAC(Media Access)レイヤ)の機能を共用する通信装置及び通信プログラムに適用し得る。 The present invention relates to a communication device and a communication program, and for example, a communication device and a communication program in which a plurality of upper layer functions created independently share a medium access control sublayer (MAC (Media Access) layer) function. Applicable to.
近年、いわゆるスマート社会を実現する技術としてIEEE802.15.4に規定される標準化技術が注目されている。 In recent years, standardization technology defined in IEEE802.15.4 has attracted attention as a technology for realizing a so-called smart society.
IEEE802.15.4は一般的にMACレイヤの機能であると分類される、様々なデータ伝送処理や管理機能を持つ。IEEE802.15.4は上位レイヤ(例えばアプリケーション等)からの依頼によってMACレイヤとしての動作を実施する。 IEEE 802.15.4 has various data transmission processing and management functions that are generally classified as MAC layer functions. IEEE802.15.4 performs an operation as a MAC layer by a request from an upper layer (for example, an application).
MACレイヤの機能として、ハンドルを用いた動作処理単位の管理がある。これはたとえば,上位レイヤがMACレイヤに対して動作処理を依頼する場合、上位レイヤは、依頼する動作処理を示す1バイトの「ハンドル」を、要求毎に指定してMACレイヤに動作処理を要求する。MACレイヤは、上位レイヤから指定されたハンドルを管理し、ハンドルを用いて動作処理を区別している。 As a function of the MAC layer, there is management of an operation processing unit using a handle. For example, when the upper layer requests an operation process from the MAC layer, the upper layer requests the MAC layer to specify the 1-byte “handle” indicating the requested operation process for each request. To do. The MAC layer manages the handle specified by the upper layer, and distinguishes operation processing using the handle.
しかしながら、IEEE802.15.4の標準化技術は、例えば、SUN(Smart Utility Network)やHEMS(Home Energy Management System)等に利用される関係から、それぞれ異なる複数の上位レイヤで共用されることが予測される。 However, IEEE802.15.4 standardization technology is expected to be shared by a plurality of different upper layers, for example, because of the relationship used in SUN (Smart Utility Network), HEMS (Home Energy Management System), and the like.
従来の一般的な構成は、MACレイヤに対して上位レイヤが1個の場合には問題ないが、複数の上位レイヤがMACレイヤを共用する場合、上位レイヤ間でハンドルが重複することが生じ得、その場合、MACレイヤが正しく安全に動作することができないおそれが生じ得る。 In the conventional general configuration, there is no problem when there is one upper layer with respect to the MAC layer. However, when a plurality of upper layers share the MAC layer, the handles may overlap between the upper layers. In that case, there is a possibility that the MAC layer cannot operate correctly and safely.
例えば、Xネットワークスタック及びYネットワークスタックがMACレイヤを共用する場合、Xネットワークスタックが「ハンドルα」とする間接送信要求をした後に、Yネットワークスタックが、同じく「ハンドルα」に対してフレーム送信キャンセル機能が実施されてしまうことが生じ得る。 For example, when the X network stack and the Y network stack share the MAC layer, after the X network stack makes an indirect transmission request for “handle α”, the Y network stack cancels frame transmission for “handle α”. It can happen that the function is implemented.
また、MACレイヤは、ネットワークスタックからフレーム送信要求があると、そのフレーム送信要求に対する依頼動作応答を実施する。この場合にも、MACレイヤはハンドルを利用して依頼動作応答を行うが、MACレイヤはハンドルのみを管理しているので、ハンドルが競合したときには、複数のネットワークスタックが、果たして自己の依頼動作の応答であるか否かの判断をすることができない。 Further, when there is a frame transmission request from the network stack, the MAC layer performs a request operation response to the frame transmission request. Also in this case, the MAC layer uses the handle to make a request operation response. However, since the MAC layer manages only the handle, when the handle conflicts, a plurality of network stacks eventually perform their own request operation. It cannot be determined whether or not it is a response.
これらの課題に対して、それぞれ上位レイヤが利用するハンドルの番号の範囲を予め決めておくという方法も考えられる。しかし、上位レイヤは相互に独自に作成されることが多い。そのため、それぞれの上位レイヤとMACレイヤとの間で連携を取る仕組みを設けることは現実的でない。 To deal with these problems, a method of predetermining the range of handle numbers used by the upper layers can be considered. However, upper layers are often created independently of each other. Therefore, it is not realistic to provide a mechanism for establishing cooperation between each upper layer and the MAC layer.
また、1個のネットワークスタックは複数のアプリケーション等の上位レイヤにより共用される。現在最も利用されているネットワークスタックであるIPスタックはこういった課題を「ソケット」という方法で解決している。しかし、計算機資源が限られた組込みで利用されることが多いIEEE802.15.4でソケット相当のものを用意するのはオーバヘッドが大きく現実的ではない。 One network stack is shared by upper layers such as a plurality of applications. The IP stack, which is currently the most used network stack, solves these problems by a method called “socket”. However, it is not practical to prepare a socket equivalent to IEEE802.15.4, which is often used with a limited amount of computer resources.
そのため、独立して作成された複数のソフトウェアから共用されるMACレイヤを安全に動作させることができる通信装置及び通信プログラムが求められている。 Therefore, there is a need for a communication device and a communication program that can safely operate a MAC layer shared by a plurality of independently created software.
かかる課題を解決するために、第1の本発明の通信装置は、ネットワークプロトコルスタック以上の1又は複数の上位部に対して、媒体アクセス制御副層が、物理層で得られた情報を通知する通信装置において、(1)1又は複数の上位部から無線通信に係る動作処理の依頼を受けて、依頼された動作処理を行う依頼動作処理手段と、(2)依頼動作処理手段への依頼元である上位部で指定される依頼動作情報と、依頼元の上位部を識別する上位部識別情報とを対応付けた対応情報を記憶する対応情報記憶手段とを備えることを特徴とする通信装置である。 In order to solve such a problem, in the communication apparatus of the first aspect of the present invention, the medium access control sublayer notifies the information obtained in the physical layer to one or a plurality of higher-order units of the network protocol stack or higher. In the communication apparatus, (1) a request operation processing unit that receives a request for operation processing related to wireless communication from one or a plurality of higher-order units, and (2) a request source to the request operation processing unit A correspondence information storage means for storing correspondence information in which the requested operation information specified by the higher order part is associated with the higher order part identification information for identifying the higher order part of the request source. is there.
第2の本発明の通信プログラムは、ネットワークプロトコルスタック以上の1又は複数の上位部に対して、媒体アクセス制御副層が、物理層で得られた情報を通知する通信プログラムにおいて、コンピュータを、(1)1又は複数の上位部から無線通信に係る動作処理の依頼を受けて、依頼された動作処理を行う依頼動作処理手段(2)依頼動作処理手段への依頼元である上位部で指定される依頼動作情報と、依頼元の上位部を識別する上位部識別情報とを対応付けた対応情報を記憶部に記憶する対応情報記憶手段として機能させることを特徴とする通信プログラムである。 A communication program according to a second aspect of the present invention is a communication program in which a medium access control sublayer notifies information obtained in a physical layer to one or a plurality of higher-order units of a network protocol stack or higher. 1) Requested operation processing means for receiving requested operation processing related to wireless communication from one or more higher-order units, and (2) designated by the upper-level unit that is a request source to the requested operation processing unit The communication program is made to function as correspondence information storage means for storing correspondence information in which the requested operation information and the higher-level part identification information for identifying the higher-order part of the request source are associated with each other.
本発明によれば、独立に作成された複数のソフトウェアから共用されるMACレイヤを、安全に動作させるためのものである。 According to the present invention, a MAC layer shared by a plurality of independently created software is operated safely.
(A)第1の実施形態
以下では、本発明の通信装置及び通信プログラムの第1の実施形態を、図面を参照しながら詳細に説明する。
(A) 1st Embodiment Below, the 1st Embodiment of the communication apparatus and communication program of this invention is described in detail, referring drawings.
第1の実施形態では、IEEE802.15.4の標準化技術を採用して、フレーム伝送処理を行う通信装置に本発明を適用する場合を例示する。 The first embodiment exemplifies a case where the present invention is applied to a communication apparatus that performs frame transmission processing by adopting IEEE 802.15.4 standardization technology.
第1の実施形態は、上位レイヤから依頼された間接送信を行う場合に、その間接送信のフレーム送信を取り消すフレームキャンセル機能を実施する場合を例示する。 The first embodiment exemplifies a case where a frame cancel function for canceling the frame transmission of the indirect transmission is performed when the indirect transmission requested by the upper layer is performed.
例えば、イーサネット(登録商標)等において、MACレイヤのフレーム送信要求後に上位レイヤからフレーム送信をキャンセルすることは難しい。なぜなら、上位レイヤがMACレイヤに対してフレーム送信要求を行った場合、その直後にフレーム送信が実施されてしまうからである。よって、通常、MACレイヤがフレーム送信キャンセルを行うことはない。 For example, in Ethernet (registered trademark) or the like, it is difficult to cancel frame transmission from an upper layer after a frame transmission request of the MAC layer. This is because when a higher layer makes a frame transmission request to the MAC layer, frame transmission is performed immediately after that. Therefore, normally, the MAC layer does not cancel frame transmission.
しかし、IEEE802.15.4で規定されているMACレイヤは、フレーム送信キャンセル機能がある(MCPS-PURGE.request)。これは、IEEE802.15.4の標準化技術が省電力のための「間接送信」という特殊なフレーム送信機能を持っているからである。 However, the MAC layer defined in IEEE802.15.4 has a frame transmission cancel function (MCPS-PURGE.request). This is because IEEE802.15.4 standardization technology has a special frame transmission function called “indirect transmission” for power saving.
IEEE802.15.4準拠のMACレイヤは、フレーム間接送信要求(=間接送信オプションを有効にしてMCPS-DATA.request)を出された場合、そのフレームを送
信先ノードからの間接送信フレーム送信要求(=Datarequestコマンドフレームの受信)があるまで、MACレイヤ内部で保持する。
When an IEEE802.15.4 compliant MAC layer issues a frame indirect transmission request (= MCPS-DATA.request with the indirect transmission option enabled), the frame is sent to the indirect transmission frame transmission request (= Datarequest It is held inside the MAC layer until a command frame is received).
よって、間接送信を実施する場合、従来のMACレイヤと異なり、フレーム送信要求直後にフレーム送信が実施されるとは限らない。「間接送信」の場合、フレーム送信が要求後すぐに実施されないのでフレーム送信キャンセル機能に意味がある。 Therefore, when performing indirect transmission, unlike the conventional MAC layer, frame transmission is not always performed immediately after a frame transmission request. In the case of “indirect transmission”, the frame transmission cancellation function is meaningful because the frame transmission is not performed immediately after the request.
(A−1)第1の実施形態の構成
図1は、第1の実施形態の通信装置の内部構成を示す内部構成図である。図1は、第1の実施形態の通信装置100の主な内部構成を示している。
(A-1) Configuration of First Embodiment FIG. 1 is an internal configuration diagram illustrating an internal configuration of a communication device according to the first embodiment. FIG. 1 shows a main internal configuration of the
図1において、第1の実施形態の通信装置100は、複数の上位部103及び104と、MACレイヤ及びPHY(物理)レイヤ102として、間接送信制御部111、フレーム送信キャンセル処理部112、依頼元確認部113、記憶部114とを有する。
In FIG. 1, the
上位部103及び104は、MACレイヤ及びPHYレイヤ102の上位レイヤであるネットワークプロトコルスタックに相当するものである。上位部103及び104は、例えばアプリケーション等の上位レイヤから取得したフレーム間接送信要求やフレーム送信キャンセル要求をMACレイヤ及びPHYレイヤ102に与えるものである。上位部103及び104はそれぞれ、複数のアプリケーション等の上位レイヤから共用されるものであってもよい。なお、図1では、上位部の数が2個の場合を例示するが、上位部の数は特に限定されるものではなく、3個以上であってもよい。
The
間接送信制御部111は、依頼元確認部113と接続しており、上位部103又は上位部104からフレーム間接送信要求を受けると、フレーム間接送信を行うものである。
The indirect transmission control unit 111 is connected to the request
IEEE802.15.4に規定されるデータ送信は、上位レイヤからのデータ送信依頼時(MCPS-DATA.request発行時)に、複数の送信オプションを設定することができる。例えば、送信オプションには、ACK要求有り送信、間接送信、セキュリティ有り送信等がある。上位部103及び104が間接送信を要求する場合、上位部103及び104は、設定パラメータ(Indirect Transmissionパラメータ)を設定し、フレーム送信要求(MCPS-DATA.request)をMACレイヤ及びPHYレイヤ102に与える。
For data transmission stipulated in IEEE802.15.4, a plurality of transmission options can be set when a data transmission is requested from an upper layer (when MCPS-DATA.request is issued). For example, transmission options include transmission with ACK request, indirect transmission, transmission with security, and the like. When the
間接送信制御部111は、フレーム間接送信要求を受けると、間接送信に係るフレームを一時的に保持し、図示しない送信先から間接送信フレーム送信要求(Datarequestコマンドフレーム)を受信すると、保持しているフレームを送信先ノードに送信する。 When receiving an indirect frame transmission request, the indirect transmission control unit 111 temporarily holds a frame related to indirect transmission, and holds when receiving an indirect transmission frame transmission request (Datarequest command frame) from a transmission destination (not shown). Send the frame to the destination node.
なお、間接送信制御部111がフレームを保持するデータ保持時間は、所定の設定時間を設定するようにしてもよく、又設定変更できるようにしてもよい。また、間接送信制御部111は、所定数のフレームを保持するようにしてもよい。 Note that the data holding time for which the indirect transmission control unit 111 holds a frame may be set to a predetermined setting time or may be set to change. The indirect transmission control unit 111 may hold a predetermined number of frames.
フレーム送信キャンセル処理部112は、依頼元確認部113及び間接送信制御部111と接続しており、上位部103又は上位部104からフレーム送信キャンセル要求を受けると、対応するフレームの間接送信をキャンセルするものである。上位部103及び104がフレーム送信のキャンセルを要求する場合、上位部103及び104は、間接送信を依頼したときの間接送信のハンドル(1バイトの番号)を指定してフレーム送信キャンセル要求を行う。
The frame transmission cancel
従って、フレーム送信キャンセル処理部112は、指定されたハンドルについての間接送信を取り消すことを間接送信制御部111に指示する。
Therefore, the frame transmission cancel
依頼元確認部113は、上位部103及び104と、間接送信制御部111と、フレーム送信キャンセル処理部112と、記憶部114と接続するものである。
The request
図1に示すように、依頼元確認部113は、対応情報取得部11、間接送信要求指示部12、確認部13、フレーム送信キャンセル指示部14、対応情報削除部15を有する。
As illustrated in FIG. 1, the request
対応情報記憶部11は、上位部103及び上位部104から間接送信要求を受けると、間接送信要求に含まれるハンドル及び上位部識別情報を取得し、取得されたハンドルと上位部識別情報とを対応付けた対応情報を記憶部114に記憶するものである。
When receiving the indirect transmission request from the
間接要求指示部12は、対応情報記憶部11によりハンドル及び上位部識別情報の対応情報が記憶部114に記憶されると、上位部103及び104からの間接送信要求を間接送信制御部111に与えるものである。
The indirect request instructing unit 12 gives the indirect transmission request from the
確認部13は、上位部103及び上位部104からフレーム送信キャンセル要求を受けると、このフレーム送信キャンセル要求に含まれるハンドル及び上位部識別情報と、記憶部114に記憶されるハンドル及び上位部識別情報とを比較して、一致するものがあるか否かを確認するものである。
When the
フレーム送信キャンセル指示部14は、確認部13によりハンドル及び上位部識別情報が一致すると判断された場合、フレーム送信キャンセル要求をフレーム送信キャンセル処理部112に与える。また、フレーム送信キャンセル指示部14は、確認部13によりハンドル及び上位部識別情報が一致しないと判断された場合、依頼元確認部113は、フレーム送信キャンセル要求を無効にする。
The frame transmission cancellation instruction unit 14 gives a frame transmission cancellation request to the frame transmission
対応情報削除部15は、間接送信要求のときに、間接送信制御部111により間接送信が実施されると、記憶部114に記憶されるハンドル及び上位部識別情報を削除する。また、対応情報削除部15は、フレーム送信キャンセル要求のときに、フレーム送信キャンセル処理部112によりフレーム送信のキャンセルが実施されると、記憶部114に記憶されるハンドル及び上位部識別情報を削除する。
When the indirect transmission is performed by the indirect transmission control unit 111 at the time of the indirect transmission request, the correspondence information deleting unit 15 deletes the handle and the upper unit identification information stored in the storage unit 114. The correspondence information deleting unit 15 deletes the handle and the higher-level part identification information stored in the storage unit 114 when the frame transmission
ここで、上位部103及び104が間接送信要求を行う場合には、依頼する間接送信処理と紐付けしたハンドルを上位部103及び104が指定して行う。また、上位部103及び104がフレーム送信キャンセルを行う場合には、先に依頼した間接送信のハンドルを上位部103及び104が指定してフレーム送信キャンセルを要求する。
Here, when the
上位部識別情報とは、依頼動作の依頼元である上位部103及び104を識別する情報である。上位部識別情報は、依頼元である上位部103及び104を特定する情報であれば種々の情報を広く適用することができる。
The high-order part identification information is information for identifying the high-
例えば、上位部識別情報は、予め設定されている上位部識別情報や、MACレイヤ及びPHYレイヤ102に動作依頼を行った上位部103及び104の上位部識別情報や、動作依頼の際に上位部103及び104が指定した上位部識別情報等を適用することができる。
For example, the high-order part identification information includes the high-order part identification information set in advance, the high-order part identification information of the high-
上記の上位部識別情報は、上位部103及び104に対して予め割り当てられている固有のIDや、上位部103及び104のタスク又はスレッドのID(以下、処理実行単位識別情報ともいう)等を用いることができる。
The upper part identification information includes a unique ID assigned in advance to the
なお、上位部103及び104に相当するネットワークプロトコルスタックやアプリケーションは、マルチタスクOSやマルチスレッドOSを利用して実装される。従って、各レイヤは、1以上のタスク又はスレッドを利用して実装される。通常、マルチタスクOS等は、個々のタスク等を区別又は管理する情報としてタスクID又はスレッドIDを用意している。依頼元確認部113は、上位部103及び104からの間接送信要求又はフレーム送信キャンセル要求を受けると、その間接送信要求又はフレーム送信キャンセル要求を依頼したタスクID又はスレッドIDとハンドルとを対応付けて記憶部114に記憶するようにしてもよい。
Note that network protocol stacks and applications corresponding to the
記憶部114は、依頼元確認部113が取得したハンドル及び上位部識別情報を対応付けて記憶するものである。
The storage unit 114 stores the handle acquired by the request
(A−2)第1の実施形態の動作
次に、上位部103及び104から間接送信要求及びフレーム送信キャンセル要求が依頼されるときの通信装置100における処理の動作を、図面を参照しながら詳細に説明する。
(A-2) Operation of the First Embodiment Next, details of the processing operation in the
まず、図2及び図3を用いて、上位部103及び104から間接送信要求が依頼される場合の通信装置100における処理の動作を説明する。なお、ここでは、説明便宜上、上位部103からMACレイヤ及びPHYレイヤ102に対して間接送信要求があった場合を例示する。
First, the operation of processing in the
図2は、上位部103及び104から間接送信要求が依頼される場合の通信装置100における処理の動作を示すフローチャートである。図3は、上位部103から間接送信要求が依頼される場合の通信装置100の処理を説明する説明図である。
FIG. 2 is a flowchart showing an operation of processing in the
図2において、上位部103がMACレイヤ及びPHYレイヤ102に対して間接送信要求を依頼する場合、データ送信依頼時(MCPS-DATA.request発行時)に、上位部103は、設定パラメータ(Indirect Transmissionパラメータ)を設定し、フレーム送信要求(MCPS-DATA.request)をMACレイヤ及びPHYレイヤ102に与える。
In FIG. 2, when the
MACレイヤ及びPHYレイヤ102では、図3に示すように依頼元確認部113が上位部103からの間接送信要求を取得する(S101)。
In the MAC layer and
依頼元確認部113は、取得した間接送信要求に含まれるハンドルと、依頼元である上位部103の上位部識別情報とを取得する(S102)。
The request
ハンドルは、上位部103が間接送信として指定したハンドル番号である。また、上位部識別情報は、上述したように様々な識別情報を適用することができる。例えば、上位部識別情報が、上位部103及び104に対して予め割り当てられた上位部識別情報である場合、依頼元確認部113は、間接送信要求の依頼元である上位部103の上位部識別情報を認識することで上位部識別情報を取得することができる。また、例えば、上位部識別情報が、上位部103により指定されたタスクID又はスレッドID(処理実行単位識別情報)とする場合、依頼元確認部113は、上位部103が指定するタスクID又はスレッドIDを取得する。
The handle is a handle number designated by the
次に、依頼元確認部113は、取得したハンドル及び上位部識別情報を対応付けて記憶部114に記憶する(S103)。そして、依頼元確認部113がハンドル及び上位部識別情報を記憶した後、依頼元確認部113は、間接送信制御部111に対して間接送信要求を与える(S104)。
Next, the request
間接送信制御部111は、間接送信要求を受けると間接送信処理を行う(S105)。すなわち、間接送信制御部111は、間接送信に係るフレームを一時的に保持し、送信先から間接送信フレーム送信要求(Datarequestコマンドフレーム)を受信すると、保持しているフレームを送信先ノードに送信する。 When receiving the indirect transmission request, the indirect transmission control unit 111 performs indirect transmission processing (S105). That is, the indirect transmission control unit 111 temporarily holds a frame related to indirect transmission, and when receiving an indirect transmission frame transmission request (Datarequest command frame) from the transmission destination, transmits the held frame to the transmission destination node. .
そして、間接送信制御部111が、間接送信処理が完了すると(S106)、間接送信制御部111は依頼元確認部113に間接送信完了の旨を通知し、依頼元確認部113は、記憶部114に記憶される当該間接送信処理のハンドルと上位部識別情報とを削除する(S107)。
When the indirect transmission control unit 111 completes the indirect transmission process (S106), the indirect transmission control unit 111 notifies the request
次に、図4〜図6を用いて、上位部103及び104からフレーム送信キャンセル要求が依頼される場合の通信装置100における処理の動作を説明する。
Next, an operation of processing in the
図4は、上位部103及び104から間接送信要求が依頼される場合の通信装置100における処理の動作を示すフローチャートである。
FIG. 4 is a flowchart showing an operation of processing in the
図4において、上位部103がMACレイヤ及びPHYレイヤ102に対してフレーム送信キャンセル要求を依頼する場合、上位部103からフレーム送信キャンセル要求(MCPS-PURGE.request)がMACレイヤ及びPHYレイヤ102に与えられる。
In FIG. 4, when the
MACレイヤ及びPHYレイヤ102では、依頼元確認部113が上位部103からの間接送信要求を取得する(S201)。
In the MAC layer and the
依頼元確認部113は、取得した間接送信要求に含まれるハンドルと、依頼元である上位部103の上位部識別情報とを取得する(S202)。
The request
次に、依頼元確認部113は、記憶部114を参照して、取得したハンドル及び上位部識別情報と一致するものがあるか否かを確認する(S203)。
Next, the request
取得したハンドル及び上位部識別情報が記憶部114にある場合、依頼元確認部113は、フレーム送信キャンセル要求を、フレーム送信キャンセル処理部112に与える(S204)。そして、フレーム送信キャンセル処理部112は、ハンドルに対応する間接送信処理の取り消しを間接送信制御部111に指示してフレーム送信キャンセル処理を行う(S205)。
When the acquired handle and higher-level part identification information are in the storage unit 114, the request
例えば、図3のように上位部103からの間接送信要求が依頼されている場合に、図5のように上位部103が間接送信依頼時のハンドルでフレーム送信キャンセル要求を依頼したとする。このとき、ハンドル及び上位部識別情報が記憶部114に記憶されているため、依頼元確認部113は、フレーム送信キャンセル処理部112にフレーム送信キャンセル要求を与える。
For example, when an indirect transmission request from the
一方、取得したハンドル及び上位部識別情報が記憶部114にある場合、依頼元確認部113は、フレーム送信キャンセル要求を無効にする(S208)。
On the other hand, when the acquired handle and higher-level part identification information are in the storage unit 114, the request
例えば、上記と同様に、図3のように上位部103からの間接送信要求が依頼されている場合に、図6のように上位部104が、上位部103の依頼したハンドルでフレーム送信キャンセル要求を依頼したとする。この場合、ハンドルは同じであっても、上位部識別情報が異なる。つまり、ハンドル及び上位部識別情報が不一致なので、依頼元確認部113は、フレーム送信キャンセル要求を無効にする。
For example, as described above, when an indirect transmission request from the
このとき、例えば、依頼元確認部113は、フレーム送信キャンセルが無効である旨を、依頼元の上位部103に通知し、取得したフレーム送信キャンセル要求を廃棄するようにしてもよい。
At this time, for example, the request
なお、S205において、フレーム送信キャンセル処理部112が、間接送信に係るフレーム送信キャンセル処理を完了すると(S206)、間接送信制御部111は依頼元確認部113にフレーム送信キャンセル完了の旨を通知し、依頼元確認部113は、記憶部114に記憶される当該間接送信処理のハンドルと上位部識別情報とを削除する(S207)。
In S205, when the frame transmission
(A−3)第1の実施形態の効果
以上のように、第1の実施形態によれば、例えば、上位部103からの間接送信依頼発行時と同じハンドルで上位部104がフレーム送信キャンセル要求を発行したとしても、依頼元確認部113が上位部104からの依頼を無効とするので、MACレイヤ及びPHYレイヤ102が正しく安全に動作する。
(A-3) Effect of First Embodiment As described above, according to the first embodiment, for example, the
また、第1の実施形態によれば、依頼元確認部113が、ハンドル及び上位部識別情報を記憶することで、MACレイヤに対する処理の依頼元を確認し、処理の可否を判断する。上位部識別情報は、例えば、ネットワークプロトコルスタックやアプリケーション等の上位レイヤと連携を取るものではない。従って、従来のMACレイヤを前提として作られた上位レイヤに変更を加える必要なく、MACレイヤの正しく安全な動作を実現することができる。
Further, according to the first embodiment, the request
さらに、上位部識別情報として「依頼時に上位部から指定された上位部識別情報」を利用する場合、上位レイヤの都合でキャンセル依頼を発行する上位部を決めることができるので利便性があがる。 Furthermore, when “upper part identification information designated by the upper part at the time of request” is used as the upper part identification information, the upper part issuing the cancel request can be determined for the convenience of the upper layer, which is convenient.
(B)第2の実施形態
次に、本発明の通信装置及び通信プログラムの第2の実施形態を、図面を参照しながら詳細に説明する。
(B) Second Embodiment Next, a second embodiment of the communication device and the communication program of the present invention will be described in detail with reference to the drawings.
第2の実施形態も、第1の実施形態と同様に、IEEE802.15.4の標準化技術を採用して、フレーム伝送処理を行う通信装置に本発明を適用する場合を例示する。 Similarly to the first embodiment, the second embodiment also exemplifies a case where the present invention is applied to a communication apparatus that adopts IEEE802.15.4 standardization technology and performs frame transmission processing.
第2の実施形態は、上位レイヤから依頼された間接送信を行う場合に、その間接送信のフレーム送信を取り消すフレームキャンセル機能を実施する場合を例示する。 The second embodiment exemplifies a case where a frame cancel function for canceling frame transmission of indirect transmission is performed when performing indirect transmission requested by an upper layer.
(B−1)第2の実施形態の構成
図7は、第2の実施形態の通信装置の内部構成を示す内部構成図である。図7は、第2の実施形態の通信装置200の主な内部構成を示している。
(B-1) Configuration of Second Embodiment FIG. 7 is an internal configuration diagram illustrating an internal configuration of a communication device according to the second embodiment. FIG. 7 shows a main internal configuration of the
図7において、第2の実施形態の通信装置200は、複数の上位部203及び204と、MACレイヤ及びPHY(物理)レイヤ202として、依頼動作処理部211、依頼動作応答部212、記憶部213とを有する。
In FIG. 7, the
上位部203及び204は、MACレイヤ及びPHYレイヤ202の上位レイヤであるネットワークプロトコルスタックに相当するものである。上位部203及び204は、例えばアプリケーション等の上位レイヤが依頼する動作要求をMACレイヤ202に与えるものである。なお、上位部203及び204はそれぞれ、複数のアプリケーション等の上位レイヤから共用されるものであってもよい。また、図7では、上位部の数が2個の場合を例示するが、上位部の数は特に限定されるものではなく、3個以上であってもよい。
The
ここで、上位部203及び204がMACレイヤ及びPHYレイヤ202への依頼は、例えば、(a)データフレーム送信依頼(MCPS-DATA.request)、データフレーム間接送信依頼(MCPS-DATA.request Indirect送信)、データフレーム送信キャンセル依頼(MCPS-PURGE.request)、MAC・PHYレイヤ設定変更依頼(MLME-SET.request PLME-SET.request)、MAC・PHYレイヤ設定参照依頼(MLME-GET.request PLME-GET.request)、RSSI値取得依頼(MLME-SCAN.request EDスキャン)、周囲に対するビーコン要求依頼(MLME-SCAN.request Activeスキャン)、受信部OFF機能(MLME-RX-ENABLE.request)、コマンドフレーム送信依頼(その他MLME-XXX.request)等がある。
Here, the requests from the
依頼動作処理部211は、上位部203及び204から動作依頼要求時(動作依頼発行時)されると、依頼された動作処理を行うものである。図7に示すように、依頼動作処理部211は、対応情報記憶部21、依頼動作実行部22を有する。
The requested
対応情報記憶部21は、上位部203及び204からの動作依頼要求時(動作依頼発行時)に、上位部203及び204が指定したハンドル及び上位部識別情報を対応付けた対応情報を記憶部213に記憶するものである。
The correspondence information storage unit 21 stores correspondence information in which the handle specified by the
上位部識別情報とは、依頼動作の依頼元である上位部203及び204を識別する情報である。上位部識別情報は、依頼元である上位部203及び204を特定する情報であれば種々の情報を広く適用することができる。
The high-order part identification information is information for identifying the high-
例えば、上位部識別情報は、予め設定されている上位部識別情報や、MACレイヤ202に動作依頼を行った上位部203及び204の上位部識別情報や、動作依頼の際に上位部203及び204が指定した上位部識別情報等を適用することができる。
For example, the high-order part identification information includes preset high-order part identification information, high-order part identification information of the high-
上記の上位部識別情報は、上位部203及び204に対して予め割り当てられている固有のIDや、上位部203及び204のタスク又はスレッドのID(処理実行単位識別情報)等を用いることができる。
As the upper part identification information, a unique ID assigned in advance to the
上位部203及び204に相当するネットワークプロトコルスタックやアプリケーションは、マルチタスクOSやマルチスレッドOSを利用して実装される。従って、各レイヤは、1以上のタスク又はスレッドを利用して実装される。通常、マルチタスクOS等は、個々のタスク等を区別又は管理する情報としてタスクID又はスレッドIDを用意している。この場合、対応情報記憶部21は、上位部203及び204からの依頼動作要求時(依頼動作発行時)のタスクID又はスレッドIDとハンドルとを対応付けて記憶部213に記憶する。
Network protocol stacks and applications corresponding to the
依頼動作実行部22は、上位部203及び204から依頼された動作処理を実行するものである。
The requested operation execution unit 22 executes the operation process requested by the
依頼動作応答部212は、依頼動作処理部211が依頼された動作処理を行うと、動作処理の処理結果を上位部203及び204に応答するものである。図7に示すように、依頼動作応答部212は、確認部23、依頼動作応答部24、対応情報削除部25を有する。
When the requested
確認部23は、依頼動作応答を発行する際、発行された依頼動作応答に対する上位部識別情報を、記憶部213から取得するものである。
When the confirmation unit 23 issues a request operation response, the confirmation unit 23 acquires, from the
依頼動作応答部24は、確認部23により取得された上位部識別情報を、依頼動作応答と共に、依頼元の上位部203及び204に与えるものである。
The requested action response unit 24 gives the higher order part identification information acquired by the confirmation part 23 to the requested
対応情報削除部25は、依頼動作応答後に、依頼動作応答に係る記憶部213に記憶されるハンドル及び上位部識別情報を削除する。
The correspondence information deleting unit 25 deletes the handle and the higher-level part identification information stored in the
ここで、上位部203及び204がMACレイヤ及びPHY202に動作を依頼する場合、依頼する動作処理と紐付けしたハンドルを、上位部203及び204が指定して行う。
Here, when the
記憶部213は、対応情報記憶部21によるハンドル及び上位部識別情報を対応付けて記憶するものである。
The
(B−2)第2の実施形態の動作
次に、上位部203及び204からMACレイヤ及びPHYレイヤ202に対する動作依頼及び依頼動作応答の通信装置200における処理の動作を、図面を参照しながら詳細に説明する。
(B-2) Operation of Second Embodiment Next, details of processing operations in the
図8は、第2の実施形態の通信装置200における動作依頼処理及び依頼動作応答処理の動作を示すフローチャートである。
FIG. 8 is a flowchart illustrating operations of the operation request process and the request operation response process in the
上位部203及び204は、依頼動作要求時(依頼動作発行時)に、依頼動作のハンドルを指定して行う。
The
MACレイヤ及びPHYレイヤ102では、依頼動作処理部211が上位部203及び204からの依頼動作要求を取得する(S301)。
In the MAC layer and the
依頼動作処理部211は、取得した依頼動作要求に係るハンドルと、依頼元である上位部203及び204の上位部識別情報とを取得する(S302)。
The requested
上位部識別情報は、上述したように様々な識別情報を適用することができる。例えば、上位部識別情報が、上位部203及び204に対して予め割り当てられた上位部識別情報である場合、依頼動作処理部211は、依頼元である上位部203及び204の上位部識別情報を認識することで上位部識別情報を取得することができる。また、例えば、上位部識別情報が、上位部203により指定されたタスクID又はスレッドID(処理実行単位識別情報)とする場合、依頼動作処理部211は、上位部203及び204が指定するタスクID又はスレッドIDを取得する。
As described above, various pieces of identification information can be applied to the upper part identification information. For example, when the high-order part identification information is high-order part identification information assigned in advance to the high-
次に、依頼動作処理部211は、取得したハンドル及び上位部識別情報を対応付けて記憶部213に記憶する(S303)。そして、依頼動作処理部211がハンドル及び上位部識別情報を記憶した後、依頼動作処理部211は、依頼された動作処理を行う(S304)。なお、依頼動作処理211が実行する動作は、IEEE802.15.4で規定されるMACレイヤ及びPHY202の既存の管理処理を行う。
Next, the requested
依頼動作処理部211による依頼動作が実行され(S305)、依頼動作応答発行時に、依頼動作応答部212は、発行されたハンドルに対応する上位部識別情報を、記憶部213から取得する。そして、依頼動作応答部212は、取得された上位部識別情報を依頼動作応答と共に、依頼元の上位部203及び204に与える(S306)。
The requested operation is performed by the requested operation processing unit 211 (S305), and when issuing a requested operation response, the requested
そして、依頼動作応答がなされると、依頼動作応答部212は、記憶部114に記憶される当該動作依頼に係るハンドルと上位部識別情報とを削除する(S307)。
When the requested motion response is made, the requested
(B−3)第2の実施形態の効果
以上のように、第2の実施形態によれば、依頼動作応答は上位部識別情報と共になされるので、例えば、上位部203及び204は、動作依頼応答に付された上位部識別情報に基づいて、どの上位部宛てのものか判断できる。
(B-3) Effects of the Second Embodiment As described above, according to the second embodiment, the request operation response is made together with the upper part identification information. Based on the high-order part identification information attached to the response, it is possible to determine which high-order part is addressed.
また、第2の実施形態によれば、記憶部213で記憶される上位部識別情報として「ハンドル毎にあらかじめ設定されている上位部識別情報」「依頼をした上位部の上位部識別情報」を記憶することにより、従来のMACレイヤを前提として作られた上位レイヤに変更を加える必要なく、どの上位部の依頼動作応答を判断できる。
Further, according to the second embodiment, “upper part identification information preset for each handle” and “upper part identification information of the requested upper part” are stored as upper part identification information stored in the
さらに、第2の実施形態によれば、上位部識別情報として「依頼時に上位部から指定された上位部識別情報」を利用すると、上位レイヤの都合で依頼応答を確認する上位部を決めることができるので利便性があがる。 Furthermore, according to the second embodiment, when “upper part identification information designated by the upper part at the time of request” is used as the upper part identification information, the upper part for confirming the request response can be determined for the convenience of the upper layer. Because it is possible, convenience is improved.
(C)他の実施形態
上述した第1及び第2の実施形態においても種々の変形実施形態を説明したが、以下の他の変形実施形態についても本発明は適用することができる。
(C) Other Embodiments Although various modified embodiments have been described in the first and second embodiments described above, the present invention can also be applied to the following other modified embodiments.
(C−1)上述した第1の実施形態では、送信オプションとして間接送信及びフレーム送信キャンセルを行う場合を例示したが、間接送信以外のデータ伝送についても適用することができる。つまり、本発明は、ACK要求有り送信、セキュリティ有り送信等を行う場合にも適用することができる。これにより、送信オプションの設定の仕方に応じて、仕組みを作り分ける必要がないので、処理や装置をコンパクトな実装とすることができる。 (C-1) In the first embodiment described above, the case where indirect transmission and frame transmission cancellation are performed as transmission options is illustrated, but the present invention can also be applied to data transmission other than indirect transmission. That is, the present invention can also be applied to the case of performing transmission with ACK request, transmission with security, and the like. Thereby, it is not necessary to create a mechanism according to the setting method of the transmission option, so that the processing and the apparatus can be implemented in a compact manner.
(C−2)本発明は、上述した第1の実施形態と第2の実施形態とを組み合わせた構成としても良い。これにより、ハンドル及び上位部識別情報を対応付けて記憶することができるので、上位部から指定されたハンドルが重複する場合でも、MACレイヤは上位部からの動作依頼に対して正しく安全に動作することができる。 (C-2) The present invention may be configured by combining the first embodiment and the second embodiment described above. As a result, since the handle and the upper part identification information can be stored in association with each other, even when the handle specified by the upper part overlaps, the MAC layer operates correctly and safely in response to the operation request from the upper part. be able to.
100及び200…通信装置、
102及び202…MACレイヤ及びPHYレイヤ、
111…間接送信制御部、112…フレーム送信キャンセル処理部、
113…依頼元確認部、11…対応情報記憶部、12…間接送信要求指示部、
13…確認部、14…フレーム送信キャンセル指示部、15…対応情報削除部、
114…記憶部、
211…依頼動作処理部、21…対応情報記憶部、22…依頼動作実行部、
212…依頼動作応答部、23…確認部、24…依頼動作応答部、
25…対応情報削除部、213…記憶部、
103、104、203及び204…上位部。
100 and 200 ... communication devices,
102 and 202 ... MAC layer and PHY layer,
111 ... Indirect transmission control unit, 112 ... Frame transmission cancellation processing unit,
113 ... Request source confirmation unit, 11 ... Corresponding information storage unit, 12 ... Indirect transmission request instruction unit,
13 ... confirmation unit, 14 ... frame transmission cancel instruction unit, 15 ... corresponding information deletion unit,
114 ... storage part,
211: Request operation processing unit, 21 ... Corresponding information storage unit, 22 ... Request operation execution unit,
212 ... Request operation response unit, 23 ... Confirmation unit, 24 ... Request operation response unit,
25 ... correspondence information deletion unit, 213 ... storage unit,
103, 104, 203 and 204: upper part.
Claims (13)
上記1又は複数の上位部から無線通信に係る動作処理の依頼を受けて、依頼された動作処理を行う依頼動作処理手段と、
上記依頼動作処理手段への依頼元である上記上位部で指定される依頼動作情報と、依頼元の上記上位部を識別する上位部識別情報とを対応付けた対応情報を記憶する対応情報記憶手段と
を備えることを特徴とする通信装置。 In the communication apparatus in which the medium access control sublayer notifies the information obtained in the physical layer to one or a plurality of higher-order units over the network protocol stack,
At the request of the operation processing according to the radio communication from the one or more upper portions, and the request operation processing means for performing the requested operation process,
Correspondence information storage means for storing correspondence information in which the requested action information specified by the higher order part that is a request source to the requested action processing means is associated with the higher order part identification information that identifies the higher order part of the request source. A communication apparatus comprising:
上記対応情報記憶手段は、依頼元である上記上位部に割り当てられている上位部識別情報と、上記依頼動作情報とを対応付けて記憶するものであることを特徴とする請求項1に記載の通信装置。 Upper part identification information is assigned in advance to the one or more upper parts,
2. The correspondence information storage means stores high-order part identification information assigned to the high-order part, which is a request source, and the requested action information in association with each other. Communication device.
上記依頼動作応答処理手段が、上記対応情報記憶手段を参照して、動作依頼時の上記依頼動作情報に対応する上記上位部識別情報を取得し、取得した上記上位部識別情報と共に上記処理結果を応答することを特徴とする請求項1〜6のいずれかに記載の通信装置。 Request operation response processing means for responding to the processing result by the request operation processing means,
The requested action response processing means refers to the correspondence information storage means to obtain the upper part identification information corresponding to the requested action information at the time of an action request, and obtains the processing result together with the obtained upper part identification information. The communication device according to claim 1, which responds.
コンピュータを、
上記1又は複数の上位部から無線通信に係る動作処理の依頼を受けて、依頼された動作処理を行う依頼動作処理手段
上記依頼動作処理手段への依頼元である上記上位部で指定される依頼動作情報と、依頼元の上記上位部を識別する上位部識別情報とを対応付けた対応情報を記憶部に記憶する対応情報記憶手段
として機能させることを特徴とする通信プログラム。 In a communication program in which the medium access control sublayer notifies the information obtained in the physical layer to one or a plurality of upper layers above the network protocol stack,
At the request of the operation processing according to the radio communication from the one or more upper portions, is designated by the upper unit is a request operation processing unit requesting to said request operation processing means for performing the requested operation processing request A communication program that functions as correspondence information storage means for storing correspondence information in which a piece of operation information is associated with high-order part identification information for identifying the high-order part of a request source in a storage unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012158673A JP6217060B2 (en) | 2012-07-17 | 2012-07-17 | Communication apparatus and communication program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012158673A JP6217060B2 (en) | 2012-07-17 | 2012-07-17 | Communication apparatus and communication program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014022880A JP2014022880A (en) | 2014-02-03 |
JP6217060B2 true JP6217060B2 (en) | 2017-10-25 |
Family
ID=50197330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012158673A Active JP6217060B2 (en) | 2012-07-17 | 2012-07-17 | Communication apparatus and communication program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6217060B2 (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3360138B2 (en) * | 1991-01-17 | 2002-12-24 | 株式会社日立製作所 | Communication control device |
US5299197A (en) * | 1992-02-11 | 1994-03-29 | Roger Schlafly | Communications packet server protocol |
JP3259188B2 (en) * | 1992-07-24 | 2002-02-25 | 株式会社ピーエフユー | Buffer management method |
JPH08223250A (en) * | 1995-02-08 | 1996-08-30 | Mitsubishi Electric Corp | Communication control system |
JP5206532B2 (en) * | 2009-03-25 | 2013-06-12 | 日本電気株式会社 | System, message relay server, and terminal device |
JP5638063B2 (en) * | 2010-03-23 | 2014-12-10 | キヤノン株式会社 | COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, PROGRAM |
-
2012
- 2012-07-17 JP JP2012158673A patent/JP6217060B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014022880A (en) | 2014-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10788992B2 (en) | System and method for efficient access for remote storage devices | |
CN104753697B (en) | A kind of method, equipment and system controlling the automatic beginning of the network equipment | |
JP6055111B2 (en) | Method and apparatus for proximity control in a wireless communication system | |
JP2008079344A5 (en) | ||
JP2011193307A (en) | Field communication system and field communication method | |
JP2014071478A (en) | Information processor, and off-loading method of instruction | |
CN105677605A (en) | Highly-efficient interconnected system capable of configuring chips and realization system thereof and device | |
CN105812321A (en) | Network file system based on user information management file resource and processing method | |
JP5123238B2 (en) | COMMUNICATION DEVICE, COMMUNICATION DEVICE STARTING METHOD, AND PROGRAM | |
CN104579889A (en) | Method and device for calling NF (network function) | |
US20160124404A1 (en) | User device, driving method of user device, apparatus for providing service and driving method of apparatus for providing service | |
JP6802354B2 (en) | Communication test equipment, communication test methods and programs | |
JP6217060B2 (en) | Communication apparatus and communication program | |
CN105721169A (en) | Cloud manufacturing-oriented adaptive access device for 3D printing | |
JP6101197B2 (en) | Network connection management system and method, and wireless terminal device | |
US9747144B2 (en) | Function processing apparatus and function processing method dynamically process network function using commands | |
JP6515052B2 (en) | Communication apparatus, communication system, communication method and program | |
JP6320569B2 (en) | Home control device and home control system | |
JP6064749B2 (en) | Controller and program | |
JP6543600B2 (en) | Management system and management method | |
JP2011170689A (en) | Apparatus and method for processing information, and program | |
JP4457773B2 (en) | Wireless communication system, authentication card, communication device, and computer program | |
JP2007226822A (en) | Method of allocating information processors and management server executing the method | |
US10623492B2 (en) | Service processing method, related device, and system | |
US10142676B2 (en) | Residential gateway making at least one private memory space available |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150515 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160622 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160628 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160823 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170131 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170322 |
|
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: 20170829 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170911 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6217060 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |