JPH032950A - Reception buffer control system - Google Patents

Reception buffer control system

Info

Publication number
JPH032950A
JPH032950A JP1136583A JP13658389A JPH032950A JP H032950 A JPH032950 A JP H032950A JP 1136583 A JP1136583 A JP 1136583A JP 13658389 A JP13658389 A JP 13658389A JP H032950 A JPH032950 A JP H032950A
Authority
JP
Japan
Prior art keywords
pointer
buffer
block
data
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1136583A
Other languages
Japanese (ja)
Inventor
Takeshi Suzuki
武 鈴木
Kenji Tsubata
津幡 憲二
Naoyuki Kaneko
金子 尚之
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.)
Hewlett Packard Japan Inc
Original Assignee
Yokogawa Hewlett Packard 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 Yokogawa Hewlett Packard Ltd filed Critical Yokogawa Hewlett Packard Ltd
Priority to JP1136583A priority Critical patent/JPH032950A/en
Publication of JPH032950A publication Critical patent/JPH032950A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To prevent a process carried out at the reception side from progressing up to an unfixed part of the data stored in a reception buffer in a simple constitution by providing a means which shows the boundary position between the readable and unreadable parts of the written reception data. CONSTITUTION:A pointer RF is provided for control of a reception buffer 10 and points a boundary between a part which may possibly be cancelled with detection of an error and a part which has no such possibility within the buffer 10. The control is carried out so that the reading operation of the buffer 10 does not exceed the pointer RF. Thus it is possible to invalidate the reception data block while minimizing the complication of constitution for the transfer of data carried out via the buffer 10.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はデータ受信装置における受信バッファの管理方
式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a reception buffer management method in a data reception device.

[従来技術およびその問題点〕 プリンタ等のデータ受信装置においては、受信したデー
タを装置内部で処理するため、多くの場合このデータを
適当なサイズの受信バッファに順次格納し、古いデータ
から順次読み出して処理していく。このような順次の格
納と読出を管理するため、夫々書込ポインタと読出ポイ
ンタが用いられる。
[Prior art and its problems] In data receiving devices such as printers, received data is processed within the device, so in most cases this data is sequentially stored in a receive buffer of an appropriate size and read out sequentially starting from the oldest data. We will process it. To manage such sequential storage and reading, write pointers and read pointers are used, respectively.

データ転送をブロック中位で行ない、ブロック中にエラ
ーが検出されたら当該ブロック全体を受信バッファから
削除してブロック全体を再送する方式を上述のようなバ
ッファ管理に適用しようとすると、以下の様な問題点が
生じる。すなわち、ブロックにエラーがあることが分か
るのは、一般にそのブロックの先頭の部分あるいはブロ
ック全体が受信バッファに書き込まれた後である。装置
内部の処理が早く進んでいる場合には、現在のブロック
にエラーがあると分かったときには受信バッファからの
読出が既にこのブロック内にまで進んでしまっている可
能性がある。
If you try to apply a method to the buffer management described above, in which data is transferred in the middle of a block, and if an error is detected in a block, the entire block is deleted from the receive buffer and the entire block is retransmitted, the following will occur. A problem arises. That is, a block is generally found to have an error only after the beginning of the block or the entire block has been written to the receive buffer. If the internal processing of the device is progressing quickly, there is a possibility that reading from the receive buffer has already progressed into the current block by the time it is determined that there is an error in this block.

〔発明の目的〕[Purpose of the invention]

本発明は上述した従来技術の問題点を解消し、受信バッ
ファを用いたデータ転送において、構成の複雑化を最小
限に抑えながら受信データブロックの無効化を可能にす
る受信バッファ管理方式を提供することを目的とする。
The present invention solves the problems of the prior art described above, and provides a receive buffer management method that makes it possible to invalidate received data blocks while minimizing the complexity of the configuration in data transfer using a receive buffer. The purpose is to

〔発明の概要〕[Summary of the invention]

本発明の一実施例によれば、受信バッファを管理するた
めに、受信バッファ中でエラーの検出等により取り消さ
れる可能性のある部分とそのような可能性のない部分と
の境界を指示するように制御されるポインタを設ける。
According to an embodiment of the present invention, in order to manage the receive buffer, a boundary between a portion of the receive buffer that may be canceled due to detection of an error, etc., and a portion that is not likely to be canceled is specified. Provide a pointer controlled by

受信バッファからの読出がこのポインタを越えて進まな
いように制御を行うことにより、上述の目的が達成され
る。
The above objective is achieved by controlling the reading from the receive buffer so that it does not proceed beyond this pointer.

〔発明の実施例〕[Embodiments of the invention]

以上、図面に基づいて本発明の一実施例を説明する。こ
の実施例においては、ホストから受信装置へのデータ転
送は以下のプロトコルに従って行われる。
An embodiment of the present invention will be described above based on the drawings. In this embodiment, data transfer from the host to the receiving device is performed according to the following protocol.

■ホストから受信装置へのデータ転送はブロック単位で
行われる。
■Data transfer from the host to the receiving device is performed in blocks.

■ホストは1ブロックのデータを送り終わる毎に状態確
認コマンドを受信装置に与える。
■Every time the host finishes sending one block of data, it gives a status confirmation command to the receiving device.

■受信装置は、直前に受信したデータのブロックにエラ
ーがあれば状態確認コマンドに応答して当該ブロックを
受信バッファから削除するとともに、ホストに対してエ
ラー状態を通知する。エラー状態の通知を受けたホスト
は当該ブロックの再送を行う。
(2) If there is an error in the block of data received immediately before, the receiving device deletes the block from the reception buffer in response to the status confirmation command, and notifies the host of the error status. The host that is notified of the error status retransmits the block.

■エラーがなければ受信装置は状態確認コマンドに対し
て正常である旨応答する。この場合には、ホストは次の
ブロックの転送が可能になり、また受信バッファ中の正
常に受信されたブロックの処理が可能になる。
■If there is no error, the receiving device responds to the status confirmation command to the effect that it is normal. In this case, the host is able to transfer the next block and also process the successfully received block in the receive buffer.

第1図は本発明の一実施例が適用される受信バッファの
初期状態を示す図である。同図において、WPは書込ポ
インタ、R?は読出ポインタ、RFは読出ポインタがそ
れ以上先へ進まないようにするための読出フェンスポイ
ンタである。同図の状態では受信バッファ10にはデー
タが入っていないので、3つのポインタWP、RP、R
Fは皆同じ位置を指している。
FIG. 1 is a diagram showing the initial state of a receiving buffer to which an embodiment of the present invention is applied. In the figure, WP is a write pointer, R? is a read pointer, and RF is a read fence pointer to prevent the read pointer from advancing any further. In the state shown in the figure, there is no data in the reception buffer 10, so the three pointers WP, RP, and R
All F points to the same position.

第2図は、受信バッファ10に1ブロック分のデータが
読み込まれたが、まだエラーチエツクが完了していない
状態を示す。このエラーチエツクは例えばCRCを使用
して行われるが、エラーチエツクの方法自体は本発明の
要旨ではなくまた当業者にとっては周知の事項であるた
め、これ以上の説明は省略する。
FIG. 2 shows a state in which one block of data has been read into the reception buffer 10, but error checking has not yet been completed. This error check is performed using, for example, CRC, but since the error check method itself is not the gist of the present invention and is well known to those skilled in the art, further explanation will be omitted.

第2図から分かるように、このような状態では書込ポイ
ンタWPは1ブロック分進んでいるが、読出フェンスポ
インタRFは第1図と同じ位置に留まっている。読出ポ
インタRPは読出フェンスポインタRFを追い越せない
ようになっているので、これも第1図と同し位置に留ま
っている。
As can be seen from FIG. 2, in this state, the write pointer WP has advanced by one block, but the read fence pointer RF remains at the same position as in FIG. Since the read pointer RP cannot overtake the read fence pointer RF, it also remains at the same position as in FIG. 1.

第3図は、エラーチエツクによりエラーが発見された場
合、ホスト側からの状態確認コマンドに応答して当該ブ
ロックが削除された状態を示す。
FIG. 3 shows a state in which when an error is discovered by error checking, the block is deleted in response to a status confirmation command from the host side.

同図から分かるように、ブロックの削除は書込ポインタ
WPを1ブロック分戻すことによって行われる。第2図
に関して説明したように、エラーがあるかどうかが未確
認のブロックへ読出ポインタが入り込むこと、つまりこ
のブロック内のデータが読み出されることは阻止されて
いる。従って、エラーを含んでいるブロックのデータを
処理してしまうことはない。
As can be seen from the figure, a block is deleted by moving the write pointer WP back by one block. As explained with reference to FIG. 2, the read pointer is prevented from entering a block whose error has not been confirmed, that is, the data within this block is prevented from being read. Therefore, data in blocks containing errors will not be processed.

受信装置はブロックの削除を行うとともに、ホストに対
してエラーがあったことを通知するので、ホストはこれ
に応答して直前のブロックを再送する。今度は正常に受
信できたならば、受信装置は状態確認コマンドに応答し
て正常である旨通知するとともに、読出フェンスポイン
タRFを進める。
The receiving device deletes the block and notifies the host of the error, so the host responds by retransmitting the previous block. If the reception is successful this time, the receiving device responds to the status confirmation command to notify that it is normal, and advances the read fence pointer RF.

この段階ではじめて、受信装置は直前に受信されたブロ
ック中のデータを処理できるようになる。
Only at this stage is the receiving device able to process the data in the previously received block.

この後受信装置による受信バッファlOからの読出があ
る程度進んだ状態を第4図に示す。
FIG. 4 shows a state in which reading from the receiving buffer IO by the receiving device has proceeded to a certain extent.

第7図には、上述の動作を表すシーケンスを図式的に示
す。
FIG. 7 diagrammatically shows a sequence representing the operations described above.

第5図および第6図には、第4図に示された状態の後に
次のブロックのデータが正常に受信される場合の過程が
示されでいる。なお、第6図は、読出フェンスポインタ
RFが進められた直後の状態を示す。ここで、(A)は
その直前までに読出ポインタが読出フェンスポインタR
Fに追いついていた場合を、また(B)は読出ポインタ
RPがまだ読出フェンスポインタRFに追いついていな
かった場合の状態を示すものである。
5 and 6 show the process when the next block of data is normally received after the state shown in FIG. 4. Note that FIG. 6 shows the state immediately after the read fence pointer RF is advanced. Here, in (A), the read pointer is the read fence pointer R just before that.
(B) shows the case where the read pointer RP has not yet caught up with the read fence pointer RF.

なお、実際の受信バッファはリングバッファ等の形態で
実現されるが、このような具体的な受信バッファの構成
法は当業者には周知の事項であるため、説明は省略する
Note that the actual receiving buffer is realized in the form of a ring buffer or the like, but the specific method of configuring such a receiving buffer is well known to those skilled in the art, and therefore a description thereof will be omitted.

以上一実施例に基づいた説明を行ったが、本発明はこれ
に限定されるものではなく、多様な変形を包含するもの
であることは言うまでもない。
Although the above description has been made based on one embodiment, it goes without saying that the present invention is not limited to this and includes various modifications.

例えば、受信バッファからのブロックの削除は、フロッ
ク全体を一旦受信バッファに入れてから行なうかわりに
、ブロックの転送途中で現在受信中のブロックが不要で
あると判明したときに(例えばパリティエラーの検出に
応答して)直ちに行ってもよい。
For example, instead of deleting a block from the receive buffer after the entire block has been placed in the receive buffer, a block may be removed from the receive buffer when it becomes clear that the currently received block is no longer needed (e.g. due to detection of a parity error). may be done immediately).

また、ホスト側からの状態確認を待たずにブロックの削
除を行うこともできる。
Additionally, blocks can be deleted without waiting for status confirmation from the host side.

また、実施例では、エラーの検出によるブロックの削除
について説明したが、本発明の適用範囲はこれに限定さ
れるものではなく、−旦受信バノファに入ったデータが
直ちに処理できない状態であることがある場合に適用で
きる。例えば受信したデータに何らかの処理を行ったり
あるいはエラーではないが不要として捨てるか否かの判
断がなされる場合にも適用可能である。
Further, in the embodiment, deletion of a block due to error detection has been described, but the scope of application of the present invention is not limited to this. Applicable in certain cases. For example, it can be applied to cases in which it is determined whether or not to perform some processing on received data, or to discard it as unnecessary data even though it is not an error.

また、本発明は上述のプロトコル以外に対しても適用で
きることは言うまでもない。
Furthermore, it goes without saying that the present invention can be applied to protocols other than those described above.

〔発明の効果〕〔Effect of the invention〕

以ト説明したように、本発明によれば、簡単な構成で、
受信側での処理が受信バッファ中のデータの未確定部分
まで進まないようにすることができる。
As explained above, according to the present invention, with a simple configuration,
It is possible to prevent processing on the receiving side from proceeding to an undefined portion of data in the receiving buffer.

【図面の簡単な説明】[Brief explanation of drawings]

第1図ないし第6図は本発明の一実施例の動作を説明す
る図、第7図は第1図ないし第6図に示された動作シー
ケンスを図式的に説明するための図である。 IO=受信バッファ WP:書込ポインタ RP:読出ポインタ RF:読出フェンスポインタ 第1図 第2図
1 to 6 are diagrams for explaining the operation of an embodiment of the present invention, and FIG. 7 is a diagram for schematically explaining the operation sequence shown in FIGS. 1 to 6. IO = Receive buffer WP: Write pointer RP: Read pointer RF: Read fence pointer Figure 1 Figure 2

Claims (2)

【特許請求の範囲】[Claims] (1)受信データが順次書き込まれまた順次読み出され
る受信バッファにおいて、 前記書き込まれた受信データのうち前記読出を行っても
良い部分とそうでない部分との境界位置を示す手段を設
けたことを特徴とする受信バッファ管理方式。
(1) A receiving buffer in which received data is sequentially written and sequentially read out is provided with means for indicating a boundary position between a portion of the written received data that may be read and a portion that is not allowed to be read. Receive buffer management method.
(2)前記受信データの末尾の位置を示す第1のポイン
タと、 前記読出が最後に行われた位置を示す第2のポインタと
、 前記境界位置を示す手段である第3のポインタとを設け
、 前記第2のポインタに基づいた読出は前記第3のポイン
タが示す前記境界を越えないようにした ことを特徴とする請求項1記載の受信バッファ管理方式
(2) A first pointer indicating the end position of the received data, a second pointer indicating the position where the reading was last performed, and a third pointer serving as means for indicating the boundary position. 2. The reception buffer management system according to claim 1, wherein reading based on the second pointer is configured not to exceed the boundary indicated by the third pointer.
JP1136583A 1989-05-30 1989-05-30 Reception buffer control system Pending JPH032950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1136583A JPH032950A (en) 1989-05-30 1989-05-30 Reception buffer control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1136583A JPH032950A (en) 1989-05-30 1989-05-30 Reception buffer control system

Publications (1)

Publication Number Publication Date
JPH032950A true JPH032950A (en) 1991-01-09

Family

ID=15178675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1136583A Pending JPH032950A (en) 1989-05-30 1989-05-30 Reception buffer control system

Country Status (1)

Country Link
JP (1) JPH032950A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011529229A (en) * 2008-07-23 2011-12-01 クゥアルコム・インコーポレイテッド System, method or apparatus for integrating multiple streams of media data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011529229A (en) * 2008-07-23 2011-12-01 クゥアルコム・インコーポレイテッド System, method or apparatus for integrating multiple streams of media data
US8762561B2 (en) 2008-07-23 2014-06-24 Qualcomm Incorporated System, method or apparatus for combining multiple streams of media data

Similar Documents

Publication Publication Date Title
US6253212B1 (en) Method and system for maintaining checkpoint values
JPH096546A (en) Disk control system
US7010650B2 (en) Multiple data management method, computer and storage device therefor
JPH032950A (en) Reception buffer control system
US7533132B2 (en) Parallel replication mechanism for state information produced by serialized processing
US20030033440A1 (en) Method of logging message activity
EP1244015A2 (en) Parallel replication mechanism for state information produced by serialized processing
JPH05324449A (en) Move system for data file
JPS603223B2 (en) Central processing unit error collection method
JPH04230553A (en) Method for recovery from file transfer error
KR20010110100A (en) Checkpointing for recovery of channels in a data processing system
JPS63318647A (en) Data file receiving method
JP2524620B2 (en) Input / output control method
Engert Use of network job processing (NJP)
JPS62290955A (en) On-line data processing system
JPH05265889A (en) Data transfer controller
JPS6380347A (en) Retransmission system for file transfer
JPH10247157A (en) Transaction processing system and its recovery method
JPS61843A (en) Resource status holding system
JPH0546443A (en) Process terminating method
JPH0541041A (en) Magnetic disk write / read diagnostic method
JPH04245523A (en) Asynchronous magnetic disk controller and its data control method
JPH05204670A (en) Communication control system for parallel execution between processes
JPH05265785A (en) Error recovery method for file transfer
JPH0743673B2 (en) Writing control method to auxiliary storage device