JP3794480B2 - Control device and method for inter-device data communication - Google Patents

Control device and method for inter-device data communication Download PDF

Info

Publication number
JP3794480B2
JP3794480B2 JP2002057661A JP2002057661A JP3794480B2 JP 3794480 B2 JP3794480 B2 JP 3794480B2 JP 2002057661 A JP2002057661 A JP 2002057661A JP 2002057661 A JP2002057661 A JP 2002057661A JP 3794480 B2 JP3794480 B2 JP 3794480B2
Authority
JP
Japan
Prior art keywords
data
orb
printer
received
receiving
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.)
Expired - Fee Related
Application number
JP2002057661A
Other languages
Japanese (ja)
Other versions
JP2003258804A (en
Inventor
博 武内
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

Images

Landscapes

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

Description

【0001】
【発明が属する技術分野】
本発明は、例えばホスト装置と電子式プリンタとの間の印刷データや制御データの通信のような、装置間のデータ通信を制御するための装置及び方法に関する。
【0002】
【従来の技術】
装置間の通信インタフェースには、多くの種類のものが知られている。ある種の通信インタフェース、例えばIEEE1394では、アクシデントが発生してもデータを確実に伝送できるように幾つかの方策が採られている。
【0003】
例えば、IEEE1394通信インタフェースで一方の装置から他方の装置へデータを伝送している途中で、受信側の装置が何らかの原因でデータ受信を進められなくなったとする。この場合、受信側装置から送信側装置へ、処理未完了の応答を送ることで、そのデータ通信を一時的に中断し、後に、同じデータの伝送を再度行うことができる。
【0004】
また、一方の装置から他方の装置へデータを伝送している途中で、両装置が接続されたIEEE1394の通信ネットワークの構成が変化する(例えば、その通信ネットワークの何処かの箇所で通信ケーブルが抜かれたり、その通信ケーブルが再び接続されたりする、など)とする。この場合、その通信ネットワークの構成が変化した直後に両装置にてバスリセットが行われてネットワーク・トポロジが再構築され、その直後に、バスリセット直前に送信されていたと同じデータが再度伝送されるようになっている。
【0005】
【発明が解決しようとする課題】
説明のための一例として、ホスト装置と電子式プリンタとの間のデータ通信を取り上げる。ホスト装置からプリンタへ送信されるデータの種類には、文書の印刷をプリンタに行わせるための印刷データや、所定の特別の動作(例えば、プリンタステータスの返送、インクカートリッジ交換、テスト印刷、ヘッドクリーニングなど)をプリンタに行わせるための制御データなどがある。ホスト装置では、印刷データを出力するアプリケーションプログラム(例えば、プリンタドライバ)や制御データを出力するアプリケーションプログラム(例えば、プリンタユーティリティ)は、それぞれ、プリンタに対してデータを出力した後、プリンタでのそのデータの受信状態又は処理状態を知らせるプリンタからの応答を待ち、その待ち時間をカウントする。もし、応答が来ずに所定の制限時間が経過すると(タイムアウトイベントの発生)、そのアプリケーションプログラムは、プリンタとの通信が不能である(例えば、プリンタが接続されていないか電源が入っていない)とみなし、所定の対処方法を行うことになる。
【0006】
ところとで、プリンタとホスト装置間の通信が可能な場合であっても、上記のタイムアウトイベントが発生してしまう場合がある。
【0007】
例えば、プリンタが印刷データの受信を開始した後、その印刷データを全部を受信完了するまでに長い時間がかかりすぎて、ホスト装置への応答の返送が長く遅れると、上記のタイムアウトイベントが発生してしまう。
【0008】
また、例えば、IEEE1394のように、データチャネルとコントロールチャネルという異なる論理チャネルをもつ通信インタフェースが用いられる場合には、次のようなトラブルによりタイムアウトイベントが発生することがある。すなわち、多くのシステムは、印刷データはデータチャネルで、制御データはコントロールチャネルで送るように設計されている。この場合、通信インタフェースの規格では、データチャネルとコントロールチャネルを並行的に用いて、印刷データと制御データを同時並行的に送ることが可能な筈なのだが、しかし、現実のある種のパーソナルコンピュータシステムでは、この2つのチャネルを用いて印刷データと制御データを同時並行的に送ると、制御データに関して、プリンタからの応答がホスト装置内のアプリケーションプログラムに正常に認識されない、というトラブルが発生することがある。その原因はまだ解明されていないが、とにかく、そのようなトラブルが生じると、制御データに関して上記のタイムアウトイベントが発生してしまう。
【0009】
上記のように、ホスト装置のアプリケーションプログラムでタイムアウトイベントが発生するようなシステムでは、上述したIEEE1394のように通信インタフェースそれ自体がデータ通信の中断を補償できる方策を採っていても、ホスト装置とプリンタとの間の確実なデータ通信を保証することができない。
【0010】
また、上述したように、IEEE1394の通信ネットワークにおいて、印刷データ伝送の最中にネットワーク構成が変化した場合、バスリセットが行われてネットワーク・トポロジが再構築され、その後に、バスリセット直前と同じ印刷データが再送信されるるようになっている。この場合、プリンタでは、その印刷データのうち、バスリセット前に受信し終わった部分については、再度受信せずに、未だ受信していない残りの部分だけを選択的に受信することが望ましい。しかし、このような残りデータの選択的受信を行うことは簡単ではない。すなわち、バスリセットによってネットワーク・トポロジが再構築されるため、ホスト装置とプリンタのネットワーク上でのアドレスや、ホスト装置内のリソースのアドレスなどが、バスリセット前とは違ったものに変わってしまうことがある。そうすると、プリンタとしては、ホスト装置内の印刷データのどの部分が受信済みでどの部分が未受信なのか分からなくなってしまう。
【0011】
上記のような問題は、ホスト装置とプリンタとの通信だけに限らず、他の様々な装置間通信でも存在するであろう。
【0012】
本発明は、以上のような事情に鑑みなされたもので、その目的は、上記のタイムアウトとネットワーク・トポロジ再構築の2つの問題のうち、特に後者の問題を解決することにある。
【0013】
すなわち、本発明の目的は、装置間のデータ通信において、データ伝送中に通信ネットワーク構成が変化した場合、ネットワーク・トポロジの再構築後に、未伝送の残りデータだけを選択的に伝送できるようにすることにある。
【0014】
【課題を解決するための手段】
本発明の第1の形態に従う、通信ネットワーク上で装置間のデータ通信を制御するための装置は、受信側装置にて、前記送信側装置から所定データサイズのデータを漸次に受信するデータ受信手段と、前記受信装置にて、前記データの受信の進行に伴って、受信済みデータサイズ又は未受信の残りデータサイズを更新し記憶する受信済みデータサイズ記憶手段手段と、前記通信ネットワークの構成が変化した直後、前記受信側装置及び前記送信側装置にて、バスリセットを行なって前記通信ネットワークのトポロジを再構築するトポロジ再構築手段と、前記送信側装置にて、前記トポロジの再構築直後、データ受信要求を前記受信側装置に再び送る手段と、前記受信側装置にて、前記トポロジの再構築直後、前記送信側装置からの前記データ受信要求を受け、前記受信要求によって要求されたデータが前記バスリセット直前に受信したデータと同じデータであるか否かを判断する判断手段と、前記受信側装置にて、前記判断の結果、前記要求されたデータが前記バスリセット直前に受信したデータと同じデータである場合、前記バスリセット直前に記憶した前記受信済みデータサイズ又は残りデータサイズを用いて、前記要求されたデータのうち、先頭から前記受信済みデータサイズ分のデータ部分をスキップして、後続の未受信のデータ部分を選択的に受信するデータ再受信手段とを備える。
【0015】
本発明の制御装置の好適な実施形態は、前記送信側装置にて、前記受信側装置へ送信される各データに対して、別のデータから区別するためのシグネチャを付与する手段を更に備え、この手段は、前記トポロジの再構築直後の前記受信要求によって要求されたデータが前記バスリセット直前のデータと同じデータである場合には、前記要求されたデータに対して、前記バスリセット直前のデータと同じシグネチャを付与する。そして、前記受信装置の判断手段は、前記バスリセット直前に受信したデータのシグネチャと、前記前記要求されたデータのシグネチャとを比較することにより、前記要求されたデータが前記バスリセット直前に受信したデータと同じか否かを判断するようになっている。
【0016】
また、好適な実施系は、前記受信側装置にて、前記判断の結果、前記要求されたデータが前記バスリセット直前に受信したデータとは別のデータである場合、前記要求されたデータの全部を漸次に受信する手段を更に備える。
【0017】
【発明の実施の形態】
以下、説明のための一例として、パーソナルコンピュータのようなホスト装置と、レーザプリンタやインクジェットプリンタのような電子式プリンタとの間のデータ通信を取り上げる。
【0018】
図1は、ホスト装置と電子式プリンタ間のデータ通信に適用された本発明の一実施形態における、データ通信に関わるホスト装置内のプログラム又はハードウェアモジュールの構成を示す。
【0019】
プリンタドライバ10は、ユーザの要求に応答して、ユーザ所望の文書の印刷データを作成して出力するものである。プリンタドライバ10から出力された印刷データは、スプーラ30に一時格納された後、スプーラ30から送出されて、ポートモニタ40、IEEE1394.3コントローラ50、SBP2コントローラ60、IEEE1394バスドライバ70、IEEE1394コネクタ80及びIEEE1394ケーブル90を通じてプリンタへ送られるようになっている。
【0020】
また、プリンタユーティリティ20は、定期的に又はユーザの要求に応答してプリンタの現在のステータスをプリンタから取得したり、ユーザの要求に応答してプリンタに対してメンテナンスなどのための各種の特別動作(例えば、インクカートリッジ交換、ヘッドクリーニング、テスト印刷、ステータス印刷、給紙/排紙など)を行わせたりするための制御データを出力するものである。プリンタユーティリティ20から出力された制御データは、ポートモニタ40、IEEE1394.3コントローラ50、SBP2コントローラ60、IEEE1394バスドライバ70、IEEE1394コネクタ80及びIEEE1394ケーブル90を通じてプリンタへ送られるようになっている。
【0021】
IEEE1394.3コントローラ50は、規格IEEE1394.3に準拠した通信プロトコル制御を行うものであり、以下に説明する本発明の原理に従うホスト装置の通信制御動作は、主として、このIEEE1394.3コントローラ50によって行われる。SBP2コントローラ60は、規格SBP2に準拠した通信プロトコル制御を行うものである。IEEE1394バスドライバ70は、規格IEEE1394に準拠した特に物理的な通信信号制御を行うものである。IEEE1394コネクタ80は、IEEE1394ケーブル90が接続される物理的なコネクタである。
【0022】
図示してないが、プリンタ側にも上記と同様に、ポートモニタ、IEEE1394.3コントローラ、SBP2コントローラ、IEEE1394バスドライバ、IEEE1394コネクタがある。そして、ホスト装置からの印刷データや制御データを解釈してプリンタを制御するプログラム又は回路が、ポートモニタの上位に存在する。以下に説明する本発明の原理に従うプリンタの通信制御動作は、主に、プリンタ内のIEEE1394.3コントローラによって行われる。
【0023】
図2は、IEEE1394に準拠したホスト装置とプリンタ間のデータ通信の概略手順を示す。
【0024】
ホスト装置において、プリンタドライバ10又はプリンタユーティリティ20からの印刷データ又は制御データの送信要求が発生すると、図2に示すように、ホスト装置は、そのメモリ上に、オペレーション・リクエスト・ブロック(以下、「ORB」という)と呼ばれるデータブロック100と、送信したい印刷データ又は制御データを格納したデータ・バッファ110を構築し、そして、ステップS1に示すように、ORBリード要求をプリンタに送信する。プリンタは、ホスト装置からのORBリード要求に応答して、ステップS2に示すように、ホスト装置からORBを読み込む。
【0025】
ORBには、ホスト装置からプリンタに要求された動作(例えば、データのリード又はライトなど)や、データ・バッファ110の先頭アドレス及びデータサイズなどが記述されている。プリンタは、ステップS3に示すように、ORBにより要求された動作を実行する。ORBにより要求される動作の典型例は、データ・バッファ110から印刷データ又は制御データを読み込むこと(つまり、ホスト装置からプリンタへ印刷データ又は制御データを送信すること)である。また、別のある種のORBにより要求される動作は、例えば、プリンタ内の特定のデータ(例えば、プリンタの現在の状態を示すステータス・データ)をホスト装置内のデータ・バッファ110に書き出すことである。いずれにせよ、プリンタは、ORBにより要求された動作を実行した後、ステップS4に示すように、その実行結果を示すステータス・ブロック(以下、「SB」という)と呼ばれるデータブロックを、ホスト装置内のメモリ上のレジスタ120に書き込む。SBには、対応のORBのアドレスや、そのORBにより要求された動作の完了状態(例えば、完了又は未完了)などが記述されている。SBは、要するに、ホスト装置からの処理要求(ORB)に対する、プリンタからの応答である。
【0026】
図3は、ORBの構成を示す。
【0027】
図3に示すように、ORB100には、ポインタ、データ・バッファ・アドレス、動作、データ・バッファ・サイズ、キュー番号、シグネチャなどのフィールドが含まれている。
【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を受けて、そのステータス・データをホスト装置に返送する。
【0029】
ORB100内のデータ・バッファ・アドレス・フィールドには、ホスト装置内のデータ・バッファ110の先頭アドレスが記述される。動作フィールドには、プリンタに要求される動作の種類、例えば、データ・バッファ110から印刷データ又は制御データを読み込むこと、或るいは、データ・バッファ110へステータス・データを書き出すこと、などが記述される。データ・バッファ・サイズ・フィールドには、データ・バッファ110のデータサイズが記述される。
【0030】
ORB100内のキュー番号フィールドには、このORB100で要求された動作を実行するときに使用する論理チャネルを示すキュー番号が記述される。IEEE1394の通信インタフェースには、データチャネルとコントロールチャネルという2つの論理チャネルがある。よって、キュー番号フィールドには、データチャネルとコントロールチャネルのうちの何れかを示すキュー番号が記述されることになる。例えば、印刷データの読み込みを要求するORBには、データチャネルを示すキュー番号が書かれている。よって、印刷データはデータチャネルを用いてホスト装置からプリンタへと伝送されることになる。また、例えば、制御データの読み込みを要求するORBには、コントロールチャネルを示すキュー番号が書かれている。よって、制御データはコントロールチャネルを用いてホスト装置からプリンタへと伝送されることになる。また、例えば、ステータス・データの書き出しを要求するORBには、コントロールチャネルを示すキュー番号が書かれている。よって、ステータス・データはコントロールチャネルを用いてプリンタからホスト装置へと伝送されることになる。
【0031】
ORB100内のシグネチャ・フィールドには、このORB100を他のORBと区別するための識別番号であるシグネチャが記述される。プリンタは、今受信したORBのシグネチャと、それより前に受信したORBのシグネチャとを比較することにより、両シグネチャが違っていれば今受信したORBは前のORBとは別の新しいORBであると認識することができ、一方、両シグネチャが一致していれば今受信したORBは前のORBと同じORBがホスト装置から再送信されたものであると認識することができる。
【0032】
図4は、SBの構成を示す。
【0033】
図4に示すように、SB200には、ORBアドレス、完了状態/エラー状態及び未処理データサイズなどのフィールドがある。
【0034】
SB200内のORBアドレス・フィールドには、このSB200に対応するORBのホスト装置内でのアドレスが記述される。ホスト装置は、受信したSB200内のORBアドレスによって、そのSB200がどのORBに対する応答なのかを識別することができる。
【0035】
SB200内の完了状態/エラー状態フィールドには、対応するORBの要求動作を完了したか未完了か、未完了の場合にその原因はエラーかタイムアウト(後述)か、ということが記述される。
【0036】
SB200内の未処理データサイズには、対応するORBの要求動作が未完了である場合に、データバッファ110内の未処理で残っているデータのサイズ(又は、既に処理済みのデータのサイズ)が記述される。
【0037】
図5は、本発明の原理に従う通信制御の下でホスト装置からプリンタへと印刷データ及び制御データが伝送される手順の一具体例を示す。
【0038】
図5に示すように、まず、ホスト装置において、ステップS11で、プリンタドライバが印刷データの送信要求を発した(つまり、印刷データを出力した)とする。すると、ステップS12で、その印刷データをデータチャネル(以下、「D_Ch」と略す)を通じて読み込むようプリンタに要求するデータチャネルのORB(以下、「D_Ch_ORB」と略す)と、その印刷データを格納したデーバッファとが、ホスト装置内に構築される。また、プリンタドライバは、印刷データの送信要求を発した後、ステップ13で、タイムカウントを開始する。
【0039】
プリンタは、ステップ14で、ホスト装置から上記D_Ch_ORBを読み込む。(なお、プリンタによるORBの読み込みの前には、前述したように、ホスト装置からプリンタへORBリード要求が送られるが、このステップについては、説明を以下省略する。)続いて、ステップS15で、プリンタは、上記D_Ch_ORBによって要求された動作、すなわち、ホスト装置内のデータバッファから印刷データを読み込む動作を開始する。通常、印刷データのサイズはかなり大きく、そして、印刷データは多数のデータブロック(パケット)に区分され、最初のデータブロックから最後のデータブロックまで順番にプリンタに読み込まれていく(つまり、データブロック単位でホスト装置からプリンタへ伝送される)。プリンタは、印刷データの読み込みを開始した後、直ちに、ステップS16で、タイムカウントを開始する。
【0040】
こうしてホスト装置からプリンタへ印刷データが送信されている最中に、ホスト装置では、ステップS17に示すように、プリンタユーティリティが制御データの送信要求を発した(つまり、制御データを出力した)とする。実際、プリンタユティリティは定期的にプリンタからステータスデータを取得しようとするので、印刷データの送信中にステータス取得のための制御データが発されることは頻繁にある。制御データ送信要求が発されると、その制御データをコントロールチャネル(以下、「C_Ch」と略す)を通じて読み込むようプリンタに要求するコントロールチャネルのORB(以下、「C_Ch_ORB」と略す)と、その制御データを格納したデーバッファとが、ホスト装置内に構築される。しかし、その時、D_Chを通じて印刷データが送信中である場合には、ホスト装置は、(IEEE1394の規格によれば、D_ChとC_Chを同時に用いて印刷データと制御データを同時並行的に送信できるのであるが、敢えてそうせずに)ステップS18に示すように、そのC_Ch_ORBに関連付けられた制御データ送信要求をC_Ch送信保留キューに入れ、それにより、制御データの送信を一時的に保留する。また、プリンタユーティリティは、制御データの送信要求を発した後、ステップS19に示すように、タイムカウントを開始する。
【0041】
さて、ホスト装置内のプリンタドライバ及びプリンタユーティリティの各々は、上述したステップS13及びS19でそれぞれのタイムカウントを開始した後、プリンタから応答を受けることなしに、そのカウント値が所定の制限時間(例えば30秒)に達するというタイムアウトイベントが生じると、プリンタとの通信が不能である(例えば、プリンタがホスト装置に接続されていないか電源が入っていない)と判断して、所定の対処方法を行うことになる。
【0042】
このようなホスト装置でのタイムアウトイベントの発生を防ぐために、プリンタは、次のように動作する。すなわち、プリンタは、上述したステップS15で印刷データの読み込みを開始した後、まだ全部の印刷データの読み込みが終わらないうちに、ステップS20に示すように、プリンタ内部で何らかのエラー(例えば、用紙なしエラーなど)が発生して、更なる印刷データの読み込みを進めることができなくなったならば、直ちに、ステップS21に示すように、要求処理が未完了である旨のSBをホスト装置に返送する。また、エラーが生じなくても、まだ全部の印刷データの読み込みが終わらないうちに、ステップS16で開始したタイムカウントのカウント値が所定の上限時間に達するというタイムアウトイベントが発生した場合(ステップS20)にも、プリンタは、直ちに、要求処理が未完了である旨のSBをホスト装置に返送する(ステップS21)。ここで、プリンタでタイムアウトイベントが生じる上限時間は、ホスト装置でタイムアウトイベントが生じる制限時間よりも十分に短い時間に設定されている。例えば、ホスト側のタイムアウトの制限時間が例えば30秒である場合、プリンタ側のタイムアウトの上限時間は例えば5秒である。なお、上述したエラー発生の場合にも、直ちに未完了のSBを返送する代わりに、エラー発生時点からタイムカウントを開始して、そのカウント値が上記上限時間(すなわち、ホスト側のタイムアウト制限時間より十分い短い時間、例えば5秒)に達した時点で、未完了のSBを返送するようにしてもよい。
【0043】
上述したステップS21で未完了のSBがホスト装置に返送されると、ホスト装置では、ステップS22に示すように、プリンタから未完了の応答が来たことがプリンタドライバに知らされる。つまり、プリンタドライバはプリンタからの応答を受ける。この時点では、上述した上限時間が短いという説明から明らかなように、プリンタドライバのタイムカウント値は上記制限時間には達していないから、プリンタドライバではタイムアウトイベントが発生しないことになる。また、上記未完了のSBの受信と同時に、ステップS23に示すように、今まで行われていた印刷データの読み込みを要求したD_Ch_ORBに関連付けられた印刷データ送信要求がD_Ch送信保留キーに入れられ、それにより、今まで行われていた印刷データの送信が一時的に中断される。さらに同時に、ステップS24に示すように、今までC_Ch送信保留キュー内で待っていた制御データ送信要求が送信保留キューから取り出されて実行される。それにより、C_Ch_ORBがプリンタに読み込まれ(ステップS25)、続いて、そのC_Ch_ORBによって要求された制御データのプリンタによる読み込みが実行される(ステップS26)。通常、制御データのデータサイズは、印刷データに比べて大幅に小さい(例えば、1個又は少数のデータブロック又はパケットに収まる)ので、制御データの読み込みは、上述したタイムアウトの制限時間とは全く比較にならないほどに極めて短かい時間内に完了する。また、たとえプリンタでエラーが発生していたとしても、大抵の場合、プリンタは、制御データの読み込みは可能であるから、瞬時に制御データの読み込みが完了する。制御データの読み込みが完了すると、プリンタは、ステップS27に示すように、制御データの読み込みが完了した旨のSBをホスト装置に返送する。
【0044】
ホスト装置では、プリンタから制御データ読み込み完了のSBが返送されると、ステップS28に示すように、プリンタから応答があったことがプリンタユーティリティに通知される。つまり、プリンタユーティリティはプリンタからの応答を受ける。この時点では、前述の説明から明らかなように、プリンタユーティリティのタイムカウント値は上記制限時間に達してはいないから、プリンタユーティリティでもタイムアウトイベントが発生しないことになる。上記完了のSBの受信と同時に、ステップS29に示すように、D_Ch送信保留キューに入っていた印刷データ送信要求が送信保留キューから取り出されて実行される。それにより、前回のD_Ch_ORBと同じD_Ch_ORBが再びプリンタに読み込まれ(ステップS30)、続いて、そのD_Ch_ORBによって要求された印刷データのプリンタによる読み込みが実行される(ステップS31)。このとき、プリンタは、前回の印刷データ読み込みのときに既に読み込み終わったデータのサイズとまだ読み込んでない残りデータのサイズとを記憶していて、それを用いて、データバッファから読み込み済のデータを読み飛ばして、その先のまだ読み込んでない残りデータだけを読み込む。(図示してないが、このデータ読み込みのときも、前述のステップS16と同様にタイムカウントを行う。)印刷データの全部の読み込みが完了すると、プリンタは、ステップS32に示すように、印刷データの読み込みが完了した旨のSBをホスト装置に返送する。ホスト装置では、プリンタから印刷データ読み込み完了の応答があったことが、プリンタドライバに知らされる。
【0045】
なお、印刷データのプリンタによる読み込みがプリンタにて何の問題も無く円滑に実行されるときには、上記タイムアウトの制限時間よりもずっと短い時間で印刷データの読み込みは完了するから、プリンタドライバやプリンタユーティリティでタイムアウトイベントが生じることはない。
【0046】
図6は、本発明の原理に従う通信制御の下で、ホスト装置とプリンタとが接続されたIEEE1934通信ネットワークの構成が変化した場合におけるバスリセット前後のデータ通信の手順の一具体例を示す。
【0047】
図6に示すように、プリンタは、ステップS41でホスト装置から或るORB(D_ChでもC_Chでもよいが、この例ではD_Ch_ORBとする)を読み込むと、直ちにステップS42でそのORBを記憶する(この記憶内容には、当然、そのORBのシグネチャも含まれている)。続いて、プリンタは、ステップS43で、そのORBによる要求されたホスト装置からのデータ読み込みを実行する。データ読み込みを実行している間、プリンタは、処理済み(読み込み済)のデータ数(又はデータサイズ)と未だ処理してない(読み込んでない)残りデータ数(又はデータサイズ)とをカウントして記憶する。
【0048】
ここで、プリンタがデータの読み込みを行っている最中に、ホスト装置とプリンタが接続されたIEEE1934通信ネットワークの構成が変化した(例えば、通信ネットワークの何処かの通信ケーブルが抜かれた、或いは、その通信ケーブルが再び差し込まれた、など)とする。すると、ネットワークの構成が変化した直後に、ステップS45で、ホスト装置とプリンタでバスリセットイベントが発生し、ステップS46、S47に示すように、ホスト装置とプリンタにてIEEE1934通信ネットワーク・トポロジーの再構築が行われる。ネットワーク・トポロジーの再構築が終わると、直ちにステップS48に示すように、バスリセット直前に送信されていたORBと同じ内容のORBが、ホスト装置からプリンタへ再度送られる。プリンタは、ステップS48でそのORBを読み込むと、ステップS49で、その今回のORBのシグネチャと、ステップS42で記憶したバスリセット前の前回のORBのシグネチャとを比較する。その結果、シグネチャが一致したなら、プリンタは、今回のORBが前回のORBと同じものであると認識する。続いて、プリンタは、ステップS50で、ステップS43で記憶した残りデータ数がゼロかどうかをチェックする(又は、前回記憶した処理済みデータ数と今回のORBに記述してあるデータサイズとから残りのデータ数を計算して、それをチェックしてもよい)。その残りデータ数がゼロでなければ、プリンタは、前回のORBで要求されたデータの読み込みが未完了であったことを認識し、そして、ステップS51で、ORBにより指定されたデータバッファの先頭アドレスから処理済み(読み込み済み)データ数だけ読み飛ばして、その先のまだ読み込んでいない残りデータだけを読み込む。このように、プリンタでは、データバッファ上のアドレスではなく、データ数(データサイズ)を用いて、データバッファ内のデータ読み込みが中断した場所を管理する。そのため、バスリセットによってネットワーク・トポロジーが変更されても、データバッファの中から残りデータを正確に見つけ出して選択的に読み込むことができる。要求されたデータ全部の読み込みが終わると、プリンタは、ステップS52で、完了のSBをホスト装置へ返送する。
【0049】
図7~図13は、上述したような具体的な動作を実現するための、ホスト装置とプリンタの通信制御の詳細な手順を示す。
【0050】
図7は、印刷データや制御データ等のデータ送信要求が発生したときのホスト装置の制御流れを示す。
【0051】
図7に示すように、データ送信要求が発生すると、まず、それがD_Chへのデータ送信要求(例えば、印刷データの送信要求)なのか、C_Chへのデータ送信要求(例えば、制御データの送信要求)なのかを判断する(S61、S62)。その結果、D_Chへのデータ送信要求であれば、そのデータの読み込みをプリンタに要求するためのD_Ch_ORBを構築し(S63)、そして、そのD_Ch_ORBに関連付けられたデータ送信要求をD_Ch送信保留キューに入れる(S64)。また、C_Chへのデータ送信要求であれば、そのデータの読み込みをプリンタに要求するためのC_Ch_ORBを構築し(S65)、そして、そのC_Ch_ORBに関連付けられたデータ送信要求をC_Ch送信保留キューに入れる(S66)。
【0052】
図8は、ORBを送信するときのホスト装置の制御手順を示す。
【0053】
図8に示すように、まず、現在他のORBの処理が実行されている最中であるか否かを知るために、ORB処理中フラグをチェックする(S71)。その結果、ORB処理中フラグがONであれば、現在他のORBの処理が実行されているので、ORBの送信は行わない。一方、ORB処理中フラグがOFFであれば、現在他のORBの処理は実行されていないので、次に、まず、C_Ch送信保留キュー内にデータ送信要求があるか否かをチェックする(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にする(S77)。
【0055】
このようにして、ホスト装置は、C_Ch送信保留キュー内にデータ送信要求が存在すれば、それを優先的に実行し、そして、C_Ch送信保留キュー内に要求が無くなったならば、次に、D_Ch送信保留キュー内のデータ送信要求をチェックする(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にする(S83)。
【0057】
また、C_Ch送信保留キューにもD_Ch送信保留キューにも要求が入ってなければ、ORB処理中フラグをOFFにする(S84)。
【0058】
図9は、バスリセット直後のホスト装置の制御手順を示す。
【0059】
図9に示すように、バスリセット直後にホスト装置は、バスリセット直前に送信していたORBを、同じシグネチャで再度プリンタへ送信する(S91)。そして、ORB処理中フラグをONにする(S92)。
【0060】
図10は、プリンタがORBを受信した(すなわち、ホスト装置からORBを読み込んだ)時のプリンタの制御手順を示す。
【0061】
図10に示すように、プリンタは、ORBを受信すると、そのORBを記憶し保存する(S101)。この記憶されたORBに含まれるシグネチャは、前述のように、このORBと前回又は次回に受信したORBとの同一/非同一を判断するために使用されることになる。続いて、プリンタは、受信したORBがD_ChのものかC_Chのものかを判断する(S102、S103)。その結果、D_Ch_ORBであったならば、次に、プリンタが現在エラー状態か正常状態かをチェックする。その結果、エラー状態であれば、ORBにより要求された処理がエラーによる未完了である旨のSBをホスト装置に返送する(S105)。
【0062】
一方、ステップS104のチェックの結果、プリンタが正常状態であれば、上述した上限時間(例えば、5秒)までカウントするタイマを起動し(S105)、そして、今回受信したORBのシグネチャと前回受信したORBのシグネチャとを比較する(S107)。その結果、両シグネチャが一致していれば、今回のORBは前回のORBが再送信されたものであることを意味する。その場合、プリンタは、次に、前回のORBの処理実行時に記憶しておいた残りデータ数がゼロかどうかをチェックする(S107)。(なお、前回のORBの処理実行時に記憶しておいた残りデータ数を用いる代わりに、前回のORBの処理実行時に記憶しておいた処理(読み込み)済データ数と、今回のORBで指定されたデータ・バッファ・サイズとから、残りデー多数を計算してもよい。)その結果、残りデータ数がゼロでなければ、前回のORBの要求処理は未完了であったことを意味するので、プリンタは、今回のORBで指定されたデータバッファの先頭アドレスから、前回のORBに関して記憶しておいた処理済データ数(読み込み済データ数)分だけアドレスをスキップして、その次のアドレスから未処理の残りデータ(例えば、残り印刷データ)の読み込みを開始する(S110)。そして、D_Ch_ORB処理中フラグをONにする(S111)。
【0063】
一方、ステップS109のチェックの結果、残りデータ数がゼロであれば、前回のORBの要求処理は既に完了していることを意味するので、プリンタは、要求処理が完了した旨のSBをホスト装置に返送する(S112)。
【0064】
また、上記ステップS107のシグネチャ比較の結果、前回と今回のシグネチャが違っていれば、今回のORBは前回とは別の新しいORBであることを意味するので、プリンタは、今回のORBで指定されたデータバッファの先頭アドレスから、データ(例えば、印刷データ)の読み込みを開始する(S108)。そして、D_Ch_ORB処理中フラグをONにする(S111)。
【0065】
また、上記のステップS103で、受信したORBがC_Chのものであった場合には、プリンタは、そのC_Ch_ORBで指定されたデータバッファの先頭アドレスから、データ(例えば、制御データ)の読み込みを開始する(S113)。そして、C_Ch_ORB処理中フラグをONにする(S114)。
【0066】
さて、上述した図10のステップS108又はS11で開始されたD_Chによるデータ(例えば、印刷データ)の読み込み処理では、既に述べたように、そのデータは多数のデータブロック(又はパケット)に区分されていて、プリンタは、その多数のデータブロックを1ブロックづつ順番に読み込んでいく。
【0067】
図11は、D_Chで1つのデータブロックの読み込みが完了する都度にプリンタが行う制御手順を示す。
【0068】
図11に示すように、1つのデータブロックの読み込みが完了すると、プリンタは、処理済データ数(読み込み済データ数)を1データブロック分増やし、残りデータ数を1データブロック分減らす(S121)。そして、この更新された処理済データ数又は残りデータ数から、プリンタは、ORBに指定された全データブロックの読み込みが完了したか否かをチェックする(S122)。その結果、まだ全データブロックの読み込みが完了してなければ、次のデータブロックの読み込みを開始する(S123)。一方、全データブロックの読み込みが完了したならば、完了のSBをホスト装置に返送し(S124)、そして、D_Ch_ORB処理中フラグをOFFにする(S125)。
【0069】
再び図10を参照して、プリンタは、D_Chでデータ読み込みを開始する際、ステップS106でタイマを起動して、読み込みにかかる時間をカウントする。そして、既に説明したように、ORBに要求された全てのデータの読み込みが完了する前に、タイマのカウント値が所定の上限時間(例えば、5秒)に達すると、タイムアウトイベントが発生することになる。
【0070】
図12は、D_Chでデータ受信中にタイムアウトアウトイベントが発生した時のプリンタの制御手順を示す。
【0071】
図12に示すように、タイムアウトイベントが発生すると(S131でYes)、プリンタは、D_Ch_ORB処理中フラグをチェックする(S132)。その結果、D_Ch_ORB処理中フラグがONであれば、D_Ch_ORBにより要求された全データの読み込みが未だ完了していないことを意味するので、プリンタは、要求された処理がタイムアウトにより未完了である旨のSBをホスト装置に返送し(S133)、そして、D_Ch_ORB処理中フラグをOFFにして、そのD_Chでのデータ読み込みを一時的に中断する(S134)。
【0072】
図13は、プリンタからSBを受信した時のホスト装置の制御手順を示す。
【0073】
図13に示すように、プリンタからSBを受信すると、ホスト装置は、その受信したSBを解釈して、ORBにより要求された処理が正常に完了したか否かをチェックする(S141)。その結果、完了していれば、その完了したORBに関するリソースを開放する(S142)。そして、その完了したORBがD_Chのものであれば(S143でD_Ch)、D_Ch_ORB未完了フラグをOFFにし(S144)、一方、その完了したORBがC_Chのものであれば(S143でC_Ch)、C_Ch_ORB未完了フラグをOFFにする(S145)。そして、ホスト装置の通信制御は、図8に示したORB送信時の処理に進む。
【0074】
上記ステップS141の完了チェックの結果、ORBの要求処理が未完了である場合には、ホスト装置は、その未完了のORBがD_Chのものであれば(S146でD_Ch)、その未完了の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送信時の処理に進む。
【0075】
以上、本発明の実施形態を説明したが、これは本発明の説明のための例示であり、この実施形態のみに本発明の範囲を限定する趣旨ではない。従って、本発明は、その要旨を逸脱することなく、他の様々な形態で実施することが可能である。例えば、ホスト装置と電子式プリンタ間のデータ通信だけでなく、他の様々な装置間のデータ通信にも本発明は適用可能である。また、IEEE1394によるデータ通信だけでなく、他の様々な通信インタフェースいよるデータ通信にも本発明は適用可能である。
【図面の簡単な説明】
【図1】 ホスト装置と電子式プリンタ間のデータ通信に適用された本発明の一実施形態における、データ通信に関わるホスト装置内のプログラム又はハードウェアモジュールの構成を示す
【図2】 IEEE1394に準拠したホスト装置とプリンタ間のデータ通信の概略手順を示す図。
【図3】 オペレーション・リクエスト・ブロック(ORB)の構成を示す図
【図4】 ステータス・ブロック(SB)の構成を示す図。
【図5】 本発明の原理に従う通信制御の下でホスト装置からプリンタへと印刷データ及び制御データが伝送される手順の一具体例を示す図。
【図6】 本発明の原理に従う通信制御の下で、ホスト装置とプリンタが接続されたIEEE1934通信ネットワークの構成が変化した場合におけるバスリセット前後のデータ通信の手順の一具体例を示す図。
【図7】 印刷データや制御データ等の送信要求が発生したときのホスト装置の制御流れを示すフローチャート。
【図8】 ORBを送信するときのホスト装置の制御手順を示すフローチャート。
【図9】 バスリセット直後のホスト装置の制御手順を示すフローチャート。
【図10】 ORBを受信した時のプリンタの制御手順を示すフローチャート。
【図11】 1ブロックデータ受信完了時のプリンタの制御手順を示すフローチャート。
【図12】 D_Chでデータ受信中にタイムアウトアウトイベントが発生した時のプリンタの制御手順を示すフローチャート。
【図13】 SBを受信した時のホスト装置の制御手順を示すフローチャート。
【符号の説明】
10 プリンタドライバ
20 プリンタユティリティ
50 IEEE1394.3コントローラ
100 オペレーション・リクエスト・ブロック(ORB)
110 データバッファ
120 レジスタ
200 ステータス・ブロック(SB)
[0001]
[Technical field to which the invention belongs]
The present invention relates to an apparatus and method for controlling data communication between apparatuses, such as communication of print data and control data between a host apparatus and an electronic printer.
[0002]
[Prior art]
Many types of communication interfaces between devices are known. In some types of communication interfaces, for example, IEEE1394, some measures are taken so that data can be reliably transmitted even if an accident occurs.
[0003]
For example, it is assumed that the receiving device cannot 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, the data communication can be temporarily interrupted by sending an incomplete processing response from the receiving device to the transmitting device, and the same data can be transmitted again later.
[0004]
In addition, during the transmission of data from one device to the other, the configuration of the IEEE1394 communication network to which both devices are connected changes (for example, the communication cable is disconnected at some point in the communication network). Or the communication cable is reconnected). In this case, immediately after the configuration of the communication network changes, both devices perform a bus reset to reconstruct the network topology, and immediately after that, the same data that was transmitted just before the bus reset is transmitted again. It is like that.
[0005]
[Problems to be solved by the invention]
As an example for explanation, data communication between a host device and an electronic printer will be taken up. The types of data transmitted from the host device to the printer include print data for causing the printer to print a document, and predetermined special operations (for example, return of printer status, ink cartridge replacement, test printing, head cleaning). Control data for causing the printer to perform. In the host device, an application program (for example, a printer driver) that outputs print data and an application program (for example, a printer utility) that outputs control data output data to the printer and then the data in the printer. The printer waits for a response from the printer that informs the reception state or processing state, 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 is not turned on). Therefore, a predetermined countermeasure is taken.
[0006]
However, even when communication between the printer and the host device is possible, the timeout event may occur.
[0007]
For example, after the printer starts receiving print data, it takes a long time to complete receiving the print data, and if the response return to the host device is delayed for a long time, the above timeout event occurs. End up.
[0008]
For example, when a communication interface having different logical channels such as a data channel and a control channel is used, such as IEEE1394, a timeout event may occur due to the following trouble. That is, many systems are designed to send print data on the data channel and control data on the control channel. In this case, the standard of the communication interface should be able to send the print data and the control data at the same time using the data channel and the control channel in parallel. Then, if print data and control data are sent simultaneously using these two channels, a trouble may occur that the response from the printer is not normally recognized by the application program in the host device regarding the control data. is there. The cause has not yet been elucidated, but anyway, when such a trouble occurs, the above-described timeout event occurs for the control data.
[0009]
As described above, in a system in which a timeout event occurs in an application program of a host device, even if the communication interface itself employs a measure that can compensate for interruption of data communication, such as IEEE1394, the host device and the printer Reliable data communication cannot be guaranteed.
[0010]
In addition, as described above, in the IEEE1394 communication network, if the network configuration changes during print data transmission, the bus topology is reset and the network topology is reconstructed, and then the same printing immediately before the bus reset is performed. Data is retransmitted. In this case, it is desirable for the printer to selectively receive only the remaining portion that has not yet been received without receiving again the portion of the print data that has been received before the bus reset. However, it is not easy to selectively receive such remaining data. In other words, because the network topology is reconstructed by a bus reset, the address of the host device and the printer on the network, the address of the resources in the host device, etc. will be different from those before the bus reset. There is. As a result, 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 problem as described above may be present not only in communication between the host device and the printer but also in various other inter-device communication.
[0012]
The present invention has been made in view of the above circumstances, and an object thereof is to solve the latter problem among the above two problems of timeout and network topology reconstruction.
[0013]
That is, an object of the present invention is to enable selective transmission of only untransmitted remaining data after restructuring of the network topology when the communication network configuration changes during data transmission in data communication between devices. There is.
[0014]
[Means for Solving the Problems]
An apparatus for controlling data communication between apparatuses on a communication network according to the first aspect of the present invention is a data receiving means for gradually receiving data of a predetermined data size from the transmitting apparatus at the receiving apparatus. In the receiving device, the received data size storage means for updating and storing the received data size or the unreceived remaining data size and the configuration of the communication network change with the progress of the reception of the data. Immediately after, the receiving side device and the transmitting side device perform a bus reset to reconstruct the topology of the communication network, and the transmitting side device immediately after the topology reconstruction, the data Means for re-sending a reception request to the receiving side device; and immediately after the topology is reconstructed at the receiving side device, the data receiving from the transmitting side device A determination request for determining whether or not the data requested by the reception request is the same data as the data received immediately before the bus reset; If the requested data is the same data received immediately before the bus reset, the received data size or the remaining data size stored immediately before the bus reset is used to start the requested data from the beginning. Data re-receiving means for skipping a data portion corresponding to the received data size and selectively receiving a subsequent unreceived data portion.
[0015]
In a preferred embodiment of the control device of the present invention, the transmitting device further includes means for assigning a signature for distinguishing each data transmitted to the receiving device from other data, When 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 means can perform the data immediately before the bus reset with respect to the requested data. Give the same signature as. Then, the determination unit of the receiving device compares the signature of the data received immediately before the bus reset with the signature of the requested data, thereby receiving the requested data immediately before the bus reset. Whether or not it is the same as the data is determined.
[0016]
In addition, in a case where, as a result of the determination, the requested data is different from the data received immediately before the bus reset in the receiving side device, the entire requested data Is further included.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, as an example for explanation, data communication between a host device such as a personal computer and an electronic printer such as a laser printer or an ink jet printer will be taken up.
[0018]
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 the host device and an electronic printer.
[0019]
In response to a user request, the printer driver 10 creates and outputs print data of a document desired by the user. The print data output from the printer driver 10 is temporarily stored in the spooler 30 and then transmitted from the spooler 30 to be transmitted to the port monitor 40, IEEE1394.3 controller 50, SBP2 controller 60, IEEE1394 bus driver 70, IEEE1394 connector 80, and so on. The data is sent to the printer through the IEEE1394 cable 90.
[0020]
The printer utility 20 acquires the current status of the printer from the printer periodically or in response to a user request, or performs various special operations for maintenance of the printer in response to a user request. (For example, control data for performing ink cartridge replacement, head cleaning, test printing, status printing, paper feed / discharge, etc.) is output. The control data output from the printer utility 20 is sent to the printer through the port monitor 40, IEEE1394.3 controller 50, SBP2 controller 60, IEEE1394 bus driver 70, IEEE1394 connector 80, and IEEE1394 cable 90.
[0021]
The IEEE 1394.3 controller 50 performs communication protocol control compliant with the standard IEEE 1394.3, 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. Is called. The SBP2 controller 60 performs communication protocol control conforming to the standard SBP2. The IEEE1394 bus driver 70 performs particularly physical communication signal control conforming to the standard IEEE1394. The IEEE1394 connector 80 is a physical connector to which the IEEE1394 cable 90 is connected.
[0022]
Although not shown, there are also a port monitor, IEEE1394.3 controller, SBP2 controller, IEEE1394 bus driver, and IEEE1394 connector on the printer side as described above. A program or circuit for interpreting print data and control data from the host device and controlling the printer is present above the port monitor. The communication control operation of the printer according to the principle of the present invention described below is mainly performed by the IEEE1394.3 controller in the printer.
[0023]
FIG. 2 shows a schematic procedure for data communication between a host device and a printer compliant with IEEE1394.
[0024]
When a transmission request for print data or control data is generated from the printer driver 10 or the printer utility 20 in the host device, the host device stores an operation request block (hereinafter, “ A data block 100 called “ORB” and a data buffer 110 storing print data or control data to be transmitted are constructed, and an ORB read request is transmitted to the printer as shown in step S1. In response to the ORB read request from the host device, the printer reads the ORB from the host device as shown in step S2.
[0025]
The ORB describes the operation requested from the host device to the printer (for example, data read or write), the start address of the data buffer 110, the data size, and the like. As shown in step S3, the printer executes the operation requested by the ORB. A typical example of the 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). Another type of operation required by the ORB is, for example, by writing 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 stores 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. Write to the register 120 on the memory. In the SB, the address of the corresponding ORB, the completion status of the operation requested by the ORB (for example, completed or incomplete), and the like are described. In short, the SB is a response from the printer to a processing request (ORB) from the host device.
[0026]
FIG. 3 shows the configuration of the ORB.
[0027]
As shown in FIG. 3, the ORB 100 includes fields such as a pointer, a data buffer address, an operation, a data buffer size, a queue number, and a signature.
[0028]
Here, the pointer field in the ORB 100 describes a pointer to the subsequent ORB 100-2 when another ORB 100-2 is linked to the ORB 100. FIG. 3 shows an example in which one ORB 100-2 is linked to another ORB 100-2, but another ORB is linked after the second ORB to make the ORB chain longer. Can do. When multiple ORBs are serially linked in this way, the printer reads the previous ORB, executes the requested processing, returns the SB to the host device, and then continues to read the next ORB. As a result, the requested process is executed. For example, when the printer utility 20 monitors the printer status, an ORB that requests the printer to read control data for causing the printer to prepare status data from the host device and the prepared status data to the host device It will be linked to the ORB that requests the printer to write to. In this case, the printer reads the control data in response to the first ORB, prepares status data according to the control data, and then receives the second ORB and returns the status data to the host device.
[0029]
In the data buffer address field in the ORB 100, the head address of the data buffer 110 in the host device is described. The operation field describes the type of operation required for the printer, for example, reading print data or control data from the data buffer 110 or writing status data to the data buffer 110. The The data size of the data buffer 110 is described in the data buffer size field.
[0030]
In the queue number field in the ORB 100, a queue number indicating a logical channel used when executing the operation requested by the ORB 100 is described. The IEEE1394 communication interface has two logical channels, a data channel and a control channel. Therefore, the queue number indicating either the data channel or the control channel is described in the queue number field. For example, a queue number indicating a data channel is written in an ORB that requests reading of print data. Therefore, the print data is transmitted from the host device to the printer using the data channel. In addition, for example, a queue number indicating a control channel is written in an ORB that requests reading of control data. Therefore, the control data is transmitted from the host device to the printer using the control channel. Further, for example, a queue number indicating a control channel is written in an ORB that requests writing of status data. Therefore, the status data is transmitted from the printer to the host device using the control channel.
[0031]
The signature field in the ORB 100 describes a signature that is an identification number for distinguishing the ORB 100 from other ORBs. The printer compares the signature of the ORB just received with the signature of the ORB received before that. If the signatures are different, the ORB just received is a new ORB that is different from the previous ORB. On the other hand, if both signatures match, the ORB just received can be recognized as the same ORB as the previous ORB retransmitted from the host device.
[0032]
FIG. 4 shows the configuration of the SB.
[0033]
As shown in FIG. 4, the SB 200 has fields such as an ORB address, a completion state / error state, and an unprocessed data size.
[0034]
In the ORB address field in the SB 200, an address in the host device of the ORB corresponding to the SB 200 is described. The host device can identify which ORB the SB 200 is responding to based on the ORB address in the received SB 200.
[0035]
The completion status / error status field in the SB 200 describes whether the corresponding ORB request operation has been completed or not completed, and if it is not completed, the cause is an error or a timeout (described later).
[0036]
The size of unprocessed data in the SB 200 includes the size of unprocessed data in the data buffer 110 (or the size of already processed data) when the corresponding ORB request operation is incomplete. Described.
[0037]
FIG. 5 shows a specific example of a procedure for transmitting print data and control data from the host device to the printer under communication control according to the principle of the present invention.
[0038]
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). In step S12, the data channel ORB (hereinafter abbreviated as “D_Ch_ORB”) that requests the printer to read the print data through the data channel (hereinafter abbreviated as “D_Ch”) and the data storing the print data are stored. A buffer is built in the host device. Further, after issuing a print data transmission request, the printer driver starts time counting in step 13.
[0039]
In step 14, the printer reads the D_Ch_ORB from the host device. (Note that, before reading the ORB by the printer, as described above, an ORB read request is sent from the host device to the printer. However, this step will not be described below.) Subsequently, in step S15, The printer starts the operation requested by the D_Ch_ORB, that is, the operation for reading the print data from the data buffer in the host device. Usually, the size of the print data is quite large, and the print data is divided into a large number of data blocks (packets) and read into the printer in order from the first data block to the last data block (that is, in units of data blocks). Transmitted from the host device to the printer). Immediately after starting to read the print data, the printer starts time counting in step S16.
[0040]
While the print data is being transmitted from the host device to the printer in this way, in the host device, as shown in step S17, the printer utility issues a control data transmission request (that is, outputs control data). . In fact, since the printer utility periodically acquires status data from the printer, control data for status acquisition is frequently issued during transmission of print data. When a control data transmission request is issued, the control channel ORB (hereinafter abbreviated as “C_Ch_ORB”) requesting the printer to read the control data through the control channel (hereinafter abbreviated as “C_Ch”), and the control data Is stored in the host device. However, at that time, if the print data is being transmitted through D_Ch, the host device can transmit print data and control data simultaneously in parallel using D_Ch and C_Ch simultaneously (according to the IEEE1394 standard). However, as shown in step S18, the control data transmission request associated with the C_Ch_ORB is placed in the C_Ch transmission hold queue, thereby temporarily holding the control data transmission. Also, after issuing a control data transmission request, the printer utility starts time counting as shown in step S19.
[0041]
Now, each of the printer driver and printer utility in the host device starts the respective time counts in the above-described steps S13 and S19, and then receives the response from the printer, and the count value becomes a predetermined time limit (for example, When a time-out event that reaches 30 seconds occurs, it is determined that communication with the printer is impossible (for example, the printer is not connected to the host device or the power is not turned on), and a predetermined countermeasure is taken. It will be.
[0042]
In order to prevent the occurrence of a timeout event in such a host device, the printer operates as follows. That is, after starting the reading of the print data in step S15 described above, the printer does not finish reading all of the print data yet, and as shown in step S20, some error (for example, no paper error Etc.), and further reading of the print data cannot be performed, immediately, as shown in step S21, an SB indicating that the request processing has not been completed is returned to the host device. Even if no error occurs, a time-out event occurs in which the count value of the time count started in step S16 reaches a predetermined upper limit time before reading of all print data is not yet completed (step S20). In addition, the printer immediately returns an SB indicating that the request processing has not been completed to the host device (step S21). Here, the upper limit time when the timeout event occurs in the printer is set to a time sufficiently shorter than the time limit when the timeout event occurs in the host device. For example, if the host time-out time limit is 30 seconds, for example, the printer time-out time limit is 5 seconds, for example. Even in the case of the above error occurrence, instead of immediately returning an incomplete SB, the time count starts from the time of error occurrence, and the count value is equal to the upper limit time (that is, the time limit limit time on the host side). When a sufficiently short time (for example, 5 seconds) is reached, an incomplete SB may be returned.
[0043]
When the incomplete SB is returned to the host device in step S21 described above, the host device notifies the printer driver that an incomplete response has been received from the printer, as shown in step S22. That is, the printer driver receives a response from the printer. At this time, as is clear from the above description that the upper limit time is short, the time count value of the printer driver has not reached the time limit, so that no timeout event occurs in the printer driver. Simultaneously with the reception of the incomplete SB, as shown in step S23, the print data transmission request associated with D_Ch_ORB that has been requested to read the print data has been placed in the D_Ch transmission hold key, As a result, transmission of print data that has been performed so far is temporarily interrupted. 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 extracted from the transmission suspension queue and executed. Thereby, C_Ch_ORB is read into the printer (step S25), and then the control data requested by the C_Ch_ORB is read by the printer (step S26). Usually, the data size of the control data is much smaller than the print data (for example, it fits in one or a small number of data blocks or packets). It will be completed in an extremely short time. Also, even if an error has occurred in the printer, in most cases, the printer can read the control data, so the reading of the control data is completed instantaneously. When the reading of the control data is completed, the printer returns an SB indicating that the reading of the control data is completed to the host device, as shown in step S27.
[0044]
In the host device, when the control data read completion SB is returned from the printer, the printer utility is notified of the response from the printer, as shown in step S28. That is, the printer utility receives a response from the printer. At this point in time, as is clear from the above description, the time count value of the printer utility has not reached the time limit, so that no timeout event occurs in the printer utility. Simultaneously with the reception of the completed SB, as shown in step S29, the print data transmission request that has been in the D_Ch transmission suspension queue is extracted 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 S30), and then the print data requested by the D_Ch_ORB is read by the printer (step S31). At this time, the printer stores the size of the data that has already been read at the time of the previous print data reading and the size of the remaining data that has not yet been read, and uses it to read the read data from the data buffer. Skip and read only the remaining data that has not yet been read. (Although not shown, when the data is read, the time is counted in the same manner as in step S16 described above.) When the reading of all the print data is completed, the printer reads the print data as shown in step S32. The SB indicating that the reading has been completed is returned to the host device. In the host device, the printer driver is notified that the printer has received a response to read the print data.
[0045]
Note that when print data is read smoothly by the printer without any problems, the print data will be read in a time much shorter than the time limit for the above timeout. There is no timeout event.
[0046]
FIG. 6 shows a specific example of the data communication procedure before and after the 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.
[0047]
As shown in FIG. 6, when a printer reads a certain ORB (D_Ch or C_Ch, which may be D_Ch_ORB in this example) from the host device in step S41, the printer immediately stores the ORB in step S42 (this storage). The content naturally includes the signature of the ORB). Subsequently, in step S43, the printer executes data reading from the requested host device by the ORB. While executing the data reading, the printer counts and stores the number of processed (read) data (or data size) and the number of remaining data (or data size) not yet processed (not read). To do.
[0048]
Here, while the printer is reading data, the configuration of the IEEE 1934 communication network to which the host device and the printer are connected has changed (for example, some communication cable in the communication network has been disconnected, or The communication cable is plugged in again). Then, immediately after the network configuration changes, in step S45, a bus reset event occurs between the host device and the printer, and as shown in steps S46 and S47, the host device and the printer rebuild the IEEE1934 communication network topology. Is done. As soon as the network topology is reconstructed, 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. When the printer reads the ORB in step S48, in step S49, the printer compares the current ORB signature with the previous ORB signature stored in step S42 before the bus reset. As a result, if the signatures match, the printer recognizes that the current ORB is the same as the previous ORB. Subsequently, in step S50, the printer checks whether the number of remaining data stored in step S43 is zero (or the remaining number of processed data stored last time and the remaining data size described in the current ORB). You may calculate the number of data and check it). If the remaining number of data is not zero, the printer recognizes that the data requested in the previous ORB has not been read, and in step S51, the top address of the data buffer designated by the ORB. Is skipped by the number of processed (read) data, and only the remaining data that has not yet been read is read. In this way, the printer uses the number of data (data size) instead of the address on the data buffer to manage the location where the data reading in the data buffer is interrupted. Therefore, even if the network topology is changed by the bus reset, the remaining data can be accurately found out from the data buffer and selectively read. When all the requested data has been read, the printer returns a completed SB to the host device in step S52.
[0049]
7 to 13 show the detailed procedure of communication control between the host apparatus and the printer for realizing the specific operation as described above.
[0050]
FIG. 7 shows a control flow of the host device when a data transmission request such as print data or control data is generated.
[0051]
As shown in FIG. 7, when a data transmission request occurs, first, it is a data transmission request to D_Ch (for example, a print data transmission request) or a data transmission request to C_Ch (for example, a control data transmission request). ) (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 data transmission request associated with the D_Ch_ORB 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 data transmission request associated with the C_Ch_ORB is put in the C_Ch transmission hold queue (S65). S66).
[0052]
FIG. 8 shows a control procedure of the host device when transmitting the ORB.
[0053]
As shown in FIG. 8, first, an ORB processing flag is checked in order to know whether another ORB processing is currently being executed (S71). As a result, if the ORB processing flag is ON, other ORB processing is currently being executed, and the ORB is not transmitted. On the other hand, if the ORB processing flag is OFF, no other ORB processing is currently being executed. Next, it is first checked whether there is a data transmission request in the C_Ch transmission suspension queue (S72). .
[0054]
As a result, if there is a data transmission request in the C_Ch transmission suspension queue, the transmission request is taken out from the C_Ch transmission suspension queue (S73). Subsequently, the C_Ch_ORB incomplete flag is checked (S74). As a result, if the C_Ch_ORB incomplete flag is ON, it means that the data transmission request retrieved from the C_Ch transmission suspension queue has been executed in the past but has been suspended due to incompleteness. If the C_Ch_ORB incomplete flag is OFF, the data transmission request retrieved from the C_Ch transmission pending queue is not updated. Therefore, the signature of C_Ch_ORB associated with the extracted data transmission request is updated (S76). Subsequently, the C_Ch_ORB is transmitted to the printer (S76) (that is, a read request for the C_Ch_ORB is sent to the printer to cause the printer to read the C_Ch_ORB). Then, the ORB processing flag is set to ON (S77).
[0055]
In this way, if there is a data transmission request in the C_Ch transmission hold queue, the host device preferentially executes it, and if there are no more requests in the C_Ch transmission hold queue, the host device then executes D_Ch. The data transmission request in the transmission pending queue is checked (S78).
[0056]
As a result, if there is a data transmission request in the D_Ch transmission suspension queue, the transmission request is taken out from the D_Ch transmission suspension queue (S79). Subsequently, the D_Ch_ORB incomplete flag is checked (S80). As a result, if the D_Ch_ORB incomplete flag is ON, it means that the data transmission request retrieved from the D_Ch transmission suspension queue has been executed in the past but has been suspended due to incompleteness. If the D_Ch_ORB incomplete flag is OFF, the D_Ch_ORB signature associated with the received data transmission request is not updated, but the D_Ch_ORB incomplete flag is OFF. Therefore, the signature of D_Ch_ORB associated with the extracted data transmission request is updated (S81). Subsequently, the D_Ch_ORB is transmitted to the printer (S82) (that is, the D_Ch_ORB read request is sent to the printer to cause the pudding to read the D_Ch_ORB). Then, the ORB processing flag is turned ON (S83).
[0057]
If there is no request in either the C_Ch transmission hold queue or the D_Ch transmission hold queue, the ORB processing flag is set to OFF (S84).
[0058]
FIG. 9 shows the control procedure of the host device immediately after the bus reset.
[0059]
As shown in FIG. 9, immediately after the bus reset, the host device transmits the ORB transmitted immediately before the bus reset to the printer again with the same signature (S91). Then, the ORB processing flag is set to ON (S92).
[0060]
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]
As shown in FIG. 10, when receiving the ORB, the printer stores and stores the ORB (S101). As described above, the signature included in the stored ORB is used to determine the same / non-identity between this ORB and the previous or next received ORB. Subsequently, the printer determines whether the received ORB is D_Ch or C_Ch (S102, S103). If the result is D_Ch_ORB, then it is checked whether the printer is currently in an error state or a normal state. If the result is an error state, an SB indicating that the process requested by the ORB is incomplete due to an error is returned to the host device (S105).
[0062]
On the other hand, if the result of the check in step S104 is that the printer is in a normal state, the timer that counts up to the upper limit time (for example, 5 seconds) described above is started (S105), and the ORB signature received this time and the previous time received The signature of the ORB is compared (S107). As a result, if both signatures match, this ORB means that the previous ORB has been retransmitted. In that case, the printer next checks whether or not the number of remaining data stored when the previous ORB processing is executed is zero (S107). (Instead of using the remaining number of data stored when the previous ORB process was executed, the number of processed (read) data stored when the previous ORB process was executed and the current ORB As a result, if the number of remaining data is not zero, it means that the previous ORB request processing has not been completed. The printer skips the address by the number of processed data (number of read data) stored for the previous ORB from the start address of the data buffer specified by the current ORB, and does not start from the next address. Reading of remaining processing data (for example, remaining printing data) is started (S110). Then, the D_Ch_ORB processing flag is set to ON (S111).
[0063]
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 previous ORB request processing has already been completed. (S112).
[0064]
Also, if the signature comparison in step S107 above shows that the previous and current signatures are different, this means that the current ORB is a new ORB different from the previous one, so the printer is designated by the current ORB. Reading of data (for example, print data) is started from the start address of the data buffer (S108). Then, the D_Ch_ORB processing flag is set to ON (S111).
[0065]
In step S103, if the received ORB is C_Ch, the printer starts reading data (for example, control data) from the head address of the data buffer specified by C_Ch_ORB. (S113). Then, the C_Ch_ORB processing flag is turned ON (S114).
[0066]
Now, in the reading process of data (for example, print data) by D_Ch started in step S108 or S11 of FIG. 10, the data is divided into a large number of data blocks (or packets) as described above. Then, the printer reads the many data blocks one by one in order.
[0067]
FIG. 11 shows a control procedure performed by the printer each time reading of one data block is completed with D_Ch.
[0068]
As shown in FIG. 11, when the reading of one data block is completed, the printer increases the number of processed data (number of read data) by one data block and decreases the number of remaining data by one data block (S121). Then, from the updated number of processed data or the number of remaining data, the printer checks whether reading of all data blocks designated by the ORB is completed (S122). As a result, if reading of all data blocks is not yet completed, 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 (S124), and the D_Ch_ORB processing flag is turned OFF (S125).
[0069]
Referring to FIG. 10 again, when starting data reading with D_Ch, the printer starts a timer in step S106 and counts the time required for reading. And as already explained, when the count value of the timer reaches a predetermined upper limit time (for example, 5 seconds) before the reading of all data requested by the ORB is completed, a timeout event occurs. Become.
[0070]
FIG. 12 shows a control procedure of the printer when a time-out event occurs during data reception with D_Ch.
[0071]
As shown in FIG. 12, when a timeout event occurs (Yes in S131), the printer checks the D_Ch_ORB processing flag (S132). As a result, if the D_Ch_ORB processing flag is ON, it means that reading of all data requested by D_Ch_ORB has not been completed, so the printer will indicate that the requested processing has not been completed due to a timeout. The SB is returned to the host device (S133), and the D_Ch_ORB processing flag is turned OFF, and data reading with the D_Ch is temporarily interrupted (S134).
[0072]
FIG. 13 shows a control procedure of the host device when the SB is received from the printer.
[0073]
As shown in FIG. 13, when the SB is received from the printer, the host device interprets the received SB and checks whether or not the processing requested by the ORB has been normally completed (S141). As a result, if it is completed, the resources related to the completed ORB are released (S142). If the completed ORB is D_Ch (D_Ch in S143), the D_Ch_ORB incomplete flag is turned OFF (S144), while if the completed ORB is C_Ch (C_Ch in S143), C_Ch_ORB The incomplete flag is turned OFF (S145). Then, the communication control of the host device proceeds to the processing at the time of ORB transmission shown in FIG.
[0074]
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 D_Ch (D_Ch in S146). The associated request is put in the D_Ch transmission hold queue (S147), and the D_Ch_ORB incomplete flag is turned ON (S148). On the other hand, if the incomplete ORB is C_Ch (C_Ch in S146), the request associated with the incomplete ORB is placed in the C_Ch transmission hold queue (S149), and the C_Ch_ORB incomplete flag is turned ON ( S150). Then, the communication control of the host device proceeds to the processing at the time of ORB transmission shown in FIG.
[0075]
As mentioned above, although embodiment of this invention was described, this is an illustration for description of this invention, and is not the meaning which limits the scope of the present invention only to this embodiment. Therefore, the present invention can be implemented in various other forms without departing from the gist thereof. For example, the present invention can be applied not only to data communication between a host device and an electronic printer, but also to data communication between various other devices. Further, the present invention can be applied not only to data communication using IEEE1394 but also to data communication using various other communication interfaces.
[Brief description of the drawings]
FIG. 1 shows a configuration of a program or hardware module in a host device related to data communication in an embodiment of the present invention applied to data communication between the host device and an electronic printer.
FIG. 2 is a diagram showing a schematic procedure of data communication between a host device and a printer compliant with IEEE1394.
FIG. 3 is a diagram showing a configuration of an operation request block (ORB).
FIG. 4 is a diagram showing a configuration of a status block (SB).
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 principle of the present invention.
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 IEEE 1934 communication network to which a host device and a printer are connected changes under communication control according to the principle of the present invention.
FIG. 7 is a flowchart illustrating a control flow of the host device when a transmission request for print data, control data, or the like occurs.
FIG. 8 is a flowchart showing a control procedure of the host device when transmitting an ORB.
FIG. 9 is a flowchart showing a control procedure of the host device immediately after a bus reset.
FIG. 10 is a flowchart illustrating a printer control procedure when an ORB is received.
FIG. 11 is a flowchart illustrating a printer control procedure when reception of one block data is completed.
FIG. 12 is a flowchart showing a printer control procedure when a timeout-out event occurs during data reception at D_Ch.
FIG. 13 is a flowchart showing a control procedure of the host device when an SB is received.
[Explanation of symbols]
10 Printer driver
20 Printer Utility
50 IEEE1394.3 controller
100 Operation request block (ORB)
110 Data buffer
120 registers
200 Status block (SB)

Claims (3)

通信ネットワーク上で装置間のデータ通信を制御するための装置において、
受信側装置にて、送信側装置から所定データサイズのデータを漸次に受信するデータ受信手段と、
前記受信側装置にて、前記データの受信の進行に伴って、受信済みデータサイズ及び未受信の残りデータサイズを更新し記憶する受信済み及び未受信データサイズ記憶手段と、
前記通信ネットワークの構成が変化した直後、前記受信側装置及び前記送信側装置にて、バスリセットを行って前記通信ネットワークのトポロジを再構築するトポロジ再構築手段と、
前記送信側装置にて、前記トポロジの再構築直後、データ受信要求を前記受信側装置に再び送る手段と、
前記受信側装置にて、前記トポロジの再構築直後、前記送信側装置からの前記データ受信要求を受け、前記受信要求によって要求されたデータが前記バスリセット直前に受信したデータと同じデータであるか否かを判断する判断手段と、
前記受信側装置にて、前記判断の結果、前記要求されたデータが前記バスリセット直前に受信したデータと同じデータである場合、前記受信済み及び未受信データサイズ記憶手段により記憶された未受信の残りデータサイズがゼロか否かを判断し、ゼロで無い場合にのみ前記バスリセット直前に記憶した前記受信済みデータサイズを用いて、前記要求されたデータのうち、先頭から前記受信済みデータサイズ分のデータ部分をスキップして、後続の未受信のデータ部分を選択的に受信するデータ再受信手段と、
を備えた装置間データ通信の制御装置。
In a device for controlling data communication between devices on a communication network,
A data receiving means for gradually receiving data of a predetermined data size from the transmitting side device at the receiving side device;
Received and unreceived data size storage means for updating and storing the received data size and the unreceived remaining data size as the reception of the data proceeds in the receiving side device;
Immediately after the configuration of the communication network is changed, a topology rebuilding unit that rebuilds the topology of the communication network by performing a bus reset in the reception side device and the transmission side device;
Means for re-sending a data reception request to the receiving-side apparatus immediately after the topology is reconstructed in the transmitting-side apparatus;
In the receiving device, immediately after the topology is reconstructed, whether the data requested by the receiving device receives the data reception request from the transmitting device and is the same as the data received immediately before the bus reset. A determination means for determining whether or not,
When the requested data is the same data as the data received immediately before the bus reset as a result of the determination, the receiving side apparatus stores the received and unreceived data size stored in the received data size storage means. It is determined whether or not the remaining data size is zero. Only when the remaining data size is not zero, the received data size stored immediately before the bus reset is used for the received data size from the head of the requested data. A data re-receiving unit that skips the data portion of and selectively receives a subsequent unreceived data portion;
A device for data communication between devices.
前記送信側装置にて、前記受信側装置へ送信される各データに対して、別のデータから区別するためのシグネチャを付与するものであって、前記トポロジの再構築直後の前記受信要求によって要求されたデータが前記バスリセット直前のデータと同じデータであるか否かを、前記受信側装置からのデータ送信要求に対しての送信実行が未完了か否かを表す未完了フラグに基づいて判断し、同じデータである場合には、前記要求されたデータに対して、前記バスリセット直前のデータと同じシグネチャを付与するシグネチャ割り当て手段を更に備え、
前記受信側装置の判断手段は、前記バスリセット直前に受信したデータのシグネチャと、前記要求されたデータのシグネチャとを比較することにより、前記要求されたデータが前記バスリセット直前に受信したデータと同じか否かを判断するようになった、請求項1記載の装置間データ通信の制御装置。
In the transmission side device, each data transmitted to the reception side device is given a signature for distinguishing from other data, and requested by the reception request immediately after the topology reconstruction. Whether the received data is the same as the data immediately before the bus reset is determined based on an incomplete flag indicating whether transmission execution for the data transmission request from the receiving side device is incomplete And, if the data is the same, further comprises signature assigning means for giving the requested data the same signature as the data immediately before the bus reset,
The determination means of the receiving side device compares the signature of the data received immediately before the bus reset with the signature of the requested data, and the data received by the requested data immediately before the bus reset The inter-device data communication control device according to claim 1, wherein it is determined whether or not they are the same.
通信ネットワーク上で装置間のデータ通信を制御するための方法において、
受信側装置にて、送信側装置から所定データサイズのデータを漸次に受信するステップと、
前記受信側装置にて、前記データの受信の進行に伴って、受信済みデータサイズ及び未受信の残りデータサイズを更新し記憶するステップと、
前記通信ネットワークの構成が変化した直後、前記受信側装置及び前記送信側装置にて、バスリセットを行って前記通信ネットワークのトポロジを再構築するステップと、
前記送信側装置にて、前記トポロジの再構築直後、データ受信要求を前記受信側装置に再び送るステップと、
前記受信側装置にて、前記トポロジの再構築直後、前記送信側装置からの前記データ受信要求を受け、前記受信要求によって要求されたデータが前記バスリセット直前に受信したデータと同じデータであるか否かを判断するステップと、
前記受信側装置にて、前記判断の結果、前記要求されたデータが前記バスリセット直前に受信したデータと同じデータである場合、前記受信済み及び未受信データサイズを更新し記憶するステップにおいて記憶された未受信の残りデータサイズがゼロか否かを判断し、ゼロで無い場合にのみ前記バスリセット直前に記憶した前記受信済みデータサイズを用いて、前記要求されたデータのうち、先頭から前記受信済みデータサイズ分のデータ部分をスキップして、後続の未受信のデータ部分を選択的に受信するステップと、
を備えた装置間データ通信の制御方法。
In a method for controlling data communication between devices over a communication network,
In the receiving side device, gradually receiving data of a predetermined data size from the transmitting side device;
Updating and storing the received data size and the unreceived remaining data size as the reception of the data proceeds in the receiving side device;
Immediately after the configuration of the communication network is changed, the receiving side device and the transmitting side device perform a bus reset to reconstruct the topology of the communication network;
In the transmitting device, immediately after restructuring the topology, sending a data reception request to the receiving device again;
In the receiving device, immediately after the topology is reconstructed, whether the data requested by the receiving device receives the data reception request from the transmitting device and is the same as the data received immediately before the bus reset. Determining whether or not,
If the requested data is the same as the data received immediately before the bus reset as a result of the determination, the receiving side device stores the received and unreceived data sizes in the step of updating and storing them. It is determined whether the size of the remaining unreceived data is zero, and only when the received data size is not zero, the received data size stored immediately before the bus reset is used to receive the received data from the head of the requested data. Skipping the data portion for the data size already received and selectively receiving the subsequent unreceived data portion;
A method for controlling data communication between devices.
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 JP2003258804A (en) 2003-09-12
JP3794480B2 true 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)

Families Citing this family (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
JP2003258804A (en) 2003-09-12

Similar Documents

Publication Publication Date Title
JP3711432B2 (en) Peripheral processing apparatus and control method thereof
TW552780B (en) USB communication control apparatus, USB communication system and USB communication control method
US8619290B2 (en) Image forming apparatus, image forming system, and image forming method
JP2004157966A (en) End point memory control method and device, usb device, and storage medium
TW200923661A (en) Improved remote universal serial bus access method
JP2008073887A (en) Printer and method for processing logical packet
US5854940A (en) Output control system for interpreting input data according to a specific control language based upon outputs from a plurality of control language determining devices
US20070073824A1 (en) Apparatus and method for acquiring identification information when a bus reset occurs
JP3996928B2 (en) How to handle corrupted data
WO2011137608A1 (en) Packet based data transfer system and method for host-slave interface
JP2007088775A (en) Radio communication system, device, and method
JPH07168774A (en) System and method for generation of first message of nonconnective session-directive protocol
US6937355B1 (en) Data communications apparatus for resuming data transfer after interruption
JP3794480B2 (en) Control device and method for inter-device data communication
EP0749071A2 (en) Method and system for information transfer between hostcomputer and peripherals device
JP3951113B2 (en) Control device and method for inter-device data communication
JP4413806B2 (en) Fault isolation method, communication apparatus and program having fault isolation function
JP2000224260A (en) Communication controller
JP4306118B2 (en) Printer and printer control method
JP6136754B2 (en) Communication control apparatus and image forming apparatus
JP2000122819A (en) Network printer
US20040213277A1 (en) Method and related circuit for increasing network transmission efficiency by increasing a data updating rate of a memory
CN109120628A (en) Print system kilomega network communication means, terminal and system
JP2005228222A (en) Serial data transfer method and device
JP2658931B2 (en) Printer controller

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