JP2016174292A - Communication device, communication control program, and communication control method - Google Patents

Communication device, communication control program, and communication control method Download PDF

Info

Publication number
JP2016174292A
JP2016174292A JP2015053684A JP2015053684A JP2016174292A JP 2016174292 A JP2016174292 A JP 2016174292A JP 2015053684 A JP2015053684 A JP 2015053684A JP 2015053684 A JP2015053684 A JP 2015053684A JP 2016174292 A JP2016174292 A JP 2016174292A
Authority
JP
Japan
Prior art keywords
data
tail pointer
unit
pointer
communication device
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.)
Granted
Application number
JP2015053684A
Other languages
Japanese (ja)
Other versions
JP6458574B2 (en
Inventor
佐藤 宏
Hiroshi Sato
宏 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2015053684A priority Critical patent/JP6458574B2/en
Publication of JP2016174292A publication Critical patent/JP2016174292A/en
Application granted granted Critical
Publication of JP6458574B2 publication Critical patent/JP6458574B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To change a receivable data size announced to a transmission side communication device.SOLUTION: A communication device includes: a packet reception unit 254 for receiving data; a storage unit 270 including a ring buffer region to store the received data; a protocol processing unit 256 for calculating a head pointer indicating a ring buffer region write-in position for data to be received next; setting units 266, 268 for setting a first tail pointer used for the calculation of receivable data length and a second tail pointer used for the calculation of data amount not taken in by an upper-level layer; a selection unit 264 for selecting one of the first and second tail pointers; a free capacity calculation unit 258 for calculating free capacity in the ring buffer region on the basis of the header pointer and the selected one from the first tail pointer and the second tail pointer; and a packet transmission unit 252 for announcing the free capacity in the ring buffer region to another communication device.SELECTED DRAWING: Figure 4

Description

本発明は、通信装置に関する。   The present invention relates to a communication device.

インターネットなどで利用されている通信プロトコルとして、TCP(Transmission Control Protocol)とIP(Internet Protocol)とを組み合わせたものが知られている。TCP/IPはバイトストリーム型であり、正規化された受信データはリングバッファに格納される場合がある。   As a communication protocol used in the Internet or the like, a combination of TCP (Transmission Control Protocol) and IP (Internet Protocol) is known. TCP / IP is a byte stream type, and normalized received data may be stored in a ring buffer.

リングバッファ形式の送信バッファを用いて送信制御を行う技術が知られている(例えば、特許文献1参照)。   A technique for performing transmission control using a ring buffer type transmission buffer is known (for example, see Patent Document 1).

受信側の通信装置は、受信データをリングバッファに格納する際に、次の受信データの書き込み位置を示すヘッドポインタと、アプリケーション層などの上位層の機能による次のデータ引き取り位置を示すテイルポインタとを用いて受信可能なデータサイズを求める。受信側の通信装置は、送信側の通信装置に受信可能なデータサイズを公告(アドバタイズ)することによって通知する。   When the receiving side communication device stores the received data in the ring buffer, the head pointer indicating the writing position of the next received data, and the tail pointer indicating the next data collection position by the function of the upper layer such as the application layer, Is used to determine the receivable data size. The receiving communication device notifies the transmitting communication device by advertising (advertisement) the receivable data size.

しかし、受信側の通信装置が通常動作モードから省電力動作モードに移行するなどによって受信処理のリソースが縮退した状態となった場合には、受信バッファとして使用できるリングバッファの容量や、受信データを処理する能力が通常動作モードと比較して低下している。このため、受信側の通信装置から送信側の通信装置に受信可能なデータサイズを公告し、送信側の通信装置によって送信されるデータを受信しても、受信側の通信装置は、そのデータの処理ができないおそれがある。   However, if the reception processing resources are degenerated due to the communication device on the receiving side shifting from the normal operation mode to the power saving operation mode, the capacity of the ring buffer that can be used as the reception buffer and the received data The ability to process is reduced compared to the normal operating mode. For this reason, even if the data size that can be received is announced from the communication device on the reception side to the communication device on the transmission side, and the data transmitted by the communication device on the transmission side is received, the communication device on the reception side Processing may not be possible.

そこで、本発明は、送信側の通信装置に公告する受信可能なデータサイズを変更することを目的とする。   Therefore, an object of the present invention is to change the receivable data size notified to the communication device on the transmission side.

開示の一実施の形態の通信装置は、
バイトストリームでデータ通信を行うプロトコルにしたがって動作する通信装置であって、
他の通信装置によって送信されたデータを受信する受信部と、
該受信部によって受信したデータを格納するリングバッファ領域を有する記憶部と、
前記受信部によって受信したデータに基づいて、該データを前記リングバッファ領域に格納した場合に次に受信するデータの書き込み位置を示すヘッドポインタを検出するプロトコル処理部と、
受信可能なデータ量を算出する際に使用する第1のテイルポインタと、上位層によって処理されていないデータ量を算出する際に使用する第2のテイルポインタとを設定するシステム制御部と、
該システム制御部によって設定する前記第1のテイルポインタ、および前記第2のテイルポインタのいずれかを選択する選択部と、
前記プロトコル処理部によって算出したヘッドポインタと、前記選択部によって選択した前記第1のテイルポインタおよび前記第2のテイルポインタのいずれかとに基づいて、前記他の通信装置に公告する前記リングバッファ領域の空き容量を算出する空き容量算出部と、
前記空き容量算出部によって算出した前記リングバッファ領域の空き容量を前記他の通信装置に公告する送信部と
を有する。
A communication device according to an embodiment of the disclosure includes:
A communication device that operates according to a protocol for performing data communication in a byte stream,
A receiving unit for receiving data transmitted by another communication device;
A storage unit having a ring buffer area for storing data received by the receiving unit;
A protocol processing unit for detecting a head pointer indicating a write position of data to be received next when the data is stored in the ring buffer area based on the data received by the receiving unit;
A system control unit that sets a first tail pointer that is used when calculating the amount of receivable data and a second tail pointer that is used when calculating the amount of data not processed by an upper layer;
A selection unit for selecting one of the first tail pointer and the second tail pointer set by the system control unit;
Based on the head pointer calculated by the protocol processing unit and either the first tail pointer or the second tail pointer selected by the selection unit, the ring buffer area to be notified to the other communication device A free space calculation unit for calculating free space;
A transmission unit that advertises the free capacity of the ring buffer area calculated by the free capacity calculation unit to the other communication device.

開示の実施の形態によれば、送信側の通信装置に公告する受信可能なデータサイズを変更することができる。   According to the embodiment of the disclosure, it is possible to change the receivable data size notified to the communication device on the transmission side.

一実施の形態に係る通信システムの構成例を示す図である。It is a figure which shows the structural example of the communication system which concerns on one embodiment. フレーム構成の一例を示す図である。It is a figure which shows an example of a frame structure. 一実施の形態に係る受信装置を示す図である。It is a figure which shows the receiver which concerns on one Embodiment. 一実施の形態に係る受信装置を示す機能ブロック図である。It is a functional block diagram which shows the receiver which concerns on one Embodiment. 一実施の形態に係るリングバッファの概念図(その1)である。It is a conceptual diagram (the 1) of the ring buffer which concerns on one Embodiment. 一実施の形態に係るリングバッファの概念図(その2)である。It is a conceptual diagram (the 2) of the ring buffer which concerns on one Embodiment. 一実施の形態に係る受信装置の動作を示すフローチャート(その1)である。It is a flowchart (the 1) which shows operation | movement of the receiver which concerns on one Embodiment. 一実施の形態に係るリングバッファの概念図(その3)である。It is a conceptual diagram (the 3) of the ring buffer which concerns on one Embodiment. 一実施の形態に係るリングバッファの概念図(その4)である。It is a conceptual diagram (the 4) of the ring buffer which concerns on one Embodiment. 一実施の形態に係る受信装置の動作を示すフローチャート(その2)である。It is a flowchart (the 2) which shows operation | movement of the receiver which concerns on one Embodiment. 一実施の形態に係る受信装置を示す機能ブロック図である。It is a functional block diagram which shows the receiver which concerns on one Embodiment. リングバッファの概念図である。It is a conceptual diagram of a ring buffer.

次に、本発明を実施するための形態を、以下の実施例に基づき図面を参照しつつ説明する。以下で説明する実施例は一例に過ぎず、本発明が適用される実施の形態は、以下の実施例に限られない。
なお、実施例を説明するための全図において、同一機能を有するものは同一符号を用い、繰り返しの説明は省略する。
Next, the form for implementing this invention is demonstrated, referring drawings based on the following Examples. Examples described below are merely examples, and embodiments to which the present invention is applied are not limited to the following examples.
In all the drawings for explaining the embodiments, the same reference numerals are used for those having the same function, and repeated explanation is omitted.

<第1の実施の形態>
<通信システム>
図1は、本実施の形態に係る通信システムを示す図である。通信システムは送信装置100と受信装置200とを有する。送信装置100と受信装置200との間は、インターネットなどのネットワーク50を介して有線または無線によって接続される。送信装置100と受信装置200は、バイトストリームでデータ通信を行うTCPなどの所定のプロトコルにしたがって通信を行う。
<First Embodiment>
<Communication system>
FIG. 1 is a diagram showing a communication system according to the present embodiment. The communication system includes a transmission device 100 and a reception device 200. The transmission device 100 and the reception device 200 are connected by wire or wireless via a network 50 such as the Internet. The transmission device 100 and the reception device 200 perform communication according to a predetermined protocol such as TCP that performs data communication using a byte stream.

送信装置100は、受信装置200によって公告される受信可能なデータ量(データ長)に応じて、データを付帯したパケットを受信装置200に送信する。受信装置200は、送信装置100によって送信されたパケットを受信すると、該パケットに付帯されるデータ量に基づいて、受信可能なデータ量を公告(アドバタイズ)する。   The transmission device 100 transmits a packet with data attached to the reception device 200 according to the receivable data amount (data length) announced by the reception device 200. When receiving the packet transmitted by the transmitting apparatus 100, the receiving apparatus 200 advertises the amount of receivable data based on the amount of data attached to the packet.

<フレーム構成>
図2は、送信装置100と受信装置200との間で送受信されるフレームフォーマットの一例として、TCPヘッダのフォーマットを示す。
<Frame configuration>
FIG. 2 shows a TCP header format as an example of a frame format transmitted and received between the transmission device 100 and the reception device 200.

フレームは、発信元ポート番号フィールドと、宛先ポート番号フィールドと、シーケンス番号フィールドと、確認応答(ACK)番号フィールドと、データオフセットフィールドと、予約フィールドと、コードビットフィールドとを有する。さらに、フレームは、ウインドウサイズフィールドと、チェックサムフィールドと、緊急ポインタフィールドと、オプションフィールドと、パディングフィールドとを有する。   The frame includes a source port number field, a destination port number field, a sequence number field, an acknowledgment (ACK) number field, a data offset field, a reservation field, and a code bit field. In addition, the frame has a window size field, a checksum field, an urgent pointer field, an options field, and a padding field.

発信元ポート番号フィールドは16ビットで構成され、発信元のポート番号が格納される。発信元のポート番号は、TCPパケットの送信元のアプリケーションを識別するための番号である。宛先ポート番号フィールドは16ビットで構成され、宛先のポート番号が格納される。宛先のポート番号は、あて先となるアプリケーションが待ち受けしているポートの番号である。   The source port number field is composed of 16 bits and stores the source port number. The port number of the transmission source is a number for identifying the application that is the transmission source of the TCP packet. The destination port number field is composed of 16 bits and stores the destination port number. The destination port number is the port number on which the destination application is waiting.

シーケンス番号フィールドは32ビットで構成され、分割されたTCPセグメントのシーケンス番号が格納される。シーケンス番号は、データを送信する送信装置100によって管理される。送信装置100は、データを送信するたびに、送信したデータのバイト数分だけシーケンス番号を加算し、TCPパケットに付帯して送信する。確認応答番号フィールドは32ビットで構成され、送信側が次に送信すべきデータのシーケンス番号が格納される。確認応答番号は、受信したデータに対して、どこのバイト位置までを受信したかを表す。   The sequence number field is composed of 32 bits and stores the sequence numbers of the divided TCP segments. The sequence number is managed by the transmission device 100 that transmits data. Each time data is transmitted, the transmitting device 100 adds the sequence number by the number of bytes of the transmitted data, and transmits the data by attaching it to the TCP packet. The confirmation response number field is composed of 32 bits and stores the sequence number of data to be transmitted next by the transmission side. The confirmation response number represents up to which byte position the received data has been received.

データオフセットフィールドは4ビットで構成され、TCPヘッダ長が4オクテット単位で格納される。データオフセットは、TCPデータが始まる位置を表す。予約フィールドは6ビットで構成され、0が格納される。コードビットフィールドは6ビットで構成され、各ビットはフラグとして使用される。   The data offset field is composed of 4 bits, and the TCP header length is stored in units of 4 octets. The data offset represents the position where the TCP data starts. The reserved field is composed of 6 bits and 0 is stored. The code bit field is composed of 6 bits, and each bit is used as a flag.

ウインドウサイズフィールドは16ビットで構成され、受信側が現在受信可能なデータサイズを送信側に通知するために使用される。送信側は、ウインドウサイズで指定されたデータサイズ以上のデータを送信しない。チェックサムフィールドは16ビットで構成され、データの信頼性を保証するために使用される。オプションフィールドおよびパディングフィールドは32ビットで構成され、パディングフィールドには0が格納される。   The window size field is composed of 16 bits and is used for notifying the transmitting side of the data size that the receiving side can currently receive. The transmission side does not transmit data larger than the data size specified by the window size. The checksum field is composed of 16 bits and is used to ensure data reliability. The option field and the padding field are composed of 32 bits, and 0 is stored in the padding field.

<受信装置200>
図3は、本実施の形態に係る受信装置200のハードウェア構成図である。図3に示されているように、本実施の形態の受信装置200は、受信装置200全体の動作を制御するCPU(Central Processing Unit)202、およびIPL(Initial Program Loader)等のCPU202の駆動に用いられるプログラムを記憶したROM(Read Only Memory)204を備えている。さらに、受信装置200は、CPU202のワークエリアとして使用されるRAM(Random Access Memory)206、受信装置用のプログラム等の各種データを記憶するフラッシュメモリ210、およびCPU202の制御にしたがってフラッシュメモリ210に対する各種データの読み出しまたは書き込みを制御するSSD(Solid State Drive)208を備えている。さらに、受信装置200は、ネットワーク50を利用してデータ伝送をするためのネットワークI/F(Interface)212、および上記各構成要素を図3に示されているように電気的に接続するためのアドレスバスやデータバス等のシステムバス250を備えている。
<Receiving device 200>
FIG. 3 is a hardware configuration diagram of receiving apparatus 200 according to the present embodiment. As shown in FIG. 3, the receiving apparatus 200 according to the present embodiment is driven by a CPU (Central Processing Unit) 202 that controls the operation of the entire receiving apparatus 200 and a CPU 202 such as an IPL (Initial Program Loader). A ROM (Read Only Memory) 204 storing a program to be used is provided. Furthermore, the receiving device 200 includes a RAM (Random Access Memory) 206 used as a work area of the CPU 202, a flash memory 210 that stores various data such as a program for the receiving device, and various types of data for the flash memory 210 according to the control of the CPU 202. An SSD (Solid State Drive) 208 that controls reading or writing of data is provided. Further, the receiving apparatus 200 is used to electrically connect the network I / F (Interface) 212 for data transmission using the network 50 and the above-described components as shown in FIG. A system bus 250 such as an address bus or a data bus is provided.

<受信装置200の機能構成>
図4は、本実施の形態に係る受信装置200を示す。受信装置200は、パケット送信部252と、パケット受信部254と、プロトコル処理部256と、バッファ空き容量算出部258と、DMA(Direct Memory Access)制御部260と、受信データ量算出部262と、選択部264と、第1のテイルポインタ設定部266と、第2のテイルポインタ設定部268と、記憶部270と、システム制御部272とを有する。これら各部は、図3に示されている各構成要素のいずれかが、フラッシュメモリ210からRAM206上に展開されたプログラムに従ったCPU202からの命令によって動作することで実現される機能が含まれる。また、受信装置200は、図3に示されているROM204、RAM206、フラッシュメモリ210によって構築される記憶部270を有している。記憶部270は、リングバッファ領域を有する。リングバッファ領域とは、記憶部270に確保される一定の領域であり、その領域は「環(リング)」であるように扱われ、末尾(最終アドレス)と先頭(先頭アドレス)とがつながった環状構造と見なされる。
<Functional configuration of receiving apparatus 200>
FIG. 4 shows a receiving apparatus 200 according to the present embodiment. The receiving apparatus 200 includes a packet transmission unit 252, a packet reception unit 254, a protocol processing unit 256, a buffer free capacity calculation unit 258, a DMA (Direct Memory Access) control unit 260, a received data amount calculation unit 262, A selection unit 264, a first tail pointer setting unit 266, a second tail pointer setting unit 268, a storage unit 270, and a system control unit 272 are included. Each of these units includes a function realized by any one of the components shown in FIG. 3 operating according to a command from the CPU 202 according to a program expanded from the flash memory 210 onto the RAM 206. The receiving device 200 includes a storage unit 270 constructed by the ROM 204, the RAM 206, and the flash memory 210 shown in FIG. The storage unit 270 has a ring buffer area. The ring buffer area is a certain area secured in the storage unit 270, and the area is treated as a “ring”, and the end (last address) and the start (start address) are connected. It is considered a ring structure.

(受信装置200の各機能構成)
次に、図3および図4を用いて、受信装置200の各機能構成について詳細に説明する。なお、以下では、受信装置200の各機能構成を説明するにあたって、図3に示されている各構成要素のうち、受信装置200の各機能構成を実現させるための主な構成要素との関係も説明する。
(Each functional configuration of receiving apparatus 200)
Next, each functional configuration of the receiving apparatus 200 will be described in detail with reference to FIGS. 3 and 4. In the following, in describing each functional configuration of the receiving device 200, among the components illustrated in FIG. 3, the relationship with the main components for realizing each functional configuration of the receiving device 200 is also described. explain.

図4に示される受信装置200のパケット送信部252は、ネットワークI/F212によって実現され、プロトコル処理部256によって生成されたIPパケットをネットワーク50を経由して送信装置100に送信する。   The packet transmission unit 252 of the reception device 200 illustrated in FIG. 4 is realized by the network I / F 212 and transmits the IP packet generated by the protocol processing unit 256 to the transmission device 100 via the network 50.

図4に示される受信装置200のパケット受信部254は、ネットワークI/F212によって実現され、送信装置100によって送信されたIPパケットを受信し、該IPパケットをプロトコル処理部256に入力する。   The packet receiving unit 254 of the receiving apparatus 200 shown in FIG. 4 is realized by the network I / F 212, receives the IP packet transmitted by the transmitting apparatus 100, and inputs the IP packet to the protocol processing unit 256.

図4に示される受信装置200のプロトコル処理部256は、CPU202からの命令によって実現される。プロトコル処理部256は、パケット送信部252、およびパケット受信部254と接続される。プロトコル処理部256は、TCP/IPプロトコルにしたがってデータの送受信を行う。例えば、プロトコル処理部256は、パケット受信部254によって入力されるIPパケットに付帯されるデータをDMA制御部260に入力する。さらに、プロトコル処理部256は、パケット受信部254によって入力されるパケットに付帯されるデータに基づいてヘッドポインタの位置を検出し、該ヘッドポインタの位置を表すヘッドポインタ信号をバッファ空き容量算出部258、および受信データ量算出部262に入力する。ここで、ヘッドポインタとは、記憶部270のリングバッファ領域に格納されるデータの先頭(先頭アドレス)を示す変数であり、次に受信されるデータの書き込みを開始する位置を示す。また、プロトコル処理部256は、バッファ空き容量算出部258によって入力されるバッファの空き容量を表すバッファ空き容量信号に基づいて、ウインドウサイズを設定し、該ウインドウサイズを付帯したACKなどのIPパケットを作成し、パケット送信部252に入力する。   The protocol processing unit 256 of the receiving device 200 shown in FIG. 4 is realized by a command from the CPU 202. The protocol processing unit 256 is connected to the packet transmission unit 252 and the packet reception unit 254. The protocol processing unit 256 transmits and receives data according to the TCP / IP protocol. For example, the protocol processing unit 256 inputs data attached to the IP packet input by the packet receiving unit 254 to the DMA control unit 260. Further, the protocol processing unit 256 detects the position of the head pointer based on the data attached to the packet input by the packet receiving unit 254, and outputs a head pointer signal indicating the position of the head pointer to the buffer free space calculating unit 258. And the received data amount calculation unit 262. Here, the head pointer is a variable indicating the head (head address) of data stored in the ring buffer area of the storage unit 270, and indicates a position where writing of data to be received next is started. Further, the protocol processing unit 256 sets the window size based on the buffer free space signal indicating the free space of the buffer input by the buffer free space calculation unit 258, and receives an IP packet such as ACK accompanied by the window size. Created and input to the packet transmitter 252.

図4に示される受信装置200のDMA制御部260は、ネットワークI/F212、およびCPU202からの命令によって実現される。DMA制御部260は、プロトコル処理部256と接続される。DMA制御部260は、プロトコル処理部256によって入力されるデータをシステムバス250を介して、記憶部270のリングバッファ領域にダイレクトメモリアクセスによって格納する。また、DMA制御部260は、システムバス250を介して、記憶部270のリングバッファ領域に格納されたデータを取得し、プロトコル処理部256に入力する。   The DMA control unit 260 of the receiving apparatus 200 shown in FIG. 4 is realized by commands from the network I / F 212 and the CPU 202. The DMA control unit 260 is connected to the protocol processing unit 256. The DMA control unit 260 stores the data input by the protocol processing unit 256 in the ring buffer area of the storage unit 270 via the system bus 250 by direct memory access. Also, the DMA control unit 260 acquires data stored in the ring buffer area of the storage unit 270 via the system bus 250 and inputs the data to the protocol processing unit 256.

図4に示される受信装置200の受信データ量算出部262は、演算回路などのハードウェアや、CPU202からの命令によって実現される。受信データ量算出部262は、プロトコル処理部256と接続される。受信データ量算出部262は、プロトコル処理部256によって入力されるヘッドポインタ信号により表されるヘッドポインタと、第2のテイルポインタ設定部268によって入力される上位層による引き取りが行われていないデータ量を算出する際に使用する第2のテイルポインタとに基づいて、受信データがあることを表す受信データイベント信号を作成する。ここで、第2のテイルポインタとは、記憶部270のリングバッファ領域に格納されたデータの末尾(末尾のアドレス)を指す変数である。例えば、受信データ量算出部262は、ヘッドポインタと、第2のテイルポインタが一致しない場合に受信データイベント信号を作成し、受信データ量を算出する。受信データ量算出部262は、システム制御部272に受信データイベント信号を入力するとともに、受信データ量を表す受信データ量信号を入力する。具体的には、受信データ量算出部262は、ヘッドポインタと第2のテイルポインタとの間の差分を算出することによって、受信データ量を算出する。   The reception data amount calculation unit 262 of the reception device 200 illustrated in FIG. 4 is realized by hardware such as an arithmetic circuit or a command from the CPU 202. The received data amount calculation unit 262 is connected to the protocol processing unit 256. The received data amount calculation unit 262 is a data amount that has not been picked up by the head pointer represented by the head pointer signal input by the protocol processing unit 256 and the upper layer input by the second tail pointer setting unit 268. Based on the second tail pointer used when calculating the received data, a received data event signal indicating the presence of received data is created. Here, the second tail pointer is a variable indicating the end (end address) of data stored in the ring buffer area of the storage unit 270. For example, the reception data amount calculation unit 262 creates a reception data event signal when the head pointer does not match the second tail pointer, and calculates the reception data amount. The reception data amount calculation unit 262 inputs a reception data event signal to the system control unit 272 and inputs a reception data amount signal representing the reception data amount. Specifically, the received data amount calculation unit 262 calculates the received data amount by calculating the difference between the head pointer and the second tail pointer.

図4に示される受信装置200のシステム制御部272は、比較回路などのハードウェアや、CPU202からの命令によって実現される。システム制御部272は、受信データ量算出部262、およびシステムバス250と接続される。システム制御部272は、受信データ量算出部262によって入力される受信データイベント信号、および受信データ量信号と、記憶部270のリングバッファ領域に格納されるデータ量に基づいて、ヘッドポインタの位置を把握する。   The system control unit 272 of the receiving apparatus 200 illustrated in FIG. 4 is realized by hardware such as a comparison circuit or a command from the CPU 202. The system control unit 272 is connected to the received data amount calculation unit 262 and the system bus 250. The system control unit 272 determines the position of the head pointer based on the reception data event signal and the reception data amount signal input by the reception data amount calculation unit 262 and the data amount stored in the ring buffer area of the storage unit 270. To grasp.

システム制御部272は、記憶部270のリングバッファ領域に格納されたデータに基づいて、アプリケーション層などの上位層によって引き取りされていない未処理データがある場合に、引き取りされていない未処理データがあることを上位層に通知する。上位層は、システム制御部272によって引き取りされていない未処理データがあることが通知されると、記憶部270のリングバッファ領域に格納されたデータを引き取る。上位層は、引き取ったデータ量に応じて第2のテイルポインタをずらすことによって変更し、変更した第2のテイルポインタをシステム制御部272に通知する。システム制御部272は、上位層によって通知される第2のテイルポインタを第2のテイルポインタ設定部268に設定する。   Based on the data stored in the ring buffer area of the storage unit 270, the system control unit 272 includes unprocessed data that has not been collected when there is unprocessed data that has not been collected by an upper layer such as an application layer. To the upper layer. When the upper layer is notified that there is unprocessed data that has not been collected by the system control unit 272, the upper layer takes over the data stored in the ring buffer area of the storage unit 270. The upper layer changes the second tail pointer by shifting the second tail pointer according to the amount of data taken, and notifies the system controller 272 of the changed second tail pointer. The system control unit 272 sets the second tail pointer notified by the higher layer in the second tail pointer setting unit 268.

さらに、システム制御部272は、受信装置200が通常動作モードである場合には選択部264に第2のテイルポインタ設定部268に設定される第2のテイルポインタを選択するように設定するテイルポインタ選択信号を選択部264に入力する。また、システム制御部272は、受信装置200が通常動作モードから省電力動作モードに移行した場合に、第1のテイルポインタ設定部266に第1のテイルポインタを設定する。例えば、システム制御部272は、第1のテイルポインタとして、現在のヘッドポインタから5バイトから20バイト程度、より好ましくは10バイト程度先頭アドレスから最終アドレスに向かう方向に設定する。さらに、システム制御部272は、受信装置200が省電力動作モードである場合には選択部264に第1のテイルポインタ設定部266に設定される第1のテイルポインタを選択するように設定するテイルポインタ選択信号を選択部264に入力する。   Further, the system control unit 272 sets the tail pointer to be set so that the selection unit 264 selects the second tail pointer set in the second tail pointer setting unit 268 when the reception device 200 is in the normal operation mode. A selection signal is input to the selection unit 264. In addition, the system control unit 272 sets the first tail pointer in the first tail pointer setting unit 266 when the receiving apparatus 200 shifts from the normal operation mode to the power saving operation mode. For example, the system control unit 272 sets the first tail pointer in a direction from the current head pointer to about 5 to 20 bytes, more preferably about 10 bytes in the direction from the head address to the last address. Further, the system control unit 272 sets the tail to be set so that the selection unit 264 selects the first tail pointer set in the first tail pointer setting unit 266 when the reception device 200 is in the power saving operation mode. A pointer selection signal is input to the selection unit 264.

図4に示される受信装置200の第1のテイルポインタ設定部266は、CPU202からの命令によって実現される。第1のテイルポインタ設定部266は、システムバス250と接続され、システム制御部272によって通知される第1のテイルポインタを設定する。図4に示される受信装置200の第2のテイルポインタ設定部268は、CPU202からの命令によって実現される。第2のテイルポインタ設定部268は、システムバス250と接続され、システム制御部272によって通知される第2のテイルポインタを設定する。   The first tail pointer setting unit 266 of the receiving device 200 illustrated in FIG. 4 is realized by a command from the CPU 202. The first tail pointer setting unit 266 is connected to the system bus 250 and sets the first tail pointer notified by the system control unit 272. The second tail pointer setting unit 268 of the receiving device 200 shown in FIG. 4 is realized by a command from the CPU 202. The second tail pointer setting unit 268 is connected to the system bus 250 and sets the second tail pointer notified by the system control unit 272.

図4に示される受信装置200の選択部264は、CPU202からの命令によって実現される。選択部264は、第1のテイルポインタ設定部266、第2のテイルポインタ設定部268、システム制御部272、およびバッファ空き容量算出部258と接続される。選択部264は、システム制御部272によって入力されるテイルポインタ選択信号にしたがって、第1のテイルポインタ設定部266によって設定される第1のテイルポインタまたは第2のテイルポインタ設定部268によって設定される第2のテイルポインタをバッファ空き容量算出部258に入力する。   The selection unit 264 of the reception device 200 illustrated in FIG. 4 is realized by a command from the CPU 202. The selection unit 264 is connected to the first tail pointer setting unit 266, the second tail pointer setting unit 268, the system control unit 272, and the buffer free space calculation unit 258. The selection unit 264 is set by the first tail pointer or the second tail pointer setting unit 268 set by the first tail pointer setting unit 266 according to the tail pointer selection signal input by the system control unit 272. The second tail pointer is input to the buffer free space calculation unit 258.

図4に示される受信装置200のバッファ空き容量算出部258は、CPU202からの命令によって実現される。バッファ空き容量算出部258は、プロトコル処理部256と接続される。バッファ空き容量算出部258は、プロトコル処理部256によって入力されるヘッドポインタ信号によって表されるヘッドポインタと、選択部264によって入力される第1のテイルポインタまたは第2のテイルポインタに基づいて、バッファ空き容量を求める。バッファ空き容量算出部258は、プロトコル処理部256にバッファ空き容量を表すバッファ空き容量信号を入力する。   The buffer free space calculation unit 258 of the receiving device 200 shown in FIG. 4 is realized by a command from the CPU 202. The buffer free space calculation unit 258 is connected to the protocol processing unit 256. Based on the head pointer represented by the head pointer signal input by the protocol processing unit 256 and the first tail pointer or the second tail pointer input by the selection unit 264, the buffer free space calculation unit 258 Find free space. The buffer free space calculation unit 258 inputs a buffer free space signal indicating the buffer free space to the protocol processing unit 256.

<受信装置200の動作>
以下、受信装置200の動作を通常動作モードと省電力動作モードのそれぞれについて説明する。
<Operation of Receiving Device 200>
Hereinafter, the operation of the receiving apparatus 200 will be described for each of the normal operation mode and the power saving operation mode.

<通常動作モード>
受信装置200のシステム制御部272は、通常動作モードでは、選択部264に第2のテイルポインタ設定部268によって設定される第2のテイルポインタを選択するテイルポインタ選択信号を入力する。このため、バッファ空き容量算出部258は、プロトコル処理部256によって入力されるヘッドポインタ信号によって表されるヘッドポインタと、選択部264によって入力される第2のテイルポインタとに基づいてバッファの空き容量を算出する。また、受信データ量算出部262は、プロトコル処理部256によって入力されるヘッドポインタ信号によって表されるヘッドポインタと、第2のテイルポインタ設定部268によって入力される第2のテイルポインタとが一致するか否かを判断する。受信データ量算出部262は、ヘッドポインタと第2のテイルポインタとが一致しない場合には受信データがあると判断し、受信データイベント信号を作成し、該受信データイベント信号をシステム制御部272に入力する。システム制御部272は、受信データイベント信号が入力されるか否かによって、上位層によって引き取りされていないデータがあるか否かを判断する。
<Normal operation mode>
In the normal operation mode, the system control unit 272 of the receiving device 200 inputs a tail pointer selection signal for selecting the second tail pointer set by the second tail pointer setting unit 268 to the selection unit 264. For this reason, the buffer free space calculation unit 258 determines the buffer free space based on the head pointer represented by the head pointer signal input by the protocol processing unit 256 and the second tail pointer input by the selection unit 264. Is calculated. Also, the received data amount calculation unit 262 matches the head pointer represented by the head pointer signal input by the protocol processing unit 256 with the second tail pointer input by the second tail pointer setting unit 268. Determine whether or not. The reception data amount calculation unit 262 determines that there is reception data when the head pointer does not match the second tail pointer, creates a reception data event signal, and sends the reception data event signal to the system control unit 272. input. The system control unit 272 determines whether there is data that has not been received by the upper layer, depending on whether a reception data event signal is input.

図5は、リングバッファの概念図(その1)を示し、上位層によって引き取られていない、つまり上位層によって処理されていない未処理の受信データが存在する場合を示す。図5において、縦方向はアドレスを示し、先頭アドレスから最終アドレスに向かってデータが格納される。以下、先頭アドレスから最終アドレスに向かう方向を「データ格納順方向」と呼び、その逆方向を「データ格納逆方向」と呼ぶ。また、図5において、点によって表されている領域は空き領域を示し、斜線によって表されている領域は受信データが格納されている領域を示す。   FIG. 5 is a conceptual diagram (part 1) of the ring buffer, showing a case where there is unprocessed received data that has not been taken over by the upper layer, that is, not processed by the upper layer. In FIG. 5, the vertical direction indicates an address, and data is stored from the head address toward the last address. Hereinafter, the direction from the first address to the last address is referred to as “data storage forward direction”, and the opposite direction is referred to as “data storage reverse direction”. In FIG. 5, an area represented by a dot indicates an empty area, and an area represented by a diagonal line indicates an area in which received data is stored.

送信装置100と受信装置200が通信を開始する際には、ヘッドポインタおよび第2のテイルポインタは先頭アドレスに設定されると仮定する。プロトコル処理部256は、パケット受信部254によって受信パケットが入力された場合に該受信パケットに付帯されるデータ量に基づいて、ヘッドポインタの位置をデータ格納順方向にずらすことによって変更する。プロトコル処理部256は、該変更したヘッドポインタを表すヘッドポインタ信号をバッファ空き容量算出部258、および受信データ量算出部262に入力する。また、システム制御部272は、上位層によって通知される第2のテイルポインタを第2のテイルポインタ設定部268に設定する。   When the transmission device 100 and the reception device 200 start communication, it is assumed that the head pointer and the second tail pointer are set to the head address. When a received packet is input by the packet receiving unit 254, the protocol processing unit 256 changes the position of the head pointer in the data storage forward direction based on the amount of data attached to the received packet. The protocol processing unit 256 inputs a head pointer signal representing the changed head pointer to the buffer free space calculation unit 258 and the reception data amount calculation unit 262. In addition, the system control unit 272 sets the second tail pointer notified by the higher layer in the second tail pointer setting unit 268.

図5によれば、ヘッドポインタはデータ格納順方向に第2のテイルポインタより進んでおり、ヘッドポインタから第2のテイルポインタまでのデータ格納逆方向における距離に相当する受信データが存在している。この場合、バッファ空き容量算出部258は、ヘッドポインタによって示されるアドレスと最終アドレスとの間の領域に格納できるデータ量と、先頭アドレスと第2のテイルポインタによって示されるアドレスとの間の領域に格納できるデータ量の和を求めることによって、バッファ空き容量を算出する。   According to FIG. 5, the head pointer is advanced from the second tail pointer in the data storage forward direction, and there is received data corresponding to the distance in the data storage reverse direction from the head pointer to the second tail pointer. . In this case, the buffer free space calculation unit 258 stores the amount of data that can be stored in the area between the address indicated by the head pointer and the final address, and the area between the head address and the address indicated by the second tail pointer. The buffer free capacity is calculated by calculating the sum of the amount of data that can be stored.

また、受信データ量算出部262は、ヘッドポインタと第2のテイルポインタが不一致であることによって、受信データイベント信号を作成し、該受信データイベント信号をシステム制御部272に入力する。これによって、システム制御部272は、上位層に対して引き取られていない未処理の受信データが存在することを示す未処理データ通知を発行する。未処理データ通知を受信した上位層は、ヘッドポインタから第2のテイルポインタまでのデータ格納逆方向における距離を計算することで、未処理の受信データのデータ量(データ長)を検出する。   The reception data amount calculation unit 262 creates a reception data event signal when the head pointer and the second tail pointer do not match, and inputs the reception data event signal to the system control unit 272. As a result, the system control unit 272 issues an unprocessed data notification indicating that there is unprocessed received data that has not been taken over to the upper layer. The upper layer that has received the unprocessed data notification detects the data amount (data length) of the unprocessed received data by calculating the distance in the data storage reverse direction from the head pointer to the second tail pointer.

図6は、リングバッファの概念図(その2)を示し、上位層によって引き取られていない未処理の受信データが存在しない場合を示す。図6において、縦方向はアドレスを示し、先頭アドレスから最終アドレスに向かってデータが格納される。また、図6において、点によって表されている領域は空き領域を示す。   FIG. 6 is a conceptual diagram (part 2) of the ring buffer, showing a case where there is no unprocessed received data that has not been taken over by the upper layer. In FIG. 6, the vertical direction indicates an address, and data is stored from the head address toward the last address. In FIG. 6, an area represented by a dot indicates an empty area.

図6によれば、ヘッドポインタと第2のテイルポインタは一致しており受信データは存在していない。この場合、バッファ空き容量算出部258は、ヘッドポインタから第2のテイルポインタまでのデータ格納逆方向における距離に相当する領域に格納できるデータ量、つまりリングバッファに格納できるデータ量の全てを、バッファ空き容量として算出する。   According to FIG. 6, the head pointer matches the second tail pointer, and no received data exists. In this case, the buffer free space calculation unit 258 stores all the data amount that can be stored in an area corresponding to the distance in the data storage reverse direction from the head pointer to the second tail pointer, that is, all the data amount that can be stored in the ring buffer. Calculate as free space.

また、受信データ量算出部262は、ヘッドポインタと第2のテイルポインタが一致しているため、受信データイベント信号は作成しない。このため、システム制御部272は、上位層に対して未処理の受信データが存在することを示す未処理データ通知を発行しない。   In addition, the reception data amount calculation unit 262 does not create a reception data event signal because the head pointer matches the second tail pointer. For this reason, the system control unit 272 does not issue an unprocessed data notification indicating that there is unprocessed received data to the upper layer.

図7は、本実施の形態に係る受信装置200の動作(その1)を示し、受信装置200が送信装置100によって送信されたパケットを受信する際の動作を示す。   FIG. 7 shows the operation (part 1) of receiving apparatus 200 according to the present embodiment, and shows the operation when receiving apparatus 200 receives a packet transmitted by transmitting apparatus 100.

ステップS702では、システム制御部272は、通常動作モードに設定する。通常動作モードでは、RAM206の全てを使用できる。   In step S702, the system control unit 272 sets the normal operation mode. In the normal operation mode, the entire RAM 206 can be used.

ステップS704では、システム制御部272は、選択部264に、第2のテイルポインタ設定部268によって設定される第2のテイルポインタを選択するように設定するテイルポインタ選択信号を入力する。   In step S <b> 704, the system control unit 272 inputs a tail pointer selection signal that is set to select the second tail pointer set by the second tail pointer setting unit 268 to the selection unit 264.

ステップS706では、パケット受信部254は送信装置100によって送信されたパケットを受信する。   In step S706, the packet receiving unit 254 receives the packet transmitted by the transmission device 100.

ステップS708では、受信データ量算出部262は、受信データがあるか否かを判断する。受信データ量算出部262は、ヘッドポインタと第2のテイルポインタとが一致するか否かに基づいて、受信データがあるか否かを判断する。   In step S708, the received data amount calculation unit 262 determines whether there is received data. The reception data amount calculation unit 262 determines whether there is reception data based on whether the head pointer matches the second tail pointer.

ステップS710では、ステップS708で受信データがあると判断した場合、システム制御部272は、上位層に対して、引き取られていない未処理の受信データがあることを示す未処理データ通知を送信する。   In step S710, when it is determined that there is received data in step S708, the system control unit 272 transmits an unprocessed data notification indicating that there is unprocessed received data that has not been collected to the upper layer.

ステップS712では、システム制御部272は、上位層によって通知される第2のテイルポインタを第2のテイルポインタ設定部268に設定する。   In step S712, the system control unit 272 sets the second tail pointer notified by the higher layer in the second tail pointer setting unit 268.

ステップS714では、ステップS712の処理が終了した後、またはステップS708において受信データがないと判断された場合、バッファ空き容量算出部258は、プロトコル処理部256によって入力されるヘッドポインタと選択部264によって入力される第2のテイルポインタとに基づいてバッファ空き容量を算出する。   In step S714, after the process of step S712 is completed or when it is determined in step S708 that there is no received data, the buffer free space calculation unit 258 uses the head pointer and the selection unit 264 input by the protocol processing unit 256. The buffer free capacity is calculated based on the input second tail pointer.

ステップS716では、プロトコル処理部256は、バッファ空き容量算出部258によって算出されたバッファ空き容量を表す情報を付帯したACKなどのIPパケットを作成し、パケット送信部252から送信する。   In step S 716, the protocol processing unit 256 creates an IP packet such as an ACK accompanied by information indicating the buffer free space calculated by the buffer free space calculation unit 258, and transmits it from the packet transmission unit 252.

<省電力動作モード>
受信装置200のシステム制御部272は、省電力動作モードでは、選択部264に第1のテイルポインタ設定部266によって設定される第1のテイルポインタを選択するテイルポインタ選択信号を入力する。このため、バッファ空き容量算出部258は、プロトコル処理部256によって入力されるヘッドポインタ信号によって表されるヘッドポインタと、選択部264によって入力される第1のテイルポインタとに基づいてバッファの空き容量を算出する。また、受信データ量算出部262は、プロトコル処理部256によって入力されるヘッドポインタ信号によって表されるヘッドポインタと、第2のテイルポインタ設定部268によって入力される第2のテイルポインタとが一致するか否かを判断する。受信データ量算出部262は、ヘッドポインタと第2のテイルポインタとが一致しない場合には受信データがあると判断し、受信データイベント信号を作成し、該受信データイベント信号をシステム制御部272に入力する。システム制御部272は、受信データイベント信号が入力されるか否かによって、上位層によって引き取りされていないデータがあるか否かを判断する。
<Power saving operation mode>
In the power saving operation mode, the system control unit 272 of the receiving device 200 inputs a tail pointer selection signal for selecting the first tail pointer set by the first tail pointer setting unit 266 to the selection unit 264. For this reason, the buffer free space calculation unit 258 determines the buffer free space based on the head pointer represented by the head pointer signal input by the protocol processing unit 256 and the first tail pointer input by the selection unit 264. Is calculated. Also, the received data amount calculation unit 262 matches the head pointer represented by the head pointer signal input by the protocol processing unit 256 with the second tail pointer input by the second tail pointer setting unit 268. Determine whether or not. The reception data amount calculation unit 262 determines that there is reception data when the head pointer does not match the second tail pointer, creates a reception data event signal, and sends the reception data event signal to the system control unit 272. input. The system control unit 272 determines whether there is data that has not been received by the upper layer, depending on whether a reception data event signal is input.

図8は、リングバッファの概念図(その3)を示し、上位層によって引き取られていない未処理の受信データが存在しない場合を示す。図8において、縦方向はアドレスを示し、先頭アドレスから最終アドレスに向かってデータが格納される。また、図8において、点によって表されている領域は空き領域を示す。   FIG. 8 is a conceptual diagram (part 3) of the ring buffer, and shows a case where there is no unprocessed received data that has not been taken over by the upper layer. In FIG. 8, the vertical direction indicates an address, and data is stored from the head address toward the last address. In FIG. 8, the area represented by a point indicates a free area.

図8によれば、第1のテイルポインタは、ヘッドポインタに対してデータ格納順方向に所定のデータ量に相当するアドレスだけ離れた位置(アドレス)に設定される。また、ヘッドポインタと第2のテイルポインタは一致しており受信データは存在していない。この場合、ヘッドポインタから第1のテイルポインタまでのデータ格納逆方向における距離に相当する領域に格納できるデータ量が、バッファ空き容量として送信装置100に通知される。   According to FIG. 8, the first tail pointer is set at a position (address) that is separated from the head pointer by an address corresponding to a predetermined amount of data in the data storage forward direction. Further, the head pointer and the second tail pointer coincide with each other, and no received data exists. In this case, the amount of data that can be stored in an area corresponding to the distance in the data storage reverse direction from the head pointer to the first tail pointer is notified to the transmission apparatus 100 as a buffer free space.

また、受信データ量算出部262は、ヘッドポインタと第2のテイルポインタが一致しているため、受信データイベント信号は作成しない。このため、システム制御部272は、上位層に対して未処理の受信データが存在することを示す未処理データ通知を発行しない。   In addition, the reception data amount calculation unit 262 does not create a reception data event signal because the head pointer matches the second tail pointer. For this reason, the system control unit 272 does not issue an unprocessed data notification indicating that there is unprocessed received data to the upper layer.

図9は、リングバッファの概念図(その4)を示し、上位層によって引き取られていない、つまり上位層によって処理されていない未処理の受信データが存在する場合を示す。図9において、縦方向はアドレスを示し、先頭アドレスから最終アドレスに向かってデータが格納される。また、図9において、点によって表されている領域は空き領域を示し、斜線によって表されている領域は受信データが格納されている領域を示す。   FIG. 9 is a conceptual diagram (part 4) of the ring buffer, and shows a case where there is unprocessed received data that has not been taken over by the upper layer, that is, not processed by the upper layer. In FIG. 9, the vertical direction indicates an address, and data is stored from the head address toward the last address. In FIG. 9, an area represented by a dot indicates an empty area, and an area represented by a diagonal line indicates an area in which received data is stored.

送信装置100と受信装置200が通信を開始する際には、ヘッドポインタおよび第2のテイルポインタは先頭アドレスに設定されると仮定する。プロトコル処理部256は、パケット受信部254によって受信パケットが入力された場合に該受信パケットに付帯されるデータ量に基づいて、ヘッドポインタの位置をデータ格納順方向にずらすことによって変更する。プロトコル処理部256は、該変更したヘッドポインタを表すヘッドポインタ信号をバッファ空き容量算出部258、および受信データ量算出部262に入力する。また、システム制御部272は、上位層によって通知される第2のテイルポインタを第2のテイルポインタ設定部268に設定する。   When the transmission device 100 and the reception device 200 start communication, it is assumed that the head pointer and the second tail pointer are set to the head address. When a received packet is input by the packet receiving unit 254, the protocol processing unit 256 changes the position of the head pointer in the data storage forward direction based on the amount of data attached to the received packet. The protocol processing unit 256 inputs a head pointer signal representing the changed head pointer to the buffer free space calculation unit 258 and the reception data amount calculation unit 262. In addition, the system control unit 272 sets the second tail pointer notified by the higher layer in the second tail pointer setting unit 268.

図9によれば、ヘッドポインタはデータ格納順方向に第2のテイルポインタより進んでおり、ヘッドポインタから第2のテイルポインタまでのデータ格納逆方向における距離だけの受信データが存在している。この場合、バッファ空き容量算出部258は、ヘッドポインタによって示されるアドレスと、第1のテイルポインタによって示されるアドレスとの間の領域に格納できるデータ量を求めることによって、バッファ空き容量を算出する。   According to FIG. 9, the head pointer advances from the second tail pointer in the data storage forward direction, and there is received data corresponding to the distance in the data storage reverse direction from the head pointer to the second tail pointer. In this case, the buffer free space calculation unit 258 calculates the buffer free space by obtaining the amount of data that can be stored in the area between the address indicated by the head pointer and the address indicated by the first tail pointer.

また、受信データ量算出部262は、ヘッドポインタと第2のテイルポインタが不一致であることによって、受信データイベント信号を作成し、該受信データイベント信号をシステム制御部272に入力する。システム制御部272は、受信データイベント信号が入力されたか否かによって、上位層に対して引き取られていない未処理の受信データが存在することを示す未処理データ通知を発行する。未処理データ通知を受信した上位層は、ヘッドポインタから第2のテイルポインタまでのデータ格納逆方向における距離を計算することで、未処理の受信データのデータ量(データ長)を検出する。   The reception data amount calculation unit 262 creates a reception data event signal when the head pointer and the second tail pointer do not match, and inputs the reception data event signal to the system control unit 272. The system control unit 272 issues an unprocessed data notification indicating that there is unprocessed received data that has not been collected, depending on whether or not a received data event signal has been input. The upper layer that has received the unprocessed data notification detects the data amount (data length) of the unprocessed received data by calculating the distance in the data storage reverse direction from the head pointer to the second tail pointer.

図10は、本実施の形態に係る受信装置200の動作(その2)を示し、受信装置200が送信装置100によって送信されたパケットを受信する際の動作を示す。   FIG. 10 shows the operation (part 2) of receiving apparatus 200 according to the present embodiment, and shows the operation when receiving apparatus 200 receives a packet transmitted by transmitting apparatus 100.

ステップS1002では、システム制御部272は、省電力動作モードに設定する。省電力動作モードでは、大規模なRAMには電源が供給されず、小規模なRAMの使用ができると仮定する。また、省電力動作モードにおいては、受信装置200を搭載する装置の電源は切られており、受信データを処理する機能は働いていないと仮定する。ここで、装置の一例は、プリンターなどの消費電力が非常に大きく、稼動しているとき以外は装置の電源を切断し、受信装置200の電源のみを投入しておくような装置を想定する。   In step S1002, the system control unit 272 sets the power saving operation mode. In the power saving operation mode, it is assumed that power is not supplied to a large-scale RAM and a small-scale RAM can be used. In the power saving operation mode, it is assumed that the power supply of the device on which the receiving device 200 is mounted is turned off and the function of processing the received data is not working. Here, an example of the apparatus is assumed to be an apparatus that consumes a large amount of power, such as a printer, and that the apparatus is turned off and only the receiving apparatus 200 is turned on except when the apparatus is in operation.

ステップS1004では、システム制御部272は、第1のテイルポインタを設定し、該第1のテイルポインタを第1のテイルポインタ設定部266に入力する。   In step S1004, the system control unit 272 sets the first tail pointer, and inputs the first tail pointer to the first tail pointer setting unit 266.

ステップS1006では、システム制御部272は、選択部264に、第1のテイルポインタ設定部266によって設定される第1のテイルポインタを選択するように設定するテイルポインタ選択信号を選択部264に入力する。   In step S <b> 1006, the system control unit 272 inputs a tail pointer selection signal that is set to the selection unit 264 so as to select the first tail pointer set by the first tail pointer setting unit 266. .

ステップS1008では、パケット受信部254は送信装置100によって送信されたパケットを受信する。   In step S <b> 1008, the packet receiving unit 254 receives the packet transmitted by the transmission device 100.

ステップS1010では、受信データ量算出部262は、受信データがあるか否かを判断する。受信データ量算出部262は、ヘッドポインタと第2のテイルポインタとが一致するか否かに基づいて、受信データがあるか否かを判断する。   In step S1010, the reception data amount calculation unit 262 determines whether there is reception data. The reception data amount calculation unit 262 determines whether there is reception data based on whether the head pointer matches the second tail pointer.

ステップS1012では、ステップS1010で受信データがあると判断した場合、システム制御部272は、上位層に対して、引き取られていない未処理の受信データがあることを示す未処理データ通知を送信する。   In step S1012, when it is determined that there is received data in step S1010, the system control unit 272 transmits an unprocessed data notification indicating that there is unprocessed received data that has not been collected to the upper layer.

ステップS1014では、システム制御部272は、上位層によって通知される第2のテイルポインタを第2のテイルポインタ設定部268に設定する。   In step S1014, the system control unit 272 sets the second tail pointer notified by the upper layer in the second tail pointer setting unit 268.

ステップS1016では、ステップS1014の処理が終了した後、またはステップS1010において受信データがないと判断した場合、バッファ空き容量算出部258は、ヘッドポインタと第1のテイルポインタとに基づいてバッファ空き容量を算出する。   In step S1016, after the process of step S1014 is completed or when it is determined in step S1010 that there is no received data, the buffer free space calculation unit 258 calculates the buffer free space based on the head pointer and the first tail pointer. calculate.

ステップS1018では、プロトコル処理部256は、バッファ空き容量算出部258によって算出されたバッファ空き容量を表す情報を付帯したACKなどのIPパケットを作成し、パケット送信部252から送信する。   In step S <b> 1018, the protocol processing unit 256 creates an IP packet such as an ACK accompanied by information indicating the buffer free space calculated by the buffer free space calculation unit 258, and transmits the IP packet from the packet transmission unit 252.

図10に示されるフローチャートのステップS1010において、受信データ量算出部262によって、受信データがあると判断された場合に、以下の処理を行うようにしてもよい。受信データ量算出部262は、受信データの先頭部分などの一部分に示されるメッセージに含まれる受信データ量に基づいて、省電力動作モードを継続するか、通常動作モードに移行するかを判断する。受信データ量に基づいて、受信データ量算出部262は、少量のデータ交換で完了し、且つ受信装置200を搭載する装置によるデータ処理が必要ないか、受信装置200を搭載する装置によるデータ処理を必要とするかを判断する。受信データ量算出部262は、受信装置200を搭載する装置によるデータ処理が必要ない通信データである場合には省電力動作モードを継続すると判断し、受信装置200を搭載する装置によるデータ処理を必要とする通信データである場合には通常動作モードに移行すると判断する。受信データ量算出部262は、該判断結果をシステム制御部272に通知する。   In step S1010 of the flowchart shown in FIG. 10, when the received data amount calculation unit 262 determines that there is received data, the following processing may be performed. The reception data amount calculation unit 262 determines whether to continue the power saving operation mode or shift to the normal operation mode based on the reception data amount included in a message indicated in a part such as a head portion of the reception data. Based on the received data amount, the received data amount calculation unit 262 completes the data exchange with a small amount of data and does not require data processing by the device on which the receiving device 200 is mounted, or performs data processing by the device on which the receiving device 200 is mounted. Determine what you need. The received data amount calculation unit 262 determines that the power saving operation mode is to be continued when the communication data does not require data processing by the device on which the receiving device 200 is mounted, and requires data processing by the device on which the receiving device 200 is mounted. Is determined to shift to the normal operation mode. The received data amount calculation unit 262 notifies the system control unit 272 of the determination result.

システム制御部272は、受信データ量算出部262によって通知される判断結果に基づいて、省電力動作モードを継続する場合には、ステップS1012以降の処理を行う。一方、システム制御部272は、通常動作モードに移行する場合には、受信装置200を搭載する装置に電源を投入するとともに、再起動要求を実施し(1)、大規模RAMに電源を投入する(2)。さらに、システム制御部272は、該装置が再起動したか否かを確認するとともに、大規模RAMの稼動を確認する(3)。さらに、システム制御部272は、大規模RAMの稼動を確認できた場合に、小規模RAMに格納した受信データを該大規模RAMに転送するとともに(4)、ヘッドポインタ、および第2のテイルポインタによって指し示されるアドレスに対応する物理アドレスにDMA制御部260における写像設定を行うことによって、小規模RAMから大規模RAMへの切り替えを行う(5)。その後、受信装置200は、図7に示した処理を実行する。   When continuing the power saving operation mode based on the determination result notified by the received data amount calculation unit 262, the system control unit 272 performs the processing from step S1012. On the other hand, when the system control unit 272 shifts to the normal operation mode, the system control unit 272 powers on the device on which the receiving device 200 is mounted, issues a restart request (1), and powers on the large-scale RAM. (2). Further, the system control unit 272 confirms whether or not the device has been restarted and confirms the operation of the large-scale RAM (3). Further, when the operation of the large-scale RAM can be confirmed, the system control unit 272 transfers the received data stored in the small-scale RAM to the large-scale RAM (4), the head pointer, and the second tail pointer. Is switched from the small RAM to the large RAM by setting the mapping in the DMA control unit 260 to the physical address corresponding to the address indicated by (5). Thereafter, the receiving apparatus 200 executes the processing illustrated in FIG.

上記において、(1)−(3)の処理には相当の時間を要するが、この期間では、送信装置100には第1のテイルポインタに基づいて算出されるバッファ空き容量が公告され、送信装置100は、該バッファ空き容量にしたがってパケットを送信する。このため、該パケットに付帯されるデータ量は少なく、受信装置200では大規模な受信データが発生しない。一方、通常動作モードに復帰した後は、送信装置100には第2のテイルポインタに基づいて算出されるバッファの空き容量が公告され、送信装置100は、該バッファ空き容量にしたがってパケットを送信する。このため、該パケットに付帯されるデータ量は多く、大規模な受信データが発生する。このように、受信データ量に基づいて、省電力動作モードから通常動作モードへ復帰することが可能である。   In the above, the processing of (1)-(3) takes a considerable time. During this period, the transmitting device 100 is notified of the buffer free space calculated based on the first tail pointer, and the transmitting device 100 transmits a packet according to the buffer free capacity. For this reason, the amount of data attached to the packet is small, and the reception device 200 does not generate large-scale reception data. On the other hand, after returning to the normal operation mode, the transmission device 100 is notified of the free space of the buffer calculated based on the second tail pointer, and the transmission device 100 transmits a packet according to the free space of the buffer. . For this reason, the amount of data attached to the packet is large, and large-scale received data is generated. Thus, it is possible to return from the power saving operation mode to the normal operation mode based on the amount of received data.

本実施の形態に係る受信装置によれば、ヘッドポインタに対して所定のデータ量に相当するアドレスだけ離したアドレスに第1のテイルポインタを設定し、該第1のテイルポインタを使用してリングバッファの空き容量を算出することによって、実際の空き容量よりも小さく算出できる。このため、受信装置は、送信装置に実際の空き容量よりも小さい空き容量を受信可能なデータ量として通知でき、送信装置からのデータの受信速度をTCPフロー制御機能を用いて制限できる。   According to the receiving apparatus according to the present embodiment, the first tail pointer is set at an address separated from the head pointer by an address corresponding to a predetermined amount of data, and the ring is created using the first tail pointer. By calculating the free capacity of the buffer, it can be calculated smaller than the actual free capacity. For this reason, the receiving apparatus can notify the transmitting apparatus of a free capacity smaller than the actual free capacity as a receivable data amount, and can limit the reception speed of data from the transmitting apparatus using the TCP flow control function.

<第2の実施の形態>
本実施の形態に係る通信システムは図1を適用でき、フレーム構成は図2を適用できる。ただし、図1に示される通信システムにおいて、受信装置200の代わりに受信装置300を有する。
<Second Embodiment>
1 can be applied to the communication system according to this embodiment, and FIG. 2 can be applied to the frame configuration. However, the communication system shown in FIG. 1 includes a receiving device 300 instead of the receiving device 200.

本実施の形態に係る受信装置300のハードウエア構成は、図3を適用できる。   FIG. 3 can be applied to the hardware configuration of receiving apparatus 300 according to the present embodiment.

<受信装置300の機能構成>
図11は、本実施の形態に係る受信装置300を示す。受信装置300は、パケット送信部352と、パケット受信部354と、プロトコル処理部356と、バッファ空き容量算出部358と、DMA制御部360と、受信データ量算出部362と、選択部364と、第1のテイルポインタ設定部366と、第2のテイルポインタ設定部368と、記憶部370と、システム制御部372とを有する。これら各部は、図3に示されている各構成要素のいずれかが、フラッシュメモリ210からRAM206上に展開されたプログラムに従ったCPU202からの命令によって動作することで実現される機能が含まれる。また、受信装置300は、図3に示されているROM204、RAM206、フラッシュメモリ210によって構築される記憶部370を有している。
<Functional configuration of receiving apparatus 300>
FIG. 11 shows receiving apparatus 300 according to the present embodiment. The reception apparatus 300 includes a packet transmission unit 352, a packet reception unit 354, a protocol processing unit 356, a buffer free space calculation unit 358, a DMA control unit 360, a received data amount calculation unit 362, a selection unit 364, A first tail pointer setting unit 366, a second tail pointer setting unit 368, a storage unit 370, and a system control unit 372 are included. Each of these units includes a function realized by any one of the components shown in FIG. 3 operating according to a command from the CPU 202 according to a program expanded from the flash memory 210 onto the RAM 206. In addition, the receiving apparatus 300 includes a storage unit 370 constructed by the ROM 204, the RAM 206, and the flash memory 210 shown in FIG.

<受信装置300の各機能構成>
パケット送信部352、パケット受信部354、プロトコル処理部356、バッファ空き容量算出部358、DMA制御部360、受信データ量算出部362、選択部364、第1のテイルポインタ設定部366、第2のテイルポインタ設定部368、および記憶部370は、図4を参照して説明した受信装置200を適用できる。
<Each functional configuration of receiving apparatus 300>
Packet transmission unit 352, packet reception unit 354, protocol processing unit 356, buffer free space calculation unit 358, DMA control unit 360, received data amount calculation unit 362, selection unit 364, first tail pointer setting unit 366, second The tail pointer setting unit 368 and the storage unit 370 can apply the receiving device 200 described with reference to FIG.

本実施の形態に係る受信装置200のシステム制御部372は、演算回路、比較回路などのハードウェアや、CPU202からの命令によって実現される。システム制御部372は、受信データ量算出部362、およびシステムバス350と接続される。システム制御部372は、受信データ量算出部362によって入力される受信データイベント信号、および受信データ量信号と、記憶部370のリングバッファ領域に格納されるデータ量に基づいて、ヘッドポインタの位置を把握する。   The system control unit 372 of the receiving apparatus 200 according to the present embodiment is realized by hardware such as an arithmetic circuit and a comparison circuit, and a command from the CPU 202. The system control unit 372 is connected to the received data amount calculation unit 362 and the system bus 350. The system control unit 372 determines the position of the head pointer based on the reception data event signal and the reception data amount signal input by the reception data amount calculation unit 362 and the data amount stored in the ring buffer area of the storage unit 370. To grasp.

システム制御部372は、記憶部370のリングバッファ領域に格納されたデータに基づいて、アプリケーション層などの上位層によって引き取りされていない未処理データがある場合に、上位層に対して、引き取りされていない未処理の受信データがあることを示す未処理データ通知を通知する。上位層は、システム制御部372によって未処理データ通知が通知されると、記憶部270のリングバッファ領域に格納された未処理データを引き取る。上位層は、引き取った未処理データ量に応じて第2のテイルポインタをずらすことによって変更し、変更した第2のテイルポインタをシステム制御部372に通知する。システム制御部372は、上位層によって通知される第2のテイルポインタを第2のテイルポインタ設定部368に設定する。   Based on the data stored in the ring buffer area of the storage unit 370, the system control unit 372 receives the unprocessed data that has not been collected by the upper layer such as the application layer, and has received the data for the upper layer. Notify unprocessed data notification indicating that there is no unprocessed received data. When the system control unit 372 notifies the unprocessed data notification, the upper layer takes over the unprocessed data stored in the ring buffer area of the storage unit 270. The upper layer changes the second tail pointer by shifting the second tail pointer according to the amount of unprocessed data taken, and notifies the system control unit 372 of the changed second tail pointer. The system control unit 372 sets the second tail pointer notified by the upper layer in the second tail pointer setting unit 368.

さらに、システム制御部372は、受信装置300が通常動作モードである場合には選択部364に第2のテイルポインタ設定部368に設定される第2のテイルポインタを選択するように設定するテイルポインタ選択信号を選択部364に入力する。また、システム制御部372は、受信装置300が通常動作モードから省電力動作モードに移行した場合に、第1のテイルポインタ設定部366に第1のテイルポインタを設定する。例えば、システム制御部372は、第1のテイルポインタとして、現在のヘッドポインタから5バイトから20バイト程度、より好ましくは10バイト程度先頭アドレスから最終アドレスに向かう方向に設定する。さらに、システム制御部372は、受信装置300が省電力動作モードである場合には選択部364に第1のテイルポインタ設定部366に設定される第1のテイルポインタを選択するように設定するテイルポインタ選択信号を選択部364に入力する。   Further, the system control unit 372 sets the tail pointer to be set so that the selection unit 364 selects the second tail pointer set in the second tail pointer setting unit 368 when the receiving apparatus 300 is in the normal operation mode. A selection signal is input to the selection unit 364. In addition, the system control unit 372 sets the first tail pointer in the first tail pointer setting unit 366 when the receiving apparatus 300 shifts from the normal operation mode to the power saving operation mode. For example, the system control unit 372 sets the first tail pointer from the current head pointer to about 5 to 20 bytes, more preferably about 10 bytes in the direction from the head address to the last address. Furthermore, the system control unit 372 sets the tail to be set so that the selection unit 364 selects the first tail pointer set in the first tail pointer setting unit 366 when the receiving apparatus 300 is in the power saving operation mode. A pointer selection signal is input to the selection unit 364.

さらに、システム制御部372は、通常動作モードから省電力動作モードに移行し、第1のテイルポインタ設定部366に第1のテイルポインタを設定した後に、送信装置100によってヘッドポインタと第1のテイルポインタに基づいて算出されるデータ量以上のデータが送信される場合、現在のヘッドポインタから5バイトから20バイト程度、より好ましくは10バイト程度先頭アドレスから最終アドレスに向かう方向に第1のテイルポインタをさらに変更する。これによって、受信装置200は、送信装置100によって送信されるパケットをさらに受信できる。   Further, the system control unit 372 shifts from the normal operation mode to the power saving operation mode, sets the first tail pointer in the first tail pointer setting unit 366, and then transmits the head pointer and the first tail by the transmission device 100. When data larger than the amount of data calculated based on the pointer is transmitted, the first tail pointer extends from the current head pointer to about 5 to 20 bytes, more preferably about 10 bytes in the direction from the first address to the last address. Change further. Thereby, the receiving apparatus 200 can further receive a packet transmitted by the transmitting apparatus 100.

通常動作モードから省電力動作モードに移行し、第1のテイルポインタ設定部366にヘッドポインタから所定のアドレスずらした位置に第1のテイルポインタが設定されると、送信装置100から受信できるデータは、そのずらした位置に相当するデータ量に制限される。この場合、送信装置100によって該データ量以下のデータが送信される場合に対応できる。しかし、送信装置100によって該データ量以上のデータが送信される場合には対応できないため、第1のテイルポインタの位置をさらに変更する。   When shifting from the normal operation mode to the power saving operation mode and the first tail pointer is set at a position shifted from the head pointer by a predetermined address in the first tail pointer setting unit 366, the data that can be received from the transmission device 100 is The amount of data corresponding to the shifted position is limited. In this case, it is possible to cope with a case where data equal to or less than the data amount is transmitted by the transmission device 100. However, since it cannot cope with the case where data larger than the data amount is transmitted by the transmission device 100, the position of the first tail pointer is further changed.

通常動作モードから省電力動作モードに移行し、第1のテイルポインタ設定部366に設定される第1のテイルポインタの位置をヘッドポインタから大きくずらした場合、省電力動作モードから通常動作モードへ復帰する際に、小規模RAMから大規模RAMへのデータ転送量が多くなるため、非効率となる。このため、通常動作モードから省電力動作モードに移行し、第1のテイルポインタ設定部366に設定される第1のテイルポインタの位置をヘッドポインタから小さくずらして、送信装置100によってそのずらした位置に対応するデータ量以上のデータが送信される場合には、さらにずらすのが好ましい。   When the normal operation mode is shifted to the power saving operation mode and the position of the first tail pointer set in the first tail pointer setting unit 366 is largely shifted from the head pointer, the power saving operation mode is returned to the normal operation mode. In doing so, the amount of data transferred from the small-scale RAM to the large-scale RAM increases, which is inefficient. For this reason, the normal operation mode is shifted to the power saving operation mode, the position of the first tail pointer set in the first tail pointer setting unit 366 is slightly shifted from the head pointer, and the position shifted by the transmission device 100 is changed. When data larger than the data amount corresponding to is transmitted, it is preferable to further shift.

本実施の形態によれば、省電力動作モードであっても、受信装置200は、送信装置100によって送信されるデータ量に応じて、受信できるデータ量を変更できる。   According to the present embodiment, even in the power saving operation mode, receiving device 200 can change the amount of data that can be received in accordance with the amount of data transmitted by transmitting device 100.

図12は、省電力動作モードに設定する場合に、第1のテイルポインタを設定しないで、第2のテイルポインタをずらすことによって対応した例を示す。第2のテイルポインタは、ヘッドポインタのデータ格納順方向において直前に設定される。このようにした場合、上位層によって引き取られていない未処理の受信データの量が多く、リングバッファの未使用領域が少ないように見えてしまう問題がある。また、第2のテイルポインタとヘッドポインタとが不一致であるため、受信データがリングバッファ上に存在しないにも拘らず、上位層に対して未処理の受信データが存在することを示す通知が発行される問題がある。また、未処理の受信データのデータ量が、ヘッドポインタと第2のテイルポインタとから求めることができないため、未処理の受信データの判定処理が非常に複雑となる。   FIG. 12 shows an example in which the second tail pointer is shifted without setting the first tail pointer when the power saving operation mode is set. The second tail pointer is set immediately before in the data storage forward direction of the head pointer. In such a case, there is a problem that the amount of unprocessed received data that has not been taken over by the upper layer is large and the unused area of the ring buffer appears to be small. Also, because the second tail pointer does not match the head pointer, a notification indicating that unprocessed received data exists is issued to the upper layer even though the received data does not exist on the ring buffer. There is a problem. In addition, since the amount of unprocessed received data cannot be obtained from the head pointer and the second tail pointer, the determination process of unprocessed received data becomes very complicated.

本実施の形態によれば、第2のテイルポインタに加えて、第1のテイルポインタを設定できるため、上位層によって引き取られていない未処理の受信データの量があるか否かの判定ができるとともに、送信装置に公告するバッファの空き容量も小さく算出できる。   According to the present embodiment, since the first tail pointer can be set in addition to the second tail pointer, it is possible to determine whether or not there is an amount of unprocessed received data that has not been collected by the upper layer. At the same time, the free space of the buffer that is notified to the transmitting device can be calculated small.

受信装置用の各プログラムは、インストール可能な形式または実行可能な形式のファイルによって、コンピュータで読み取り可能な記録媒体に記録されて流通されるようにしてもよい。また、上記記録媒体の他の例として、CD−R(Compact Disc Recordable)、DVD(Digital Versatile Disk)、ブルーレイディスク等が挙げられる。また、上記実施の形態の各プログラムが記憶されたCD−ROM等の記録媒体、並びに、これらプログラムが記憶されたフラッシュメモリは、プログラム製品(Program Product)として、国内または国外へ提供されることができる。   Each program for the receiving device may be recorded and distributed on a computer-readable recording medium by a file in an installable or executable format. Other examples of the recording medium include CD-R (Compact Disc Recordable), DVD (Digital Versatile Disk), and Blu-ray Disc. In addition, a recording medium such as a CD-ROM in which the programs of the above-described embodiments are stored, and a flash memory in which these programs are stored may be provided domestically or abroad as a program product (Program Product). it can.

また、通信システムを構成する送信装置100、および受信装置200は、相互に通信可能なものに適用できる。例えば、送信装置100、および受信装置200は、IP(Internet Protocol)電話機や、インターネット電話機、PC(Personal Computer)等に搭載することなどによって適用してもよい。さらに、送信装置100、および受信装置200は、スマートフォン、携帯電話機、カーナビゲーション端末、ウェアラブルコンピュータ、プロジェクタ、監視カメラ、電子黒板、電子看板(デジタルサイネージ)、ゲーム機、または、通信機能を備えた産業用機器に搭載することによって適用してもよい。ウェアラブルコンピュータには、腕時計型のものやヘッドマウントディスプレイ等が含まれる。また、産業用機器には、MFP(Multifunction Peripheral/Printer/Product)等のオフィス機器、内視鏡等の医療用機器、耕運機等の農業用機器などが含まれる。   Further, the transmission device 100 and the reception device 200 constituting the communication system can be applied to devices that can communicate with each other. For example, the transmission device 100 and the reception device 200 may be applied by being mounted on an IP (Internet Protocol) telephone, an Internet telephone, a PC (Personal Computer), or the like. Furthermore, the transmission device 100 and the reception device 200 are a smartphone, a mobile phone, a car navigation terminal, a wearable computer, a projector, a surveillance camera, an electronic blackboard, an electronic signboard (digital signage), a game machine, or an industry having a communication function. You may apply by mounting in the apparatus for business. The wearable computer includes a wrist watch type, a head mounted display, and the like. Industrial equipment includes office equipment such as an MFP (Multifunction Peripheral / Printer / Product), medical equipment such as an endoscope, and agricultural equipment such as a cultivator.

更に、例えば、端末に受信装置200が搭載され、そのアプリが自らセンターのサーバにアクセスして、各種データを送信したり取得する場合にも適用される。この場合、相手側が、端末ではなく、サーバの場合もあり得る。   Furthermore, for example, the present invention is also applied to a case where the receiving device 200 is mounted on a terminal and the application itself accesses the center server to transmit or acquire various data. In this case, the other party may be a server instead of a terminal.

上述した実施の形態において、受信装置は通信装置の一例であり、パケット受信部は受信部の一例であり、受信装置用プログラムは通信制御プログラムの一例である。   In the above-described embodiments, the receiving device is an example of a communication device, the packet receiving unit is an example of a receiving unit, and the receiving device program is an example of a communication control program.

本発明は特定の実施例、変形例を参照しながら説明されてきたが、各実施例、変形例は単なる例示に過ぎず、当業者は様々な変形例、修正例、代替例、置換例などを理解するであろう。説明の便宜上、本発明の実施例に従った装置は機能的なブロック図を用いて説明されたが、そのような装置はハードウェアで、ソフトウエアでまたはそれらの組み合わせで実現されてもよい。本発明は上記実施例に限定されず、本発明の精神から逸脱することなく、様々な変形例、修正例、代替例、置換例などが包含される。   Although the present invention has been described with reference to specific embodiments and modifications, each embodiment and modification is merely an example, and those skilled in the art will recognize various modifications, modifications, alternatives, substitutions, and the like. Will understand. For convenience of explanation, an apparatus according to an embodiment of the present invention has been described using a functional block diagram, but such an apparatus may be implemented in hardware, software, or a combination thereof. The present invention is not limited to the above embodiments, and various modifications, modifications, alternatives, substitutions, and the like are included without departing from the spirit of the present invention.

50 ネットワーク
100 送信装置
200、300 受信装置
202 CPU
204 ROM
206 RAM
208 SSD
210 フラッシュメモリ
212 ネットワークI/F
252、352 パケット送信部
254、354 パケット受信部
256、356 プロトコル処理部
258、358 バッファ空き容量算出部
260、360 DMA制御部
262、362 受信データ量算出部
264、364 選択部
266、366 第1のテイルポインタ設定部
268、368 第2のテイルポインタ設定部
270、370 記憶部
272、372 システム制御部
50 Network 100 Transmitting device 200, 300 Receiving device 202 CPU
204 ROM
206 RAM
208 SSD
210 Flash memory 212 Network I / F
252 and 352 Packet transmission unit 254 and 354 Packet reception unit 256 and 356 Protocol processing unit 258 and 358 Buffer free space calculation unit 260 and 360 DMA control unit 262 and 362 Received data amount calculation unit 264 and 364 Selection unit 266 and 366 First Tail pointer setting unit 268, 368 second tail pointer setting unit 270, 370 storage unit 272, 372 system control unit

特開2014−158241号公報JP 2014-158241 A

Claims (7)

バイトストリームでデータ通信を行うプロトコルにしたがって動作する通信装置であって、
他の通信装置によって送信されたデータを受信する受信部と、
該受信部によって受信したデータを格納するリングバッファ領域を有する記憶部と、
前記受信部によって受信したデータに基づいて、該データを前記リングバッファ領域に格納した場合に次に受信するデータの書き込み位置を示すヘッドポインタを検出するプロトコル処理部と、
受信可能なデータ量を算出する際に使用する第1のテイルポインタと、上位層によって処理されていないデータ量を算出する際に使用する第2のテイルポインタとを設定するシステム制御部と、
該システム制御部によって設定する前記第1のテイルポインタ、および前記第2のテイルポインタのいずれかを選択する選択部と、
前記プロトコル処理部によって算出したヘッドポインタと、前記選択部によって選択した前記第1のテイルポインタおよび前記第2のテイルポインタのいずれかとに基づいて、前記他の通信装置に公告する前記リングバッファ領域の空き容量を算出する空き容量算出部と、
前記空き容量算出部によって算出した前記リングバッファ領域の空き容量を前記他の通信装置に公告する送信部と
を有する、通信装置。
A communication device that operates according to a protocol for performing data communication in a byte stream,
A receiving unit for receiving data transmitted by another communication device;
A storage unit having a ring buffer area for storing data received by the receiving unit;
A protocol processing unit for detecting a head pointer indicating a write position of data to be received next when the data is stored in the ring buffer area based on the data received by the receiving unit;
A system control unit that sets a first tail pointer that is used when calculating the amount of receivable data and a second tail pointer that is used when calculating the amount of data not processed by an upper layer;
A selection unit for selecting one of the first tail pointer and the second tail pointer set by the system control unit;
Based on the head pointer calculated by the protocol processing unit and either the first tail pointer or the second tail pointer selected by the selection unit, the ring buffer area to be notified to the other communication device A free space calculation unit for calculating free space;
A communication device, comprising: a transmission unit that advertises the free space in the ring buffer area calculated by the free space calculation unit to the other communication device.
前記システム制御部は、前記通信装置の動作状態に応じて、前記選択部に前記第1のテイルポインタおよび前記第2のテイルポインタのうちのいずれかを選択させる、請求項1に記載の通信装置。   The communication device according to claim 1, wherein the system control unit causes the selection unit to select one of the first tail pointer and the second tail pointer in accordance with an operation state of the communication device. . 前記システム制御部は、前記通信装置が省電力動作モードの場合には前記選択部に前記第1のテイルポインタを選択させ、前記通信装置が通常動作モードの場合には前記選択部に前記第2のテイルポインタを選択させる、請求項2に記載の通信装置。   The system control unit causes the selection unit to select the first tail pointer when the communication device is in a power saving operation mode, and causes the selection unit to select the second tail pointer when the communication device is in a normal operation mode. The communication apparatus according to claim 2, wherein the tail pointer is selected. 前記システム制御部は、前記第1のテイルポインタを、前記他の通信装置によって送信されるデータ量に応じて変更する、請求項請求項1ないし3のいずれか1項に記載の通信装置。   4. The communication device according to claim 1, wherein the system control unit changes the first tail pointer according to an amount of data transmitted by the other communication device. 5. 前記プロトコル処理部によって検出した前記ヘッドポインタと、前記システム制御部によって設定した前記第2のテイルポインタとに基づいて、受信データ量を算出する受信データ量算出部
を有し、
前記システム制御部は、前記受信データ量算出部によって算出された受信データ量に基づいて、前記上位層に引き取られていない受信データがあることを通知する、請求項1ないし3のいずれか1項に記載の通信装置。
A received data amount calculating unit that calculates a received data amount based on the head pointer detected by the protocol processing unit and the second tail pointer set by the system control unit;
4. The system control unit according to claim 1, wherein the system control unit notifies that there is received data that has not been collected in the higher layer, based on the received data amount calculated by the received data amount calculating unit. 5. The communication apparatus as described in.
バイトストリームでデータ通信を行うプロトコルにしたがって動作する通信装置に、
他の通信装置によって送信されたデータを受信させ、
該受信したデータに基づいて、受信したデータを格納するリングバッファ領域を有する記憶部に格納した場合に次に受信するデータの書き込み位置を示すヘッドポインタを検出させ、
受信可能なデータ量を算出する際に使用する第1のテイルポインタと、上位層によって処理されていないデータ量を算出する際に使用する第2のテイルポインタとを設定させ、
該設定させる前記第1のテイルポインタ、および前記第2のテイルポインタのいずれかを選択させ、
前記ヘッドポインタと、前記第1のテイルポインタおよび前記第2のテイルポインタのいずれかとに基づいて、前記他の通信装置に公告する前記リングバッファ領域の空き容量を算出させ、
該前記リングバッファ領域の空き容量を前記他の通信装置に公告させる、通信制御プログラム。
To a communication device that operates according to a protocol that performs data communication with a byte stream,
Receive data sent by other communication devices,
Based on the received data, when stored in a storage unit having a ring buffer area for storing received data, a head pointer indicating a write position of data to be received next is detected,
Setting a first tail pointer used when calculating the amount of receivable data and a second tail pointer used when calculating the amount of data not processed by the upper layer;
Selecting one of the first tail pointer and the second tail pointer to be set;
Based on the head pointer and one of the first tail pointer and the second tail pointer, the free capacity of the ring buffer area to be advertised to the other communication device is calculated,
A communication control program for causing the other communication device to advertise the free capacity of the ring buffer area.
バイトストリームでデータ通信を行うプロトコルにしたがって動作する通信装置によって実行される通信制御方法であって、
他の通信装置によって送信されたデータを受信し、
該受信したデータに基づいて、該データをリングバッファ領域を有する記憶部に格納した場合に次に受信するデータの書き込み位置を示すヘッドポインタを検出し、
受信可能なデータ量を算出する際に使用する第1のテイルポインタと、上位層によって処理されていないデータ量を算出する際に使用する第2のテイルポインタとを設定し、
前記第1のテイルポインタ、および前記第2のテイルポインタのいずれかを選択し、
前記ヘッドポインタと、前記第1のテイルポインタおよび前記第2のテイルポインタのいずれかとに基づいて、前記他の通信装置に公告する前記リングバッファ領域の空き容量を算出し、
前記リングバッファ領域の空き容量を前記他の通信装置に公告する、通信制御方法。
A communication control method executed by a communication device operating according to a protocol for performing data communication in a byte stream,
Receive data sent by other communication devices,
Based on the received data, when the data is stored in a storage unit having a ring buffer area, a head pointer indicating a write position of data to be received next is detected,
Setting a first tail pointer used when calculating the amount of receivable data and a second tail pointer used when calculating the amount of data not processed by the upper layer;
Selecting one of the first tail pointer and the second tail pointer;
Based on the head pointer and either the first tail pointer or the second tail pointer, the free capacity of the ring buffer area to be advertised to the other communication device is calculated,
A communication control method for notifying the free space of the ring buffer area to the other communication device.
JP2015053684A 2015-03-17 2015-03-17 COMMUNICATION DEVICE, COMMUNICATION CONTROL PROGRAM, AND COMMUNICATION CONTROL METHOD Expired - Fee Related JP6458574B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015053684A JP6458574B2 (en) 2015-03-17 2015-03-17 COMMUNICATION DEVICE, COMMUNICATION CONTROL PROGRAM, AND COMMUNICATION CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015053684A JP6458574B2 (en) 2015-03-17 2015-03-17 COMMUNICATION DEVICE, COMMUNICATION CONTROL PROGRAM, AND COMMUNICATION CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2016174292A true JP2016174292A (en) 2016-09-29
JP6458574B2 JP6458574B2 (en) 2019-01-30

Family

ID=57009300

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015053684A Expired - Fee Related JP6458574B2 (en) 2015-03-17 2015-03-17 COMMUNICATION DEVICE, COMMUNICATION CONTROL PROGRAM, AND COMMUNICATION CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP6458574B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257645A (en) * 2021-11-23 2022-03-29 北京谊安医疗系统股份有限公司 Embedded modular communication system and communication method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001094613A (en) * 1999-09-21 2001-04-06 Canon Inc Communication controller, method and recording medium
JP2005092764A (en) * 2003-09-19 2005-04-07 Ricoh Co Ltd Image forming apparatus, interface board, interface chip, and information processor
JP2007259374A (en) * 2006-03-27 2007-10-04 Matsushita Electric Ind Co Ltd Network transmitter/receiver
JP2014042110A (en) * 2012-08-21 2014-03-06 Fujitsu Semiconductor Ltd Data transfer device, data transfer method, and semiconductor device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001094613A (en) * 1999-09-21 2001-04-06 Canon Inc Communication controller, method and recording medium
JP2005092764A (en) * 2003-09-19 2005-04-07 Ricoh Co Ltd Image forming apparatus, interface board, interface chip, and information processor
JP2007259374A (en) * 2006-03-27 2007-10-04 Matsushita Electric Ind Co Ltd Network transmitter/receiver
JP2014042110A (en) * 2012-08-21 2014-03-06 Fujitsu Semiconductor Ltd Data transfer device, data transfer method, and semiconductor device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257645A (en) * 2021-11-23 2022-03-29 北京谊安医疗系统股份有限公司 Embedded modular communication system and communication method thereof

Also Published As

Publication number Publication date
JP6458574B2 (en) 2019-01-30

Similar Documents

Publication Publication Date Title
EP3720019B1 (en) Internet of things data transmission method, device and system
JP6387370B2 (en) Electronic device and method of operating electronic device
CN109271327B (en) Memory management method and device
JP6475256B2 (en) Computer, control device and data processing method
US20150256988A1 (en) Method, terminal, server, and system for audio signal transmission
JP6431260B2 (en) Method and system for sending an email with a large file attached on a mobile device
US9665317B2 (en) Image forming system for exchanging location and processing information of a job using short-range communication
US20100050006A1 (en) Communication apparatus, power supply control method, display apparatus, communication method, and computer program product
JP4452690B2 (en) Electronic device, control method thereof, host device and control method thereof
JP5255035B2 (en) Failover system, storage processing apparatus, and failover control method
JP2010015475A (en) Information processing terminal and client server system
EP3805938B1 (en) Server node selection method and terminal device
JP6458574B2 (en) COMMUNICATION DEVICE, COMMUNICATION CONTROL PROGRAM, AND COMMUNICATION CONTROL METHOD
JP6172296B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
JP2012156645A (en) Information processor, communication apparatus, and control method therefor
JP2006109466A (en) Message transmitting apparatus and method in mobile communication terminal
JP5632733B2 (en) Display device, screen image transfer method, and program
US11882015B2 (en) Estimation system, addition apparatus, estimation method, addition method, estimation program and addition program
CN103117955A (en) Method, device and system of message transmission
US20150341678A1 (en) Video supply apparatus, video obtaining apparatus, control methods thereof, and video supply system
CN112291285A (en) File transmission method and device for cloud desktop and terminal peripheral equipment
JP4630798B2 (en) COMMUNICATION CONTROL DEVICE, ITS CONTROL METHOD, AND COMMUNICATION CONTROL METHOD
JP2008109471A (en) Lan system, transmitter, receiver, lan system control method, program and multiple frames
JP2020013324A (en) Settlement system, settlement terminal, service provider terminal, user terminal, information processing method, and program
JP6575082B2 (en) COMMUNICATION DEVICE, COMMUNICATION CONTROL PROGRAM, AND COMMUNICATION CONTROL METHOD

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180208

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

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181130

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181210

R151 Written notification of patent or utility model registration

Ref document number: 6458574

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees