JP2004013429A - Data control method and recorder - Google Patents

Data control method and recorder Download PDF

Info

Publication number
JP2004013429A
JP2004013429A JP2002164665A JP2002164665A JP2004013429A JP 2004013429 A JP2004013429 A JP 2004013429A JP 2002164665 A JP2002164665 A JP 2002164665A JP 2002164665 A JP2002164665 A JP 2002164665A JP 2004013429 A JP2004013429 A JP 2004013429A
Authority
JP
Japan
Prior art keywords
data
channel
packet
recording
protocol
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.)
Withdrawn
Application number
JP2002164665A
Other languages
Japanese (ja)
Inventor
Makoto Hibi
日比 真
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2002164665A priority Critical patent/JP2004013429A/en
Publication of JP2004013429A publication Critical patent/JP2004013429A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)
  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To aim at normal printing in either of a case of receiving packeted data on the basis of an IEEE 1284.4 protocol and a case of receiving data of a conventional stream method. <P>SOLUTION: Discrimination is made on whether data transmitted to an interface control channel in communication by the IEEE 1284.4 protocol is 1284.4 packeted data or a non-packeted image data command group by analyzing 6 bites of the forefront, and in non-packeted data, the discrimination is repeated up to detecting the forefront of the next packet while performing the prescribed bite number of processings to a rear stage. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は記録装置に関し,特にIEEE1284.4プロトコルに規定されているパケットデータ受信時の記録データの処理と従来の複数の論理チャネルを持たないデータを受信した場合の処理に関する。
【0002】
【従来の技術】
先ずIEEE1284.4プロトコルについて述べる。IEEE1284.4プロトコルは物理インターフェース層の上でアプリケーション層よりは下になる層に使用されるpoint−to−pointプロトコルを定めたものである。こうした層はOSI参照モデルで示されるところのトランスポート層とセッション層の機能と特徴を持っている。このプロトコルはIEEE1284−1994インターフェース上で機能するものとするが,別のpoint−to−pointインターフェース上でも機能することが出来る。IEEE1284.4プロトコルを実装する上で物理インターフェースに要求されている事は双方向通信が可能なことであり,IEEE1284.4プロトコルはそのインターフェース上に論理的な通信路(チャネル)を確立し,1つのチャネルに対して双方向の通信を実現するものである。
【0003】
このIEEE1284.4プロトコルでは送信側機器,受信側機器それぞれの端をPrimarySocketID(PSID),SecondarySoeketID(SSID)と呼んでおり,それぞれのSocketIDを接続したデータの流路が通信路(チャネル)である。
【0004】
IEEE1284.4プロトコルではデータ転送方式としてパケット方式を採用している。パケット方式とはデータ長を示すヘッダ部分と,データ自体からなるデータ部分とから構成されたパケットデータを1つのデータ群として送信するものである。IEEE1284.4プロトコルではこのパケットヘッダは6バイトと規定されており、データ群としては最大64k−6byteのデータを送信することが可能である。
【0005】
しかしながら,このパケットサイズは転送可能な最大長を定めるものであって,実際に転送するパケットデータはこのサイズを満たしていない場合もある。そのため,パケットヘッダにはそのパケットデータに含まれるデータ長が記述されているので,受信機器側装置はパケットを受信すると,ヘッダ部分に示されたデータ長を基にして,データ部分とパケットデータの切れ目とを認識し,認識されたデータ部分からデータを取り出して,装置内のメモリに格納するなどの処理を行う。
【0006】
より具体的にはこの通信路(チャネル)上で流通するパケットは図2に示すような構造であり,送信機器及び受信機器はこのヘッダ部に含まれるPSID,SSIDによってどの通信路(チャネル)上に送信されたパケットかを判別する。なお,各SocketIDは0×00〜0×FFまでの値が許されているが,PSID=0×00,SSlD=0×00は最初の通信路(チャネル)であってインターフェース制御用チャネルとして予約されている。このインターフェース制御用チャネルは主にインターフェースの管理のために使用されており、その他のチャネルはこのインターフェース制御用チャネル上でパケットサイズの折衝をした後,OpenChannel/OpenChanneIReplyコマンドによって動的に確立される。
【0007】
このIEEE1284.4プロトコル上での送信機器側がデータ転送用のチャネルを確立し,そのチャネル上に記録データを送信し,受信機器が画像データを生成するまでを具体的な例をとって説明する。
【0008】
まず,送信機器側(ホストコンピュータ)の構成としては,図3に示すようにアプリケーション,プリンタドライバメイン,レンダラ,スプーラ,パケット化モジュールが存在するものとする。これらはそれぞれユーザが印字しようとする画像を作成するアプリケーション,ユーザのプリント指示により起動されるプリンタドライバメイン,プリンタドライバメインからの指示によってアプリケーション上の画像データをビットマップデータ化するレンダラ,プリンタドライバからの記録装置制御コマンド及びレンダラからのビットマップデータをコマンドに変換したデータをハードディスク上のファイルにスプールするスプーラ,スプールされたファイルから前述のコマンド群を読み出し,IEEE1284.4パケットを生成し適切なチャネルにデータを送信するパケット化モジュールである。パケット化モジュールは必要なチャネルを動的に生成する機能も有する。また,画像データの他にユーザからの指示を元に受信側機器を制御したり,インターフェースを管理したりするのもパケット化モジュールであり,このモジュールがデータ送信用のチャネルを確立する構成となっている。
【0009】
IEEE1284.4プロトコルでは送信機器と受信機器が接続された時点ではその通信路としてインタフェース制御用チャネルのみが利用可能である。従って印字データが生成された時点でパケット化モジュールは動的にデータ通信用のチャネルを確立するのが望ましい。ここで新たなチャネルを確立する前にはインターフェース制御用チャネルを通してConfigSocketコマンドを発行し,このチャネルに対するパケットサイズを指定せねばならない。仮に送信機器側がこのデータチャネルに対するパケットサイズを1KByteにしようとする場合,ConfigSocketコマンドに“1KByte”と記述してコマンドを発行する。受信機器側はこのコマンドを受信したときにこのパケットサイズを受け入れることが出来るならば,ConfigSocketReplyコマンドの中に“1KByte”を記述して送信機器側へコマンドを発行しても良いし,必要ならばより小さい値を記述してコマンドを発行することも可能である。
【0010】
送信機器側はこのConfigSocetReplyコマンドを受信した時点で自分の発行したConfigSocketコマンド内のパケットサイズと受信機器側が発行したConfiqSocketReplyコマンド内のパケットサイズの小さい方をこのデータ送信用チャネルに送信可能な最大パケットサイズとして以後運用することになる。その後,送信機器側はインターフェース制御用チャネルにOpenChannelを発行し,受信機器側からのOpenChannelReplyコマンドを受信した時点でこのデータ送信用チャネルは確立する。以後はこのデータ送信用チャネルを通して画像データを送信し,記録装置はデータ送信用チャネル上のデータから画像を生成する。
【0011】
以上述べてきた様にIEEE1284.4プロトコルではパケット化されたデータを送信することが前提であるが,このパケットは前述の記録装置を制御したり,画像データを送信したりするコマンド群をあらかじめ定められたサイズの範囲内で適当なサイズに分断しパケットヘッダを付けたものであって,連続する複数のパケットのヘッダを取り外し(デパケットし)それを繋ぐと従来のストリーム方式のデータと全く同等のデータ群が得られる。
【0012】
ところで,lEEE1284.4プロトコルのようなパケット方式によるデータ転送を実装する以前の記録装置は従来のセントロニクスインタフェースに代表されるようなストリーム方式のデータ転送が一般的であった。セントロニクスインタフェースではチャネルの概念は無く常に一つの通進路でデータ転送は送信機器側から受信機器側への片方向であった。また,その通信路上に流れるデータはストリームと呼ばれるデータ長に制限の無いデータ列として送信されていた。
【0013】
このようなセントロニクスインターフェースを使用することを前提に作成された従来の送信機器側(ホストコンピュータ)の構成は図3と基本的には同じであるが,パケット化モジュールが存在せず,スプールされた画像データを他のモジュールによってセントロニクスインターフェース上に送信していた。また,プリンタドライバの機能として,スプールされたデータを「ファイルに保存」することによってその画像データを流用し,DOSのCOPYコマンド等によって送信することが可能であった。この場合,ホストコンピュータはDOS等のIEEE1284.4プロトコルに対応したドライバが使用されないため,新たにデータ送信用のチャネルを確立すること無く,画像データを送信することになる。この場合,受信機器側ではインターフェース制御用チャネルにパケット化されていないデータが送信されることになるのでそのままではパケットエラーとして扱うことになる。
【0014】
【発明が解決しようとする課題】
以上述べたように従来の送信機器側の構成はスプーラによってスプールされた記録データはデータ送信用チャネルを確立してそのチャネルにデータを送信するという構成では無かったので,プリンタドライバによって「ファイルに保存」した場合も,DOSのCOPYコマンドによって送信した場合も全く同様の印字結果を得ることが可能であった。しかしながら,IEEE1284.4プロトコルを実装した場合,記録データはスプールされたデータを更にパケット化モジュールによってパケット化し,データ送信用チャネルに送信しなければ受信機器側はパケットエラーとして,そのデータを破棄してしまう。
【0015】
本発明は上記問題点を鑑み,ファイルに保存されたパケット化されていない従来互換データをインターフェース制御用チャネルにおいて受信した場合にはこれをデータエラーとはせずに本来記録データ通信用に用意されているバッファメモリにソフトウェア的に書き込むことによってDOSコマンドの一つであるCOPYコマンドによる印字も可能にするものである。
【0016】
【課題を解決するための手段】
上記目的を達成するために本発明の記録装置は,USB,IEEEE1284等の双方向通信可能な物理インタフェースを有し、IEEE1284.4に規定される複数の論理チャネルを制御するプロトコル制御手段と,その論理チャネルの一つはインターフェース制御用のチャネルとして使用し、そのチャネル上で受信したコントロールパケットを解析するパケット解析手段と、インターフェース制御用チャネルの他に新たなチャネルを確立するインターフェース制御手段と、その確立されたチャネルが記録データ通信用のチャネルの場合、その通信路で受信したデータパケットのヘッダ部を取り除くデパケット手段と、デパケットされたデータを保持しておくバッファメモリと、前記デパケットされたデータをDMA等のハードウェアによってバッファメモリに書き込むデータ保存手段と、バッファメモリに保持されたデータから記録画像を生成する記録データ解析手段と、を有し、正規の手順により記録データ通信用のチャネルが確立され、記録データ通信用チャネルで記録データを受信した場合には前記デパケット手段と、前記データ保存手段により前記バッファメモリに記録データを保持し、前記記録データ解析手段により記録画像を生成するが、記録データ通信用のチャネルが確立されることなくインターフェース制御用のチャネルでIEEE1284.4のパケット構造を持たないデータを受信した場合には前記パケット解析手段により受信データを前記バッファメモリにソフトウェア的に書き込み、前記パケット解析手段が新たなパケットヘッダを検出するまでこれを繰り返すこと、を特徴とする。
【0017】
【発明の実施の形態】
以下に図面に基づいて本発明の実施例を詳細かつ具体的に説明する。
【0018】
図3は本発明に基づく記録装置と画像データを送信するホストコンピュータを接続した時のインターフェースの概念図である。この実施例の記録装置304はホストコンピュータ301と物理インターフェース302上に確立される複数の論理チャネル303によって接続されている。
【0019】
最初に物理インターフェースが接続された時点では図2(a)の様に論理チャネルは一本しか無くこのチャネル上に送信されるデータはプロトコル制御手段401によって受信され,パケットとしてパケット解析手段403に渡される。パケット解析手段403は受信したパケットのコマンドを解析し,必要ならばインターフェース制御手段402を利用して物理インターフェース302上に新たなデータ送信用の論理チャネル305を確立する。
【0020】
次にホストコンピュータからIEEE1284.4プロトコルに基づくパケット化された画像データを受信した時の動作を説明する。
【0021】
図4は本発明に基づく記録装置のブロック図である。特に図4(a)はこの実施例の記録装置304において,データ送信用の論理チャネルを確立した後にそのデータ送信用チャネル上に送信されたデータについてプロトコル制御手段から不図示である記録手段までの流れを示している。
【0022】
プロトコル制御手段401はその物理インターフェースがUSBの場合にはUSBパケットのヘッダ部を取り除き,データ部のみをパケット解析手段403に渡す機能を有する。また,その物理インターフェースがIEEE1284の場合には規格に定められたハンドシェーク処理を行い1バイトづつパケット解析手段403に渡すものである。
【0023】
前述した手順によりデータ送信用の論理チャネルを確立した後にこのデータ送信用チャネル上に送信されたデータはIEEE1284.4プロトコルに従って送信されたパケットと看徹され,パケット解析手段403によってPSID/SSIDからどのチャネル上に送信されたパケットか解析される。パケット解析手段403は解析したパケットがデータ送信用チャネル上に送信されたパケットであると認識すると,そのパケットをデパケット手段404に渡す機能を有する。
【0024】
デパケット手段404は渡されたパケットからヘッダ部を取り除きデータ部のみを不図示であるDMA等のハードウェアによってバッファメモリ405に保存する機能を有する。
【0025】
記録データ解析手段406は常にバッファメモリ405を監視しており,バッファメモリ405にデータが保存されると逐次データを読み出してきて不図示である記録手段が記録データを記録するのに最も適したデータ形式に変換してプリントバッファ407に保存する。
【0026】
次にホストコンピュータから新たなデータ送信用のチャネルを確立することなくストリーム方式で画像データを受信しだ時の動作を説明する。
【0027】
図4(b)はこの実施例の記録装置304において,データ送信用の論理チャネルが確立されること無く,従来のストリーム方式のデータとして送信されたデータについてプロトコル制御手段から不図示である記録手段までの流れを示している。
【0028】
受信機器側ではデータ送信用の論理チャネルが確立される前の状態で受信したデータはインターフェース制御用チャネルに送信されたパケットと看做されるため,パケット解析手段403はそのパケットヘッダのPSID/SSIDが共に0×00であるかをチェックする。共に0×00であった場合には正常なパケットデータと看做し,対応した処理を実行するが,PSID/SSIDのいずれかが0×00で無かった場合にはそのデータを記録データ解析手段406に送り,ストリームデータとして取り扱う。
【0029】
このようにパケット解析手段403が受信したデータを解析し,そのデータがインターフェース制御用コマンドであるか,ストリームデータかを判別することによってDOSのCOPYコマンド等で送信された画像データをも本記録装置は印字することが可能となるがそのパケット解析手段403は図1に示されるステップにおいてこの判別を行う。すなわち,Step1においてパケット解析手段403が受信しだデータのヘッダ部と思われる6バイトを解析し,PSID/SSIDからこのデータがインターフェース制御用パケットであるかを判別する(Step2)。これがインターフェース制御用コマンドであれば,コマンドに応じた処理を実行し,再びStep1に戻る。もし,この8バイトに含まれるPSID/SSIDが既にオープンしているチャネルでも無い場合,これを記録データ解析手段406へ転送し(Step4),記録データ解析手段408がコマンド群ストリームデータとしてデータを解析する。記録データ解析手段406はストリームデータを解析し,コマンドの終了を検知するとインターフェース制御手段にイベントを発行し,再びStep1に戻る。
【0030】
【発明の効果】
以上の様に本実施例の記録装置はIEEE1284.4プロトコルに基づく複数の論理チャネルを持つインターフェースにおいて,データ送信用のチャネルを利用しデータ送信をすることが出来,且つ,従来のプリンタドライバ等で作成された複数の論理チャネルを確立すること無くデータを送信するストリーム方式のデータを送信された場合も正常な印字をすることが可能である。
【図面の簡単な説明】
【図1】本発明に基づくデータ制御方式の動作フローチャートである。
【図2】IEE1284.4に定義されているパケット構造である。
【図3】本発明に基づく記録装置のインターフェースの概念図である。
【図4】本発明に基づく記録装置のブロック図である。
【図5】本発明に基づく記録装置が印字するデータを生成する送信機器の構成図である。
【符号の説明】
301 送信機器(ホストコンピュータ)
302 物理インターフェース(USB,lEEE1284)
303 論理チャネル
304 記録装置
401 プロトコル制御手段
402 インターフェース制御手段
403 パケット解析手段
404 デパケット手段
405 バッファメモリ
406 記録データ解析手段
407 プリントバッファ
[0001]
TECHNICAL FIELD OF THE INVENTION
1. Field of the Invention The present invention relates to a recording apparatus, and more particularly, to processing of recording data at the time of receiving packet data specified by the IEEE1284.4 protocol and processing of receiving conventional data without a plurality of logical channels.
[0002]
[Prior art]
First, the IEEE1284.4 protocol will be described. The IEEE1284.4 protocol defines a point-to-point protocol used for a layer above the physical interface layer and below the application layer. These layers have the functions and features of the transport and session layers as indicated by the OSI reference model. This protocol shall function on the IEEE1284-1994 interface, but may also function on another point-to-point interface. What is required of the physical interface to implement the IEEE1284.4 protocol is that bidirectional communication is possible. The IEEE1284.4 protocol establishes a logical communication path (channel) on the interface, and It implements bidirectional communication for one channel.
[0003]
In the IEEE1284.4 protocol, the ends of the transmission-side device and the reception-side device are called PrimarySocketID (PSID) and SecondarySocketID (SSID), respectively, and the flow path of data to which the respective SocketIDs are connected is a communication path (channel).
[0004]
The IEEE1284.4 protocol employs a packet method as a data transfer method. The packet method transmits packet data composed of a header portion indicating a data length and a data portion including data itself as one data group. In the IEEE1284.4 protocol, this packet header is specified as 6 bytes, and a maximum of 64 k-6 bytes of data can be transmitted as a data group.
[0005]
However, this packet size determines the maximum transferable length, and the packet data actually transferred may not satisfy this size. Therefore, the data length included in the packet data is described in the packet header. When the receiving device receives the packet, based on the data length indicated in the header portion, the data portion and the packet data are compared. Processing such as recognizing a break, extracting data from the recognized data portion, and storing the data in a memory in the device is performed.
[0006]
More specifically, the packet circulating on this communication path (channel) has a structure as shown in FIG. 2, and the transmitting device and the receiving device determine on which communication channel (channel) by the PSID and SSID included in the header portion. It is determined whether or not the packet is transmitted. Each Socket ID is allowed to have a value of 0 × 00 to 0 × FF, but PSID = 0 × 00 and SSID = 0 × 00 are the first communication paths (channels) and are reserved as interface control channels. Have been. This interface control channel is mainly used for interface management, and other channels are dynamically established by an OpenChannel / OpenChannelIReply command after negotiating a packet size on the interface control channel.
[0007]
A specific example will be described in which the transmitting device side on the IEEE1284.4 protocol establishes a data transfer channel, transmits recording data on the channel, and generates image data by the receiving device.
[0008]
First, as the configuration of the transmitting device side (host computer), it is assumed that an application, a printer driver main, a renderer, a spooler, and a packetizing module exist as shown in FIG. These are provided by an application for creating an image to be printed by the user, a printer driver main activated by a user's print instruction, a renderer for converting image data on the application into bitmap data according to an instruction from the printer driver main, and a printer driver. A spooler for spooling the storage device control command and the data obtained by converting bitmap data from the renderer into a command to a file on the hard disk, reading the above-mentioned command group from the spooled file, generating IEEE1284.4 packets, and generating an appropriate channel Is a packetization module that transmits data to The packetization module also has the function of dynamically creating the required channels. The packetization module also controls the receiving device and manages the interface based on instructions from the user in addition to the image data, and this module establishes a data transmission channel. ing.
[0009]
In the IEEE1284.4 protocol, when a transmitting device and a receiving device are connected, only an interface control channel can be used as a communication path. Therefore, it is desirable that the packetization module dynamically establish a channel for data communication when print data is generated. Here, before establishing a new channel, a ConfigSocket command must be issued through the interface control channel to specify the packet size for this channel. If the transmitting device attempts to set the packet size for this data channel to 1 KByte, it issues a command with "1 KByte" written in the ConfigSocket command. If the receiving device can accept this packet size when receiving this command, it may issue "1 KByte" in the ConfigSocketReply command and issue the command to the transmitting device. It is also possible to issue a command by describing a smaller value.
[0010]
When the transmitting device receives this ConfigSocketReply command, the smaller the packet size in the ConfigSocket command issued by itself and the smaller the packet size in the ConfigSocketReply command issued by the receiving device, the maximum packet size that can be transmitted to this data transmission channel. Will be operated thereafter. Thereafter, the transmitting device issues an OpenChannel to the interface control channel, and the data transmitting channel is established when an OpenChannelReply command is received from the receiving device. Thereafter, image data is transmitted through the data transmission channel, and the recording apparatus generates an image from the data on the data transmission channel.
[0011]
As described above, the IEEE 1284.4 protocol is based on the premise that packetized data is transmitted. This packet defines a command group for controlling the above-described recording apparatus and transmitting image data in advance. A packet header is divided into appropriate sizes within the specified size range, and packet headers are attached. If the headers of a plurality of consecutive packets are removed (depacketed) and connected, they are completely equivalent to the data of the conventional stream system. A data group is obtained.
[0012]
By the way, the recording apparatus before implementing the data transfer by the packet system such as the IEEE1284.4 protocol generally used the stream system data transfer represented by the conventional Centronics interface. In the Centronics interface, there is no concept of a channel, and data transfer is always one-way from the transmitting device to the receiving device on one transit path. Further, the data flowing on the communication path has been transmitted as a data string called a stream having no limitation on the data length.
[0013]
The configuration of the conventional transmitting device (host computer) created on the assumption that such a Centronics interface is used is basically the same as that of FIG. 3, but there is no packetization module and the spooling is performed. Image data was transmitted by another module over the Centronics interface. Further, as a function of the printer driver, it is possible to divert the image data by "storing the spooled data in a file" and transmit it by a DOS COPY command or the like. In this case, since the host computer does not use a driver corresponding to the IEEE1284.4 protocol such as DOS, image data is transmitted without newly establishing a data transmission channel. In this case, on the receiving device side, unpacketized data is transmitted to the interface control channel, so that it is treated as a packet error as it is.
[0014]
[Problems to be solved by the invention]
As described above, the configuration of the conventional transmission device side does not establish a data transmission channel for the recording data spooled by the spooler and transmits the data to that channel. And the same print result could be obtained when transmitted by the DOS COPY command. However, when the IEEE1284.4 protocol is implemented, the recording data is further packetized by the packetizing module of the spooled data, and if the data is not transmitted to the data transmission channel, the receiving device discards the data as a packet error and discards the data. I will.
[0015]
The present invention has been made in view of the above-described problems, and when conventional compatible data that is not packetized and stored in a file is received on an interface control channel, the data is not prepared as a data error but is originally prepared for recording data communication. By writing the data in the buffer memory using software, printing using a COPY command, which is one of the DOS commands, is also enabled.
[0016]
[Means for Solving the Problems]
In order to achieve the above object, a recording apparatus of the present invention has a physical interface capable of bidirectional communication such as USB, IEEE1284, etc., and a protocol control means for controlling a plurality of logical channels defined in IEEE1284.4; One of the logical channels is used as a channel for interface control, a packet analysis unit for analyzing a control packet received on the channel, an interface control unit for establishing a new channel in addition to the interface control channel, and When the established channel is a channel for recording data communication, depacket means for removing a header portion of a data packet received on the communication channel, a buffer memory for holding the depacketed data, For hardware such as DMA Means for writing data to the buffer memory, and print data analyzing means for generating a print image from the data held in the buffer memory. When the recording data is received through the communication channel, the depacket unit and the data storage unit hold the recording data in the buffer memory, and the recording data analysis unit generates a recording image. If data without an IEEE1284.4 packet structure is received on an interface control channel without a channel being established, the packet analysis means writes the received data to the buffer memory in software, and the packet analysis means Until it finds a new packet header. Repeating, characterized.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail and specifically with reference to the drawings.
[0018]
FIG. 3 is a conceptual diagram of an interface when a recording apparatus according to the present invention and a host computer for transmitting image data are connected. The recording device 304 of this embodiment is connected to the host computer 301 by a plurality of logical channels 303 established on the physical interface 302.
[0019]
When the physical interface is connected for the first time, there is only one logical channel as shown in FIG. 2A, and data transmitted on this channel is received by the protocol control means 401 and passed to the packet analysis means 403 as a packet. It is. The packet analysis unit 403 analyzes the command of the received packet, and establishes a new data transmission logical channel 305 on the physical interface 302 by using the interface control unit 402 if necessary.
[0020]
Next, an operation when receiving packetized image data based on the IEEE1284.4 protocol from the host computer will be described.
[0021]
FIG. 4 is a block diagram of a recording apparatus according to the present invention. In particular, FIG. 4A shows that in the recording device 304 of this embodiment, after a logical channel for data transmission is established, data transmitted from the protocol control unit to a recording unit (not shown) is transmitted on the data transmission channel. Shows the flow.
[0022]
When the physical interface is USB, the protocol control means 401 has a function of removing the header part of the USB packet and passing only the data part to the packet analysis means 403. When the physical interface is IEEE1284, it performs a handshake process defined in the standard and passes it to the packet analysis unit 403 byte by byte.
[0023]
After establishing a logical channel for data transmission according to the procedure described above, the data transmitted on this data transmission channel is identified as a packet transmitted in accordance with the IEEE1284.4 protocol. The packet transmitted on the channel is analyzed. When the packet analyzing unit 403 recognizes that the analyzed packet is a packet transmitted on the data transmission channel, it has a function of passing the packet to the depacketing unit 404.
[0024]
The depacket unit 404 has a function of removing the header part from the passed packet and storing only the data part in the buffer memory 405 by hardware such as DMA (not shown).
[0025]
The recording data analysis means 406 always monitors the buffer memory 405, and when the data is stored in the buffer memory 405, reads out the data one by one, and the recording means (not shown) most suitable for recording the recording data. The data is converted into a format and stored in the print buffer 407.
[0026]
Next, an operation when image data is received by the stream method without establishing a new data transmission channel from the host computer will be described.
[0027]
FIG. 4B shows a recording unit (not shown) from the protocol control unit for data transmitted as conventional stream system data without establishing a logical channel for data transmission in the recording device 304 of this embodiment. The flow up to this point is shown.
[0028]
On the receiving device side, the data received before the logical channel for data transmission is established is regarded as a packet transmitted to the interface control channel, so the packet analysis means 403 determines the PSID / SSID of the packet header. Are both 0 × 00. If both are 0x00, it is regarded as normal packet data and the corresponding processing is executed. If either PSID / SSID is not 0x00, the data is recorded data analysis means. The data is sent to 406 and handled as stream data.
[0029]
As described above, the packet analysis unit 403 analyzes the received data, and determines whether the data is an interface control command or a stream data, so that the image data transmitted by the DOS COPY command or the like can also be used in the recording apparatus. Can be printed, but the packet analysis means 403 makes this determination in the step shown in FIG. That is, the packet analysis means 403 analyzes 6 bytes which are considered to be the header part of the received data in Step 1, and determines whether this data is an interface control packet from PSID / SSID (Step 2). If this is an interface control command, a process corresponding to the command is executed, and the process returns to Step 1 again. If the PSID / SSID included in the 8 bytes is not a channel that is already open, it is transferred to the recording data analysis unit 406 (Step 4), and the recording data analysis unit 408 analyzes the data as command group stream data. I do. The recording data analysis means 406 analyzes the stream data, and when detecting the end of the command, issues an event to the interface control means and returns to Step 1 again.
[0030]
【The invention's effect】
As described above, the recording apparatus of the present embodiment can transmit data using the data transmission channel in the interface having a plurality of logical channels based on the IEEE1284.4 protocol, and can use the conventional printer driver or the like. Normal printing can be performed even when data of a stream method for transmitting data without transmitting a plurality of created logical channels is transmitted.
[Brief description of the drawings]
FIG. 1 is an operation flowchart of a data control method according to the present invention.
FIG. 2 is a packet structure defined in IEEE1284.4.
FIG. 3 is a conceptual diagram of an interface of a recording apparatus according to the present invention.
FIG. 4 is a block diagram of a recording device according to the present invention.
FIG. 5 is a configuration diagram of a transmission device that generates data to be printed by a recording device according to the present invention.
[Explanation of symbols]
301 Transmission equipment (host computer)
302 Physical interface (USB, IEEE1284)
303 logical channel 304 recording device 401 protocol control means 402 interface control means 403 packet analysis means 404 depacket means 405 buffer memory 406 print data analysis means 407 print buffer

Claims (1)

USB,IEEE1284等の双方向通信可能な物理インタフェースを有し、IEEE1284.4に規定される複数の論理チャネルを制御するプロトコル制御手段と,
論理チャネル上を流れるパケットを解析するパケット解析手段と、
前記複数の論理チャネルのうちの一つをインターフェース制御用チャネルとし,その他に新たなチャネルを確立するインターフェース制御手段と、
その確立されたチャネルが記録データ通信用のチャネルの場合、その通信路で受信したデータパケットのヘッダ部を取り除くデパケット手段と、
デパケットされたデータを保持しておくバッファメモリと、
前記デパケットされたデータをDMA等のハードウェアによってバッファメモリに書き込むデータ保存手段と、
バッファメモリに保持されたデータから記録画像を生成する記録データ解析手段と、を有し、
正規の手順により記録データ通信用のチャネルが確立され、記録データ通信用チャネルで記録データを受信した場合には前記デパケット手段と、前記データ保存手段により前記バッファメモリに記録データを保持し、前記記録データ解析手段により記録画像を生成するが、記録データ通信用のチャネルが確立されることなくインターフェース制御用のチャネルでIEEE1284.4のパケット構造を持たないデータを受信した場合には前記パケット解析手段が受信したデータを前記記録データ解析手段に転送し、前記パケット解析手段が新たなパケットヘッダを検出するまでこれを繰り返すこと、
を特徴とするデータ制御方式及び記録装置。
A protocol control means having a physical interface capable of bidirectional communication such as USB, IEEE1284 or the like, and controlling a plurality of logical channels defined by IEEE1284.4;
Packet analysis means for analyzing packets flowing on the logical channel;
An interface control means for setting one of the plurality of logical channels as an interface control channel and establishing a new channel in addition to the other logical channel;
When the established channel is a channel for recording data communication, depacket means for removing a header portion of a data packet received on the communication channel;
A buffer memory for holding depacketed data,
Data storage means for writing the depacketed data to a buffer memory by hardware such as DMA,
Recording data analysis means for generating a recording image from the data held in the buffer memory,
A channel for recording data communication is established by a regular procedure, and when recording data is received on the recording data communication channel, the recording data is held in the buffer memory by the depacket unit and the data storage unit. A recording image is generated by the data analysis unit, but when data without the IEEE1284.4 packet structure is received on the interface control channel without establishing a recording data communication channel, the packet analysis unit Transferring the received data to the recording data analysis means, repeating this until the packet analysis means detects a new packet header,
And a recording device.
JP2002164665A 2002-06-05 2002-06-05 Data control method and recorder Withdrawn JP2004013429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002164665A JP2004013429A (en) 2002-06-05 2002-06-05 Data control method and recorder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002164665A JP2004013429A (en) 2002-06-05 2002-06-05 Data control method and recorder

Publications (1)

Publication Number Publication Date
JP2004013429A true JP2004013429A (en) 2004-01-15

Family

ID=30432750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002164665A Withdrawn JP2004013429A (en) 2002-06-05 2002-06-05 Data control method and recorder

Country Status (1)

Country Link
JP (1) JP2004013429A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007093800A (en) * 2005-09-27 2007-04-12 Kawai Musical Instr Mfg Co Ltd Data structure of electronic musical instrument
JP2015046091A (en) * 2013-08-29 2015-03-12 セイコーエプソン株式会社 Receiving device and transmitting device
CN113392083A (en) * 2021-05-25 2021-09-14 交控科技股份有限公司 Rail transit equipment log processing system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007093800A (en) * 2005-09-27 2007-04-12 Kawai Musical Instr Mfg Co Ltd Data structure of electronic musical instrument
JP4672501B2 (en) * 2005-09-27 2011-04-20 株式会社河合楽器製作所 Electronic musical instruments
JP2015046091A (en) * 2013-08-29 2015-03-12 セイコーエプソン株式会社 Receiving device and transmitting device
CN113392083A (en) * 2021-05-25 2021-09-14 交控科技股份有限公司 Rail transit equipment log processing system and method

Similar Documents

Publication Publication Date Title
KR101092112B1 (en) Enhanced Wireless UBS protocol and hub
US7961340B2 (en) Printer, printing system and printing method for preventing abnormal printing
US9565053B2 (en) Non-transitory computer-readable medium, communication relay apparatus, and image processing apparatus
US20100290074A1 (en) Information processing system, information processor and signal transmitting device
US8532105B2 (en) Image forming apparatus, and control method and interface apparatus thereof
JP4432385B2 (en) Data relay system
JP2001094613A (en) Communication controller, method and recording medium
JP5139859B2 (en) Information processing apparatus, control method therefor, program, and storage medium
JP2004013429A (en) Data control method and recorder
US20080162756A1 (en) Method and apparatus for communication between universal serial bus (usb) host and usb device
JPH11316661A (en) Printing control method, system and recording medium
JP2012053792A (en) System for reducing usb isochronous transfer error
JP4306118B2 (en) Printer and printer control method
JP4428750B2 (en) Data communication system
JP4264924B2 (en) Data transfer method
JPH11275102A (en) Network system by power line, data transmission method and recording medium
JP2005074928A (en) Data processing system, data processor, and data receiving program
JP2004284259A (en) Image forming apparatus and its method
JP2007172196A (en) Management for data in network device
JP3579884B2 (en) Data communication method and apparatus, printer and control method therefor
JP2003248558A (en) Method and device for data transfer
JP4655868B2 (en) First data receiving / transmitting device, receiving device, second data receiving / transmitting device, data receiving / transmitting system, and data receiving / transmitting method
JP3606145B2 (en) Data transfer control device and electronic device
JP4164243B2 (en) Print monitoring system, print monitoring method, and computer program
JP6163976B2 (en) Receiver and transmitter

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050906