JP2003258804A - Controller and controlling method for inter-device data communication - Google Patents

Controller and controlling method for inter-device data communication

Info

Publication number
JP2003258804A
JP2003258804A JP2002057661A JP2002057661A JP2003258804A JP 2003258804 A JP2003258804 A JP 2003258804A JP 2002057661 A JP2002057661 A JP 2002057661A JP 2002057661 A JP2002057661 A JP 2002057661A JP 2003258804 A JP2003258804 A JP 2003258804A
Authority
JP
Japan
Prior art keywords
data
printer
orb
receiving
requested
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
JP2002057661A
Other languages
Japanese (ja)
Other versions
JP3794480B2 (en
Inventor
Hiroshi Takeuchi
博 武内
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2002057661A priority Critical patent/JP3794480B2/en
Publication of JP2003258804A publication Critical patent/JP2003258804A/en
Application granted granted Critical
Publication of JP3794480B2 publication Critical patent/JP3794480B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Computer And Data Communications (AREA)
  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To transmit only untransmitted remaining data after reconstructing network topology if a communication network configuration changes during data transmission in data communication between devices. <P>SOLUTION: In communication between a host and a printer, for example, with IEEE 1394, the printer counts and stores the number of pieces of received data and the number of pieces of remaining data while receiving print data from the host (S43). If a network configuration changes by the extraction and addition of a cable or the like in the middle of receiving the print data, a bus is reset (S45), network topology is reconstructed (S46 and S47), and just after that, the host sends to the printer a receiving request for print data that is the same as print data which is being transmitted just after the bus resetting (S48). The printer skips the number of pieces of received data stored just before the bus resetting from the head in print data requested for reception and receives only subsequent remaining data (S51). <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明が属する技術分野】本発明は、例えばホスト装置
と電子式プリンタとの間の印刷データや制御データの通
信のような、装置間のデータ通信を制御するための装置
及び方法に関する。
FIELD OF THE INVENTION The present invention relates to an apparatus and method for controlling data communication between devices, such as communication of print data and control data between a host device and an electronic printer.

【0002】[0002]

【従来の技術】装置間の通信インタフェースには、多く
の種類のものが知られている。ある種の通信インタフェ
ース、例えばIEEE1394では、アクシデントが発生しても
データを確実に伝送できるように幾つかの方策が採られ
ている。
2. Description of the Related Art Many types of communication interfaces between devices are known. Some types of communication interfaces, such as IEEE 1394, have taken some measures to ensure that data can be transmitted even if an accident occurs.

【0003】例えば、IEEE1394通信インタフェースで一
方の装置から他方の装置へデータを伝送している途中
で、受信側の装置が何らかの原因でデータ受信を進めら
れなくなったとする。この場合、受信側装置から送信側
装置へ、処理未完了の応答を送ることで、そのデータ通
信を一時的に中断し、後に、同じデータの伝送を再度行
うことができる。
For example, suppose that a device on the receiving side is unable to proceed with data reception for some reason while data is being transmitted from one device to the other device via the IEEE1394 communication interface. In this case, by transmitting a response indicating that the processing is not completed from the receiving side device to the transmitting side device, the data communication can be temporarily interrupted and the same data can be transmitted again later.

【0004】また、一方の装置から他方の装置へデータ
を伝送している途中で、両装置が接続されたIEEE1394の
通信ネットワークの構成が変化する(例えば、その通信
ネットワークの何処かの箇所で通信ケーブルが抜かれた
り、その通信ケーブルが再び接続されたりする、など)
とする。この場合、その通信ネットワークの構成が変化
した直後に両装置にてバスリセットが行われてネットワ
ーク・トポロジが再構築され、その直後に、バスリセッ
ト直前に送信されていたと同じデータが再度伝送される
ようになっている。
Also, during the transmission of data from one device to the other, the configuration of the IEEE 1394 communication network to which both devices are connected changes (for example, communication is performed at some point of the communication network). (The cable is unplugged, the communication cable is reconnected, etc.)
And In this case, immediately after the configuration of the communication network is changed, the bus reset is performed by both devices to reconstruct the network topology, and immediately after that, the same data as that transmitted immediately before the bus reset is transmitted again. It is like this.

【0005】[0005]

【発明が解決しようとする課題】説明のための一例とし
て、ホスト装置と電子式プリンタとの間のデータ通信を
取り上げる。ホスト装置からプリンタへ送信されるデー
タの種類には、文書の印刷をプリンタに行わせるための
印刷データや、所定の特別の動作(例えば、プリンタス
テータスの返送、インクカートリッジ交換、テスト印
刷、ヘッドクリーニングなど)をプリンタに行わせるた
めの制御データなどがある。ホスト装置では、印刷デー
タを出力するアプリケーションプログラム(例えば、プ
リンタドライバ)や制御データを出力するアプリケーシ
ョンプログラム(例えば、プリンタユーティリティ)
は、それぞれ、プリンタに対してデータを出力した後、
プリンタでのそのデータの受信状態又は処理状態を知ら
せるプリンタからの応答を待ち、その待ち時間をカウン
トする。もし、応答が来ずに所定の制限時間が経過する
と(タイムアウトイベントの発生)、そのアプリケーシ
ョンプログラムは、プリンタとの通信が不能である(例
えば、プリンタが接続されていないか電源が入っていな
い)とみなし、所定の対処方法を行うことになる。
As an illustrative example, consider data communication between a host device and an electronic printer. The types of data sent from the host device to the printer include print data for causing the printer to print a document and certain special operations (for example, returning printer status, ink cartridge replacement, test printing, head cleaning). Etc.) for controlling the printer. In the host device, an application program that outputs print data (for example, printer driver) or an application program that outputs control data (for example, printer utility)
Respectively, after outputting the data to the printer,
The printer waits for a response from the printer indicating the reception status or processing status of the data and counts the waiting time. If a predetermined time limit elapses without a response (timeout event occurs), the application program cannot communicate with the printer (for example, the printer is not connected or the power is not turned on). Therefore, a predetermined coping method will be taken.

【0006】ところとで、プリンタとホスト装置間の通
信が可能な場合であっても、上記のタイムアウトイベン
トが発生してしまう場合がある。
By the way, even when communication between the printer and the host device is possible, the above-mentioned timeout event may occur.

【0007】例えば、プリンタが印刷データの受信を開
始した後、その印刷データを全部を受信完了するまでに
長い時間がかかりすぎて、ホスト装置への応答の返送が
長く遅れると、上記のタイムアウトイベントが発生して
しまう。
For example, after the printer starts receiving the print data, if it takes too long to completely receive all the print data, and if the reply to the host device is delayed for a long time, the above-mentioned timeout event occurs. Will occur.

【0008】また、例えば、IEEE1394のように、データ
チャネルとコントロールチャネルという異なる論理チャ
ネルをもつ通信インタフェースが用いられる場合には、
次のようなトラブルによりタイムアウトイベントが発生
することがある。すなわち、多くのシステムは、印刷デ
ータはデータチャネルで、制御データはコントロールチ
ャネルで送るように設計されている。この場合、通信イ
ンタフェースの規格では、データチャネルとコントロー
ルチャネルを並行的に用いて、印刷データと制御データ
を同時並行的に送ることが可能な筈なのだが、しかし、
現実のある種のパーソナルコンピュータシステムでは、
この2つのチャネルを用いて印刷データと制御データを
同時並行的に送ると、制御データに関して、プリンタか
らの応答がホスト装置内のアプリケーションプログラム
に正常に認識されない、というトラブルが発生すること
がある。その原因はまだ解明されていないが、とにか
く、そのようなトラブルが生じると、制御データに関し
て上記のタイムアウトイベントが発生してしまう。
Further, when a communication interface having different logical channels such as a data channel and a control channel is used like IEEE1394,
A timeout event may occur due to the following problems. That is, many systems are designed to send print data on the data channel and control data on the control channel. In this case, according to the standard of the communication interface, it should be possible to send the print data and the control data at the same time by using the data channel and the control channel in parallel.
In some real-life personal computer systems,
When print data and control data are sent simultaneously in parallel using these two channels, a problem may occur in which a response from the printer regarding the control data is not normally recognized by the application program in the host device. The cause has not been clarified yet, but anyway, when such trouble occurs, the above-mentioned timeout event occurs with respect to the control data.

【0009】上記のように、ホスト装置のアプリケーシ
ョンプログラムでタイムアウトイベントが発生するよう
なシステムでは、上述したIEEE1394のように通信インタ
フェースそれ自体がデータ通信の中断を補償できる方策
を採っていても、ホスト装置とプリンタとの間の確実な
データ通信を保証することができない。
As described above, in a system in which a time-out event occurs in the application program of the host device, even if the communication interface itself is capable of compensating for interruption of data communication as in the above IEEE 1394, the host No reliable data communication can be guaranteed between the device and the printer.

【0010】また、上述したように、IEEE1394の通信ネ
ットワークにおいて、印刷データ伝送の最中にネットワ
ーク構成が変化した場合、バスリセットが行われてネッ
トワーク・トポロジが再構築され、その後に、バスリセ
ット直前と同じ印刷データが再送信されるるようになっ
ている。この場合、プリンタでは、その印刷データのう
ち、バスリセット前に受信し終わった部分については、
再度受信せずに、未だ受信していない残りの部分だけを
選択的に受信することが望ましい。しかし、このような
残りデータの選択的受信を行うことは簡単ではない。す
なわち、バスリセットによってネットワーク・トポロジ
が再構築されるため、ホスト装置とプリンタのネットワ
ーク上でのアドレスや、ホスト装置内のリソースのアド
レスなどが、バスリセット前とは違ったものに変わって
しまうことがある。そうすると、プリンタとしては、ホ
スト装置内の印刷データのどの部分が受信済みでどの部
分が未受信なのか分からなくなってしまう。
Further, as described above, in the IEEE1394 communication network, if the network configuration changes during the transmission of print data, a bus reset is performed to reconstruct the network topology, and then immediately before the bus reset. The same print data as is retransmitted. In this case, in the printer, regarding the part of the print data that has been received before the bus reset,
It is desirable to selectively receive only the remaining portion that has not been received yet without receiving it again. However, it is not easy to selectively receive the remaining data. That is, since the network topology is reconstructed by the bus reset, the addresses of the host device and the printer on the network, the addresses of the resources in the host device, etc. will be different from those before the bus reset. There is. Then, the printer cannot know which part of the print data in the host device has been received and which part has not been received.

【0011】上記のような問題は、ホスト装置とプリン
タとの通信だけに限らず、他の様々な装置間通信でも存
在するであろう。
The above-mentioned problems may exist not only in communication between the host device and the printer but also in communication between various other devices.

【0012】本発明は、以上のような事情に鑑みなされ
たもので、その目的は、上記のタイムアウトとネットワ
ーク・トポロジ再構築の2つの問題のうち、特に後者の
問題を解決することにある。
The present invention has been made in view of the above circumstances, and an object thereof is to solve the latter problem of the two problems of timeout and network topology reconstruction.

【0013】すなわち、本発明の目的は、装置間のデー
タ通信において、データ伝送中に通信ネットワーク構成
が変化した場合、ネットワーク・トポロジの再構築後
に、未伝送の残りデータだけを選択的に伝送できるよう
にすることにある。
That is, an object of the present invention is that in data communication between devices, if the communication network configuration changes during data transmission, only the untransmitted remaining data can be selectively transmitted after the network topology is reconstructed. To do so.

【0014】[0014]

【課題を解決するための手段】本発明の第1の形態に従
う、通信ネットワーク上で装置間のデータ通信を制御す
るための装置は、受信側装置にて、前記送信側装置から
所定データサイズのデータを漸次に受信するデータ受信
手段と、前記受信装置にて、前記データの受信の進行に
伴って、受信済みデータサイズ又は未受信の残りデータ
サイズを更新し記憶する受信済みデータサイズ記憶手段
手段と、前記通信ネットワークの構成が変化した直後、
前記受信側装置及び前記送信側装置にて、バスリセット
を行なって前記通信ネットワークのトポロジを再構築す
るトポロジ再構築手段と、前記送信側装置にて、前記ト
ポロジの再構築直後、データ受信要求を前記受信側装置
に再び送る手段と、前記受信側装置にて、前記トポロジ
の再構築直後、前記送信側装置からの前記データ受信要
求を受け、前記受信要求によって要求されたデータが前
記バスリセット直前に受信したデータと同じデータであ
るか否かを判断する判断手段と、前記受信側装置にて、
前記判断の結果、前記要求されたデータが前記バスリセ
ット直前に受信したデータと同じデータである場合、前
記バスリセット直前に記憶した前記受信済みデータサイ
ズ又は残りデータサイズを用いて、前記要求されたデー
タのうち、先頭から前記受信済みデータサイズ分のデー
タ部分をスキップして、後続の未受信のデータ部分を選
択的に受信するデータ再受信手段とを備える。
According to a first aspect of the present invention, there is provided a device for controlling data communication between devices on a communication network, the device having a predetermined data size from the device at the transmitting side at a receiving side device. Data receiving means for gradually receiving data, and received data size storing means for updating and storing the received data size or the unreceived remaining data size in the receiving device as the reception of the data progresses. Immediately after the configuration of the communication network changes,
Topology reconstructing means for reconstructing the topology of the communication network by performing bus reset in the receiving side device and the transmitting side device, and a data reception request immediately after the reconstruction of the topology in the transmitting side device. Means for sending again to the receiving side device, and immediately after the reconstruction of the topology, the receiving side device receives the data reception request from the transmitting side device, and the data requested by the reception request is immediately before the bus reset. In the receiving side device, a determining means for determining whether or not the received data is the same as the received data,
As a result of the determination, if the requested data is the same data received immediately before the bus reset, the requested data size or the remaining data size stored immediately before the bus reset is used. A data re-receiving unit that skips a data portion corresponding to the received data size from the beginning of the data and selectively receives a subsequent unreceived data portion.

【0015】本発明の制御装置の好適な実施形態は、前
記送信側装置にて、前記受信側装置へ送信される各デー
タに対して、別のデータから区別するためのシグネチャ
を付与する手段を更に備え、この手段は、前記トポロジ
の再構築直後の前記受信要求によって要求されたデータ
が前記バスリセット直前のデータと同じデータである場
合には、前記要求されたデータに対して、前記バスリセ
ット直前のデータと同じシグネチャを付与する。そし
て、前記受信装置の判断手段は、前記バスリセット直前
に受信したデータのシグネチャと、前記前記要求された
データのシグネチャとを比較することにより、前記要求
されたデータが前記バスリセット直前に受信したデータ
と同じか否かを判断するようになっている。
In a preferred embodiment of the control apparatus of the present invention, the transmission side apparatus includes means for giving a signature for distinguishing each data transmitted to the reception side apparatus from other data. Further, the means further comprises: if the data requested by the reception request immediately after the reconstruction of the topology is the same data as the data immediately before the bus reset, the bus reset is performed for the requested data. Assign the same signature as the previous data. Then, the determination means of the receiving device compares the signature of the data received immediately before the bus reset with the signature of the requested data, so that the requested data is received immediately before the bus reset. It is designed to judge whether it is the same as the data.

【0016】また、好適な実施系は、前記受信側装置に
て、前記判断の結果、前記要求されたデータが前記バス
リセット直前に受信したデータとは別のデータである場
合、前記要求されたデータの全部を漸次に受信する手段
を更に備える。
Also, in a preferred embodiment, if the requested data is different from the data received immediately before the bus reset in the receiving side device as a result of the determination, the requested device is requested. It further comprises means for progressively receiving all of the data.

【0017】[0017]

【発明の実施の形態】以下、説明のための一例として、
パーソナルコンピュータのようなホスト装置と、レーザ
プリンタやインクジェットプリンタのような電子式プリ
ンタとの間のデータ通信を取り上げる。
BEST MODE FOR CARRYING OUT THE INVENTION As an example for explanation,
It deals with data communication between a host device such as a personal computer and an electronic printer such as a laser printer or an inkjet printer.

【0018】図1は、ホスト装置と電子式プリンタ間の
データ通信に適用された本発明の一実施形態における、
データ通信に関わるホスト装置内のプログラム又はハー
ドウェアモジュールの構成を示す。
FIG. 1 shows an embodiment of the present invention applied to data communication between a host device and an electronic printer.
1 shows a configuration of a program or a hardware module in a host device related to data communication.

【0019】プリンタドライバ10は、ユーザの要求に
応答して、ユーザ所望の文書の印刷データを作成して出
力するものである。プリンタドライバ10から出力され
た印刷データは、スプーラ30に一時格納された後、ス
プーラ30から送出されて、ポートモニタ40、IEEE13
94.3コントローラ50、SBP2コントローラ60、IEEE13
94バスドライバ70、IEEE1394コネクタ80及びIEEE13
94ケーブル90を通じてプリンタへ送られるようになっ
ている。
The printer driver 10 creates and outputs print data of a document desired by a user in response to a request from the user. The print data output from the printer driver 10 is temporarily stored in the spooler 30, and then sent out from the spooler 30 to be sent to the port monitor 40, the IEEE 13
94.3 Controller 50, SBP2 Controller 60, IEEE13
94 bus driver 70, IEEE1394 connector 80 and IEEE13
94 It is designed to be sent to the printer through a cable 90.

【0020】また、プリンタユーティリティ20は、定
期的に又はユーザの要求に応答してプリンタの現在のス
テータスをプリンタから取得したり、ユーザの要求に応
答してプリンタに対してメンテナンスなどのための各種
の特別動作(例えば、インクカートリッジ交換、ヘッド
クリーニング、テスト印刷、ステータス印刷、給紙/排
紙など)を行わせたりするための制御データを出力する
ものである。プリンタユーティリティ20から出力され
た制御データは、ポートモニタ40、IEEE1394.3コント
ローラ50、SBP2コントローラ60、IEEE1394バスドラ
イバ70、IEEE1394コネクタ80及びIEEE1394ケーブル
90を通じてプリンタへ送られるようになっている。
Further, the printer utility 20 obtains the current status of the printer from the printer periodically or in response to the user's request, and in response to the user's request, the printer utility 20 performs various maintenance operations on the printer. It outputs control data for performing special operations (for example, ink cartridge replacement, head cleaning, test printing, status printing, paper feed / paper discharge, etc.). The control data output from the printer utility 20 is sent to the printer through the port monitor 40, the IEEE1394.3 controller 50, the SBP2 controller 60, the IEEE1394 bus driver 70, the IEEE1394 connector 80, and the IEEE1394 cable 90.

【0021】IEEE1394.3コントローラ50は、規格IEEE
1394.3に準拠した通信プロトコル制御を行うものであ
り、以下に説明する本発明の原理に従うホスト装置の通
信制御動作は、主として、このIEEE1394.3コントローラ
50によって行われる。SBP2コントローラ60は、規格
SBP2に準拠した通信プロトコル制御を行うものである。
IEEE1394バスドライバ70は、規格IEEE1394に準拠した
特に物理的な通信信号制御を行うものである。IEEE1394
コネクタ80は、IEEE1394ケーブル90が接続される物
理的なコネクタである。
The IEEE 1394.3 controller 50 is a standard IEEE
The communication protocol control conforming to 1394.3 is performed, and the communication control operation of the host device according to the principle of the present invention described below is mainly performed by the IEEE 1394.3 controller 50. SBP2 controller 60 is a standard
It controls the communication protocol based on SBP2.
The IEEE1394 bus driver 70 performs particularly physical communication signal control conforming to the standard IEEE1394. IEEE1394
The connector 80 is a physical connector to which the IEEE1394 cable 90 is connected.

【0022】図示してないが、プリンタ側にも上記と同
様に、ポートモニタ、IEEE1394.3コントローラ、SBP2コ
ントローラ、IEEE1394バスドライバ、IEEE1394コネクタ
がある。そして、ホスト装置からの印刷データや制御デ
ータを解釈してプリンタを制御するプログラム又は回路
が、ポートモニタの上位に存在する。以下に説明する本
発明の原理に従うプリンタの通信制御動作は、主に、プ
リンタ内のIEEE1394.3コントローラによって行われる。
Although not shown, the printer side also has a port monitor, an IEEE1394.3 controller, an SBP2 controller, an IEEE1394 bus driver, and an IEEE1394 connector as described above. A program or circuit for interpreting print data or control data from the host device and controlling the printer exists above the port monitor. The communication control operation of the printer according to the principles of the present invention described below is mainly performed by the IEEE 1394.3 controller in the printer.

【0023】図2は、IEEE1394に準拠したホスト装置と
プリンタ間のデータ通信の概略手順を示す。
FIG. 2 shows a schematic procedure of data communication between a host device and a printer conforming to IEEE1394.

【0024】ホスト装置において、プリンタドライバ1
0又はプリンタユーティリティ20からの印刷データ又
は制御データの送信要求が発生すると、図2に示すよう
に、ホスト装置は、そのメモリ上に、オペレーション・
リクエスト・ブロック(以下、「ORB」という)と呼ば
れるデータブロック100と、送信したい印刷データ又
は制御データを格納したデータ・バッファ110を構築
し、そして、ステップS1に示すように、ORBリード要求
をプリンタに送信する。プリンタは、ホスト装置からの
ORBリード要求に応答して、ステップS2に示すように、
ホスト装置からORBを読み込む。
In the host device, the printer driver 1
0 or a request for transmission of print data or control data from the printer utility 20 occurs, as shown in FIG.
A data block 100 called a request block (hereinafter referred to as "ORB") and a data buffer 110 storing print data or control data to be transmitted are constructed, and an ORB read request is sent to the printer as shown in step S1. Send to. The printer is from the host device
In response to the ORB read request, as shown in step S2,
Read the ORB from the host device.

【0025】ORBには、ホスト装置からプリンタに要求
された動作(例えば、データのリード又はライトなど)
や、データ・バッファ110の先頭アドレス及びデータ
サイズなどが記述されている。プリンタは、ステップS
3に示すように、ORBにより要求された動作を実行す
る。ORBにより要求される動作の典型例は、データ・バ
ッファ110から印刷データ又は制御データを読み込む
こと(つまり、ホスト装置からプリンタへ印刷データ又
は制御データを送信すること)である。また、別のある
種のORBにより要求される動作は、例えば、プリンタ内
の特定のデータ(例えば、プリンタの現在の状態を示す
ステータス・データ)をホスト装置内のデータ・バッフ
ァ110に書き出すことである。いずれにせよ、プリン
タは、ORBにより要求された動作を実行した後、ステッ
プS4に示すように、その実行結果を示すステータス・ブ
ロック(以下、「SB」という)と呼ばれるデータブロッ
クを、ホスト装置内のメモリ上のレジスタ120に書き
込む。SBには、対応のORBのアドレスや、そのORBにより
要求された動作の完了状態(例えば、完了又は未完了)
などが記述されている。SBは、要するに、ホスト装置か
らの処理要求(ORB)に対する、プリンタからの応答で
ある。
In the ORB, the operation requested by the printer from the host device (for example, reading or writing of data)
Also, the start address and data size of the data buffer 110 are described. The printer is step S
3. Perform the action requested by the ORB, as shown in 3. A typical example of an operation required by the ORB is reading print data or control data from the data buffer 110 (that is, sending print data or control data from the host device to the printer). The operation required by another kind of ORB is, for example, to write specific data in the printer (for example, status data indicating the current state of the printer) to the data buffer 110 in the host device. is there. In any case, after executing the operation requested by the ORB, the printer sends a data block called a status block (hereinafter referred to as “SB”) indicating the execution result in the host device, as shown in step S4. To the register 120 on the memory. The SB contains the address of the corresponding ORB and the completion status of the operation requested by that ORB (for example, completed or incomplete).
Etc. are described. The SB is, in short, a response from the printer to a processing request (ORB) from the host device.

【0026】図3は、ORBの構成を示す。FIG. 3 shows the structure of the ORB.

【0027】図3に示すように、ORB100には、ポイ
ンタ、データ・バッファ・アドレス、動作、データ・バ
ッファ・サイズ、キュー番号、シグネチャなどのフィー
ルドが含まれている。
As shown in FIG. 3, the ORB 100 contains fields such as pointer, data buffer address, operation, data buffer size, queue number, signature, and so on.

【0028】ここで、ORB100内のポインタ・フィー
ルドには、このORB100に他のORB100−2がリンク
されている場合における、後続のORB100−2へのポ
インタが記述される。図3では1つのORB100に別の
一つのORB100−2がリンクされている例が示されて
いるが、2番目のORBの後に更に別のORBをリンクして、
ORBの連鎖をもっと長くすることができる。このように
複数のORBがシリアルにリンクされている場合、プリン
タは、先のORBを読み、それにより要求された処理を実
行してSBをホスト装置に返した後、引き続き、次のORB
を読んで、それにより要求された処理を実行することに
なる。例えば、プリンタユーティリティ20がプリンタ
のステータスをモニタする場合は、プリンタにステータ
ス・データを用意させるための制御データをホスト装置
から読み込むことをプリンタに要求するORBと、用意さ
れたステータス・データをホスト装置に書き出すことを
プリンタに要求するORBとがリンクされることになる。
この場合、プリンタは、最初のORBを受けて制御データ
を読み、その制御データに従ってステータス・データを
用意し、次に、2番目のORBを受けて、そのステータス・
データをホスト装置に返送する。
Here, the pointer field in the ORB 100 describes the pointer to the subsequent ORB 100-2 when another ORB 100-2 is linked to this ORB 100. 3 shows an example in which one ORB100-2 is linked to another ORB100-2, but another ORB is linked after the second ORB,
The ORB chain can be extended. When multiple ORBs are serially linked in this way, the printer reads the previous ORB, performs the requested processing, returns SB to the host device, and then continues to the next ORB.
To perform the required processing. For example, when the printer utility 20 monitors the status of the printer, an ORB requesting the printer to read control data for preparing the printer for the status data from the host device, and the prepared status data to the host device. Will be linked with the ORB that requests the printer to write to.
In this case, the printer receives the first ORB, reads the control data, prepares the status data according to the control data, then receives the second ORB and outputs the status data.
Return the data to the host device.

【0029】ORB100内のデータ・バッファ・アドレ
ス・フィールドには、ホスト装置内のデータ・バッファ
110の先頭アドレスが記述される。動作フィールドに
は、プリンタに要求される動作の種類、例えば、データ
・バッファ110から印刷データ又は制御データを読み
込むこと、或るいは、データ・バッファ110へステー
タス・データを書き出すこと、などが記述される。デー
タ・バッファ・サイズ・フィールドには、データ・バッ
ファ110のデータサイズが記述される。
The head address of the data buffer 110 in the host device is described in the data buffer address field in the ORB 100. The operation field describes the type of operation required of the printer, for example, reading print data or control data from the data buffer 110, or writing status data to the data buffer 110. It The data size of the data buffer 110 is described in the data buffer size field.

【0030】ORB100内のキュー番号フィールドに
は、このORB100で要求された動作を実行するときに
使用する論理チャネルを示すキュー番号が記述される。
IEEE1394の通信インタフェースには、データチャネルと
コントロールチャネルという2つの論理チャネルがあ
る。よって、キュー番号フィールドには、データチャネ
ルとコントロールチャネルのうちの何れかを示すキュー
番号が記述されることになる。例えば、印刷データの読
み込みを要求するORBには、データチャネルを示すキュ
ー番号が書かれている。よって、印刷データはデータチ
ャネルを用いてホスト装置からプリンタへと伝送される
ことになる。また、例えば、制御データの読み込みを要
求するORBには、コントロールチャネルを示すキュー番
号が書かれている。よって、制御データはコントロール
チャネルを用いてホスト装置からプリンタへと伝送され
ることになる。また、例えば、ステータス・データの書
き出しを要求するORBには、コントロールチャネルを示
すキュー番号が書かれている。よって、ステータス・デ
ータはコントロールチャネルを用いてプリンタからホス
ト装置へと伝送されることになる。
A queue number field in the ORB 100 describes a queue number indicating a logical channel used when the operation requested by the ORB 100 is executed.
The IEEE 1394 communication interface has two logical channels, a data channel and a control channel. Therefore, in the queue number field, the queue number indicating either the data channel or the control channel is described. For example, a queue number indicating a data channel is written in the ORB that requests reading of print data. Therefore, the print data is transmitted from the host device to the printer using the data channel. Further, for example, the queue number indicating the control channel is written in the ORB requesting the reading of the control data. Therefore, the control data is transmitted from the host device to the printer using the control channel. Also, for example, the queue number indicating the control channel is written in the ORB requesting the writing of the status data. Therefore, the status data is transmitted from the printer to the host device using the control channel.

【0031】ORB100内のシグネチャ・フィールドに
は、このORB100を他のORBと区別するための識別番号
であるシグネチャが記述される。プリンタは、今受信し
たORBのシグネチャと、それより前に受信したORBのシグ
ネチャとを比較することにより、両シグネチャが違って
いれば今受信したORBは前のORBとは別の新しいORBであ
ると認識することができ、一方、両シグネチャが一致し
ていれば今受信したORBは前のORBと同じORBがホスト装
置から再送信されたものであると認識することができ
る。
The signature field in the ORB 100 describes a signature which is an identification number for distinguishing this ORB 100 from other ORBs. The printer compares the signature of the ORB it just received with the signature of the ORB it received earlier, so that if the two signatures are different, the ORB just received is a new ORB different from the previous ORB. On the other hand, if both signatures match, the ORB received now can be recognized as the same ORB as the previous ORB retransmitted from the host device.

【0032】図4は、SBの構成を示す。FIG. 4 shows the structure of the SB.

【0033】図4に示すように、SB200には、ORBア
ドレス、完了状態/エラー状態及び未処理データサイズ
などのフィールドがある。
As shown in FIG. 4, the SB 200 has fields such as an ORB address, a completion status / error status, and an unprocessed data size.

【0034】SB200内のORBアドレス・フィールドに
は、このSB200に対応するORBのホスト装置内でのア
ドレスが記述される。ホスト装置は、受信したSB200
内のORBアドレスによって、そのSB200がどのORBに対
する応答なのかを識別することができる。
In the ORB address field in SB200, the address of the ORB corresponding to this SB200 in the host device is described. The host device receives the SB200
It is possible to identify which ORB the SB 200 responds to by the ORB address in the.

【0035】SB200内の完了状態/エラー状態フィー
ルドには、対応するORBの要求動作を完了したか未完了
か、未完了の場合にその原因はエラーかタイムアウト
(後述)か、ということが記述される。
The completion status / error status field in the SB 200 describes whether the requested operation of the corresponding ORB has been completed or not completed, and if the operation is not completed, the cause is an error or a timeout (described later). It

【0036】SB200内の未処理データサイズには、対
応するORBの要求動作が未完了である場合に、データバ
ッファ110内の未処理で残っているデータのサイズ
(又は、既に処理済みのデータのサイズ)が記述され
る。
The size of the unprocessed data in the SB 200 is the size of the unprocessed data remaining in the data buffer 110 (or of the already processed data when the requested operation of the corresponding ORB is uncompleted). Size) is described.

【0037】図5は、本発明の原理に従う通信制御の下
でホスト装置からプリンタへと印刷データ及び制御デー
タが伝送される手順の一具体例を示す。
FIG. 5 shows a specific example of a procedure for transmitting print data and control data from a host device to a printer under communication control according to the principles of the present invention.

【0038】図5に示すように、まず、ホスト装置にお
いて、ステップS11で、プリンタドライバが印刷データ
の送信要求を発した(つまり、印刷データを出力した)
とする。すると、ステップS12で、その印刷データをデ
ータチャネル(以下、「D_Ch」と略す)を通じて読み込
むようプリンタに要求するデータチャネルのORB(以
下、「D_Ch_ORB」と略す)と、その印刷データを格納し
たデーバッファとが、ホスト装置内に構築される。ま
た、プリンタドライバは、印刷データの送信要求を発し
た後、ステップ13で、タイムカウントを開始する。
As shown in FIG. 5, first, in the host device, in step S11, the printer driver issues a print data transmission request (that is, print data is output).
And Then, in step S12, the ORB (hereinafter abbreviated as "D_Ch_ORB") of the data channel requesting the printer to read the print data through the data channel (hereinafter abbreviated as "D_Ch") and the data storing the print data. A buffer is built in the host device. Further, the printer driver starts time counting in step 13 after issuing the print data transmission request.

【0039】プリンタは、ステップ14で、ホスト装置
から上記D_Ch_ORBを読み込む。(なお、プリンタによる
ORBの読み込みの前には、前述したように、ホスト装置
からプリンタへORBリード要求が送られるが、このステ
ップについては、説明を以下省略する。)続いて、ステ
ップS15で、プリンタは、上記D_Ch_ORBによって要求さ
れた動作、すなわち、ホスト装置内のデータバッファか
ら印刷データを読み込む動作を開始する。通常、印刷デ
ータのサイズはかなり大きく、そして、印刷データは多
数のデータブロック(パケット)に区分され、最初のデ
ータブロックから最後のデータブロックまで順番にプリ
ンタに読み込まれていく(つまり、データブロック単位
でホスト装置からプリンタへ伝送される)。プリンタ
は、印刷データの読み込みを開始した後、直ちに、ステ
ップS16で、タイムカウントを開始する。
In step 14, the printer reads the D_Ch_ORB from the host device. (Note that depending on the printer
Before reading the ORB, the ORB read request is sent from the host device to the printer as described above, but the description of this step will be omitted below. ) Subsequently, in step S15, the printer starts the operation requested by the D_Ch_ORB, that is, the operation of reading the print data from the data buffer in the host device. The size of the print data is usually quite large, and the print data is divided into a large number of data blocks (packets), which are sequentially read by the printer from the first data block to the last data block (that is, data block unit). Is transmitted from the host device to the printer). Immediately after starting reading the print data, the printer starts time counting in step S16.

【0040】こうしてホスト装置からプリンタへ印刷デ
ータが送信されている最中に、ホスト装置では、ステッ
プS17に示すように、プリンタユーティリティが制御デ
ータの送信要求を発した(つまり、制御データを出力し
た)とする。実際、プリンタユティリティは定期的にプ
リンタからステータスデータを取得しようとするので、
印刷データの送信中にステータス取得のための制御デー
タが発されることは頻繁にある。制御データ送信要求が
発されると、その制御データをコントロールチャネル
(以下、「C_Ch」と略す)を通じて読み込むようプリン
タに要求するコントロールチャネルのORB(以下、「C_C
h_ORB」と略す)と、その制御データを格納したデーバ
ッファとが、ホスト装置内に構築される。しかし、その
時、D_Chを通じて印刷データが送信中である場合には、
ホスト装置は、(IEEE1394の規格によれば、D_ChとC_Ch
を同時に用いて印刷データと制御データを同時並行的に
送信できるのであるが、敢えてそうせずに)ステップS1
8に示すように、そのC_Ch_ORBに関連付けられた制御デ
ータ送信要求をC_Ch送信保留キューに入れ、それによ
り、制御データの送信を一時的に保留する。また、プリ
ンタユーティリティは、制御データの送信要求を発した
後、ステップS19に示すように、タイムカウントを開始
する。
While the print data is being transmitted from the host device to the printer, the printer utility of the host device issues a control data transmission request (that is, the control data is output in step S17). ). In fact, the printer utility regularly tries to get status data from the printer, so
Control data for status acquisition is frequently issued during transmission of print data. When a control data transmission request is issued, the ORB of the control channel (hereinafter, "C_C_C" that requests the printer to read the control data through the control channel (hereinafter, "C_Ch")).
abbreviated as “h_ORB”) and a data buffer storing the control data thereof are built in the host device. However, at that time, if print data is being sent through D_Ch,
The host device (according to the IEEE 1394 standard, D_Ch and C_Ch
Print data and control data can be sent simultaneously and in parallel, but without intentionally doing so) Step S1
As shown in 8, the control data transmission request associated with that C_Ch_ORB is put in the C_Ch transmission suspension queue, thereby temporarily suspending the transmission of control data. After issuing the control data transmission request, the printer utility starts time counting as shown in step S19.

【0041】さて、ホスト装置内のプリンタドライバ及
びプリンタユーティリティの各々は、上述したステップ
S13及びS19でそれぞれのタイムカウントを開始した後、
プリンタから応答を受けることなしに、そのカウント値
が所定の制限時間(例えば30秒)に達するというタイ
ムアウトイベントが生じると、プリンタとの通信が不能
である(例えば、プリンタがホスト装置に接続されてい
ないか電源が入っていない)と判断して、所定の対処方
法を行うことになる。
Now, each of the printer driver and the printer utility in the host device has the steps described above.
After starting each time count in S13 and S19,
When a timeout event occurs, in which the count value reaches a predetermined time limit (for example, 30 seconds) without receiving a response from the printer, communication with the printer is disabled (for example, the printer is connected to the host device). If it is not or the power is not turned on), the prescribed countermeasures will be taken.

【0042】このようなホスト装置でのタイムアウトイ
ベントの発生を防ぐために、プリンタは、次のように動
作する。すなわち、プリンタは、上述したステップS15
で印刷データの読み込みを開始した後、まだ全部の印刷
データの読み込みが終わらないうちに、ステップS20に
示すように、プリンタ内部で何らかのエラー(例えば、
用紙なしエラーなど)が発生して、更なる印刷データの
読み込みを進めることができなくなったならば、直ち
に、ステップS21に示すように、要求処理が未完了であ
る旨のSBをホスト装置に返送する。また、エラーが生じ
なくても、まだ全部の印刷データの読み込みが終わらな
いうちに、ステップS16で開始したタイムカウントのカ
ウント値が所定の上限時間に達するというタイムアウト
イベントが発生した場合(ステップS20)にも、プリン
タは、直ちに、要求処理が未完了である旨のSBをホスト
装置に返送する(ステップS21)。ここで、プリンタで
タイムアウトイベントが生じる上限時間は、ホスト装置
でタイムアウトイベントが生じる制限時間よりも十分に
短い時間に設定されている。例えば、ホスト側のタイム
アウトの制限時間が例えば30秒である場合、プリンタ
側のタイムアウトの上限時間は例えば5秒である。な
お、上述したエラー発生の場合にも、直ちに未完了のSB
を返送する代わりに、エラー発生時点からタイムカウン
トを開始して、そのカウント値が上記上限時間(すなわ
ち、ホスト側のタイムアウト制限時間より十分い短い時
間、例えば5秒)に達した時点で、未完了のSBを返送す
るようにしてもよい。
In order to prevent such a time-out event from occurring in the host device, the printer operates as follows. That is, the printer uses the above-described step S15.
After starting to read the print data with, before the reading of all the print data is not finished yet, as shown in step S20, some error (for example,
If it becomes impossible to read further print data due to a paper out error etc.), immediately return the SB indicating that the request processing is not completed to the host device, as shown in step S21. To do. Further, even if no error occurs, if a timeout event occurs that the count value of the time count started in step S16 reaches a predetermined upper limit time before the reading of all print data is completed (step S20) Moreover, the printer immediately returns the SB indicating that the request processing has not been completed to the host device (step S21). Here, the upper limit time at which the time-out event occurs in the printer is set to be sufficiently shorter than the time limit during which the time-out event occurs in the host device. For example, when the time limit for timeout on the host side is, for example, 30 seconds, the upper limit time for timeout on the printer side is, for example, 5 seconds. Even if the above error occurs, the SB
Instead of sending back, the time count is started from the time when the error occurs, and when the count value reaches the upper limit time (that is, a time sufficiently shorter than the timeout limit time on the host side, for example, 5 seconds), The completed SB may be returned.

【0043】上述したステップS21で未完了のSBがホス
ト装置に返送されると、ホスト装置では、ステップS22
に示すように、プリンタから未完了の応答が来たことが
プリンタドライバに知らされる。つまり、プリンタドラ
イバはプリンタからの応答を受ける。この時点では、上
述した上限時間が短いという説明から明らかなように、
プリンタドライバのタイムカウント値は上記制限時間に
は達していないから、プリンタドライバではタイムアウ
トイベントが発生しないことになる。また、上記未完了
のSBの受信と同時に、ステップS23に示すように、今ま
で行われていた印刷データの読み込みを要求したD_Ch_O
RBに関連付けられた印刷データ送信要求がD_Ch送信保留
キーに入れられ、それにより、今まで行われていた印刷
データの送信が一時的に中断される。さらに同時に、ス
テップS24に示すように、今までC_Ch送信保留キュー内
で待っていた制御データ送信要求が送信保留キューから
取り出されて実行される。それにより、C_Ch_ORBがプリ
ンタに読み込まれ(ステップS25)、続いて、そのC_Ch_
ORBによって要求された制御データのプリンタによる読
み込みが実行される(ステップS26)。通常、制御デ
ータのデータサイズは、印刷データに比べて大幅に小さ
い(例えば、1個又は少数のデータブロック又はパケッ
トに収まる)ので、制御データの読み込みは、上述した
タイムアウトの制限時間とは全く比較にならないほどに
極めて短かい時間内に完了する。また、たとえプリンタ
でエラーが発生していたとしても、大抵の場合、プリン
タは、制御データの読み込みは可能であるから、瞬時に
制御データの読み込みが完了する。制御データの読み込
みが完了すると、プリンタは、ステップS27に示すよう
に、制御データの読み込みが完了した旨のSBをホスト装
置に返送する。
When the unfinished SB is returned to the host device in step S21, the host device returns to step S22.
As shown in, the printer driver is notified that the printer has received an incomplete response. That is, the printer driver receives a response from the printer. At this point, as is clear from the explanation that the upper limit time is short,
Since the time count value of the printer driver has not reached the above time limit, the printer driver does not generate a time-out event. At the same time as the reception of the incomplete SB, as shown in step S23, D_Ch_O requesting the reading of the print data that has been performed up to now is performed.
The print data transmission request associated with the RB is put into the D_Ch transmission hold key, which temporarily suspends the print data transmission that has been performed up to now. At the same time, as shown in step S24, the control data transmission request that has been waiting in the C_Ch transmission suspension queue until now is taken out from the transmission suspension queue and executed. As a result, C_Ch_ORB is read by the printer (step S25), and then C_Ch_ORB is read.
The printer reads the control data requested by the ORB (step S26). Since the data size of control data is usually much smaller than that of print data (for example, it fits in one or a few data blocks or packets), reading control data is completely different from the above timeout time limit. It will be completed in a very short time so as not to be. Further, even if an error occurs in the printer, in most cases, the printer can read the control data, and thus the reading of the control data is instantly completed. When the reading of the control data is completed, the printer returns SB indicating that the reading of the control data is completed to the host device, as shown in step S27.

【0044】ホスト装置では、プリンタから制御データ
読み込み完了のSBが返送されると、ステップS28に示す
ように、プリンタから応答があったことがプリンタユー
ティリティに通知される。つまり、プリンタユーティリ
ティはプリンタからの応答を受ける。この時点では、前
述の説明から明らかなように、プリンタユーティリティ
のタイムカウント値は上記制限時間に達してはいないか
ら、プリンタユーティリティでもタイムアウトイベント
が発生しないことになる。上記完了のSBの受信と同時
に、ステップS29に示すように、D_Ch送信保留キューに
入っていた印刷データ送信要求が送信保留キューから取
り出されて実行される。それにより、前回のD_Ch_ORBと
同じD_Ch_ORBが再びプリンタに読み込まれ(ステップS3
0)、続いて、そのD_Ch_ORBによって要求された印刷デ
ータのプリンタによる読み込みが実行される(ステップ
S31)。このとき、プリンタは、前回の印刷データ読み
込みのときに既に読み込み終わったデータのサイズとま
だ読み込んでない残りデータのサイズとを記憶してい
て、それを用いて、データバッファから読み込み済のデ
ータを読み飛ばして、その先のまだ読み込んでない残り
データだけを読み込む。(図示してないが、このデータ
読み込みのときも、前述のステップS16と同様にタイム
カウントを行う。)印刷データの全部の読み込みが完了
すると、プリンタは、ステップS32に示すように、印刷
データの読み込みが完了した旨のSBをホスト装置に返送
する。ホスト装置では、プリンタから印刷データ読み込
み完了の応答があったことが、プリンタドライバに知ら
される。
In the host device, when the control data read completion SB is returned from the printer, the printer utility is notified that there is a response from the printer, as shown in step S28. That is, the printer utility receives a response from the printer. At this point, as is clear from the above description, the time count value of the printer utility has not reached the time limit, so that the printer utility does not generate a time-out event. Simultaneously with the reception of the completed SB, as shown in step S29, the print data transmission request in the D_Ch transmission suspension queue is taken out from the transmission suspension queue and executed. As a result, the same D_Ch_ORB as the previous D_Ch_ORB is read into the printer again (step S3
0), and then the printer reads the print data requested by the D_Ch_ORB (step
S31). At this time, the printer remembers the size of the data that has already been read and the size of the remaining data that has not been read at the time of the previous print data read, and uses it to read the already read data from the data buffer. Skip and read only the remaining data that has not been read yet. (Although not shown, when reading this data, the time count is performed in the same manner as in step S16 described above.) When the reading of all the print data is completed, the printer displays the print data as shown in step S32. The SB indicating that the reading is completed is returned to the host device. In the host device, the printer driver is notified that the printer has responded that the print data has been read.

【0045】なお、印刷データのプリンタによる読み込
みがプリンタにて何の問題も無く円滑に実行されるとき
には、上記タイムアウトの制限時間よりもずっと短い時
間で印刷データの読み込みは完了するから、プリンタド
ライバやプリンタユーティリティでタイムアウトイベン
トが生じることはない。
When the printer reads the print data smoothly without any problem, the print data reading is completed in a time much shorter than the time-out limit described above. The printer utility never triggers a timeout event.

【0046】図6は、本発明の原理に従う通信制御の下
で、ホスト装置とプリンタとが接続されたIEEE1934通信
ネットワークの構成が変化した場合におけるバスリセッ
ト前後のデータ通信の手順の一具体例を示す。
FIG. 6 is a specific example of the procedure of data communication before and after bus reset when the configuration of the IEEE 1934 communication network in which the host device and the printer are connected is changed under the communication control according to the principle of the present invention. Show.

【0047】図6に示すように、プリンタは、ステップ
S41でホスト装置から或るORB(D_ChでもC_Chでもよい
が、この例ではD_Ch_ORBとする)を読み込むと、直ちに
ステップS42でそのORBを記憶する(この記憶内容には、
当然、そのORBのシグネチャも含まれている)。続い
て、プリンタは、ステップS43で、そのORBによる要求さ
れたホスト装置からのデータ読み込みを実行する。デー
タ読み込みを実行している間、プリンタは、処理済み
(読み込み済)のデータ数(又はデータサイズ)と未だ
処理してない(読み込んでない)残りデータ数(又はデ
ータサイズ)とをカウントして記憶する。
As shown in FIG. 6, the printer has a step
When a certain ORB (which may be D_Ch or C_Ch, but is D_Ch_ORB in this example) is read from the host device in S41, the ORB is immediately stored in step S42 (in this stored content,
Of course, the ORB's signature is also included). Then, in step S43, the printer executes the data read from the requested host device by the ORB. While reading data, the printer counts and stores the number of processed (read) data (or data size) and the number of unprocessed (not read) remaining data (or data size). To do.

【0048】ここで、プリンタがデータの読み込みを行
っている最中に、ホスト装置とプリンタが接続されたIE
EE1934通信ネットワークの構成が変化した(例えば、通
信ネットワークの何処かの通信ケーブルが抜かれた、或
いは、その通信ケーブルが再び差し込まれた、など)と
する。すると、ネットワークの構成が変化した直後に、
ステップS45で、ホスト装置とプリンタでバスリセット
イベントが発生し、ステップS46、S47に示すように、ホ
スト装置とプリンタにてIEEE1934通信ネットワーク・ト
ポロジーの再構築が行われる。ネットワーク・トポロジ
ーの再構築が終わると、直ちにステップS48に示すよう
に、バスリセット直前に送信されていたORBと同じ内容
のORBが、ホスト装置からプリンタへ再度送られる。プ
リンタは、ステップS48でそのORBを読み込むと、ステッ
プS49で、その今回のORBのシグネチャと、ステップS42
で記憶したバスリセット前の前回のORBのシグネチャと
を比較する。その結果、シグネチャが一致したなら、プ
リンタは、今回のORBが前回のORBと同じものであると認
識する。続いて、プリンタは、ステップS50で、ステッ
プS43で記憶した残りデータ数がゼロかどうかをチェッ
クする(又は、前回記憶した処理済みデータ数と今回の
ORBに記述してあるデータサイズとから残りのデータ数
を計算して、それをチェックしてもよい)。その残りデ
ータ数がゼロでなければ、プリンタは、前回のORBで要
求されたデータの読み込みが未完了であったことを認識
し、そして、ステップS51で、ORBにより指定されたデー
タバッファの先頭アドレスから処理済み(読み込み済
み)データ数だけ読み飛ばして、その先のまだ読み込ん
でいない残りデータだけを読み込む。このように、プリ
ンタでは、データバッファ上のアドレスではなく、デー
タ数(データサイズ)を用いて、データバッファ内のデ
ータ読み込みが中断した場所を管理する。そのため、バ
スリセットによってネットワーク・トポロジーが変更さ
れても、データバッファの中から残りデータを正確に見
つけ出して選択的に読み込むことができる。要求された
データ全部の読み込みが終わると、プリンタは、ステッ
プS52で、完了のSBをホスト装置へ返送する。
Here, while the printer is reading data, the IE connected to the host device and the printer
EE1934 It is assumed that the configuration of the communication network has changed (for example, the communication cable is unplugged somewhere in the communication network, or the communication cable is plugged in again). Then, immediately after the network configuration changed,
A bus reset event occurs in the host device and the printer in step S45, and the IEEE1934 communication network topology is reconstructed in the host device and the printer as shown in steps S46 and S47. Immediately after the reconstruction of the network topology, as shown in step S48, the ORB having the same contents as the ORB transmitted immediately before the bus reset is sent again from the host device to the printer. The printer reads the ORB in step S48, and in step S49, the signature of the current ORB and step S42.
Compare with the previous ORB signature before bus reset stored in. As a result, if the signatures match, the printer recognizes that this ORB is the same as the previous ORB. Then, in step S50, the printer checks whether the number of remaining data stored in step S43 is zero (or the number of processed data stored in the previous time and the number of processed data stored in this time).
You may check the number of remaining data by calculating it from the data size described in the ORB). If the number of remaining data is not zero, the printer recognizes that the reading of the data requested by the previous ORB has not been completed, and in step S51, the start address of the data buffer specified by the ORB. Skip the number of processed (read) data from and read only the remaining data that has not been read yet. In this way, the printer manages the position in the data buffer where the data reading is interrupted, using the number of data (data size), not the address on the data buffer. Therefore, even if the network topology is changed by the bus reset, the remaining data can be accurately found in the data buffer and selectively read. When the reading of all the requested data is completed, the printer returns the completed SB to the host device in step S52.

【0049】図7~図13は、上述したような具体的な
動作を実現するための、ホスト装置とプリンタの通信制
御の詳細な手順を示す。
7 to 13 show detailed procedures of communication control between the host device and the printer for realizing the above-described specific operation.

【0050】図7は、印刷データや制御データ等のデー
タ送信要求が発生したときのホスト装置の制御流れを示
す。
FIG. 7 shows a control flow of the host device when a data transmission request such as print data and control data is generated.

【0051】図7に示すように、データ送信要求が発生
すると、まず、それがD_Chへのデータ送信要求(例え
ば、印刷データの送信要求)なのか、C_Chへのデータ送
信要求(例えば、制御データの送信要求)なのかを判断
する(S61、S62)。その結果、D_Chへのデータ送信要求
であれば、そのデータの読み込みをプリンタに要求する
ためのD_Ch_ORBを構築し(S63)、そして、そのD_Ch_OR
Bに関連付けられたデータ送信要求をD_Ch送信保留キュ
ーに入れる(S64)。また、C_Chへのデータ送信要求で
あれば、そのデータの読み込みをプリンタに要求するた
めのC_Ch_ORBを構築し(S65)、そして、そのC_Ch_ORB
に関連付けられたデータ送信要求をC_Ch送信保留キュー
に入れる(S66)。
As shown in FIG. 7, when a data transmission request is generated, first, whether it is a data transmission request to D_Ch (for example, print data transmission request), or a data transmission request to C_Ch (for example, control data). (S61, S62). As a result, if it is a data transmission request to D_Ch, D_Ch_ORB for requesting the printer to read the data is constructed (S63), and the D_Ch_OR
The data transmission request associated with B is put in the D_Ch transmission hold queue (S64). If it is a data transmission request to C_Ch, C_Ch_ORB for requesting the printer to read the data is constructed (S65), and the C_Ch_ORB
The data transmission request associated with is put into the C_Ch transmission hold queue (S66).

【0052】図8は、ORBを送信するときのホスト装置
の制御手順を示す。
FIG. 8 shows the control procedure of the host device when transmitting the ORB.

【0053】図8に示すように、まず、現在他のORBの
処理が実行されている最中であるか否かを知るために、
ORB処理中フラグをチェックする(S71)。その結果、OR
B処理中フラグがONであれば、現在他のORBの処理が実行
されているので、ORBの送信は行わない。一方、ORB処理
中フラグがOFFであれば、現在他のORBの処理は実行され
ていないので、次に、まず、C_Ch送信保留キュー内にデ
ータ送信要求があるか否かをチェックする(S72)。
As shown in FIG. 8, first, in order to know whether or not another ORB process is currently being executed,
The ORB processing flag is checked (S71). As a result, OR
If the B processing flag is ON, the ORB is not transmitted because the processing of another ORB is currently being executed. On the other hand, if the ORB processing flag is OFF, no other ORB processing is currently being executed, so first, it is checked whether or not there is a data transmission request in the C_Ch transmission suspension queue (S72). .

【0054】その結果、C_Ch送信保留キュー内にデータ
送信要求が有れば、その送信要求をC_Ch送信保留キュー
から取り出す(S73)。続いて、C_Ch_ORB未完了フラグ
をチェックする(S74)。その結果、C_Ch_ORB未完了フ
ラグがONであれば、C_Ch送信保留キューから取り出した
データ送信要求は、過去に実行されたのであるが未完了
で中断されたものであることを意味するので、その取り
出したデータ送信要求に関連付けられているC_Ch_ORBの
シグネチャは更新せずに前回のままとするが、一方、C_
Ch_ORB未完了フラグがOFFであれば、C_Ch送信保留キュ
ーから取り出したデータ送信要求は、新しいデータの送
信要求であることを意味するので、その取り出したデー
タ送信要求に関連付けられているC_Ch_ORBのシグネチャ
を更新する(S76)。続いて、そのC_Ch_ORBをプリンタ
へ送信する(S76)(すなわち、そのC_Ch_ORBのリード
要求をプリンタへ送って、プリンタにそのC_Ch_ORBを読
み込ませる)。そして、ORB処理中フラグをONにする(S
77)。
As a result, if there is a data transmission request in the C_Ch transmission suspension queue, the transmission request is extracted from the C_Ch transmission suspension queue (S73). Then, the C_Ch_ORB incomplete flag is checked (S74). As a result, if the C_Ch_ORB incompletion flag is ON, it means that the data transmission request fetched from the C_Ch transmission hold queue has been executed in the past but was interrupted because it was incomplete. The signature of C_Ch_ORB associated with the data transmission request that has been
If the Ch_ORB incompletion flag is OFF, it means that the data transmission request fetched from the C_Ch transmission hold queue is a new data transmission request, so the signature of C_Ch_ORB associated with the fetched data transmission request is set Update (S76). Then, the C_Ch_ORB is transmitted to the printer (S76) (that is, a read request for the C_Ch_ORB is transmitted to the printer, and the printer is made to read the C_Ch_ORB). Then, the ORB processing flag is turned ON (S
77).

【0055】このようにして、ホスト装置は、C_Ch送信
保留キュー内にデータ送信要求が存在すれば、それを優
先的に実行し、そして、C_Ch送信保留キュー内に要求が
無くなったならば、次に、D_Ch送信保留キュー内のデー
タ送信要求をチェックする(S78)。
In this way, the host device preferentially executes the data transmission request if it exists in the C_Ch transmission suspension queue, and if there is no request in the C_Ch transmission suspension queue, then Then, the data transmission request in the D_Ch transmission hold queue is checked (S78).

【0056】その結果、D_Ch送信保留キュー内にデータ
送信要求が有れば、その送信要求をD_Ch送信保留キュー
から取り出す(S79)。続いて、D_Ch_ORB未完了フラグ
をチェックする(S80)。その結果、D_Ch_ORB未完了フ
ラグがONであれば、D_Ch送信保留キューから取り出した
データ送信要求は、過去に実行されたのであるが未完了
で中断されたものであることを意味するので、その取り
出したデータ送信要求に関連付けられているD_Ch_ORBの
シグネチャは更新せずに前回のままとするが、一方、D_
Ch_ORB未完了フラグがOFFであれば、D_Ch送信保留キュ
ーから取り出したデータ送信要求は、新しいデータの送
信要求であることを意味するので、その取り出したデー
タ送信要求に関連付けられているD_Ch_ORBのシグネチャ
を更新する(S81)。続いて、そのD_Ch_ORBのプリンタ
へ送信する(S82)(すなわち、そのD_Ch_ORBのリード
要求をプリンタへ送って、プリンにそのD_Ch_ORBをの読
み込ませる)。そして、ORB処理中フラグをONにする(S
83)。
As a result, if there is a data transmission request in the D_Ch transmission suspension queue, the transmission request is extracted from the D_Ch transmission suspension queue (S79). Then, the D_Ch_ORB incomplete flag is checked (S80). As a result, if the D_Ch_ORB incompletion flag is ON, it means that the data transmission request fetched from the D_Ch transmission hold queue has been executed in the past but was interrupted because it was incomplete. The signature of D_Ch_ORB associated with the data transmission request remains unchanged from the previous time, but
If the Ch_ORB incompletion flag is OFF, it means that the data transmission request fetched from the D_Ch transmission pending queue is a new data transmission request, so the D_Ch_ORB signature associated with the fetched data transmission request is set. Update (S81). Then, the D_Ch_ORB is sent to the printer (S82) (that is, a read request for the D_Ch_ORB is sent to the printer to cause the pudding to read the D_Ch_ORB). Then, the ORB processing flag is turned ON (S
83).

【0057】また、C_Ch送信保留キューにもD_Ch送信保
留キューにも要求が入ってなければ、ORB処理中フラグ
をOFFにする(S84)。
If there is no request in either the C_Ch transmission suspension queue or the D_Ch transmission suspension queue, the ORB processing flag is turned off (S84).

【0058】図9は、バスリセット直後のホスト装置の
制御手順を示す。
FIG. 9 shows the control procedure of the host device immediately after the bus reset.

【0059】図9に示すように、バスリセット直後にホ
スト装置は、バスリセット直前に送信していたORBを、
同じシグネチャで再度プリンタへ送信する(S91)。そ
して、ORB処理中フラグをONにする(S92)。
As shown in FIG. 9, immediately after the bus reset, the host device transmits the ORB transmitted immediately before the bus reset,
The same signature is sent to the printer again (S91). Then, the ORB processing flag is turned on (S92).

【0060】図10は、プリンタがORBを受信した(す
なわち、ホスト装置からORBを読み込んだ)時のプリン
タの制御手順を示す。
FIG. 10 shows a control procedure of the printer when the printer receives the ORB (that is, reads the ORB from the host device).

【0061】図10に示すように、プリンタは、ORBを
受信すると、そのORBを記憶し保存する(S101)。この
記憶されたORBに含まれるシグネチャは、前述のよう
に、このORBと前回又は次回に受信したORBとの同一/非
同一を判断するために使用されることになる。続いて、
プリンタは、受信したORBがD_ChのものかC_Chのものか
を判断する(S102、S103)。その結果、D_Ch_ORBであっ
たならば、次に、プリンタが現在エラー状態か正常状態
かをチェックする。その結果、エラー状態であれば、OR
Bにより要求された処理がエラーによる未完了である旨
のSBをホスト装置に返送する(S105)。
As shown in FIG. 10, upon receiving the ORB, the printer stores and saves the ORB (S101). The signature contained in this stored ORB will be used to determine the same / non-identity of this ORB and the ORB received previously or next time, as described above. continue,
The printer determines whether the received ORB belongs to D_Ch or C_Ch (S102, S103). If the result is D_Ch_ORB, then it is checked if the printer is currently in an error or normal state. As a result, if there is an error condition, OR
An SB indicating that the processing requested by B is incomplete due to an error is returned to the host device (S105).

【0062】一方、ステップS104のチェックの結果、プ
リンタが正常状態であれば、上述した上限時間(例え
ば、5秒)までカウントするタイマを起動し(S105)、
そして、今回受信したORBのシグネチャと前回受信したO
RBのシグネチャとを比較する(S107)。その結果、両シ
グネチャが一致していれば、今回のORBは前回のORBが再
送信されたものであることを意味する。その場合、プリ
ンタは、次に、前回のORBの処理実行時に記憶しておい
た残りデータ数がゼロかどうかをチェックする(S10
7)。(なお、前回のORBの処理実行時に記憶しておいた
残りデータ数を用いる代わりに、前回のORBの処理実行
時に記憶しておいた処理(読み込み)済データ数と、今
回のORBで指定されたデータ・バッファ・サイズとか
ら、残りデー多数を計算してもよい。)その結果、残り
データ数がゼロでなければ、前回のORBの要求処理は未
完了であったことを意味するので、プリンタは、今回の
ORBで指定されたデータバッファの先頭アドレスから、
前回のORBに関して記憶しておいた処理済データ数(読
み込み済データ数)分だけアドレスをスキップして、そ
の次のアドレスから未処理の残りデータ(例えば、残り
印刷データ)の読み込みを開始する(S110)。そして、
D_Ch_ORB処理中フラグをONにする(S111)。
On the other hand, if the result of the check in step S104 is that the printer is in a normal state, the timer for counting up to the above-mentioned upper limit time (for example, 5 seconds) is started (S105),
The ORB signature received this time and the O received last time
The signature of RB is compared (S107). As a result, if the two signatures match, this means that the current ORB is a retransmitted previous ORB. In that case, the printer next checks whether or not the number of remaining data stored at the time of the previous ORB processing execution is zero (S10).
7). (Note that instead of using the number of remaining data that was stored when the previous ORB was executed, the number of processed (read) data that was stored when the previous ORB was executed and the number specified by the current ORB were specified. The number of remaining data may be calculated from the data buffer size that was saved.) As a result, if the number of remaining data is not zero, it means that the previous ORB request processing was incomplete. The printer is
From the start address of the data buffer specified by the ORB,
The address is skipped by the number of processed data (the number of read data) stored in the previous ORB, and the unprocessed remaining data (for example, the remaining print data) starts to be read from the next address ( S110). And
The D_Ch_ORB processing flag is turned ON (S111).

【0063】一方、ステップS109のチェックの結果、残
りデータ数がゼロであれば、前回のORBの要求処理は既
に完了していることを意味するので、プリンタは、要求
処理が完了した旨のSBをホスト装置に返送する(S11
2)。
On the other hand, if the number of remaining data is zero as a result of the check in step S109, it means that the request processing of the previous ORB has already been completed, and therefore the printer outputs an SB indicating that the request processing has been completed. To the host device (S11
2).

【0064】また、上記ステップS107のシグネチャ比較
の結果、前回と今回のシグネチャが違っていれば、今回
のORBは前回とは別の新しいORBであることを意味するの
で、プリンタは、今回のORBで指定されたデータバッフ
ァの先頭アドレスから、データ(例えば、印刷データ)
の読み込みを開始する(S108)。そして、D_Ch_ORB処理
中フラグをONにする(S111)。
If the result of the signature comparison in step S107 described above is that the previous and current signatures are different, this means that this ORB is a new ORB different from the previous one, so the printer Data (for example, print data) from the start address of the data buffer specified by
Starts reading (S108). Then, the D_Ch_ORB processing flag is turned ON (S111).

【0065】また、上記のステップS103で、受信したOR
BがC_Chのものであった場合には、プリンタは、そのC_C
h_ORBで指定されたデータバッファの先頭アドレスか
ら、データ(例えば、制御データ)の読み込みを開始す
る(S113)。そして、C_Ch_ORB処理中フラグをONにする
(S114)。
Further, the OR received in the above step S103
If B was for C_Ch, then the printer
Reading of data (for example, control data) is started from the start address of the data buffer designated by h_ORB (S113). Then, the C_Ch_ORB processing flag is turned ON (S114).

【0066】さて、上述した図10のステップS108又は
S11で開始されたD_Chによるデータ(例えば、印刷デー
タ)の読み込み処理では、既に述べたように、そのデー
タは多数のデータブロック(又はパケット)に区分され
ていて、プリンタは、その多数のデータブロックを1ブ
ロックづつ順番に読み込んでいく。
Now, step S108 of FIG. 10 described above or
In the process of reading data (for example, print data) by D_Ch started in S11, the data is divided into a large number of data blocks (or packets) as described above, and the printer determines that a large number of data blocks. Are sequentially read one block at a time.

【0067】図11は、D_Chで1つのデータブロックの
読み込みが完了する都度にプリンタが行う制御手順を示
す。
FIG. 11 shows a control procedure performed by the printer each time reading of one data block by D_Ch is completed.

【0068】図11に示すように、1つのデータブロッ
クの読み込みが完了すると、プリンタは、処理済データ
数(読み込み済データ数)を1データブロック分増や
し、残りデータ数を1データブロック分減らす(S12
1)。そして、この更新された処理済データ数又は残り
データ数から、プリンタは、ORBに指定された全データ
ブロックの読み込みが完了したか否かをチェックする
(S122)。その結果、まだ全データブロックの読み込み
が完了してなければ、次のデータブロックの読み込みを
開始する(S123)。一方、全データブロックの読み込み
が完了したならば、完了のSBをホスト装置に返送し(S1
24)、そして、D_Ch_ORB処理中フラグをOFFにする(S12
5)。
As shown in FIG. 11, when the reading of one data block is completed, the printer increases the number of processed data (the number of read data) by one data block and decreases the remaining data number by one data block ( S12
1). Then, from the updated number of processed data or the number of remaining data, the printer checks whether or not reading of all data blocks specified in the ORB is completed (S122). As a result, if the reading of all the data blocks is not completed yet, the reading of the next data block is started (S123). On the other hand, when all the data blocks have been read, the completed SB is returned to the host device (S1
24), and the D_Ch_ORB processing flag is turned off (S12
Five).

【0069】再び図10を参照して、プリンタは、D_Ch
でデータ読み込みを開始する際、ステップS106でタイマ
を起動して、読み込みにかかる時間をカウントする。そ
して、既に説明したように、ORBに要求された全てのデ
ータの読み込みが完了する前に、タイマのカウント値が
所定の上限時間(例えば、5秒)に達すると、タイムア
ウトイベントが発生することになる。
Referring again to FIG. 10, the printer uses D_Ch
When the data reading is started in step S106, a timer is started in step S106 to count the time required for reading. Then, as already explained, if the count value of the timer reaches a predetermined upper limit time (for example, 5 seconds) before the reading of all the data requested by the ORB is completed, a timeout event occurs. Become.

【0070】図12は、D_Chでデータ受信中にタイムア
ウトアウトイベントが発生した時のプリンタの制御手順
を示す。
FIG. 12 shows the control procedure of the printer when a timeout-out event occurs during data reception by D_Ch.

【0071】図12に示すように、タイムアウトイベン
トが発生すると(S131でYes)、プリンタは、D_Ch_ORB
処理中フラグをチェックする(S132)。その結果、D_Ch
_ORB処理中フラグがONであれば、D_Ch_ORBにより要求さ
れた全データの読み込みが未だ完了していないことを意
味するので、プリンタは、要求された処理がタイムアウ
トにより未完了である旨のSBをホスト装置に返送し(S1
33)、そして、D_Ch_ORB処理中フラグをOFFにして、そ
のD_Chでのデータ読み込みを一時的に中断する(S13
4)。
As shown in FIG. 12, when a time-out event occurs (Yes in S131), the printer uses D_Ch_ORB.
The processing flag is checked (S132). As a result, D_Ch
If the _ORB processing flag is ON, it means that the reading of all the data requested by D_Ch_ORB has not been completed yet, so the printer hosts the SB that the requested processing has not completed due to timeout. Return to device (S1
33) Then, the D_Ch_ORB processing flag is turned off, and the data reading at that D_Ch is temporarily interrupted (S13).
Four).

【0072】図13は、プリンタからSBを受信した時の
ホスト装置の制御手順を示す。
FIG. 13 shows the control procedure of the host device when the SB is received from the printer.

【0073】図13に示すように、プリンタからSBを受
信すると、ホスト装置は、その受信したSBを解釈して、
ORBにより要求された処理が正常に完了したか否かをチ
ェックする(S141)。その結果、完了していれば、その
完了したORBに関するリソースを開放する(S142)。そ
して、その完了したORBがD_Chのものであれば(S143でD
_Ch)、D_Ch_ORB未完了フラグをOFFにし(S144)、一
方、その完了したORBがC_Chのものであれば(S143でC_C
h)、C_Ch_ORB未完了フラグをOFFにする(S145)。そし
て、ホスト装置の通信制御は、図8に示したORB送信時
の処理に進む。
As shown in FIG. 13, when the SB is received from the printer, the host device interprets the received SB,
It is checked whether the processing requested by the ORB has been completed normally (S141). As a result, if completed, the resource related to the completed ORB is released (S142). If the completed ORB belongs to D_Ch (D in S143,
_Ch), the D_Ch_ORB incompletion flag is turned off (S144), and if the completed ORB is C_Ch (C_C in S143).
h), C_Ch_ORB incomplete flag is turned off (S145). Then, the communication control of the host device proceeds to the processing for ORB transmission shown in FIG.

【0074】上記ステップS141の完了チェックの結果、
ORBの要求処理が未完了である場合には、ホスト装置
は、その未完了のORBがD_Chのものであれば(S146でD_C
h)、その未完了のORBに関連付けられた要求をD_Ch送信
保留キューに入れ(S147)、D_Ch_ORB未完了フラグをON
にする(S148)。一方、その未完了のORBがC_Chのもの
であれば(S146でC_Ch)、その未完了のORBに関連付け
られた要求をC_Ch送信保留キューに入れ(S149)、C_Ch
_ORB未完了フラグをONにする(S150)。そして、そし
て、ホスト装置の通信制御は、図8に示したORB送信時
の処理に進む。
As a result of the completion check in step S141,
If the ORB request processing is incomplete, the host device determines that the incomplete ORB is of D_Ch (D_C in S146).
h), put the request associated with the uncompleted ORB in the D_Ch transmission hold queue (S147), and set the D_Ch_ORB incomplete flag to ON
(S148). On the other hand, if the uncompleted ORB belongs to C_Ch (C_Ch in S146), the request associated with the uncompleted ORB is placed in the C_Ch transmission hold queue (S149), and C_Ch
Turns on the _ORB incomplete flag (S150). Then, the communication control of the host device proceeds to the processing for ORB transmission shown in FIG.

【0075】以上、本発明の実施形態を説明したが、こ
れは本発明の説明のための例示であり、この実施形態の
みに本発明の範囲を限定する趣旨ではない。従って、本
発明は、その要旨を逸脱することなく、他の様々な形態
で実施することが可能である。例えば、ホスト装置と電
子式プリンタ間のデータ通信だけでなく、他の様々な装
置間のデータ通信にも本発明は適用可能である。また、
IEEE1394によるデータ通信だけでなく、他の様々な通信
インタフェースいよるデータ通信にも本発明は適用可能
である。
Although the embodiment of the present invention has been described above, this is merely an example for explaining the present invention, and the scope of the present invention is not limited to this embodiment. Therefore, the present invention can be implemented in various other modes without departing from the gist thereof. For example, the present invention is applicable not only to data communication between the host device and the electronic printer, but also to data communication between various other devices. Also,
The present invention is applicable not only to data communication by IEEE1394, but also to data communication using various other communication interfaces.

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

【図1】 ホスト装置と電子式プリンタ間のデータ通信
に適用された本発明の一実施形態における、データ通信
に関わるホスト装置内のプログラム又はハードウェアモ
ジュールの構成を示す
FIG. 1 shows a configuration of a program or a hardware module in a host device related to data communication in an embodiment of the present invention applied to data communication between a host device and an electronic printer.

【図2】 IEEE1394に準拠したホスト装置とプリンタ間
のデータ通信の概略手順を示す図。
FIG. 2 is a diagram showing a schematic procedure of data communication between a host device and a printer in conformity with IEEE1394.

【図3】 オペレーション・リクエスト・ブロック(OR
B)の構成を示す図
[Figure 3] Operation request block (OR
Diagram showing the configuration of B)

【図4】 ステータス・ブロック(SB)の構成を示す
図。
FIG. 4 is a diagram showing a configuration of a status block (SB).

【図5】 本発明の原理に従う通信制御の下でホスト装
置からプリンタへと印刷データ及び制御データが伝送さ
れる手順の一具体例を示す図。
FIG. 5 is a diagram showing a specific example of a procedure for transmitting print data and control data from a host device to a printer under communication control according to the principles of the present invention.

【図6】 本発明の原理に従う通信制御の下で、ホスト
装置とプリンタが接続されたIEEE1934通信ネットワーク
の構成が変化した場合におけるバスリセット前後のデー
タ通信の手順の一具体例を示す図。
FIG. 6 is a diagram showing a specific example of a data communication procedure before and after a bus reset when the configuration of an IEEE1934 communication network in which a host device and a printer are connected is changed under communication control according to the principle of the present invention.

【図7】 印刷データや制御データ等の送信要求が発生
したときのホスト装置の制御流れを示すフローチャー
ト。
FIG. 7 is a flowchart showing a control flow of the host device when a transmission request for print data, control data, or the like is generated.

【図8】 ORBを送信するときのホスト装置の制御手順
を示すフローチャート。
FIG. 8 is a flowchart showing a control procedure of a host device when transmitting an ORB.

【図9】 バスリセット直後のホスト装置の制御手順を
示すフローチャート。
FIG. 9 is a flowchart showing a control procedure of the host device immediately after the bus reset.

【図10】 ORBを受信した時のプリンタの制御手順を
示すフローチャート。
FIG. 10 is a flowchart showing a printer control procedure when an ORB is received.

【図11】 1ブロックデータ受信完了時のプリンタの
制御手順を示すフローチャート。
FIG. 11 is a flowchart showing a printer control procedure upon completion of reception of one-block data.

【図12】 D_Chでデータ受信中にタイムアウトアウト
イベントが発生した時のプリンタの制御手順を示すフロ
ーチャート。
FIG. 12 is a flowchart showing a printer control procedure when a timeout-out event occurs during data reception in D_Ch.

【図13】 SBを受信した時のホスト装置の制御手順を
示すフローチャート。
FIG. 13 is a flowchart showing a control procedure of the host device when SB is received.

【符号の説明】[Explanation of symbols]

10 プリンタドライバ 20 プリンタユティリティ 50 IEEE1394.3コントローラ 100 オペレーション・リクエスト・ブロック(OR
B) 110 データバッファ 120 レジスタ 200 ステータス・ブロック(SB)
10 Printer Driver 20 Printer Utility 50 IEEE1394.3 Controller 100 Operation Request Block (OR
B) 110 data buffer 120 register 200 status block (SB)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 通信ネットワーク上で装置間のデータ通
信を制御するための装置において、 受信側装置にて、送信側装置から所定データサイズのデ
ータを漸次に受信するデータ受信手段と、 前記受信装置にて、前記データの受信の進行に伴って、
受信済みデータサイズ又は未受信の残りデータサイズを
更新し記憶する受信済みデータサイズ記憶手段と、 前記通信ネットワークの構成が変化した直後、前記受信
側装置及び前記送信側装置にて、バスリセットを行なっ
て前記通信ネットワークのトポロジを再構築するトポロ
ジ再構築手段と、 前記送信側装置にて、前記トポロジの再構築直後、デー
タ受信要求を前記受信側装置に再び送る手段と、 前記受信側装置にて、前記トポロジの再構築直後、前記
送信側装置からの前記データ受信要求を受け、前記受信
要求によって要求されたデータが前記バスリセット直前
に受信したデータと同じデータであるか否かを判断する
判断手段と、 前記受信側装置にて、前記判断の結果、前記要求された
データが前記バスリセット直前に受信したデータと同じ
データである場合、前記バスリセット直前に記憶した前
記受信済みデータサイズ又は残りデータサイズを用い
て、前記要求されたデータのうち、先頭から前記受信済
みデータサイズ分のデータ部分をスキップして、後続の
未受信のデータ部分を選択的に受信するデータ再受信手
段とを備えた装置間データ通信の制御装置。
1. A device for controlling data communication between devices on a communication network, comprising: a receiving device, a data receiving means for gradually receiving data of a predetermined data size from a transmitting device; and the receiving device. With the progress of receiving the data,
A received data size storage unit that updates and stores the received data size or the unreceived remaining data size, and immediately after the configuration of the communication network changes, the receiving side device and the transmitting side device perform a bus reset. Topological reconstructing means for reconstructing the topology of the communication network by means of the transmitting device, immediately after the reconstruction of the topology, means for sending a data reception request again to the receiving device, and the receiving device. Immediately after rebuilding the topology, a determination is made to receive the data reception request from the transmission side device and determine whether the data requested by the reception request is the same as the data received immediately before the bus reset. As a result of the judgment in the receiving side device, the requested data is data received immediately before the bus reset. If the same data, using the received data size or the remaining data size stored immediately before the bus reset, of the requested data, skip the data portion of the received data size from the beginning, A control device for inter-device data communication, comprising data re-reception means for selectively receiving a subsequent unreceived data portion.
【請求項2】 前記送信側装置にて、前記受信側装置へ
送信される各データに対して、別のデータから区別する
ためのシグネチャを付与するものであって、前記トポロ
ジの再構築直後の前記受信要求によって要求されたデー
タが前記バスリセット直前のデータと同じデータである
場合には、前記要求されたデータに対して、前記バスリ
セット直前のデータと同じシグネチャを付与するシグネ
チャ割り当て手段を更に備え、 前記受信装置の判断手段は、前記バスリセット直前に受
信したデータのシグネチャと、前記前記要求されたデー
タのシグネチャとを比較することにより、前記要求され
たデータが前記バスリセット直前に受信したデータと同
じか否かを判断するようになった、請求項1記載の装置
間データ通信の制御装置。
2. The transmission side device adds a signature for distinguishing each data transmitted to the reception side device from other data, which is provided immediately after reconstruction of the topology. When the data requested by the reception request is the same data as the data immediately before the bus reset, a signature assigning unit that gives the same signature as the data immediately before the bus reset to the requested data is further included. The determining means of the receiving device compares the signature of the data received immediately before the bus reset with the signature of the requested data, so that the requested data is received immediately before the bus reset. The control device for inter-device data communication according to claim 1, wherein it is determined whether or not it is the same as the data.
【請求項3】 前記受信側装置にて、前記判断の結果、
前記要求されたデータが前記バスリセット直前に受信し
たデータとは別のデータである場合、前記要求されたデ
ータの全部を漸次に受信する手段を更に備えた請求項1
記載の装置間データ通信の制御装置。
3. As a result of the judgment in the receiving side device,
2. The method according to claim 1, further comprising means for gradually receiving all of the requested data when the requested data is different from the data received immediately before the bus reset.
A control device for inter-device data communication described.
【請求項4】 通信ネットワーク上で装置間のデータ通
信を制御するための方法において、 受信側装置にて、前記送信側装置から所定データサイズ
のデータを漸次に受信するステップと、 前記受信装置にて、前記データの受信の進行に伴って、
受信済みデータサイズ又は未受信の残りデータサイズを
更新し記憶するステップと、 前記通信ネットワークの構成が変化した直後、前記受信
側装置及び前記送信側装置にて、バスリセットを行なっ
て前記通信ネットワークのトポロジを再構築するステッ
プと、 前記送信側装置にて、前記トポロジの再構築直後、デー
タ受信要求を前記受信側装置に再び送るステップと、 前記受信側装置にて、前記トポロジの再構築直後、前記
送信側装置からの前記データ受信要求を受け、前記受信
要求によって要求されたデータが前記バスリセット直前
に受信したデータと同じデータであるか否かを判断する
ステップと、 前記受信側装置にて、前記判断の結果、前記要求された
データが前記バスリセット直前に受信したデータと同じ
データである場合、前記バスリセット直前に記憶した前
記受信済みデータサイズ又は残りデータサイズを用い
て、前記要求されたデータのうち、先頭から前記受信済
みデータサイズ分のデータ部分をスキップして、後続の
未受信のデータ部分を選択的に受信するステップを備え
た装置間データ通信の制御方法。
4. A method for controlling data communication between devices on a communication network, the receiving device gradually receiving data of a predetermined data size from the transmitting device; Then, as the reception of the data progresses,
Updating and storing the received data size or the unreceived remaining data size; and immediately after the configuration of the communication network changes, the receiving side device and the transmitting side device perform a bus reset to perform communication of the communication network. Reconstructing the topology, in the transmission side device, immediately after the reconstruction of the topology, sending a data reception request again to the reception side device, in the reception side device, immediately after the reconstruction of the topology, Receiving the data reception request from the transmission side device, determining whether the data requested by the reception request is the same data received immediately before the bus reset, and the reception side device. If, as a result of the determination, the requested data is the same as the data received immediately before the bus reset, the Using the received data size or the remaining data size stored immediately before the bus reset, of the requested data, skip the data part of the received data size from the beginning, and the subsequent unreceived data part. A method for controlling inter-device data communication, comprising the step of selectively receiving the data.
JP2002057661A 2002-03-04 2002-03-04 Control device and method for inter-device data communication Expired - Fee Related JP3794480B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002057661A JP3794480B2 (en) 2002-03-04 2002-03-04 Control device and method for inter-device data communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002057661A JP3794480B2 (en) 2002-03-04 2002-03-04 Control device and method for inter-device data communication

Publications (2)

Publication Number Publication Date
JP2003258804A true JP2003258804A (en) 2003-09-12
JP3794480B2 JP3794480B2 (en) 2006-07-05

Family

ID=28667870

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002057661A Expired - Fee Related JP3794480B2 (en) 2002-03-04 2002-03-04 Control device and method for inter-device data communication

Country Status (1)

Country Link
JP (1) JP3794480B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113971151A (en) * 2021-10-28 2022-01-25 上海兆芯集成电路有限公司 Serial transmission controller and data transmission method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113971151A (en) * 2021-10-28 2022-01-25 上海兆芯集成电路有限公司 Serial transmission controller and data transmission method thereof

Also Published As

Publication number Publication date
JP3794480B2 (en) 2006-07-05

Similar Documents

Publication Publication Date Title
JP3711432B2 (en) Peripheral processing apparatus and control method thereof
CN102023826B (en) Printing system, printing device, program, and storage medium
US9565053B2 (en) Non-transitory computer-readable medium, communication relay apparatus, and image processing apparatus
JP2002055936A (en) Usb device, and system and method for communication between usb devices
JPH11327815A (en) Communication control method/device and communication system
JPH07168774A (en) System and method for generation of first message of nonconnective session-directive protocol
JP3387466B2 (en) Data communication device
JP2007272832A (en) Print system, host device, printer, print control method, print method, program for allowing computer to execute these methods, and recording medium
US5926650A (en) Method and system utilizing a negotiation phase to transfer commands and data in separate modes over a host/peripheral interface
JP2003258804A (en) Controller and controlling method for inter-device data communication
JP3951113B2 (en) Control device and method for inter-device data communication
JP2000224260A (en) Communication controller
JP3750467B2 (en) USB simulation apparatus and storage medium
JP3478519B2 (en) Printer device
JP2005228222A (en) Serial data transfer method and device
JP3846089B2 (en) Interface device, control method thereof, and information recording medium
WO2009095969A1 (en) Data transfer device, data transfer system, and data transfer method
JP2001086132A (en) Communication system, print system, communication method and print control method
JPH0991100A (en) Data transmission controller
CN115237836A (en) Video transcoding card connecting method, device, equipment and medium
CN117632812A (en) Execution method of host command and related components
JPS6249461A (en) Communication system
JP3007404B2 (en) Printing apparatus and printing method
JPH07336334A (en) High-rate data transfer method
CN117439832A (en) Communication control method and system applied to host computer end and slave computer end

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051017

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051020

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051216

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20051216

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060405

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100421

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110421

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110421

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120421

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130421

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130421

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140421

Year of fee payment: 8

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees