JP2004032214A - Method for transmitting/receiving data, transmitter, receiver, and transmitter/receiver - Google Patents
Method for transmitting/receiving data, transmitter, receiver, and transmitter/receiver Download PDFInfo
- Publication number
- JP2004032214A JP2004032214A JP2002183595A JP2002183595A JP2004032214A JP 2004032214 A JP2004032214 A JP 2004032214A JP 2002183595 A JP2002183595 A JP 2002183595A JP 2002183595 A JP2002183595 A JP 2002183595A JP 2004032214 A JP2004032214 A JP 2004032214A
- Authority
- JP
- Japan
- Prior art keywords
- data
- compressed
- code
- header
- 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.)
- Granted
Links
Images
Landscapes
- Information Transfer Systems (AREA)
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、パケットヘッダが付加されたデータを送受信するデータ送受信方法、パケットヘッダが付加されたデータを送信する送信機、パケットヘッダが付加されたデータを受信する受信機、及びパケットヘッダが付加されたデータを送受信する送受信装置に関するものである。
【0002】
【従来の技術】
パーソナルコンピュータ及び周辺機器等のデータ送受信においては、データをパケット化して送受信する。このパケット送受信の方法としては、大きく分けて2通りある。
第1の方法は、送信するデータの前に、このデータのデータ長の情報を含むパケットヘッダを付加し、パケットのデータ長を予め規定して送信する方法である。この方法では、連続するパケットデータの区切りは、上述したデータ長に基づき判定される。つまり、受信側は、データ長分のデータ受信が完了してはじめて、1つのパケットデータの受信が完了したと判定する。
【0003】
第2の方法は、送信するデータを圧縮(例えばパックビッツ圧縮)し、この圧縮したデータの前に、圧縮したデータに現れないコードを含むパケットヘッダを付加する方法である。この方法では、連続するパケットデータの区切りは、上述したパケットヘッダを検出することにより判定される。つまり、受信側は、パケットヘッダを検出することにより、新たなデータの始まりであると判定する。また、この方法では、圧縮してデータが短くなった分だけ、データの送受信速度は速くなるという長所を有している。
このような、圧縮処理の1つの方法が、特開2000−242450号公報に開示されている。
【0004】
【発明が解決しようとする課題】
しかし、上述した第1の方法では、何らかの要因で送受信中のデータが途切れた場合、復帰処理が複雑になるという問題がある。これは、データ長分のデータの送受信が終了しない限り、この途切れた部分のデータ転送が完了したものと判断されない為であり、タイムアウト処理が実行される迄待つか、又は所定のデータ長に達する迄、ダミーデータを送信し続けなければならない。
【0005】
また、ダミーデータを送信する場合に、データ長の長いデータが途中で途切れてしまうと、ダミーデータの送信数が増える分だけ復帰に時間がかかることになる。
さらに、第1の方法では、データを圧縮しない為、データ長の長いデータの送信には、第2の方法のようにデータを圧縮する方法に比べて、転送に時間がかかるという問題がある。
【0006】
また、第2の方法では、上述したように、圧縮したデータの前に、この圧縮したデータに現れないコードを含むヘッダを付加する必要がある。つまり、ヘッダに含まれるコードが、圧縮されたデータ内に現れないように、データを圧縮処理しなければならない。
その為、データ長が短く、圧縮効率が悪い場合には、圧縮処理に要する手間が増加するという短所が、圧縮処理してデータが短くなり、データ送受信速度が速くなるという長所を上回ることになる。つまり、圧縮効率が悪い場合には、一連のデータ送受信処理に時間がかかるという問題がある。
【0007】
また、1つのデータ内で同じ情報が連続しない場合等は、圧縮処理により、逆にデータ数が増加してしまう場合も生じる。
例えば、00から255迄の連続する256バイトのデータを、パックビッツ圧縮を用いて圧縮する場合、2バイトの圧縮符号が必要となり、また、同じ数が現れない為、0から255迄の256バイトは圧縮されず、合計258バイトとなる。
【0008】
更に、圧縮したデータは、格納先毎に、解凍回路を用いて解凍する必要がある。この解凍する時期は、入力されるデータの種類によって異なり、メモリに蓄えられた後に解凍する必要があるもの、格納される際に解凍する必要があるもの等がある。その為、複数の転送先がある場合には、複数の解凍回路を備える必要があり、回路が複雑・大型化する問題がある。
本発明は、上述したような事情に鑑みてなされたものであり、効率のよいパケットデータの送受信を実現できるデータ送受信方法、送信機、受信機及び送受信装置を提供することを目的とする。
【0009】
【課題を解決するための手段】
本発明に係るデータ送受信方法は、ヘッダ識別コード、データ長コード、及びデータ種類コードを含むパケットヘッダが付加されたデータを送受信するデータ送受信方法において、データを送信する場合は、該データのデータ種類コードにより、該データを圧縮するか否かを判定し、圧縮すると判定したときには、前記ヘッダ識別コードが含まれないように、前記データを圧縮して送信し、データを受信する場合は、該データのデータ種類コードにより、圧縮されたデータであるか否かを判定し、圧縮されたデータであると判定したときは、前記ヘッダ識別コードを検出しながら、データを受信し続け、圧縮されたデータでないと判定したときは、前記ヘッダ識別コードの検出を無効にし、前記データのデータ長コードが示す量のデータを受信することを特徴とする。
【0010】
本発明に係る送信機は、ヘッダ識別コード、データ長コード、及びデータ種類コードを含むパケットヘッダが付加されたデータを送信する送信機において、送信するデータのデータ種類コードにより、該データを圧縮するか否かを判定する手段と、該手段が圧縮すると判定したときに、前記ヘッダ識別コードが含まれないように、前記データを圧縮する手段と、該手段が圧縮したデータを送信する手段とを備えることを特徴とする。
【0011】
この送信機では、ヘッダ識別コード、データ長コード、及びデータ種類コードを含むパケットヘッダが付加されたデータを送信する。判定する手段が、送信するデータのデータ種類コードにより、データを圧縮するか否かを判定し、圧縮すると判定したときに、圧縮する手段が、ヘッダ識別コードが含まれないように、データを圧縮する。送信する手段が、その圧縮したデータを送信する。
【0012】
これにより、受信機側で、圧縮されたデータを受信した場合には、圧縮後のデータにヘッダ識別コードが含まれない為、ヘッダ識別コードを検出することにより、連続して送信される複数の異なるデータを区別しながら受信できる。また、受信機側で、非圧縮のデータを受信した場合には、データ長コードにより規定されたデータ長分のデータを受信する為、データを他のデータと区別することが出来る。
【0013】
ここで、データ種類コードの設定において、圧縮効率の高いデータ、例えばGDI(Graphics Device Interface )データを圧縮するコード設定に、データ長が短くまた圧縮効率の悪いデータ、例えば入力γデータを圧縮しないコード設定にすることにより、以下の効果が得られる。
データを圧縮する場合には、圧縮によるデータの転送量が減少する。また、データの受信が何らかの不具合により中断しても、次のデータの開始がヘッダにより判断できるため、前データの途中に次データが混在して両データの区別が出来なくなることはない。
【0014】
データを圧縮しない場合には、圧縮されたデータにヘッダ識別コードが含まれないように圧縮する処理が不要となり、処理の無駄がなくなる。また、データの受信が何らかの不具合により中断した場合においても、タイムアウト処理時間を短く設定することが出来、また、ダミーデータの転送量を少なく出来る。
以上により、効率のよいパケットデータの送信を実行できるデータ送信機を実現することが出来る。
【0015】
本発明に係る受信機は、ヘッダ識別コード、データ長コード、及びデータ種類コードを含むパケットヘッダが付加されたデータを受信する受信機において、受信したデータのデータ種類コードにより、圧縮されたデータであるか否かを判定する判定手段と、該判定手段が圧縮されたデータであると判定したときは、前記ヘッダ識別コードを検出しながら、データを受信し続ける手段と、前記判定手段が圧縮されたデータでないと判定したときは、前記データ長コードが示す量のデータを受信する受信手段と、該受信手段が受信している間は、前記ヘッダ識別コードの検出を無効にする無効手段とを備えることを特徴とする。
【0016】
この受信機では、ヘッダ識別コード、データ長コード、及びデータ種類コードを含むパケットヘッダが付加されたデータを受信する。判定手段が、受信したデータのデータ種類コードにより、圧縮されたデータであるか否かを判定し、判定手段が圧縮されたデータであると判定したときは、受信し続ける手段が、ヘッダ識別コードを検出しながら、データを受信し続ける。判定手段が圧縮されたデータでないと判定したときは、受信手段が、データ長コードが示す量のデータを受信し、受信手段が受信している間は、無効手段が、ヘッダ識別コードの検出を無効にする。
【0017】
これにより、圧縮されたデータを受信した場合には、圧縮後のデータにヘッダ識別コードが含まれない為、ヘッダ識別コードを検出することにより、連続して送信される複数の異なるデータを区別しながら受信出来る。また、非圧縮のデータを受信した場合には、データ長コードにより規定されたデータ長分のデータを受信する為、データを他のデータと区別することが出来る。
【0018】
ここで、データ種類コードの設定において、圧縮効率の高いデータ、例えばGDIデータを圧縮するコード設定に、データ長が短くまた圧縮効率の悪いデータ、例えば入力γデータを圧縮しないコード設定にすることにより、以下の効果が得られる。
データを圧縮する場合には、圧縮によるデータの転送量が減少する。また、データの受信が何らかの不具合により中断しても、次のデータの開始がヘッダにより判定できる為、前データの途中に次データが混在して両データの区別が出来なくなることはない。
【0019】
データを圧縮しない場合には、圧縮に伴う処理、つまり、圧縮されたデータにヘッダ識別コードが含まれないように圧縮する処理が不要となり、処理の無駄がなくなる。また、データの受信が何らかの不具合により中断した場合においても、タイムアウト処理時間を短く設定することが出来、また、ダミーデータの転送量を少なく出来る。
以上により、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0020】
本発明に係る受信機は、前記判定手段が圧縮されたデータであると判定したときに、受信データを格納する為のバッファメモリと、前記判定手段が圧縮されたデータでないと判定したときに、受信データを格納する為の、前記データ種類コードにより指定された格納先とを更に備えることを特徴とする。
【0021】
この受信機では、判定手段が、圧縮されたデータであると判定したときに、バッファメモリが、受信データを格納し、判定手段が、圧縮されたデータでないと判定したときに、データ種類コードにより指定された格納先が、受信データを格納する。
これにより、圧縮されたデータでない場合には、一旦、バッファメモリに格納されることなく、データの格納先に転送される。つまり、バッファメモリから格納先に転送する処理が不要となる。
従って、受信機内の負荷を減少させることが可能となり、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0022】
本発明に係る受信機は、前記受信手段が、前記データ長コードが示す量のデータを受信したときは、前記無効手段を停止すべくなしてあることを特徴とする。
【0023】
この受信機では、受信手段が、データ長コードが示す量のデータを受信したときは、無効手段を停止する。
この受信機は、圧縮していないデータを所定データ量受信すれば、ヘッダ識別コードの検出を有効とする。つまり、次データのパケットヘッダの検出ができない状態(ヘッダ識別コードの検出が無効の状態)から、検出できる状態(ヘッダ識別コードの検出が有効の状態)へと設定を変更する。
従って、受信機内の負荷を減少させることが可能となり、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0024】
本発明に係る受信機は、所定時間、受信データが途切れたときに、データ受信を停止する手段を更に備え、該手段が停止したときに、前記無効手段を停止すべくなしてあり、受信データが圧縮されたデータでない場合の前記所定時間は、圧縮されたデータである場合の前記所定時間よりも短く設定してあることを特徴とする。
【0025】
この受信機では、所定時間、受信データが途切れたときに、停止する手段が、データ受信を停止し、その停止したときに、無効手段を停止するように構成してあり、受信データが圧縮されたデータでない場合の前記所定時間は、圧縮されたデータである場合の前記所定時間よりも短く設定してある。
ここで、データの受信が何らかの不具合により中断した場合、非圧縮データは、もともとデータ長の短いデータである為、タイムアウト時間を短く設定することが可能である。
従って、タイムアウト時間の設定を、データにより個別に設定することにより、効率のよいデータの転送が可能となり、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0026】
本発明に係る受信機は、前記無効手段を停止している間に、前記ヘッダ識別コード以外から始まるデータを受信したときは、該データの送信側へ警告すべくなしてあることを特徴とする。
【0027】
この受信機では、無効手段を停止している間に、ヘッダ識別コード以外から始まるデータを受信したときは、データの送信側へ警告する。
従って、データの正確な送受信が行われている場合は、ヘッダ識別コードの検出を有効とした後は、ヘッダ識別コードから始まるデータが送受信される。一方、ヘッダ識別コード以外から始まるデータが受信された場合には、送受信障害が発生していると判断できる。
これにより、送受信障害が発生している場合に、引き続くデータを送信機が送信することを制御することが出来、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0028】
本発明に係る送受信装置は、ヘッダ識別コード、データ長コード、及びデータ種類コードを含むパケットヘッダが付加されたデータを送受信する送受信装置において、送信するデータのデータ種類コードにより、該データを圧縮するか否かを判定する手段、該手段が圧縮すると判定したときに、前記ヘッダ識別コードが含まれないように、前記データを圧縮する手段、及び該手段が圧縮したデータを送信する手段を有する送信機と、請求項3乃至7の何れかに記載された受信機とを備え、前記パケットヘッダが付加されたデータを送受信すべくなしてあることを特徴とする。
【0029】
本発明に係るデータ送受信方法及び送受信装置では、ヘッダ識別コード、データ長コード、及びデータ種類コードを含むパケットヘッダが付加されたデータを送受信する。送信機は、判定する手段が、送信するデータのデータ種類コードにより、データを圧縮するか否かを判定し、圧縮すると判定したときに、圧縮する手段が、ヘッダ識別コードが含まれないように、データを圧縮し、送信する手段が、その圧縮したデータを送信する。また、本発明に係る受信機とを備え、パケットヘッダが付加されたデータを送受信する。
【0030】
これにより、圧縮されたデータを受信する場合には、圧縮後のデータにヘッダ識別コードが含まれない為、ヘッダ識別コードを検出することにより、連続して送信される複数の異なるデータを区別しながら受信できる。また、非圧縮のデータを受信した場合には、データ長コードにより規定されたデータ長分のデータを受信するため、データを他のデータと区別することができる。
【0031】
ここで、データ種類コードの設定において、圧縮効率の高いデータ、例えばGDIデータを圧縮するコード設定に、データ長が短くまた圧縮効率の悪いデータ、例えば入力γデータを圧縮しないコード設定にすることにより、以下の効果が得られる。
データを圧縮する場合には、圧縮によるデータの送受信量が減少する。また、データの受信が何らかの不具合により中断しても、次のデータの開始がヘッダにより判定できるため、前データの途中に、次データが混在して、両データの区別が出来なくなることはない。
【0032】
データを圧縮しない場合には、圧縮に伴う処理、つまり、圧縮されたデータにヘッダ識別コードが含まれないように圧縮する処理が不要となり、処理の無駄がなくなる。また、データの受信が何らかの不具合により中断しても、タイムアウト処理時間を短く設定することが出来、また、ダミーデータの送受信量を少なく出来る。
以上により、効率のよいパケットデータの送受信を実行できるデータ送受信方法及び送受信装置を実現することが出来る。
【0033】
【発明の実施の形態】
以下に、本発明の実施の形態を、それを示す図面に基づき説明する。
図1は、本発明に係るデータ送受信方法、送信機、受信機及び送受信装置の実施の形態である画像形成装置の要部構成を示すブロック図である。この画像形成装置1は、送信機として作動するパーソナルコンピュータ2からのパケットデータを受信する受信機として作動し、受信したパケットデータに基づく画像を出力する。また、コピー機としての画像読取機能も備えている。
【0034】
画像出力装置1は、回路部3を備え、回路部3には、CCD・A/D変換部4、CPU5、SDRAM6、モータ7及びLSU8が接続されている。また、回路部3内部は、メイン回路部9に入力γコントローラ3a、シェーディングコントローラ3b、SDRAMコントローラ3c、モータコントローラ3d及びディザコントローラ3eが接続された構成である。
【0035】
図2は、メイン回路部9の内部構成を示すブロック図である。このメイン回路部9は、パケットデータの種類に応じて、パケットデータの転送方式を切換える回路であり、PC(パーソナルコンピュータ)接続インタフェイス10を通じて、受信したパケットデータが、転送バイト数設定回路11及びセレクタ12に与えられる。転送バイト数設定回路11は、受信するパケットデータのデータ長を設定する回路であり、転送バイト数設定回路11を経由したパケットデータもセレクタ12に与えられる。
セレクタ12は、転送バイト数設定回路オン信号により、転送バイト数設定回路11を経由したパケットデータを選択し、転送バイト数設定回路オン信号が与えられないときは、PC接続インタフェイス10からのパケットデータを選択して出力する。転送バイト数設定回路11は、CPU5へ割込み信号を与える。
【0036】
セレクタ12が、選択して出力したパケットデータは、スイッチ13とセレクタ16とへ与えられる。スイッチ13へ与えられたパケットデータは、ヘッダ検出回路14へ与えられる。スイッチ13には、ラッチ回路15が接続され、スイッチ13の制御信号は、ヘッダ検出回路14から与えられる。ヘッダ検出回路14は、CPU5へ割込み信号を与える。
セレクタ16は、ヘッダ検出回路オン信号が与えられたときは、ヘッダ検出回路14経由にパケットデータを与える。
【0037】
セレクタ16が選択して出力したパケットデータは、INFIFO17(IN First−In First−Out)に与えられ、INFIFO17に一旦入力されたパケットデータは、マルチスイッチ18に与えられる。INFIFO17は、CPU5へ割込み信号を与える。
マルチスイッチ18は、与えられたパス設定信号に従って、与えられたパケットデータを、CPU5、SDRAM6、入力γコントローラ3a又はディザコントローラ3eの何れかに出力する。
また、OUTFIFO19(OUT First−In First−Out )は、CPU5からステータスを設定され、設定されたステータスはPC接続インタフェイス10に与えられる。OUTFIFO19、CPU5へ割込み信号を与える。
【0038】
パケットデータの送受信方法には、上述したように、送受信するパケットデータの前に、そのパケットデータのデータ長情報を含むヘッダを付加し、パケットデータのデータ長を予め規定して送受信する方法(上記第1方法(以下、転送バイトを指定して送受信する方法と称する))と、送受信するパケットデータを圧縮し、この圧縮したデータの前に、圧縮したデータに現れないコードを含むヘッダを付加する方法(上記第2方法(以下、パケット検出を用いてデータを送受信する方法と称する))とがある。
【0039】
本実施の形態においては、データの種類に応じて、上記両方の送受信方法を切換えて、効率の良いデータ転送を実現する。
そこで、データの送信側であるパーソナルコンピュータ2から回路部3へ、データを送信するに際し、予めデータにパケットヘッダを付加する。
転送バイトを指定して転送する方法では、少なくとも、ヘッダにデータ長の情報(データ長コード)が付加されている必要がある。また、パケット検出を用いてデータ転送する方法では、少なくとも、圧縮したデータに現れないコードを含むヘッダが付加されている必要がある。
【0040】
そこで、図3に示すような、IEEE1284.4に定義されている6バイトのパケットヘッダをデータに付加して、データを転送する。この6バイトのパケットヘッダ(ヘッダ部)は、2バイトの先頭Headerデータ(ヘッダ識別コード)、2バイトのLengthデータ(データ長コード)、1バイトのCreditデータ及び1バイトのControlデータ(データ種類コード)から構成されている。
【0041】
Headerデータには、データを圧縮する場合に、データ本体部に現れないコード(例えば、8181)が記される。
Lengthデータには、このパケットヘッダに続くデータ本体のデータ長が記される。
Creditデータには、ベンダー固有のデータが記される。
Controlデータ(データ種類コード)には、パケットデータに続くデータ本体の種類、例えば入力γlut、GDI(Graphics Device Interface )データ等が記される。
【0042】
データ長が短く、データ圧縮効率の悪いデータは、上述したように、パケット検出を用いてデータ転送する方法よりも、転送バイトを指定して送受信する方法の方が送受信効率がよい。
一方、データ長の長いデータは、転送バイトを指定して送受信する方法よりも、パケット検出を用いてデータ転送する方法の方が転送効率がよい。
【0043】
以上のことから、データの送信側であるパーソナルコンピュータ2(送信機)は、データ長が短く、圧縮効率の悪いデータ、例えば、入力γLUT(ルックアップテーブル)、出力γLUT、フィルタ係数、ディザマトリクス、モータ制御用LUT、カラーマッチングLUT及びシューディング補正データは、圧縮せずに、データを転送することとする。
一方、データ長が長いデータ、例えばGDIデータは圧縮して、データ転送を行うこととする。
ここで、データを圧縮するか否かは、Controlデータにより判定するものとする。また、データの受信側である回路部3においても、データが圧縮されたものか否かを、Controlデータにより判定する。
【0044】
図6は、パーソナルコンピュータ2のデータ送信時の動作を示すフローチャートである。
パーソナルコンピュータ2は、先ず、送信データの格納場所により、送信データの種類を判別し、判別した送信データの種類に応じたControlデータを生成する(S111)。
【0045】
パーソナルコンピュータ2は、次に、生成したControlデータ(S111)により、その送信データが、GDIデータ等の圧縮すべき種類であるか否かを判定し(S112)、圧縮すべき種類であれば、パケットヘッダのHeaderデータと同じコードが、圧縮したデータに含まれないように、その送信データを圧縮する(S113)。
パーソナルコンピュータ2は、次に、生成したControlデータ(S111)を、圧縮した送信データのパケットヘッダに付加して(S114)送信する(S115)。
【0046】
パーソナルコンピュータ2は、その送信データが、入力γLUT、出力γLUT、フィルタ係数、ディザマトリクス、モータ制御用LUT、カラーマッチングLUT及びシューディング補正データ等の、圧縮すべきでない種類であれば(S112)、生成したControlデータ(S111)をその送信データのパケットヘッダに付加して(S114)送信する(S115)。
尚、パーソナルコンピュータ2は、以上の送信機としての動作のみではなく、画像出力装置1(メイン回路部9及びCPU5)の後述する受信機としての動作(図7〜10)と同様の動作も行い、送受信装置として作動する。
【0047】
PC接続インタフェイス10は、パーソナルコンピュータ2と受信装置1とを接続し。転送バイト設定回路11は、転送するデータのデータ長を設定し、設定した分の長さのデータを引き続く処理工程に転送する。
セレクタ12は、CPU5が指定するセレクタであり、転送バイト数を設定してデータを転送するか、又は転送バイト数を設定しないでデータを転送するかを選択する。
【0048】
スイッチ13は、ヘッダ検出回路14が指定するスイッチであり、データの先頭2バイトのデータが所定のキャラクタか否かにより、このデータの格納先を変更する。
ヘッダ検出回路14は、2バイトのHeaderデータが、所定のキャラクタ(例えば8181)か否かを判定し、ラッチ回路15は、Headerデータが所定のデータであった場合に、2バイトのLengthデータ、1バイトのCreditデータ及び1バイトのControlデータを格納する。
【0049】
セレクタ16は、ヘッダ検出回路14の検出動作に従って作動し、ヘッダ検出回路14の検出動作で、データが所定のキャラクタでなければ(例えば8153)、そのデータは圧縮されたデータ本体の一部である為、引き続く処理工程に転送する。
INFIFO17は、セレクタ16を介して転送されたデータを受信し、マルチスイッチ18に転送する。
マルチスイッチ18は、CPU5が指定するスイッチである。マルチスイッチ18では、Pathを設定することにより、転送されたデータを、CPU、SDRAM、入力γ又はDither等の経路に振り分け転送する。
【0050】
以下に、メイン回路部9における具体的なパケットデータの転送方法を、それを示す図4,5のメイン回路部9の内部構成を示すブロック図に基づき説明する。
先ず、データ長がGDIデータのように長く、圧縮して転送する方が効率のよい場合には、上述したように、パケット検出を用いてデータ転送する方法を適用する。以下に、この場合のメイン回路9の動作を図4に基づき説明する。
ここで、圧縮してデータを転送するか否かは、予めデータの種類に応じて定められたControlデータにより判断される。
【0051】
先ず、セレクタ12に対して、転送バイト数設定回路11をOFFとする制御信号が、CPU5から与えられる。これにより、PC接続インタフェイス10からメイン回路9に入力されたデータは、転送バイト数設定回路11を介さずに、次の処理工程に転送される。
次に、セレクタ16に、ヘッダ検出回路14をONとする制御信号が、CPU5から与えられる。これにより、データがヘッダ検出回路14に転送される。
【0052】
ヘッダ検出回路14では、転送されたデータが所定のキャラクタ(例えば、8181)か否かの判定を行う。ここで、所定のキャラクタであれば、このキャラクタをHeaderデータであると判定し、この後に続くデータ、つまりLengthデータ、Creditデータ、Controlデータの合計4バイトのデータをラッチ回路格納部15に取り込む。
ここで、ヘッダ検出回路14は、2バイトのHeaderデータ、2バイトのLengthデータ、1バイトのCreditデータ、及び1バイトのControlデータの合計6バイトのパケットデータが揃うと、CPU5に対して割込み処理を発生させる。尚、CPU5は、レジスタを通して、Lengthデータ、Creditデータ、及びControlデータを確認出来る。
【0053】
上記6バイトのパケットデータがヘッダ検出回路14に転送された後は、データ本体、つまりヘッダ部を除いたデータ本体部が、順次、セレクタ16からINFIFO17に転送される。この後、マルチスイッチ18を介して、上記データ本体部が、それぞれの種類に応じた経路に転送される。例えば、GDIデータであれば、SDRAM6に転送される。なお、この経路(Path)の設定は、上記Controlデータにより決定される。
【0054】
データ長が入力γのように短く、圧縮効率の悪いデータの場合には、転送バイトを指定して転送する方法を適用する。以下に、この場合のメイン回路9の動作を図5に基づき説明する。
ここで、転送バイトを指定して転送するか否かは、予めデータの種類に応じて定められたControlデータにより判断される。
【0055】
先ず、セレクタ12に対して、転送バイト数設定回路11をONとする制御信号が、CPU5から与えられる。これにより、PC接続インタフェイス10からメイン回路9に入力されたデータは、転送バイト数設定回路11を介して、次の処理工程に転送される。
転送バイト数設定回路11では、所定の転送バイト数分のデータ転送が許可される。これにより、所定のバイトが転送されて初めて、このデータの転送が完了したものと判定し、次のデータが入力されるのを待つことになる。ここで、転送バイト数設定回路11のバイト数は、Lengthデータにより決定される。
【0056】
次に、セレクタ16にヘッダ検出回路14をOFFとする制御信号が、CPU5から与えられる。これにより、データが、ヘッダ検出回路14を介さずに、順次、INFIFO17に転送される。この後、INFIFO17から、マルチスイッチ18を介して、上記データが、それぞれの種類に応じた経路に転送される。例えば、入力γデータであれば、入力γコントローラ3aに転送される。
このように、圧縮されたデータでない場合には、SDRAM6に格納することなく、Cotrolデータにより指定された格納先(例えば入力γコントローラ3a)に、受信データを直接格納することにより、CPU5の負荷を減少させることができる。
【0057】
INFIFO17は、所定のバイト数を受信終了すると、CPU5に対して割込み通知を発信し、受信が完了したことを知らせる。CPU5は、受信が完了した通知を受け取ると、転送バイト数設定回路11をOFFにする制御信号を出力し、また、ヘッダ検出回路14をONにする制御信号を出力し、次の新たなコマンドを待つ。尚、この経路(Path)の設定は、Controlデータにより決定される。
【0058】
以上のように、PC接続インタフェイス10を介して入力されるデータを、予め、パケット検出を用いる形式のデータと、転送バイトを指定して転送する形式のデータとに分類しておき、メイン回路9では、それぞれのデータ形式に対応した転送経路を選択するように構成する。以上のような構成とすることにより、以下の効果が生じる。
データ長が短く、圧縮効果が悪い為、転送バイト数を指定して転送する形式を取るデータが、何らかの不具合により、そのデータの転送を中断した場合には、データ長が短い為、上述したタイムアウト時間を短く設定することが出来る。あるいは、上述したダミーデータの転送量を少なくすることが出来る。これにより、中断時間を短くすることが出来、効率のよいデータ送受信が可能となる。
【0059】
また、データ長が長く、パケット検出を用いる形式を取るデータが、何らかの不具合により、そのデータの転送を中断した場合には、次に続くデータの始まりを、Headerデータにより認識出来る為、次に続くデータを、中断したデータの途中のデータであると、誤認識することがない。
以上のように、データの種類に応じて転送方法を切り換えることにより、送受信効率を向上させるとともに、データ送受信が中断した場合にも、早期の復旧が可能となり、また、データの誤認識を防止することが可能となる。
【0060】
次に、上述したメイン回路部9及びCPU5の受信機としての動作を、それを示す図7〜10のフローチャートを参照しながら説明する。
先ず、CPU5は、ヘッダ検出回路14をONにし、転送バイト数設定回路11をOFFにする(S1)。つまり、図4に示したように、セレクタ16にヘッダ検出回路14をONとする制御信号を与え、セレクタ12に対して、転送バイト数設定回路11をOFFとする制御信号を与える。
初期状態では、転送バイト数設定回路11は無効になっており、パーソナルコンピュータ2から転送されたデータは、パケットヘッダを検出する為に、ヘッダ検出回路14に転送される。
【0061】
次に、CPU5は、ヘッダ検出回路14からの割込み通知を待ち(S2)、割込み通知が来ると、レジスタからLengthデータ、Creditデータ及びControlデータを読取り(S3)、データがGDIデータであるか否かを、Controlデータにより判定する(S4)。
CPU5は、データがGDIデータであれば(S4)、INFIFO17にデータが残っているか否かを判定し(図8S101)、データが残っていれば、INFIFO17内のデータを空にする(S102)。
【0062】
CPU5は、データが残っていないとき(S101)、又はデータを空にした(S102)後は、パス設定をSDRAMに切り換え(S103)、データをSDRAM7に転送させる。
CPU5は、次に、割込みを解除し(S104)、次のデータが入力されるのを待つ。
【0063】
CPU5は、データがGDIデータでなければ(図7S4)、データが入力γデータであるか否かを判定し(S5)、入力γデータであれば、INFIFO17にデータが残っているか否かを判定する(図9S201)。
CPU5は、INFIFO17にデータが残っていれば(S201)、INFIFO17内のデータを空にする(S202)。
【0064】
CPU5は、INFIFO17にデータが残っていないとき(S201)、又はINFIFO17内のデータを空にした(S202)後は、パケット検出をOFF、つまりヘッダ検出回路をOFFとし、転送バイト数の長さを設定し、設定した転送バイト数分のみのデータを転送し、パス設定を入力γに切り換え、データを入力γに転送する(S203)。
【0065】
CPU5は、次に、タイムアウト処理に備えてタイマをスタートさせ(S204)、割込み処理を解除する(S205)。
CPU5は、次に、割込みがあるか否かを判定し(S206)、割込みがあれば、次のデータが入力されるのを待つ。
CPU5は、割込みがなければ(S206)、所定のタイムアウト時間が経過する迄待機し(S207)、タイムアウト時間が経過したならば、エラー処理を行う(S208)。この後、次のデータの入力を待つ。
【0066】
CPU5は、データが入力γデータでなければ(図7S5)、次の処理に進む。メイン回路9には、GDIデータ、入力γデータ以外にも、Dither(Sn)のような様々なデータが転送されて来る。その為、様々なデータが転送されて来た場合も、GDIデータ(S4)及び入力γデータ(S5)の場合に示したように、データの照合を行い(Sn)、照合が一致すれば、データの種類に応じて、S101〜S104又はS201〜S208と同様の処理を行う。
【0067】
CPU5は、次に、パーソナルコンピュータ2がステータス要求をしているか否かを判定し(Sn+ m)、ステータス要求をしていれば、OUTFIFO19に数バイトのステータス情報をセットする(図10Sn+ m1)。
CPU5は、次に、割込みを解除した(Sn+ m2)後、次の割込みが発生する迄待機する(Sn+ m3)。
CPU5は、次の割り込みが発生すれば(Sn+ m3)、セットしたステータス情報(Sn+ m1)を転送する。この転送が完了すると、OUTFIFO19から転送終了の割り込み通知が発生し、CPU5は、この割り込みを解除し(Sn+ m4)、次のデータの入力を待つ。
【0068】
CPU5は、パーソナルコンピュータ2がステータス要求をしていなければ(Sn+ m)、GDIデータ処理が終了したか否かを判定し(Sn+ m+ 1)、終了していれば、SDRAM6に記録された印刷データであるGDIデータのプリントを開始させる(Sn+ m+ 2)。
CPU5は、GDIデータ処理が終了していなければ(Sn+ m+ 1)、エラーであるか否かを判定し(Sn+ m+ 3)、エラーであれば、エラー処理を行い(Sn+ m+ 4)、次いで、次のデータの入力を待つ。
【0069】
CPU5は、エラーでなければ(Sn+ m+ 3)、未知のコマンドが送られてくる(Sn+ m+ 5)。このような一例としては、ケーブル異常等があげられる。
尚、上述したタイムアウト処理は、転送バイトを指定して転送する方法に適用したが、 これに限られるものではなく、データ長が長くパケット検出を用いる方法にも適用することが可能である。また、転送バイトを指定して転送するデータは、データ長の短いデータである。その為、上述したタイムアウト時間を、パケット検出を用いる方法の場合のタイムアウト時間よりも短く設定することが可能である。従って、タイムアウト時間の設定を、データにより個別に設定することにより、効率のよいデータの送受信が可能となる。
【0070】
【発明の効果】
本発明に係る送信機によれば、効率のよいパケットデータの送信を実行できるデータ送信機を実現することが出来る。
【0071】
本発明に係る受信機によれば、受信機内の負荷を減少させることが可能となり、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0072】
本発明に係る受信機によれば、タイムアウト時間の設定を、データにより個別に設定することにより、効率のよいデータの転送が可能となり、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0073】
本発明に係る受信機によれば、送受信障害が発生している場合に、引き続くデータを送信機が送信することを制御することが出来、効率のよいパケットデータの受信を実行出来るデータ受信機を実現することが出来る。
【0074】
本発明に係るデータ送受信方法及び送受信装置によれば、効率のよいパケットデータの送受信を実行できるデータ送受信方法及び送受信装置を実現することが出来る。
【図面の簡単な説明】
【図1】本発明に係るデータ送受信方法、送信機、受信機及び送受信装置の実施の形態である画像形成装置の要部構成を示すブロック図である。
【図2】メイン回路部の内部構成を示すブロック図である。
【図3】IEEE1284.4に定義されているパケットヘッダを示す説明図である。
【図4】メイン回路部における具体的なパケットデータの転送方法を示す、その内部構成のブロック図に基づく説明図である。
【図5】メイン回路部における具体的なパケットデータの転送方法を示す、その内部構成のブロック図に基づく説明図である。
【図6】パーソナルコンピュータの動作を示すフローチャートである。
【図7】メイン回路部及びCPUの動作を示すフローチャートである。
【図8】メイン回路部及びCPUの動作を示すフローチャートである。
【図9】メイン回路部及びCPUの動作を示すフローチャートである。
【図10】メイン回路部及びCPUの動作を示すフローチャートである。
【符号の説明】
1 画像形成装置(受信機)
2 パーソナルコンピュータ(送信機)
3 回路部
3a 入力γコントローラ
3b シェーディングコントローラ
3c SDRAMコントローラ
3d モータコントローラ
3e ディザコントローラ
4 CCD・A/D変換部
5 CPU
6 SDRAM
8 LSU
9 メイン回路部
10 PC接続インタフェイス
11 転送バイト数設定回路
12,16 セレクタ
13 スイッチ
14 ヘッダ検出回路
15 ラッチ回路
17 INFIFO
18 マルチスイッチ
19 OUTFIFO[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data transmission / reception method for transmitting / receiving data with a packet header added thereto, a transmitter for transmitting data with a packet header added, a receiver for receiving data with a packet header added, and a packet header added. The present invention relates to a transmitting and receiving apparatus for transmitting and receiving data.
[0002]
[Prior art]
In data transmission and reception of personal computers and peripheral devices, data is packetized and transmitted and received. There are roughly two types of packet transmission / reception methods.
The first method is a method in which a packet header including information on the data length of this data is added before the data to be transmitted, and the data length of the packet is defined in advance and transmitted. In this method, a break of continuous packet data is determined based on the data length described above. That is, the receiving side determines that the reception of one packet data is completed only after the data reception for the data length is completed.
[0003]
The second method is a method in which data to be transmitted is compressed (for example, Packbits compression), and a packet header including a code not appearing in the compressed data is added before the compressed data. In this method, a break of continuous packet data is determined by detecting the above-described packet header. That is, by detecting the packet header, the receiving side determines that it is the beginning of new data. In addition, this method has an advantage that the data transmission / reception speed increases as the data becomes shorter after compression.
One such compression processing method is disclosed in Japanese Patent Application Laid-Open No. 2000-242450.
[0004]
[Problems to be solved by the invention]
However, the first method described above has a problem in that if data being transmitted or received is interrupted for some reason, the recovery process becomes complicated. This is because it is not determined that the data transfer of the interrupted portion has been completed unless the transmission and reception of the data of the data length is completed. Therefore, it is necessary to wait until the timeout process is performed or to reach the predetermined data length. Until that time, the dummy data must be transmitted.
[0005]
Further, when transmitting dummy data, if data having a long data length is interrupted in the middle, it takes time to recover the data by an increase in the number of transmitted dummy data.
Further, in the first method, since data is not compressed, there is a problem that transmission of data having a long data length requires a longer time for transmission than the method of compressing data as in the second method.
[0006]
In the second method, as described above, it is necessary to add, before the compressed data, a header including a code that does not appear in the compressed data. That is, the data must be compressed so that the code included in the header does not appear in the compressed data.
Therefore, when the data length is short and the compression efficiency is low, the disadvantage that the time required for the compression process increases is greater than the advantage that the data is shortened by the compression process and the data transmission / reception speed is increased. . That is, when the compression efficiency is low, there is a problem that a series of data transmission / reception processing takes time.
[0007]
When the same information is not continuous in one piece of data, the number of data may increase due to the compression process.
For example, when compressing continuous 256-byte data from 00 to 255 using PackBits compression, a 2-byte compression code is required, and since the same number does not appear, 256 bytes from 0 to 255 Are not compressed, resulting in a total of 258 bytes.
[0008]
Furthermore, it is necessary to decompress the compressed data using a decompression circuit for each storage destination. The time of decompression depends on the type of input data, and there are those that need to be decompressed after being stored in the memory and those that need to be decompressed when stored. Therefore, when there are a plurality of transfer destinations, it is necessary to provide a plurality of decompression circuits, and there is a problem that the circuits become complicated and large.
The present invention has been made in view of the above circumstances, and has as its object to provide a data transmission / reception method, a transmitter, a receiver, and a transmission / reception device that can realize efficient transmission / reception of packet data.
[0009]
[Means for Solving the Problems]
A data transmitting and receiving method according to the present invention is a data transmitting and receiving method for transmitting and receiving data to which a packet header including a header identification code, a data length code, and a data type code is added. A code is used to determine whether or not to compress the data. If compression is determined, the data is compressed and transmitted so that the header identification code is not included. By the data type code, it is determined whether or not the data is compressed. If it is determined that the data is compressed, the data is continuously received while detecting the header identification code. If not, the detection of the header identification code is invalidated, and the amount of data indicated by the data length code of the data is received. Characterized in that it.
[0010]
A transmitter according to the present invention transmits data to which a packet header including a header identification code, a data length code, and a data type code is added, and compresses the data using the data type code of the data to be transmitted. Means for determining whether or not the data is compressed, means for compressing the data so that the header identification code is not included when the means determines that the data is compressed, and means for transmitting the data compressed by the means. It is characterized by having.
[0011]
This transmitter transmits data to which a packet header including a header identification code, a data length code, and a data type code has been added. The determining means determines whether or not to compress the data based on the data type code of the data to be transmitted, and when determining to compress the data, compresses the data so that the header identification code is not included. I do. The transmitting means transmits the compressed data.
[0012]
Thereby, when the receiver receives the compressed data, since the header identification code is not included in the data after compression, by detecting the header identification code, a plurality of continuously transmitted data are detected. Different data can be received while being distinguished. When the receiver receives uncompressed data, the receiver receives data of the data length specified by the data length code, so that the data can be distinguished from other data.
[0013]
Here, in the setting of the data type code, the code setting for compressing data with high compression efficiency, for example, GDI (Graphics Device Interface) data, includes data having a short data length and low compression efficiency, for example, a code for not compressing input γ data. By setting, the following effects can be obtained.
When compressing data, the amount of data transferred by compression decreases. Also, even if the reception of data is interrupted due to some trouble, the start of the next data can be determined by the header, so that there is no possibility that the next data is mixed in the middle of the previous data and the two data cannot be distinguished.
[0014]
If the data is not compressed, it is not necessary to perform a process of compressing the compressed data so that the header identification code is not included, thereby eliminating waste of the process. Further, even when the data reception is interrupted due to some trouble, the timeout processing time can be set short, and the transfer amount of the dummy data can be reduced.
As described above, a data transmitter that can efficiently transmit packet data can be realized.
[0015]
A receiver according to the present invention is a receiver that receives data to which a packet header including a header identification code, a data length code, and a data type code is added. Determining means for determining whether or not there is, and when the determining means determines that the data is compressed, means for continuing to receive data while detecting the header identification code; and When it is determined that the received data is not the received data, receiving means for receiving the amount of data indicated by the data length code, and invalidating means for invalidating the detection of the header identification code while the receiving means is receiving the data. It is characterized by having.
[0016]
This receiver receives data to which a packet header including a header identification code, a data length code, and a data type code is added. The determining means determines whether or not the data is compressed data based on the data type code of the received data. If the determining means determines that the data is compressed, the means for continuing to receive the data is a header identification code. While receiving data. When the determining means determines that the data is not compressed data, the receiving means receives the amount of data indicated by the data length code, and while the receiving means is receiving, the invalidating means detects the header identification code. To disable.
[0017]
Thereby, when the compressed data is received, since the header identification code is not included in the data after the compression, by detecting the header identification code, a plurality of different data transmitted continuously can be distinguished. While receiving. When uncompressed data is received, data corresponding to the data length specified by the data length code is received, so that the data can be distinguished from other data.
[0018]
Here, in setting the data type code, a code setting for compressing data with high compression efficiency, for example, GDI data, and a code setting for not compressing data with a short data length and low compression efficiency, for example, input γ data, are adopted. The following effects can be obtained.
When compressing data, the amount of data transferred by compression decreases. Also, even if the reception of data is interrupted due to some trouble, the start of the next data can be determined by the header, so that there is no possibility that the next data is mixed in the middle of the previous data and the two data cannot be distinguished.
[0019]
If the data is not compressed, the processing associated with the compression, that is, the processing of compressing the compressed data so that the header identification code is not included, becomes unnecessary, and the processing is not wasted. Further, even when the data reception is interrupted due to some trouble, the timeout processing time can be set short, and the transfer amount of the dummy data can be reduced.
As described above, it is possible to realize a data receiver capable of executing efficient packet data reception.
[0020]
The receiver according to the present invention, when the determination unit determines that the data is compressed, a buffer memory for storing the received data, when the determination unit determines that the data is not compressed, The storage device further includes a storage destination specified by the data type code for storing received data.
[0021]
In this receiver, when the determining means determines that the data is compressed data, the buffer memory stores the received data, and when the determining means determines that the data is not compressed data, The specified storage destination stores the received data.
As a result, if the data is not compressed, it is transferred to the data storage destination without being temporarily stored in the buffer memory. That is, the process of transferring data from the buffer memory to the storage destination becomes unnecessary.
Therefore, the load in the receiver can be reduced, and a data receiver capable of executing efficient packet data reception can be realized.
[0022]
The receiver according to the present invention is characterized in that when the receiving means receives an amount of data indicated by the data length code, the receiving means stops the invalidating means.
[0023]
In this receiver, when the receiving means receives the amount of data indicated by the data length code, the receiving means stops the invalidating means.
When the receiver receives a predetermined amount of uncompressed data, the receiver validates the header identification code. That is, the setting is changed from a state where the packet header of the next data cannot be detected (a state where the detection of the header ID code is invalid) to a state where the packet header can be detected (a state where the detection of the header ID code is valid).
Therefore, the load in the receiver can be reduced, and a data receiver capable of executing efficient packet data reception can be realized.
[0024]
The receiver according to the present invention further comprises means for stopping data reception when received data is interrupted for a predetermined time, and when the means is stopped, the invalidation means is stopped. Is set to be shorter than the predetermined time when the data is not compressed data.
[0025]
In this receiver, the means for stopping when the reception data is interrupted for a predetermined time stops the data reception and stops the invalidation means when the reception is stopped, so that the reception data is compressed. The predetermined time for non-compressed data is set shorter than the predetermined time for compressed data.
Here, when the reception of data is interrupted due to some trouble, the timeout period can be set short because the uncompressed data is originally data having a short data length.
Therefore, by setting the timeout time individually according to data, efficient data transfer becomes possible, and a data receiver that can execute efficient packet data reception can be realized.
[0026]
The receiver according to the present invention is characterized in that, while the invalidation unit is stopped, when data starting from a source other than the header identification code is received, a warning is sent to the transmitting side of the data. .
[0027]
In this receiver, if data starting from other than the header identification code is received while the invalidation unit is stopped, a warning is sent to the data transmission side.
Therefore, when data is correctly transmitted and received, after the detection of the header identification code is enabled, data starting from the header identification code is transmitted and received. On the other hand, when data starting from a code other than the header identification code is received, it can be determined that a transmission / reception failure has occurred.
As a result, when a transmission / reception failure has occurred, it is possible to control the transmission of subsequent data by the transmitter, and it is possible to realize a data receiver that can execute efficient packet data reception.
[0028]
A transmission / reception device according to the present invention transmits and receives data to which a packet header including a header identification code, a data length code, and a data type code is added, and compresses the data with the data type code of the data to be transmitted. Means for determining whether the data is compressed, means for compressing the data so that the header identification code is not included when the means determines that the data is compressed, and means for transmitting the data compressed by the means. And a receiver according to any one of
[0029]
The data transmitting / receiving method and the transmitting / receiving apparatus according to the present invention transmit / receive data to which a packet header including a header identification code, a data length code, and a data type code is added. The transmitter determines, based on the data type code of the data to be transmitted, whether or not to compress the data, and when it is determined that the data is to be compressed, the compressing means does not include the header identification code. Means for compressing and transmitting the data transmits the compressed data. In addition, the receiver includes the receiver according to the present invention, and transmits and receives data to which a packet header is added.
[0030]
Thereby, when receiving the compressed data, since the header identification code is not included in the data after compression, by detecting the header identification code, a plurality of different data transmitted continuously can be distinguished. While receiving. When uncompressed data is received, data corresponding to the data length defined by the data length code is received, so that the data can be distinguished from other data.
[0031]
Here, in setting the data type code, a code setting for compressing data with high compression efficiency, for example, GDI data, and a code setting for not compressing data with a short data length and low compression efficiency, for example, input γ data, are adopted. The following effects can be obtained.
When compressing data, the amount of data transmitted and received by the compression decreases. Further, even if the reception of data is interrupted due to some trouble, the start of the next data can be determined by the header, so that the next data is not mixed in the middle of the previous data and the two data cannot be distinguished.
[0032]
If the data is not compressed, the processing associated with the compression, that is, the processing of compressing the compressed data so that the header identification code is not included, becomes unnecessary, and the processing is not wasted. Further, even if data reception is interrupted due to some trouble, the timeout processing time can be set short, and the amount of dummy data transmitted / received can be reduced.
As described above, it is possible to realize a data transmission / reception method and a transmission / reception device that can efficiently transmit and receive packet data.
[0033]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a main configuration of an image forming apparatus which is an embodiment of a data transmitting / receiving method, a transmitter, a receiver, and a transmitting / receiving apparatus according to the present invention. The
[0034]
The
[0035]
FIG. 2 is a block diagram illustrating an internal configuration of the main circuit unit 9. The main circuit section 9 is a circuit for switching a packet data transfer method according to the type of packet data. The packet data received through the PC (personal computer)
The
[0036]
The packet data selected and output by the
The
[0037]
The packet data selected and output by the
The multi-switch 18 outputs given packet data to any of the
The status of the OUT FIFO 19 (OUT First-In First-Out) is set by the
[0038]
As described above, the packet data transmission / reception method includes a method of adding a header including the data length information of the packet data before the packet data to be transmitted / received, and preliminarily defining the data length of the packet data for transmission / reception (see above). A first method (hereinafter, referred to as a method of transmitting and receiving by designating a transfer byte), compressing packet data to be transmitted and received, and adding a header including a code not appearing in the compressed data before the compressed data. There is a method (the second method (hereinafter referred to as a method of transmitting and receiving data using packet detection)).
[0039]
In the present embodiment, efficient transmission of data is realized by switching between the above two transmission / reception methods according to the type of data.
Therefore, when transmitting data from the
In the method of transferring by designating the transfer byte, at least the data length information (data length code) needs to be added to the header. In the method of transferring data using packet detection, at least a header including a code that does not appear in the compressed data needs to be added.
[0040]
Therefore, as shown in FIG. 3, a 6-byte packet header defined in IEEE1284.4 is added to the data, and the data is transferred. The 6-byte packet header (header part) includes a 2-byte header data (header identification code), a 2-byte Length data (data length code), a 1-byte Credit data, and a 1-byte Control data (data type code). ).
[0041]
In the Header data, a code (for example, 8181) that does not appear in the data body when data is compressed is described.
In the Length data, the data length of the data body following this packet header is described.
Credit-specific data describes vendor-specific data.
The control data (data type code) describes the type of the data itself following the packet data, for example, input γlut, GDI (Graphics Device Interface) data, and the like.
[0042]
As described above, a method of transmitting / receiving data with a specified transfer byte has a higher transmission / reception efficiency for data having a short data length and poor data compression efficiency than a method of transmitting data using packet detection, as described above.
On the other hand, for data having a long data length, a method of transferring data using packet detection has a higher transfer efficiency than a method of transmitting and receiving data by designating a transfer byte.
[0043]
From the above, the personal computer 2 (transmitter) on the data transmission side has a short data length and low compression efficiency, such as an input γLUT (lookup table), an output γLUT, a filter coefficient, a dither matrix, The motor control LUT, the color matching LUT, and the pseudo-correction data are transferred without compression.
On the other hand, data having a long data length, for example, GDI data is compressed and data is transferred.
Here, whether to compress the data is determined based on the Control data. The
[0044]
FIG. 6 is a flowchart showing the operation of the
First, the
[0045]
Next, the
Next, the
[0046]
If the transmission data is of a type that should not be compressed, such as an input γ LUT, an output γ LUT, a filter coefficient, a dither matrix, a motor control LUT, a color matching LUT, and a pseudo correction data (S112), The generated control data (S111) is added to the packet header of the transmission data (S114) and transmitted (S115).
The
[0047]
The
The
[0048]
The
The
[0049]
The
The
The multi-switch 18 is a switch specified by the
[0050]
Hereinafter, a specific packet data transfer method in the main circuit unit 9 will be described based on a block diagram showing the internal configuration of the main circuit unit 9 in FIGS.
First, when the data length is long, such as GDI data, and it is more efficient to compress and transfer the data, the method of transferring data using packet detection is applied as described above. The operation of the main circuit 9 in this case will be described below with reference to FIG.
Here, whether or not to compress and transfer the data is determined based on Control data determined in advance according to the type of data.
[0051]
First, a control signal for turning off the transfer byte
Next, a control signal for turning on the
[0052]
The
Here, the
[0053]
After the 6-byte packet data is transferred to the
[0054]
When the data length is short such as the input γ and the compression efficiency is low, a method of transferring by designating the transfer byte is applied. The operation of the main circuit 9 in this case will be described below with reference to FIG.
Here, whether or not to transfer by designating a transfer byte is determined based on Control data determined in advance according to the type of data.
[0055]
First, a control signal for turning on the transfer byte
The transfer byte
[0056]
Next, a control signal for turning off the
As described above, when the data is not compressed data, the load of the
[0057]
When the reception of the predetermined number of bytes is completed, the
[0058]
As described above, the data input via the
Because the data length is short and the compression effect is poor, data that takes the form of transfer by specifying the number of bytes to transfer is interrupted due to some problem. The time can be set shorter. Alternatively, the transfer amount of the dummy data described above can be reduced. As a result, the interruption time can be reduced, and efficient data transmission and reception can be performed.
[0059]
Further, if the data length is long and the data in the format using packet detection is interrupted due to some trouble, the start of the next data can be recognized by the Header data. The data is not erroneously recognized as being in the middle of the interrupted data.
As described above, by switching the transfer method according to the type of data, transmission / reception efficiency is improved, and even when data transmission / reception is interrupted, early recovery is possible, and erroneous recognition of data is prevented. It becomes possible.
[0060]
Next, the operation of the main circuit unit 9 and the
First, the
In the initial state, the transfer byte
[0061]
Next, the
If the data is GDI data (S4), the
[0062]
When no data remains (S101) or after the data is emptied (S102), the
Next, the
[0063]
If the data is not GDI data (S4 in FIG. 7), the
If data remains in the INFO 17 (S201), the
[0064]
The
[0065]
Next, the
Next, the
If there is no interruption (S206), the
[0066]
If the data is not the input γ data (S5 in FIG. 7), the
[0067]
Next, the
After releasing the interrupt (Sn + m2), the
When the next interrupt occurs (Sn + m3), the
[0068]
If the
If the GDI data processing has not been completed (Sn + m + 1), the
[0069]
If there is no error (Sn + m + 3), the
Note that the above-described timeout processing is applied to a method of transferring by designating a transfer byte. However, the present invention is not limited to this, and may be applied to a method of using packet detection having a long data length. Data to be transferred by designating a transfer byte is data having a short data length. Therefore, the above-mentioned timeout time can be set shorter than the timeout time in the case of the method using packet detection. Therefore, by setting the setting of the timeout time individually according to the data, it is possible to transmit and receive data efficiently.
[0070]
【The invention's effect】
ADVANTAGE OF THE INVENTION According to the transmitter which concerns on this invention, the data transmitter which can perform efficient transmission of packet data can be implement | achieved.
[0071]
ADVANTAGE OF THE INVENTION According to the receiver which concerns on this invention, it becomes possible to reduce the load in a receiver, and can implement | achieve the data receiver which can perform efficient reception of packet data.
[0072]
ADVANTAGE OF THE INVENTION According to the receiver which concerns on this invention, by setting the time-out time individually by data, efficient data transfer is attained and the data receiver which can perform efficient packet data reception is implement | achieved. You can do it.
[0073]
ADVANTAGE OF THE INVENTION According to the receiver which concerns on this invention, when a transmission / reception failure occurs, it can control that a transmitter transmits the following data, and can perform the data receiver which can perform efficient packet data reception. Can be realized.
[0074]
ADVANTAGE OF THE INVENTION According to the data transmission / reception method and transmission / reception apparatus which concern on this invention, the data transmission / reception method and transmission / reception apparatus which can perform efficient transmission and reception of packet data can be implement | achieved.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a main configuration of an image forming apparatus that is an embodiment of a data transmission / reception method, a transmitter, a receiver, and a transmission / reception apparatus according to the present invention.
FIG. 2 is a block diagram illustrating an internal configuration of a main circuit unit.
FIG. 3 is an explanatory diagram showing a packet header defined in IEEE1284.4.
FIG. 4 is an explanatory diagram based on a block diagram of an internal configuration showing a specific packet data transfer method in a main circuit unit.
FIG. 5 is an explanatory diagram based on a block diagram of an internal configuration showing a specific packet data transfer method in a main circuit unit.
FIG. 6 is a flowchart illustrating an operation of the personal computer.
FIG. 7 is a flowchart illustrating operations of a main circuit unit and a CPU.
FIG. 8 is a flowchart illustrating operations of a main circuit unit and a CPU.
FIG. 9 is a flowchart illustrating operations of a main circuit unit and a CPU.
FIG. 10 is a flowchart illustrating operations of a main circuit unit and a CPU.
[Explanation of symbols]
1 Image forming device (receiver)
2 Personal computer (transmitter)
3 Circuit section
3a Input gamma controller
3b Shading controller
3c SDRAM controller
3d motor controller
3e dither controller
4 CCD / A / D converter
5 CPU
6 SDRAM
8 LSU
9 Main circuit section
10 PC connection interface
11 Transfer byte number setting circuit
12, 16 selector
13 switches
14. Header detection circuit
15 Latch circuit
17 INFO
18 Multi switch
19 OUTFIFO
Claims (8)
データを送信する場合は、該データのデータ種類コードにより、該データを圧縮するか否かを判定し、圧縮すると判定したときには、前記ヘッダ識別コードが含まれないように、前記データを圧縮して送信し、データを受信する場合は、該データのデータ種類コードにより、圧縮されたデータであるか否かを判定し、圧縮されたデータであると判定したときは、前記ヘッダ識別コードを検出しながら、データを受信し続け、圧縮されたデータでないと判定したときは、前記ヘッダ識別コードの検出を無効にし、前記データのデータ長コードが示す量のデータを受信することを特徴とするデータ送受信方法。In a data transmitting and receiving method for transmitting and receiving data to which a packet header including a header identification code, a data length code, and a data type code is added,
When transmitting data, it is determined whether or not to compress the data according to the data type code of the data, and when it is determined to compress, the data is compressed so that the header identification code is not included. When transmitting and receiving data, the data type code of the data determines whether or not the data is compressed, and when it is determined that the data is compressed, the header identification code is detected. While receiving data, when it is determined that the data is not compressed data, the detection of the header identification code is invalidated, and the amount of data indicated by the data length code of the data is received. Method.
送信するデータのデータ種類コードにより、該データを圧縮するか否かを判定する手段と、該手段が圧縮すると判定したときに、前記ヘッダ識別コードが含まれないように、前記データを圧縮する手段と、該手段が圧縮したデータを送信する手段とを備えることを特徴とする送信機。In a transmitter that transmits data to which a packet header including a header identification code, a data length code, and a data type code is added,
Means for determining whether to compress the data according to the data type code of the data to be transmitted, and means for compressing the data so that the header identification code is not included when the means determines that the data is to be compressed. And a means for transmitting data compressed by the means.
受信したデータのデータ種類コードにより、圧縮されたデータであるか否かを判定する判定手段と、該判定手段が圧縮されたデータであると判定したときは、前記ヘッダ識別コードを検出しながら、データを受信し続ける手段と、前記判定手段が圧縮されたデータでないと判定したときは、前記データ長コードが示す量のデータを受信する受信手段と、該受信手段が受信している間は、前記ヘッダ識別コードの検出を無効にする無効手段とを備えることを特徴とする受信機。In a receiver that receives data to which a packet header including a header identification code, a data length code, and a data type code is added,
Based on the data type code of the received data, determining means for determining whether the data is compressed data, and when the determining means determines that the data is compressed, while detecting the header identification code, Means for continuing to receive data, and when the determining means determines that the data is not compressed data, receiving means for receiving the amount of data indicated by the data length code, and while the receiving means is receiving, A receiver for invalidating the detection of the header identification code.
送信するデータのデータ種類コードにより、該データを圧縮するか否かを判定する手段、該手段が圧縮すると判定したときに、前記ヘッダ識別コードが含まれないように、前記データを圧縮する手段、及び該手段が圧縮したデータを送信する手段を有する送信機と、請求項3乃至7の何れかに記載された受信機とを備え、前記パケットヘッダが付加されたデータを送受信すべくなしてあることを特徴とする送受信装置。In a transmitting and receiving apparatus for transmitting and receiving data to which a packet header including a header identification code, a data length code, and a data type code is added,
Means for determining whether to compress the data by the data type code of the data to be transmitted, means for compressing the data so that the header identification code is not included when the means determines that the data is to be compressed, A transmitter having means for transmitting data compressed by the means, and a receiver according to any one of claims 3 to 7, wherein the receiver is adapted to transmit and receive the data to which the packet header has been added. A transmission / reception device characterized by the above-mentioned.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002183595A JP3949012B2 (en) | 2002-06-24 | 2002-06-24 | Data transmission / reception method, transmitter, receiver, and transmitter / receiver |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002183595A JP3949012B2 (en) | 2002-06-24 | 2002-06-24 | Data transmission / reception method, transmitter, receiver, and transmitter / receiver |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004032214A true JP2004032214A (en) | 2004-01-29 |
JP3949012B2 JP3949012B2 (en) | 2007-07-25 |
Family
ID=31179763
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002183595A Expired - Fee Related JP3949012B2 (en) | 2002-06-24 | 2002-06-24 | Data transmission / reception method, transmitter, receiver, and transmitter / receiver |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3949012B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010009486A (en) * | 2008-06-30 | 2010-01-14 | Toyota Motor Corp | Data rewriting method, data rewriting device and data management device |
US9928454B2 (en) | 2015-08-26 | 2018-03-27 | Seiko Epson Corporation | Host computer, control method of a host computer, and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59189751A (en) * | 1983-04-12 | 1984-10-27 | Fujitsu Ltd | Data transmission control system |
JPH08339273A (en) * | 1995-06-09 | 1996-12-24 | Canon Inc | Data transmitter, data transfer device and method therefor and printing system and controlling method therefor |
JPH10303971A (en) * | 1997-04-23 | 1998-11-13 | Nippon Telegr & Teleph Corp <Ntt> | Message communication system |
JP2001188728A (en) * | 1999-12-28 | 2001-07-10 | Toshiba Corp | Communication system and method for controlling the same |
-
2002
- 2002-06-24 JP JP2002183595A patent/JP3949012B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59189751A (en) * | 1983-04-12 | 1984-10-27 | Fujitsu Ltd | Data transmission control system |
JPH08339273A (en) * | 1995-06-09 | 1996-12-24 | Canon Inc | Data transmitter, data transfer device and method therefor and printing system and controlling method therefor |
JPH10303971A (en) * | 1997-04-23 | 1998-11-13 | Nippon Telegr & Teleph Corp <Ntt> | Message communication system |
JP2001188728A (en) * | 1999-12-28 | 2001-07-10 | Toshiba Corp | Communication system and method for controlling the same |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010009486A (en) * | 2008-06-30 | 2010-01-14 | Toyota Motor Corp | Data rewriting method, data rewriting device and data management device |
US9928454B2 (en) | 2015-08-26 | 2018-03-27 | Seiko Epson Corporation | Host computer, control method of a host computer, and medium |
Also Published As
Publication number | Publication date |
---|---|
JP3949012B2 (en) | 2007-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7295338B2 (en) | Status information acquisition from plural functions included in image processing apparatus | |
US7561285B2 (en) | Energy-saving control in image processing apparatus | |
JP5822470B2 (en) | Information processing apparatus, control method thereof, and storage medium | |
JP4165451B2 (en) | Printing system, printing request terminal, compression algorithm selection program, and printing method | |
JP3949012B2 (en) | Data transmission / reception method, transmitter, receiver, and transmitter / receiver | |
CN112204934A (en) | Communication device, communication method, and communication program | |
JP2005074911A (en) | Image processor | |
EP1343089B1 (en) | Data transfer method, data transfer device, communication interface method, and communication interface device | |
JP2003198378A (en) | Decoding apparatus and method therefor, record medium, and program | |
JP6033383B2 (en) | Information processing apparatus, control method thereof, and control program | |
JP5004322B2 (en) | Data transfer control method, apparatus, and image forming apparatus | |
JP2575036B2 (en) | Incoming call transfer data processing device | |
JP2017149119A (en) | Information processing apparatus and method for controlling information processing apparatus | |
JP2000207142A (en) | System and method for transferring print data | |
JPH09277624A (en) | Image forming apparatus | |
KR100280177B1 (en) | Method for Checking a Last Portion of Reading Data | |
JP3279736B2 (en) | Image communication device | |
JP2005011262A (en) | Image processing system | |
JP2655502B2 (en) | Facsimile machine | |
JP2004229066A (en) | Image forming device | |
JP2002351630A (en) | Device for identifying control command and system therefor | |
JP2006246316A (en) | Communication apparatus and communication method | |
JPH09190307A (en) | Print system, information processor, printer and print method | |
JP2001245124A (en) | Image communications equipment | |
JP2005339585A (en) | Printing system, print request terminal, compression algorithm selecting program and printing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050225 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20061221 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070109 |
|
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: 20070417 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070417 |
|
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: 20100427 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110427 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120427 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120427 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130427 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |