JP4449742B2 - Data processing apparatus and method - Google Patents

Data processing apparatus and method Download PDF

Info

Publication number
JP4449742B2
JP4449742B2 JP2004373800A JP2004373800A JP4449742B2 JP 4449742 B2 JP4449742 B2 JP 4449742B2 JP 2004373800 A JP2004373800 A JP 2004373800A JP 2004373800 A JP2004373800 A JP 2004373800A JP 4449742 B2 JP4449742 B2 JP 4449742B2
Authority
JP
Japan
Prior art keywords
data
printer
data processing
print
module
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
JP2004373800A
Other languages
Japanese (ja)
Other versions
JP2006180391A (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 JP2004373800A priority Critical patent/JP4449742B2/en
Publication of JP2006180391A publication Critical patent/JP2006180391A/en
Application granted granted Critical
Publication of JP4449742B2 publication Critical patent/JP4449742B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、データ処理のための技術に関する。   The present invention relates to a technique for data processing.

種々のデータ処理を行うことができるデータ処理装置の一つに、プリンタがある。一般に、プリンタは、ホスト装置からCMY表色系のデータを受け、そのデータに対して所定の処理を行って、印刷を実行する。   One of data processing apparatuses capable of performing various data processing is a printer. In general, a printer receives CMY color system data from a host device, performs predetermined processing on the data, and executes printing.

しかし、ホスト装置には、RGB表色系のデータを送信するものもある(例えば特許文献1及び特許文献2)。この場合、プリンタは、RGB表色系のデータを処理することができるようになっていないと、印刷を実行することができない。   However, some host devices transmit RGB color system data (for example, Patent Document 1 and Patent Document 2). In this case, the printer cannot execute printing unless it can process RGB color system data.

特開平11−240227号公報JP-A-11-240227 特開平11−314408号公報JP-A-11-314408

ところで、プリンタは、受信したデータの種類を前もって知ることができる場合とできない場合がある。知ることができる場合としては、例えば、プリンタとデータソース機器との間で、前もってデータ種類を知ることができる所定のネゴシエーションが行われる場合(例えばブルートゥース(登録商標)の規格に従う通信が行われる場合)が挙げられる。知ることができない場合としては、そのようなネゴシエーションが行われない場合が挙げられる。   Incidentally, the printer may or may not be able to know the type of received data in advance. As a case where it is possible to know, for example, when a predetermined negotiation for knowing the data type in advance is performed between the printer and the data source device (for example, communication according to the Bluetooth (registered trademark) standard is performed) ). A case in which such negotiation cannot be performed is a case where it cannot be known.

そのようなネゴシエーションが行われずに送られて来るデータの種類が、予め一つに決められているならば(例えば、CMY表色系データが入力されると決められているならば)、予め一つのデータ処理経路を準備し、その一つのデータ処理経路でデータ処理をすればよい。しかし、データソース機器が、複数種類のデータ(例えばCMY表色系のデータとRGB表色系のデータ)をプリンタに送信できる場合に、プリンタのデータ処理経路が、一種類のデータしか処理できないのでは、データソース機器の能力が有効に活用されない。だからといって、その予め準備されたデータ処理経路を、複数種類のデータを処理できるように設計変更するのは、負担が大きく、また、プリンタに正確なデータ処理を行えなくさせてしまう原因にもなりかねない。   If the type of data sent without such negotiation is determined in advance (for example, if it is determined that CMY color system data is input), it is determined in advance. One data processing path may be prepared, and data processing may be performed using the one data processing path. However, when the data source device can transmit a plurality of types of data (for example, CMY color system data and RGB color system data) to the printer, the printer data processing path can process only one type of data. Then, the capacity of the data source device is not effectively utilized. However, changing the design of the data processing path prepared in advance so that multiple types of data can be processed can be expensive and may cause the printer to be unable to perform accurate data processing. Absent.

以上の問題点は、プリンタに限らず、種々のデータ処理装置においても同様に存在すると考えられる。   The above problems are considered to exist not only in printers but also in various data processing apparatuses.

従って、本発明の一つの目的は、前もって準備されたデータ処理経路を大きく設計変更することなしに、そのデータ処理経路で複数種類のデータを受けられるようにすることにある。   Accordingly, an object of the present invention is to allow a plurality of types of data to be received through the data processing path without greatly changing the design of the data processing path prepared in advance.

本発明の更なる目的は、後述の記載から明らかになるであろう。   Further objects of the present invention will become clear from the following description.

本発明の第一の側面に従うデータ処理装置は、データ種類を特定することができるネゴシエーション無しでデータの入力を受け、第一種のデータを処理する第一のデータ処理経路と、第二種のデータを処理する第二のデータ処理経路と、前記第一のデータ処理経路に備えられ、該第一のデータ処理経路に入力されたデータが第二種のデータであるかどうかを判断する判断手段と、該第一のデータ処理経路に入力されたデータが第二種のデータであると判断された場合に、前記第二のデータ処理経路を有効にする手段とを備える。   The data processing device according to the first aspect of the present invention receives a data input without negotiation that can specify a data type, and processes a first type data and a second type A second data processing path for processing data and a determination means provided in the first data processing path for determining whether or not the data input to the first data processing path is the second type of data And means for enabling the second data processing path when it is determined that the data input to the first data processing path is the second type of data.

「第一種のデータ」とは、例えば、CMY表色系のデータ、又は、第一の言語で書かれたデータであるとすることができ、「第二種のデータ」とは、例えば、RGB表色系のデータ、又は、第二の言語で書かれたデータであるとすることができる。   The “first type of data” can be, for example, CMY color system data or data written in the first language, and the “second type of data” is, for example, The data can be RGB color system data or data written in a second language.

第一の実施態様では、前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断されるまで、前記第二のデータ処理経路は構築されていなくてもよい。この場合、前記有効にする手段が、前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断されたときに、前記第二のデータ処理経路を構築することができる。   In the first embodiment, the second data processing path may not be constructed until it is determined that the data input to the first data processing path is the second type of data. In this case, the enabling means can construct the second data processing path when it is determined that the data input to the first data processing path is the second type of data. .

第二の実施態様では、前記第一の実施態様において、データ処理装置が、データの入力を受け付ける複数のインタフェース手段と、前記複数のインタフェース手段のうちの所定のインタフェース手段で前記ネゴシエーション無しにデータが入力された場合に、前記第一のデータ処理経路を構築する手段とを更に備えることができる。   In a second embodiment, in the first embodiment, the data processing device receives a plurality of interface means for accepting data input and data without the negotiation by a predetermined interface means among the plurality of interface means. And means for constructing the first data processing path when inputted.

第三の実施態様では、データ処理装置が、前記第二のデータ処理経路が有効にされた後に入力されたデータの種類が前記第二種のデータであるかどうかを判断する手段(例えば、第二データ処理経路に存在する手段)と、前記入力されたデータの種類が前記第二種のデータでないと判断された場合に、前記第二のデータ処理経路の有効を解除する手段と、前記第二のデータ処理経路が解除された後、データの入力が検出されなくなった場合に、前記第一のデータ処理経路の有効を解除する手段とを更に備えることができる。   In a third embodiment, the data processing device determines whether or not the type of data input after the second data processing path is validated is the second type of data (for example, the first type Means for canceling the validity of the second data processing path when it is determined that the type of the input data is not the second type of data, and And means for canceling the validity of the first data processing path when data input is no longer detected after the second data processing path is cancelled.

第四の実施態様では、データ処理装置が、前記第二のデータ処理経路が有効になっても、前記第一のデータ処理経路を有効にしたままにする手段を更に備えることができる。具体的には、例えば、データ処理装置は、前記データ処理装置に入力されたデータを蓄積する第一のバッファと、前記第一のバッファから読み出されたデータを蓄積する第二のバッファと、前記第一のデータ処理経路が有効になっている場合に前記第一のバッファからデータを読み出し前記第二のバッファに格納する手段と、前記第二のデータ処理経路を有効にしても、前記第一のデータ処理経路は有効のままにする手段と、前記第二のデータ処理経路が有効になった場合に、前記第二のバッファに蓄積されたデータを読み出し、前記有効にされている前記第二のデータ処理経路に転送する転送手段とを更に備えることができる。   In the fourth embodiment, the data processing device may further comprise means for keeping the first data processing path valid even if the second data processing path is valid. Specifically, for example, the data processing device includes: a first buffer that stores data input to the data processing device; a second buffer that stores data read from the first buffer; Means for reading data from the first buffer and storing it in the second buffer when the first data processing path is enabled, and enabling the second data processing path; Means for keeping one data processing path valid; and when the second data processing path becomes valid, reads the data stored in the second buffer, and the validated first And a transfer means for transferring to the second data processing path.

第五の実施態様では、データ処理装置が、前記データ処理装置に入力されたデータを蓄積するバッファと、前記バッファに蓄積されたデータを前記第一のデータ処理経路に入力する手段とを備えることができる。この場合、前記判断手段が、前記バッファから読み出されたデータが第二種のデータであるかどうかを判断することができる。前記バッファから読み出されたデータが第二種のデータであると判断された場合に、前記入力する手段が、前記バッファに蓄積されたデータを前記第一のデータ処理経路に入力するのを止めることができる。前記有効にする手段によって有効にされた第二のデータ処理経路が、前記バッファからデータを取得することができる。   In the fifth embodiment, the data processing device includes a buffer for storing data input to the data processing device, and means for inputting the data stored in the buffer to the first data processing path. Can do. In this case, the determination unit can determine whether the data read from the buffer is the second type data. When it is determined that the data read from the buffer is the second type of data, the input means stops inputting the data accumulated in the buffer to the first data processing path. be able to. The second data processing path validated by the validation means can acquire data from the buffer.

第六の実施態様では、データ処理装置が、データ処理経路の構成要素となることができるプログラムモジュールを複数個記憶した記憶手段を更に備えることができる。この場合、前記第一のデータ処理経路と前記第二データ処理経路の各々は、前記複数個のプログラムモジュールの中から選択された、少なくとも、先頭に位置するイニシエータモジュールと、後尾に位置するターミネータモジュールとを含んだ二以上のプログラムモジュールで構成することができる。なお、第二のデータ処理経路が有効にされた場合には、第一のデータ処理経路のイニシエータモジュールよりも下流側に存在するプログラムモジュールから第二のデータ処理経路にイニシエータモジュールにデータを転送することができる。   In the sixth embodiment, the data processing apparatus can further comprise storage means for storing a plurality of program modules that can be constituent elements of the data processing path. In this case, each of the first data processing path and the second data processing path is selected from the plurality of program modules, at least the initiator module positioned at the head and the terminator module positioned at the tail. Can be composed of two or more program modules. When the second data processing path is enabled, data is transferred from the program module existing downstream of the initiator module in the first data processing path to the initiator module in the second data processing path. be able to.

第七の実施態様では、データ処理装置が、前記ネゴシエーション無しでデータの入力を受けた場合に、前記第一のデータ処理経路を有効にする手段と、前記ネゴシエーション有りでデータの入力を受けた場合に(例えば、それにより、第二種のデータが入力されることを特定した場合に)、前記第二のデータ処理経路を有効にする手段とを備えることができる。   In the seventh embodiment, when the data processing device receives data input without the negotiation, when the data processing device receives the data input with the negotiation and the means for enabling the first data processing path (For example, when it is specified that the second type of data is input thereby) can be provided with means for enabling the second data processing path.

本発明の第二の側面に従うデータ処理システムは、データソース装置とデータ処理装置とを備えたデータ処理システムである。データソース装置が、前記データ処理システムとの間で、データ種類を特定することができるネゴシエーション無しで第一種のデータと第二種のデータとのいずれかを前記データ処理装置に出力する手段を有する。前記データ処理装置が、前記ネゴシエーション無しでデータの入力を前記データソース機器から受け、第一種のデータを処理する第一のデータ処理経路と、第二種のデータを処理する第二のデータ処理経路と、前記第一のデータ処理経路に備えられ、該第一のデータ処理経路に入力されたデータが第二種のデータであるかどうかを判断する判断手段と、前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断された場合に、前記第二のデータ処理経路を有効にする手段とを備える。   A data processing system according to the second aspect of the present invention is a data processing system including a data source device and a data processing device. Means for outputting either the first type data or the second type data to the data processing device without negotiation with which the data source device can specify the data type with the data processing system; Have. The data processing device receives a data input from the data source device without the negotiation and processes a first type of data, and a second data processing for processing a second type of data A path, a determination unit that is provided in the first data processing path, and that determines whether the data input to the first data processing path is the second type of data, and the first data processing path And a means for enabling the second data processing path when it is determined that the data input to the second type of data is the second type of data.

本発明の第三の側面に従うデータ処理方法は、データ種類を特定することができるネゴシエーション無しで、第一種のデータを処理する第一のデータ処理経路にデータの入力を受けるステップと、前記第一のデータ処理経路において、前記入力されたデータが第二種のデータであるかどうかを判断するステップと、前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断された場合に、第二種のデータを処理する第二のデータ処理経路を有効にするステップとを有する。   The data processing method according to the third aspect of the present invention includes the step of receiving data input to a first data processing path for processing the first type of data without negotiation capable of specifying the data type; Determining whether the input data is the second type of data in one data processing path; and determining that the data input to the first data processing path is the second type data And enabling a second data processing path for processing the second type of data.

上述したデータ処理装置及びシステムにおける各手段は、ハードウェア、コンピュータプログラム、或いはそれらの組み合わせによって実現することができる。また、各手段の処理は、一つの要素(例えば、ハードウェア、コンピュータプログラム又はそれらの組み合わせ)によって行うこともできるし、複数の要素によって行うこともできる。   Each means in the data processing apparatus and system described above can be realized by hardware, a computer program, or a combination thereof. The processing of each means can be performed by one element (for example, hardware, computer program, or a combination thereof), or can be performed by a plurality of elements.

以下、図面を参照して本発明の一実施形態を説明する。なお、以下の説明では、画像が印刷されるメディアを便宜上「用紙」と称するが、「用紙」は、紙に限らず、他種の印刷メディア、例えば、CD(Compact Disk)やOHPフィルム等であってもよい。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In the following description, a medium on which an image is printed is referred to as “paper” for convenience. However, “paper” is not limited to paper, but other types of print media such as a CD (Compact Disk) or an OHP film. There may be.

図1は、本発明の一実施形態に係るプリントシステムの構成例を示す。   FIG. 1 shows a configuration example of a print system according to an embodiment of the present invention.

ホスト装置(例えばパーソナルコンピュータ)1のインタフェース回路(以下、「I/F」と略記)3と、プリンタ15のI/F13とがケーブル8を介して接続されている。I/F3及びI/F13は、例えば、USBプロトコルに従う通信を行うインタフェース回路、又は、パラレル通信を行うインタフェース回路である。   An interface circuit (hereinafter abbreviated as “I / F”) 3 of a host device (for example, a personal computer) 1 and an I / F 13 of a printer 15 are connected via a cable 8. The I / F 3 and the I / F 13 are, for example, an interface circuit that performs communication according to the USB protocol or an interface circuit that performs parallel communication.

ホスト装置1は、入力装置5(例えば複数の入力キーやポインティングデバイス)と、ディスプレイ画面7と、ホスト記憶域19と、プロセッサ(例えばCPU)17とを備える。入力装置5とディスプレイ画面7は、例えばタッチ式パネルのように、一体になっていてもよい。   The host device 1 includes an input device 5 (for example, a plurality of input keys and a pointing device), a display screen 7, a host storage area 19, and a processor (for example, CPU) 17. The input device 5 and the display screen 7 may be integrated, for example, like a touch panel.

ホスト記憶域19は、例えば、メモリ及びハードディスクのうちの少なくとも一方が有する記憶領域である。ホスト記憶域19には、例えば、画像データを出力するアプリケーションソフト22と、アプリケーションソフト22から出力されたRGB表色系の画像データを必要に応じて処理しプリンタ15に転送するプリンタドライバ21とが記憶される。アプリケーションソフト22やプリンタドライバ21は、プロセッサ17に読み込まれることにより、動作する。プロセッサ17に読み込まれたプリンタドライバ21が行う処理については、後に詳述する。   The host storage area 19 is a storage area included in at least one of a memory and a hard disk, for example. The host storage area 19 includes, for example, application software 22 that outputs image data, and a printer driver 21 that processes RGB color system image data output from the application software 22 as necessary and transfers the image data to the printer 15. Remembered. The application software 22 and the printer driver 21 operate by being read by the processor 17. Processing performed by the printer driver 21 read into the processor 17 will be described in detail later.

プリンタ15は、どのような種類のプリンタであってもよい(例えばレーザプリンタであっても、インクジェットプリンタ等のようなシリアルプリンタであってもよい)。プリンタ15は、画像や文字等のオブジェクトを印刷する印刷エンジン43と、ホスト装置1からのコマンドに基づいて印刷データを生成する印刷コントローラ31と、印刷コントローラ31により生成された印刷データに基づいて印刷エンジン43を制御するエンジンコントローラ41とを備える。また、プリンタ15は、I/F13の他に、別のI/F73を備えることができる(これについては、後述する)。   The printer 15 may be any type of printer (for example, a laser printer or a serial printer such as an inkjet printer). The printer 15 includes a print engine 43 that prints an object such as an image or a character, a print controller 31 that generates print data based on a command from the host device 1, and a print based on the print data generated by the print controller 31. An engine controller 41 for controlling the engine 43. The printer 15 can include another I / F 73 in addition to the I / F 13 (this will be described later).

印刷コントローラ31は、プリンタ記憶域33とプロセッサ(例えばCPU)35とを備える。   The print controller 31 includes a printer storage area 33 and a processor (for example, CPU) 35.

プリンタ記憶域33は、一又は複数の記憶装置(例えば、揮発性のメモリと不揮発性のメモリとのうちの少なくとも一方)により提供される記憶領域である。プリンタ記憶域33には、例えば、ソフトウェア群37と、レイアウト管理テーブル61と、印刷方法管理テーブル63とが記憶される。   The printer storage area 33 is a storage area provided by one or more storage devices (for example, at least one of a volatile memory and a nonvolatile memory). In the printer storage area 33, for example, a software group 37, a layout management table 61, and a printing method management table 63 are stored.

ソフトウェア群37は、プロセッサ35に読み込まれることにより動作する複数のコンピュータプログラムを含んでいる。例えば、ソフトウェア群37は、ホスト装置1からRGB表色系の画像データを受け、その画像データを別の表色系(例えばCMY表色系)の画像データに変換する色変換処理を行い、更に、ハーフトーニング処理(例えば二値化処理)を行うことができる。   The software group 37 includes a plurality of computer programs that operate by being read by the processor 35. For example, the software group 37 receives RGB color system image data from the host device 1 and performs color conversion processing for converting the image data into image data of another color system (for example, CMY color system). Halftoning processing (for example, binarization processing) can be performed.

レイアウト管理テーブル61には、どんな用紙サイズではどんな用紙種類がありどんなレイアウトが可能かが記録されている。例えば、図2に例示するように、レイアウト管理テーブル61には、複数の用紙種類の各々について、用紙種類を表す用紙種類パラメータと、その用紙種類をサポートしている各用紙サイズを表す各用紙サイズパラメータと、その用紙サイズで可能なレイアウトを表すレイアウトパラメータとが記録されている。図2によれば、例えば、このプリンタ15では、用紙サイズ「A4」が指定された場合には、プロセッサ35は、レイアウト管理テーブル61を参照することにより、用紙サイズ[A4]に対応した用紙種類が「写真用紙」、「光沢紙」、「フォトマット紙」及び「普通紙」であることと、いわゆる縁なし印刷と縁有り印刷とのうちのどちらも行うことができることとを特定することができる。   The layout management table 61 records what kind of paper and what kind of layout is possible for what kind of paper size. For example, as illustrated in FIG. 2, the layout management table 61 includes, for each of a plurality of paper types, a paper type parameter indicating the paper type and each paper size indicating each paper size supporting the paper type. Parameters and layout parameters representing possible layouts for the paper size are recorded. According to FIG. 2, for example, in the printer 15, when the paper size “A4” is designated, the processor 35 refers to the layout management table 61, so that the paper type corresponding to the paper size [A4]. Is “photo paper”, “glossy paper”, “photo matte paper” and “plain paper” and can specify that both so-called borderless printing and bordered printing can be performed. it can.

なお、パラメータは、例えば、人間が理解できる言葉をテキスト形式で表したものであっても良いし、人間は理解できないがコンピュータプログラムが理解できるコードであっても良い。後者の場合、例えば、プリンタドライバ21は、パラメータを人間が理解できる言葉で表示することができる。   The parameter may be, for example, a text that can be understood by humans in a text format, or may be a code that cannot be understood by humans but can be understood by a computer program. In the latter case, for example, the printer driver 21 can display the parameters in words that can be understood by humans.

印刷方法管理テーブル63には、どんな用紙種類でどんな印刷品質の場合にどのような印刷処理を行うかが記録されている。例えば、図3に例示するように、印刷方法管理テーブル63には、どんな用紙種類パラメータでどんな印刷品質パラメータの場合に、出力解像度(換言すれば、印刷された画像の解像度)をどんな値にし、双方向印刷と単方向印刷のどちらを採用し、ドットサイズのバージョンとしてどれを採用するかが記録されている。図3によれば、例えば、用紙種類パラメータ「写真用紙」で印刷品質パラメータ「High」が指定された場合には、プロセッサ35は、印刷方法管理テーブル63を参照することにより、単方向印刷且つドットサイズバージョン「VSD3」で、出力解像度「横2880dpi×横720dpi」の画像を印刷すべきであることを特定することができる。   In the printing method management table 63, what kind of printing processing is performed for what kind of paper and what kind of printing quality is recorded. For example, as illustrated in FIG. 3, in the printing method management table 63, the output resolution (in other words, the resolution of the printed image) is set to any value for any paper type parameter and any print quality parameter. Either bi-directional printing or uni-directional printing is used, which is recorded as the dot size version. According to FIG. 3, for example, when the print quality parameter “High” is designated by the paper type parameter “photo paper”, the processor 35 refers to the printing method management table 63 to perform unidirectional printing and dot printing. With the size version “VSD3”, it is possible to specify that an image with an output resolution “width 2880 dpi × width 720 dpi” should be printed.

なお、図3を参照すればわかるように、この実施形態では、印刷品質パラメータとして、「High」、「Normal」及び「Draft」の3つが採用される(これらの3種類に限定する必要は無い)。「High」は、画質が最も良いことを意味し、「Normal」は、画質は「High」程ではないが印刷速度は「High」よりも速いことを意味し、「Draft」は、画質は「Normal」程ではないが印刷速度は「Normal」よりも早いことを意味する。   As can be seen from FIG. 3, in this embodiment, three “High”, “Normal”, and “Draft” are adopted as print quality parameters (it is not necessary to be limited to these three types). ). “High” means that the image quality is the best, “Normal” means that the image quality is not as high as “High”, but the printing speed is faster than “High”, and “Draft” means that the image quality is “ This means that the printing speed is faster than “Normal”, but not as fast as “Normal”.

また、この実施形態において、「双方向印刷」とは、主操作方向に往復移動する印刷ヘッドが往路でも復路でもドットを打つことを意味し、それに対し、「単方向印刷」とは、印刷ヘッドが往路又は復路のどちらか一方ではドットを打つが他方ではドットを打たないことを意味する。つまり、図3のテーブル63は、プリンタ15がシリアルプリンタの場合の一例である。図3のテーブル63では、「双方向印刷ON」が双方向印刷を行うことを意味し、「双方向印刷OFF」が双方向印刷を行わないことを意味する。また、図3のテーブル63において、「ON/OFF」の表記があるが、これは、双方向印刷と単方向印刷のどちらでも可能であることを意味する。双方向印刷よりも単方向印刷の方が高品質の印刷結果が得られやすい。   Further, in this embodiment, “bidirectional printing” means that a print head that reciprocates in the main operation direction strikes dots both in the forward path and the return path, whereas “unidirectional printing” refers to a print head. Means that a dot is hit on either the forward or return path, but no dot is hit on the other. That is, the table 63 in FIG. 3 is an example when the printer 15 is a serial printer. In the table 63 of FIG. 3, “bidirectional printing ON” means that bidirectional printing is performed, and “bidirectional printing OFF” means that bidirectional printing is not performed. Also, in the table 63 of FIG. 3, there is a notation “ON / OFF”, which means that either bidirectional printing or unidirectional printing is possible. Unidirectional printing is more likely to produce high quality printing results than bidirectional printing.

また、この実施形態において、「ドットサイズバージョン」とは、印刷ヘッドから吐出するインク滴の量を表す。この実施形態では、「VSD」の後に続く数値が大きいほど、インク滴の量が少なく、それゆえ、高精細の印刷結果が得られやすい。   In this embodiment, the “dot size version” represents the amount of ink droplets ejected from the print head. In this embodiment, the larger the numerical value that follows “VSD”, the smaller the amount of ink droplets, and therefore, a higher-definition print result is more likely to be obtained.

図4は、本実施形態に係るプリントシステムにおいて行われる通信を処理するプロトコル層の構成例を示す。   FIG. 4 shows a configuration example of a protocol layer for processing communication performed in the print system according to the present embodiment.

この実施形態では、最下層に物理層があり、その上に、IEEE1284.4のプロトコル層(以下、IEEE1284.4を便宜上「D4」と称する)があり、更にその上に、アプリケーション層(以下、「AP層」と略記)がある。ホスト装置1では、プリンタドライバ21もアプリケーションソフト22も、AP層での通信を行う。   In this embodiment, there is a physical layer at the lowest layer, and there is a protocol layer of IEEE1284.4 (hereinafter, IEEE1284.4 is referred to as “D4” for convenience), and further, an application layer (hereinafter, referred to as “D4”). Abbreviated as “AP layer”). In the host device 1, both the printer driver 21 and the application software 22 perform communication at the AP layer.

なお、D4プロトコル層は、必ずしも、ホスト装置1とプリンタ15との両方に存在するものではなく、例えば、いずれか片方にしか存在しない場合や、両方に存在しない場合もあり得る。   Note that the D4 protocol layer does not necessarily exist in both the host apparatus 1 and the printer 15, and for example, the D4 protocol layer may exist only in one or both.

さて、以下、本実施形態についてより詳細に説明する。   Now, this embodiment will be described in more detail below.

図5は、ソフトウェア群に含まれる複数のコンピュータプログラムと、複数のコンピュータプログラムにより構成される印刷パスを示す。   FIG. 5 shows a plurality of computer programs included in the software group and a print path constituted by the plurality of computer programs.

ソフトウェア群37には、例えば、ハードウェアインタフェースドライバ(以下、「IFD」と略記)101と、データ取得モジュール103と、レガシー言語処理モジュール105と、印刷エンジンドライバ(以下、「PED」と略記)107と、特定言語処理モジュール113と、色変換/ハーフトーニング処理モジュール115と、インタフェース処理モジュール117と、印刷処理モジュール119と、データ処理パスコントローラ(以下、DPC)131とが含まれている。   The software group 37 includes, for example, a hardware interface driver (hereinafter abbreviated as “IFD”) 101, a data acquisition module 103, a legacy language processing module 105, and a print engine driver (hereinafter abbreviated as “PED”) 107. A specific language processing module 113, a color conversion / halftoning processing module 115, an interface processing module 117, a print processing module 119, and a data processing path controller (hereinafter referred to as DPC) 131.

IFD101は、所定のハードウェア(例えばI/F3)の動作を制御するコンピュータプログラムとして存在し、PED107は、エンジンコントローラ41の動作を制御するコンピュータプログラムとして存在する。そして、モジュール103、105、113、115、117及び119は、データ処理パスを管理するDPC131からの指示により、動的に起動又は終了することができる。   The IFD 101 exists as a computer program that controls the operation of predetermined hardware (for example, I / F 3), and the PED 107 exists as a computer program that controls the operation of the engine controller 41. The modules 103, 105, 113, 115, 117, and 119 can be activated or terminated dynamically according to an instruction from the DPC 131 that manages the data processing path.

例えば、プリンタ15には、DPC131からの指示により、データ取得モジュール103及びレガシー言語処理モードモジュール105が起動することで、それらのモジュール103及び105を構成要素として備えるレガシーパスが構築される。レガシーパスとは、例えば、従前から存在する種類の言語(以下、「レガシー言語」と言う)で書かれたコマンドが流れるデータ処理パス(このパスはプリンタにおけるパスなので、以下、「印刷パス」と称することがある)であり、より具体的には、例えば、RGBからCMYへの色変換やハーフトーニング処理が施された印刷画像データが流れる印刷パスである。印刷画像データは、例えば、プリンタ15のインク構成(例えば、インクの色、色数、又は種類)やインク滴の構成(例えば、大中小の三段階)、更には印字ヘッド(図示せず)のノズル数やノズルピッチに対応している。   For example, in the printer 15, the data acquisition module 103 and the legacy language processing mode module 105 are activated in accordance with an instruction from the DPC 131, so that a legacy path including the modules 103 and 105 as components is constructed. The legacy path is, for example, a data processing path through which a command written in the existing type of language (hereinafter referred to as “legacy language”) flows (this path is a path in the printer. More specifically, for example, a print path through which print image data subjected to color conversion from RGB to CMY and halftoning processing flows. The print image data includes, for example, the ink configuration (for example, the color, the number of colors, or the type of ink) of the printer 15, the configuration of ink droplets (for example, three levels of large, medium, and small), and further, the print head (not shown). It corresponds to the number of nozzles and nozzle pitch.

また、プリンタ15は、印刷画像データだけでなく、RGB表色系の画像データ(以下、RGB画像データ)を入力し、そのRGB画像データに基づいて印刷画像データを生成し、生成した印刷画像データを用いて印刷を行うことができるようになっている。具体的には、例えば、プリンタ15は、別のIFD111の制御により、別のI/F71を介して、ホスト装置1とは別のデバイス73(例えば、メモリカード或いはデジタルカメラ)からRGB画像データを受信し、そのRGB画像データの印刷画像データを生成して印刷を行うことができる。以下の説明では、印刷画像データ(つまり、RGBからCMYへの色変換処理が施されたデータ)が流れる印刷パスを「レガシーパス」と称するのに対し、RGB画像データが流れる印刷パスを「RGB印刷パス」と称する。DPC131によって、特定言語処理モジュール113、色変換/ハーフトーニング処理モジュール115、インターレース処理モジュール117及び印刷処理モジュール119が起動されることにより、それらのモジュール113、115、117及び119を構成要素とするRGB印刷パスが構築される。   The printer 15 receives not only print image data but also RGB color system image data (hereinafter, RGB image data), generates print image data based on the RGB image data, and generates the generated print image data. Can be used for printing. Specifically, for example, the printer 15 receives RGB image data from a device 73 (for example, a memory card or a digital camera) different from the host apparatus 1 via another I / F 71 under the control of another IFD 111. It is possible to receive and generate print image data of the RGB image data and perform printing. In the following description, a print path through which print image data (that is, data subjected to color conversion processing from RGB to CMY) flows is referred to as a “legacy path”, whereas a print path through which RGB image data flows is referred to as “RGB. This is referred to as “print pass”. When the specific language processing module 113, the color conversion / halftoning processing module 115, the interlace processing module 117, and the print processing module 119 are activated by the DPC 131, RGB including these modules 113, 115, 117, and 119 as components A print path is constructed.

この実施形態では、例えば、プリンタ15と、プリンタ15の通信相手デバイスとの間で、これから入力されるデータの種別が特定される所定のネゴシエーションが行われた場合には、RGB印刷パスが構築され(例えば、レガシーパスを構築することなくRGB印刷パスが構築され)、レガシーパスを介することなく、別のIFD111を介して、RGB画像データがRGB印刷パスに入力される。換言すれば、上記所定のネゴシエーションによりこれからRGB画像データが入力されることが特定された場合には、別のIFD11が、RGB画像データの入口として採用され、RGB印刷パスが構築される。   In this embodiment, for example, when a predetermined negotiation for specifying the type of data to be input is performed between the printer 15 and the communication partner device of the printer 15, an RGB print path is established. (For example, an RGB print path is constructed without constructing a legacy path), and RGB image data is input to the RGB print path via another IFD 111 without using the legacy path. In other words, when it is specified that RGB image data will be input from the predetermined negotiation, another IFD 11 is adopted as the entrance of the RGB image data, and an RGB print path is constructed.

一方、この実施形態では、例えば、プリンタ15と、プリンタ15の通信相手デバイスとの間で、これから入力されるデータの種別が特定される所定のネゴシエーションが行われなかった場合には、レガシーパスが構築され、レガシーパスにデータが入力される。換言すれば、例えば、上記所定のネゴシエーションが行われなかった場合には、IFD101が、入力されるデータの入口として採用され、レガシーパスが構築される。その後、レガシーパスにデータが入力され、そのデータが実はRGB画像データであることが判明した場合には、プリンタ15では、レガシーパスが有効になったままRGB印刷パスが構築され、RGB画像データが、レガシーパスを介してRGB印刷パスに入力される。   On the other hand, in this embodiment, for example, when a predetermined negotiation for specifying the type of data to be input is not performed between the printer 15 and the communication partner device of the printer 15, the legacy path is set. It is constructed and data is entered into the legacy path. In other words, for example, when the predetermined negotiation is not performed, the IFD 101 is adopted as an entrance of input data, and a legacy path is constructed. Thereafter, when data is input to the legacy path and it is found that the data is actually RGB image data, the printer 15 constructs an RGB print path while the legacy path is valid, and the RGB image data is , Input to the RGB print path via the legacy path.

このように、プリンタ15には、ホスト装置1から受信した印刷画像データが流れるレガシーパスと、ホスト装置1とは別のデバイス73から受信したRGB画像データが流れるRGB印刷パスとを構築することができる。プリンタ15は、ホスト装置1からのデータやコマンドが流れる印刷パスを、レガシーパスからRGB印刷パスに切り替えることができる。   As described above, the printer 15 can construct a legacy path through which print image data received from the host apparatus 1 flows and an RGB print path through which RGB image data received from a device 73 different from the host apparatus 1 flows. it can. The printer 15 can switch the print path through which data and commands from the host device 1 flow from the legacy path to the RGB print path.

具体的には、例えば、ホスト装置1からのデータやコマンドは、I/F3で受信される。IFD101は、ホスト装置1からのデータやコマンドを、例えば、プリンタ記憶域33(又は、I/F13のメモリ(図示せず))上に設けられたデータバッファ133に蓄積する。データバッファ133に蓄積されたデータやコマンドは、データ取得モジュール103により、読み出され(例えば所定サイズ毎に読み出され)、レガシー言語処理モジュール105に渡される。レガシー言語処理モジュール105は、渡されたコマンドの記述言語を判別し、レガシー言語で書かれていると判別した場合、そのコマンドを解釈し、それの解釈結果に基づいて、PED107を制御するためのコマンドをPED107に出力する。つまり、レガシー言語処理モジュール105は、渡されたコマンドの記述言語がレガシー言語であれば、レガシー言語処理モードを実行する。PED107は、レガシー言語処理モジュール105からのコマンドに基づいて、エンジンコントローラ41を制御することにより、印刷エンジン43を制御する。   Specifically, for example, data and commands from the host device 1 are received by the I / F 3. The IFD 101 stores data and commands from the host device 1 in, for example, a data buffer 133 provided on the printer storage area 33 (or the memory (not shown) of the I / F 13). Data and commands stored in the data buffer 133 are read by the data acquisition module 103 (for example, read at predetermined sizes) and passed to the legacy language processing module 105. The legacy language processing module 105 determines the description language of the passed command. When the legacy language processing module 105 determines that the command is written in the legacy language, the legacy language processing module 105 interprets the command and controls the PED 107 based on the interpretation result. The command is output to the PED 107. That is, the legacy language processing module 105 executes the legacy language processing mode if the description language of the passed command is the legacy language. The PED 107 controls the print engine 43 by controlling the engine controller 41 based on a command from the legacy language processing module 105.

一方、レガシー言語処理モジュール105は、渡されたコマンドの記述言語が特定言語であると判別した場合には、そのコマンドを、特定言語処理モジュール113に渡し、それ以降、特定言語処理モードの終了命令(又は、別の言語処理モードへの移行命令)を受信するまで、取得されるコマンドやデータを格別解釈することなく特定言語処理モジュール113へ転送する。   On the other hand, if the legacy language processing module 105 determines that the description language of the passed command is a specific language, the legacy language processing module 105 passes the command to the specific language processing module 113, and thereafter the end command of the specific language processing mode. The command or data to be acquired is transferred to the specific language processing module 113 without special interpretation until it receives a command (or a command to shift to another language processing mode).

特定言語処理モジュール113は、特定言語処理モードを実行する。特定言語処理モードとは、従前から存在する種類の言語に加えて新規に設けられた種類の言語(以下、「特定言語」と言う)を処理するモードである。特定言語とは、例えば、ホスト装置1から入力されるコマンドが、RGB表色系の画像データを印刷するためのコマンドであることを表す言語である。特定言語処理モジュール113は、例えば、レガシー言語処理モジュール105から渡されるコマンドを解釈し、その解釈結果に基づく処理を実行したり、渡されるRGB画像データを色変換/ハーフトーニング処理モジュール115に渡したりする。色変換/ハーフトーニング処理モジュール115は、渡されたRGB画像データをCMY画像データに変換し、且つ、変換後のCMY画像データに対してハーフトーニング処理を施し、ハーフトーニング処理が施されたCMY画像データをインターレース処理モジュール117に出力する。インターレース処理モジュール117は、必要に応じて(例えばプリンタドライバ21からの指示に応じて)、インターレース印刷が行われるための処理を、上記出力されたCMY画像データに施し、そのCMY画像データをイメージバッファ(図示せず)に出力する。イメージバッファは、例えば、プリンタ記憶域33に設けられており、印刷ヘッドのノズル構成などに基づく構成となっている。印刷処理モジュール119は、そのイメージバッファに出力されたCMY画像データに基づいて、PED107を制御するためのコマンドを生成し、そのコマンドをPED107に出力する。PED107は、印刷処理モジュール119からのコマンドに基づいて、エンジンコントローラ41を制御することにより、印刷エンジン43を制御する。   The specific language processing module 113 executes a specific language processing mode. The specific language processing mode is a mode for processing a newly provided type of language (hereinafter referred to as “specific language”) in addition to the existing type of language. The specific language is, for example, a language indicating that a command input from the host device 1 is a command for printing RGB color system image data. For example, the specific language processing module 113 interprets a command passed from the legacy language processing module 105 and executes processing based on the interpretation result, or passes the passed RGB image data to the color conversion / halftoning processing module 115. To do. The color conversion / halftoning processing module 115 converts the received RGB image data into CMY image data, and performs a halftoning process on the converted CMY image data, and the CMY image subjected to the halftoning process. Data is output to the interlace processing module 117. The interlace processing module 117 performs processing for performing interlaced printing on the output CMY image data as necessary (for example, in response to an instruction from the printer driver 21), and uses the CMY image data as an image buffer. (Not shown). The image buffer is provided in the printer storage area 33, for example, and has a configuration based on the nozzle configuration of the print head. The print processing module 119 generates a command for controlling the PED 107 based on the CMY image data output to the image buffer, and outputs the command to the PED 107. The PED 107 controls the print engine 43 by controlling the engine controller 41 based on a command from the print processing module 119.

以上が、プリンタ15において行われる印刷処理の概要である。なお、本実施形態において、例えば、特定言語処理モジュール113は、レガシー言語処理モジュール105を介してではなく、データバッファ133からデータやコマンドを取得してもよい。また、レガシー言語は、例えば、ESC/P(Epson Standard Code for Printer)とすることができる。それに対し、特定言語は、例えば、RGB画像データを送信するということから、「ESC/P−R」と称することができる。   The above is the outline of the printing process performed in the printer 15. In this embodiment, for example, the specific language processing module 113 may acquire data and commands from the data buffer 133 instead of via the legacy language processing module 105. The legacy language can be, for example, ESC / P (Epson Standard Code for Printer). On the other hand, the specific language can be referred to as “ESC / PR” because it transmits RGB image data, for example.

図6は、プリンタ15に存在する複数の言語処理モードと言語処理モードの遷移の様子とを示す。   FIG. 6 shows a plurality of language processing modes existing in the printer 15 and how the language processing modes transition.

プリンタ15には、前述したレガシー言語処理モード及び特定言語処理モードの他に、リモートモードと他の言語処理モード(例えば、PostScriptを処理するモード)とがある(リモートモードの存在意義については後述する)。プリンタ15では、ホスト装置1からの指示により、レガシー言語処理モードを基点に、モード遷移が行われる。例えば、プリンタ15は、特定言語処理モードから一旦レガシー言語処理モードに遷移してから、リモートモードに遷移することができるようになっており、特定言語処理モードから直接リモートモードへ遷移することができるようにはなっていない。逆の場合も同様で、プリンタ15は、リモートモードから特定言語処理モードへの遷移を行うためには、リモートモードからレガシー言語処理モードを介して特定言語処理モードへ遷移するようになっている。特定言語処理モードは、プリンタ15に新たに搭載された言語処理モードのため、従前から用意されているレガシー言語処理モードとの間でのみ遷移する方が、エラーの発生頻度の少ない安定性の高いプリンタ15を作成する観点から好ましいと考えられる。   In addition to the legacy language processing mode and the specific language processing mode described above, the printer 15 has a remote mode and other language processing modes (for example, a mode for processing PostScript) (the significance of the existence of the remote mode will be described later). ). In the printer 15, mode transition is performed based on the legacy language processing mode in accordance with an instruction from the host device 1. For example, the printer 15 can change from the specific language processing mode to the legacy language processing mode and then change to the remote mode, and can change from the specific language processing mode to the remote mode directly. It's not like that. The same applies to the reverse case, and the printer 15 makes a transition from the remote mode to the specific language processing mode via the legacy language processing mode in order to make a transition from the remote mode to the specific language processing mode. Since the specific language processing mode is a language processing mode newly installed in the printer 15, it is more stable that the frequency of occurrence of errors is less when the transition is made only with the legacy language processing mode that has been prepared in the past. It is considered preferable from the viewpoint of creating the printer 15.

言語処理モードの遷移の制御は、例えば、レガシー言語処理モジュール105が実行することができる。レガシー言語処理モジュール105は、例えば、レガシー言語処理モード中に、特定言語処理モードへの移行コマンドを受信した場合には、それ以降に受信するコマンドを、特定言語で記述されたコマンドとして認識する。レガシー言語処理モジュール105は、特定言語処理モード中に、特定言語処理モードへの移行コマンド(及び/又は、リモートモードや他の言語処理モードへの移行コマンド)を受けた場合には、それを無視する(例えば読み捨てる)。   For example, the legacy language processing module 105 can control the transition of the language processing mode. For example, when the legacy language processing module 105 receives a command to shift to the specific language processing mode during the legacy language processing mode, the legacy language processing module 105 recognizes a command received thereafter as a command written in the specific language. When the legacy language processing module 105 receives a command for shifting to the specific language processing mode (and / or a command for shifting to the remote mode or another language processing mode) during the specific language processing mode, the legacy language processing module 105 ignores it. (For example, discard it).

また、例えば、レガシー言語処理モジュール105は、特定言語処理モード中に、レガシー言語処理モードへの移行コマンドを受信した場合には、それ以降に受信するコマンドを、レガシー言語で記述されたコマンドとして認識する。レガシー言語処理モジュール105は、レガシー言語処理モード中に、レガシー言語処理モードへの移行コマンドを受信した場合には、それを無視する(例えば読み捨てる)。   Further, for example, when the legacy language processing module 105 receives a command to shift to the legacy language processing mode during the specific language processing mode, the legacy language processing module 105 recognizes a command received thereafter as a command written in the legacy language. To do. When the legacy language processing module 105 receives a command to shift to the legacy language processing mode during the legacy language processing mode, the legacy language processing module 105 ignores it (for example, discards it).

また、例えば、レガシー言語処理モジュール105は、特定言語処理モードへ移行する以前に、レガシー言語処理モードやリモートモードにおいて少なくとも一種類の項目が設定された場合、以下の(1)〜(4)の項目
(1)給紙パスに関する設定(例えば、どの給紙トレーから用紙を取り込むか、どの排紙ビンに用紙を排出するか)、
(2)用紙サイズや印刷領域(例えば、縁有りと縁無しのどちらか)に関する設定、
(3)印刷モード(例えば、印刷品質及び用紙種類)に関する設定、
(4)メカ制御に関する設定(例えば給紙シーケンス)、
のうちの少なくとも一つの項目については、設定を初期値に戻し、特定言語処理モード中に受信した設定(特定言語で書かれた設定)を採用する。
Further, for example, when at least one type of item is set in the legacy language processing mode or the remote mode before the transition to the specific language processing mode, the legacy language processing module 105 performs the following (1) to (4). Item (1) Settings relating to the paper feed path (for example, from which paper feed tray paper is taken in, to which paper discharge bin the paper is discharged),
(2) Settings related to paper size and print area (for example, with or without borders)
(3) Settings relating to the print mode (for example, print quality and paper type),
(4) Settings related to mechanical control (for example, paper feed sequence),
For at least one of the items, the setting is returned to the initial value, and the setting received during the specific language processing mode (the setting written in the specific language) is adopted.

以下、本実施形態に係るプリントシステムで行われる処理流れの概要を説明し、その後で、その処理流れにおける各ステップで行われる処理の詳細について説明する。なお、以下の説明では、レガシー言語処理モードを「レガシーモード」と略記し、特定言語処理モードを「特定モード」と略記する場合がある。   Hereinafter, an outline of a processing flow performed in the printing system according to the present embodiment will be described, and then details of processing performed in each step in the processing flow will be described. In the following description, the legacy language processing mode may be abbreviated as “legacy mode” and the specific language processing mode may be abbreviated as “specific mode”.

図7及び図8は、本実施形態に係るプリントシステムで行われる処理流れの概要を示す。   7 and 8 show an outline of a processing flow performed in the print system according to the present embodiment.

ホスト装置1のI/F3がプリンタ15のI/F13に通信可能に接続される(ステップS1)。この場合、ホスト装置1が、プリンタ15が単方向通信と双方向通信のどちらを行うかを判別する(S2)。例えば、ホスト装置1とプリンタ15との通信がUSBにより行われる場合には、ホスト装置1は、デバイスディスクリプタをプリンタ15から受信し、そのデバイスディスクリプタを解析することにより、プリンタ15が単方向通信と双方向通信のどちらを行うかを判別することができる。また、例えば、ホスト装置1がプリンタ15にパラレルでデータを送信するようになっている場合、ホスト装置1は、所定の信号線(例えばリバースの信号線)のレベルが変化したか否かにより、プリンタ15が単方向通信と双方向通信のどちらを行うかを判別することができる。   The I / F 3 of the host device 1 is communicably connected to the I / F 13 of the printer 15 (step S1). In this case, the host device 1 determines whether the printer 15 performs unidirectional communication or bidirectional communication (S2). For example, when the communication between the host apparatus 1 and the printer 15 is performed by USB, the host apparatus 1 receives the device descriptor from the printer 15 and analyzes the device descriptor so that the printer 15 performs the one-way communication. It is possible to determine which of the two-way communication is performed. For example, when the host device 1 is configured to transmit data to the printer 15 in parallel, the host device 1 determines whether or not the level of a predetermined signal line (for example, a reverse signal line) has changed. It is possible to determine whether the printer 15 performs unidirectional communication or bidirectional communication.

ホスト装置1は、デバイスID(デバイスを識別するためのID)をプリンタ15に問い合わせる(S3)。プリンタ15は、その問合せに応答して、デバイスIDをホスト装置1に送信する(S4)。なお、プリンタ15は、自分が特定モードを実行できる場合には、その旨を表す情報(以下、「特定言語サポート情報」と言う)を、デバイスIDのCMDフィールドにセットし、特定言語サポート情報がセットされたデバイスIDを、ホスト装置1に送信する。デバイスIDには、例えば、図9Aに例示するように、データ長フィールドや、MFGフィールドや、CMDフィールドがある。プリンタ15は、データ長フィールドに、デバイスIDのデータ長(例えば何バイトであるか)をセットし、MFGフィールドに、プリンタ15のメーカID(例えばメーカ名)をセットし、CMDフィールドに、特定言語サポート情報をセットすることができる。もし、プリンタ15が、特定モードを実行することができないプリンタである場合には、CMDフィールドには別の情報をセットする(何もセットせず空きフィールドになっていてもよい)。また、特定モードに複数種類のレベルが存在する場合には、プリンタ15は、自分がサポートしている特定モードのレベルをCMDにセットしても良い。例えば、プリンタドライバ21は、特定モードのレベルとして「1」がセットされていれば、プリンタ15には特定モードの処理のために必要最低限の機能が搭載されていると判断し、レベルが「2」以降がセットされていれば、その必要最低限の機能よりも多くの機能としてどんな機能がプリンタ15に搭載されているかを判別することができる。なお、レベル「2」以降では、例えば、後述するクラスの追加、コマンドの追加、パラメータユニットの追加及びパラメータの追加のうちの少なくとも一つを行うことができる。パラメータユニットが追加される場合には、新たにコマンドが追加されてもよい。パラメータの追加は、同一コマンドでの追加が許可されてもよい。プリンタ15は、コマンドサポートレベルと合わないパラメータを受けた場合には、そのパラメータを無視してもよい。   The host device 1 inquires of the printer 15 about the device ID (ID for identifying the device) (S3). In response to the inquiry, the printer 15 transmits the device ID to the host device 1 (S4). When the printer 15 can execute the specific mode, the printer 15 sets information indicating that fact (hereinafter referred to as “specific language support information”) in the CMD field of the device ID. The set device ID is transmitted to the host device 1. The device ID includes, for example, a data length field, an MFG field, and a CMD field as illustrated in FIG. 9A. The printer 15 sets the data length (for example, how many bytes) of the device ID in the data length field, sets the manufacturer ID (for example, manufacturer name) of the printer 15 in the MFG field, and sets a specific language in the CMD field. Support information can be set. If the printer 15 is a printer that cannot execute the specific mode, other information is set in the CMD field (nothing may be set and the field may be an empty field). When there are a plurality of types of levels in the specific mode, the printer 15 may set the level of the specific mode supported by the printer 15 in the CMD. For example, if “1” is set as the level of the specific mode, the printer driver 21 determines that the printer 15 has the minimum necessary functions for processing in the specific mode, and the level is “ If “2” or later is set, it is possible to determine what functions are installed in the printer 15 as more functions than the minimum necessary functions. At level “2” and after, for example, at least one of adding a class, adding a command, adding a parameter unit, and adding a parameter, which will be described later, can be performed. When a parameter unit is added, a new command may be added. The addition of parameters may be permitted with the same command. If the printer 15 receives a parameter that does not match the command support level, the printer 15 may ignore the parameter.

図7に示すように、ホスト装置1は、プリンタ15からプリンタIDを受信する(S5)。以上のS1〜S5の処理は、物理層で行われる。そして、それ以降のS6〜S15の処理は、AP層で行うことができ、場合によっては、D4プロトコル層がAP層での処理をサポートすることができる。なお、「場合によっては」と記載したのは、ホスト装置1及びプリンタ15の少なくとも一方がD4プロトコル層を備えていない場合や、D4プロトコル層を備えていてもその層が利用されない場合があるからである。   As shown in FIG. 7, the host device 1 receives the printer ID from the printer 15 (S5). The above processes of S1 to S5 are performed in the physical layer. The subsequent processing of S6 to S15 can be performed in the AP layer. In some cases, the D4 protocol layer can support the processing in the AP layer. Note that “in some cases” is described because at least one of the host device 1 and the printer 15 does not include the D4 protocol layer, or even if the D4 protocol layer is included, the layer may not be used. It is.

さて、ホスト装置1のプリンタドライバ21は、受信したプリンタIDのCMDフィールドを解析する(S6)。プリンタドライバ21は、それにより、プリンタ15が特定モードをサポートしているか否かを判別することができる(例えば、特定言語サポート情報を検出した場合には、プリンタ15では特定言語がサポートされていると判断できる)。また、S2において、プリンタ15が単方向通信を行うか双方向通信を行うかが判別されており、例えば、その判別結果が記録された記憶領域を参照する等の方法により、プリンタドライバ21は、S2での判別結果を取得することができる。従って、プリンタドライバ21は、プリンタ15が、以下の(a)〜(c)、
(a)単方向通信を行い、且つ、特定モードに対応していること、
(b)双方向通信を行い、且つ、特定モードに対応していること、
(c)単方向通信を行うか双方向通信を行うかに関わらず特定モードをサポートしていないこと、
のいずれに該当するかを、判断することができる(S7)。
Now, the printer driver 21 of the host device 1 analyzes the CMD field of the received printer ID (S6). Accordingly, the printer driver 21 can determine whether or not the printer 15 supports the specific mode (for example, when the specific language support information is detected, the printer 15 supports the specific language. Can be judged). In S2, it is determined whether the printer 15 performs one-way communication or two-way communication. For example, the printer driver 21 refers to a storage area in which the determination result is recorded. The discrimination result in S2 can be acquired. Accordingly, the printer driver 21 has the following functions (a) to (c):
(A) Perform unidirectional communication and support a specific mode;
(B) Perform bidirectional communication and support a specific mode;
(C) Does not support a specific mode regardless of whether unidirectional communication or bidirectional communication is performed,
It is possible to determine which of the following (S7).

S7において、プリンタ15が(c)に該当すると判断された場合、プリンタドライバ21は、レガシーモードに対応した印刷制御処理を実行する(S8)。例えば、プリンタドライバ21は、アプリケーションソフト22から出力されたRGB画像データをCMY画像データの印刷画像データに変換し、その印刷画像データを印刷するためのコマンドをレガシー言語で記述し、レガシー言語で記述されたコマンドをプリンタ15に送信する。   If it is determined in S7 that the printer 15 corresponds to (c), the printer driver 21 executes print control processing corresponding to the legacy mode (S8). For example, the printer driver 21 converts RGB image data output from the application software 22 into print image data of CMY image data, describes a command for printing the print image data in the legacy language, and describes in the legacy language. The transmitted command is transmitted to the printer 15.

S7において、プリンタ15が(a)に該当すると判断された場合、プリンタドライバ21は、図8に示すように、プリンタ15の仕様の問合せを行なうことなく、後述するS12以降の処理を行う。なぜなら、プリンタ15の仕様を問い合わせても、プリンタ15は双方向通信を行わないので、プリンタ15から、プリンタ15の仕様に関する仕様情報を受信することがないからである。   If it is determined in S7 that the printer 15 corresponds to (a), the printer driver 21 performs the processing from S12 onward, which will be described later, without making an inquiry about the specifications of the printer 15, as shown in FIG. This is because the printer 15 does not perform bi-directional communication even when inquiring about the specifications of the printer 15, and therefore does not receive specification information regarding the specifications of the printer 15 from the printer 15.

S7において、プリンタ15が(b)に該当すると判断された場合、プリンタドライバ21は、図8に示すように、プリンタの仕様の問合せを行う(S9)。例えば、プリンタドライバ21は、プリンタの仕様に関する仕様情報を取得するためのコマンド(以下、仕様情報取得コマンド)をプリンタ15に送信する。ここでは、例えば、プリンタドライバ21は、D4プロトコルに従う形式の仕様情報取得コマンドを送信する。すなわち、ここでは、ホスト装置1とプリンタ15との間では、D4プロトコル層での通信が行われる。   If it is determined in S7 that the printer 15 corresponds to (b), the printer driver 21 inquires about the printer specifications as shown in FIG. 8 (S9). For example, the printer driver 21 transmits a command (hereinafter referred to as a specification information acquisition command) for acquiring specification information related to the printer specifications to the printer 15. Here, for example, the printer driver 21 transmits a specification information acquisition command in a format according to the D4 protocol. That is, here, communication at the D4 protocol layer is performed between the host apparatus 1 and the printer 15.

プリンタ15は、仕様の問合せに応答して、所定構造にした仕様情報をホスト装置1に送信する(S10)。具体的には、例えば、プリンタ15は、仕様情報取得コマンドに応答して、プリンタ記憶域33に記憶されているレイアウト管理テーブル61や印刷方法管理テーブル63を参照し、それにより、どんな用紙サイズではどんな用紙種類がサポートされており且つどんなレイアウトで印刷が可能かや、どの用紙種類ではどんな印刷品質がサポートされているかを特定し、特定された結果に基づいて所定構造の仕様情報を生成し、その仕様情報をホスト装置1に送信する。ホスト装置1に送信される仕様情報は、例えば、図9B及び図9Cに示すように、プリンタ15によって入れ子構造にされる。図9Bは、ホスト装置1に送信される仕様情報の構造の概念を表し、図9Cは、ホスト装置1に送信される仕様情報の具体例を示す。なお、図9Cにおいて、""で囲まれた部分は、所定の文字データ(例えばASCII文字データ)を示し、<>で囲まれた部分は、バイナリデータを示す。   In response to the specification inquiry, the printer 15 transmits specification information having a predetermined structure to the host device 1 (S10). Specifically, for example, in response to the specification information acquisition command, the printer 15 refers to the layout management table 61 and the printing method management table 63 stored in the printer storage area 33, so that any paper size can be obtained. Identify what paper types are supported and in what layout, and what print quality is supported on which paper types, generate specification information for a given structure based on the identified results, The specification information is transmitted to the host device 1. The specification information transmitted to the host device 1 is nested by the printer 15 as shown in FIGS. 9B and 9C, for example. FIG. 9B represents the concept of the structure of specification information transmitted to the host device 1, and FIG. 9C shows a specific example of specification information transmitted to the host device 1. In FIG. 9C, a portion surrounded by “” indicates predetermined character data (for example, ASCII character data), and a portion surrounded by <> indicates binary data.

例えば、用紙サイズを表す情報が先頭になる。用紙サイズの先頭タグ(例えば図9Cの参照番号211で表される部分)は、所定コード(例えば「S」)で表され、終端タグ(例えば図9Cの参照番号212で表される部分)は、別の所定コード(例えば「/」)で表される。また、用紙サイズの先頭タグの後に続くパラメータ1(例えば図9Cの参照番号213で表される部分)は、用紙サイズのID(例えば1バイトのバイナリで表される)である。   For example, information indicating the paper size is at the top. The first tag of the paper size (for example, the portion represented by reference number 211 in FIG. 9C) is represented by a predetermined code (for example, “S”), and the end tag (for example, the portion represented by reference number 212 of FIG. 9C) is It is represented by another predetermined code (for example, “/”). Further, the parameter 1 (for example, a portion represented by the reference number 213 in FIG. 9C) following the first tag of the paper size is a paper size ID (for example, represented by 1-byte binary).

用紙サイズの先頭タグと、用紙サイズの終端タグとの間には、その用紙サイズについてサポートされている用紙種類と、その用紙種類でサポートされている印刷品質と、その用紙サイズでサポートされているレイアウトの情報とが入れ込まれる。より具体的には、例えば、用紙種類の先頭タグ(例えば図9Cの参照番号214で表される部分)は、所定コード(例えば「T」)で表され、終端タグ(例えば図9Cの参照番号219で表される部分)は、別の所定コード(例えば「/」)で表される。また、用紙サイズの先頭タグと終端タグとの間に存在するパラメータ1(例えば図9Cの参照番号215で表される部分)は、用紙種類のID(例えば1バイトのバイナリで表される)である。そして、そのパラメータ1の後に続くパラメータ2は、印刷モード(印刷品質とレイアウト)を表すID(例えば1バイとのバイナリ)である。パラメータ2では、例えば、最初の所定数ビット(例えば3ビット)で印刷品質が表され、最後の所定数ビット(例えば1ビット)で縁無し印刷可能か否かが表される。具体的には、例えば、パラメータ2において、そのパラメータ2に関わる用紙種類で「Draft」がサポートされていればn(例えば0)番目のビットが「1」になり、その用紙種類で「Normal」がサポートされていればm(例えば1)番目のビットが「1」になり、その用紙種類で「High」がサポートされていればp(例えば2)番目のビットが「1」になり、そのパラメータ2が関わる用紙サイズで縁無し印刷がサポートされていればq(例えば7)番目のビットが「1」になる。   Between the first tag of the paper size and the end tag of the paper size, the paper type supported for the paper size, the print quality supported by the paper type, and the paper size supported Layout information is inserted. More specifically, for example, the first tag of the paper type (for example, the portion represented by the reference number 214 in FIG. 9C) is represented by a predetermined code (for example, “T”), and the end tag (for example, the reference number of FIG. 9C). The portion represented by 219) is represented by another predetermined code (for example, “/”). In addition, the parameter 1 (for example, a portion represented by the reference number 215 in FIG. 9C) existing between the first tag and the last tag of the paper size is a paper type ID (for example, represented by 1-byte binary). is there. A parameter 2 following the parameter 1 is an ID (for example, binary of 1 buy) representing a print mode (print quality and layout). In parameter 2, for example, the print quality is represented by the first predetermined number of bits (for example, 3 bits), and whether or not borderless printing is possible is represented by the last predetermined number of bits (for example, 1 bit). Specifically, for example, in parameter 2, if “Draft” is supported for the paper type related to parameter 2, the n (for example, 0th) bit is “1”, and “Normal” is used for the paper type. Is supported, the mth (for example, 1) bit is “1”, and if the paper type is “High”, the p (for example) 2nd bit is “1”. If borderless printing is supported for the paper size related to parameter 2, the q (for example, 7th) bit is “1”.

或る用紙サイズについて、複数種類の用紙種類がサポートされている場合には、そのサポートされている用紙種類と同じ数だけ、用紙種類の先頭タグ、パラメータ1、パラメータ2及び終端タグのセットが、その用紙サイズの先頭タグと終端タグとの間に入れ込まれる。   When a plurality of paper types are supported for a certain paper size, the same number of paper type head tags, parameter 1, parameter 2 and end tag sets as the supported paper types are set. It is inserted between the first tag and the last tag of the paper size.

上記の入れ子構造は、例えば、プリンタ15における印刷条件の優先順位に基づく構造になっている。例えば、プリンタ15では、後述するように、印刷品質、レイアウト、用紙種類及び用紙サイズの順に優先順位が高くなっているので、それにあわせて、用紙サイズが最も外にあり、その中に、用紙種類、レイアウト及び印刷品質を入れ込んだ入れ子構造にすることができる。   The above nested structure is based on, for example, the priority order of the printing conditions in the printer 15. For example, in the printer 15, as will be described later, the priority order is higher in the order of print quality, layout, paper type, and paper size. Accordingly, the paper size is the outermost, and the paper type It is possible to make a nested structure incorporating layout and print quality.

プリンタドライバ21は、図9B及び図9Cで表す入れ子構造の仕様情報を受信し、その仕様情報を解析することで、プリンタ15の仕様、すなわち、プリンタ15でどんな用紙サイズがサポートされており、各用紙サイズではどんな用紙種類がサポートされており且つどんなレイアウトで印刷が可能であり、どの用紙種類ではどんな印刷品質がサポートされているかを、特定することができる。   The printer driver 21 receives the specification information of the nested structure shown in FIGS. 9B and 9C and analyzes the specification information, so that the specifications of the printer 15, that is, what paper size is supported by the printer 15, It is possible to specify what kind of paper is supported by the paper size, what kind of layout can be used for printing, and what kind of print quality is supported for which kind of paper.

再び図8を参照する。プリンタドライバ21は、プリンタ15から受信した仕様情報をホスト記憶域19に記憶させる(S11)。   Refer to FIG. 8 again. The printer driver 21 stores the specification information received from the printer 15 in the host storage area 19 (S11).

プリンタドライバ21は、ユーザから入力装置5を介してユーザインタフェース(以下、UI)の表示要求を受けた場合には(S12でYES)、ホスト記憶域19に記憶されている仕様情報の中から各種印刷条件毎にユーザ所望の印刷パラメータを受け付けるためのUI(以下、印刷パラメータ選択画面)を表示する(S13)。   When the printer driver 21 receives a display request for a user interface (hereinafter referred to as UI) from the user via the input device 5 (YES in S12), the printer driver 21 selects various information from the specification information stored in the host storage area 19. A UI (hereinafter referred to as a print parameter selection screen) for receiving print parameters desired by the user is displayed for each print condition (S13).

図10は、印刷パラメータ選択画面80の構成例を示す。   FIG. 10 shows a configuration example of the print parameter selection screen 80.

印刷条件として、例えば、用紙サイズ、用紙種類、印刷品質及びレイアウトがある。印刷パラメータ選択画面80には、各種印刷条件毎に、印刷パラメータの選択を受け付けるためのメニュー(例えばプルダウン式のメニュー)が表示される。プリンタドライバ21は、各種印刷条件毎に、メニューの表示(選択可能に表示する印刷パラメータをどれにするか)を制御することができる。   Examples of printing conditions include paper size, paper type, print quality, and layout. The print parameter selection screen 80 displays a menu (for example, a pull-down menu) for accepting print parameter selection for each print condition. The printer driver 21 can control the display of the menu (which print parameter is displayed so as to be selectable) for each of various printing conditions.

例えば、プリンタドライバ21において、優先順位として、高い方から低い順に、用紙サイズ、用紙種類、レイアウト及び印刷品質が設定されているとする。この場合、プリンタドライバ21は、仕様情報34に含まれている一以上の用紙サイズパラメータの中から或る用紙サイズパラメータが選択された場合には、用紙種類のメニューには、その用紙サイズパラメータに関わる用紙種類パラメータを選択可能に表示し、且つ、レイアウトのメニューには、その用紙サイズパラメータに関わるレイアウトパラメータを選択可能に表示し、その用紙サイズパラメータでサポートされていないパラメータ(例えば、その用紙サイズの先頭タグと終端タグとの間に入れ込まれていないパラメータ)は、選択可能に表示しない。また、プリンタドライバ21は、同様に、或る用紙種類パラメータが選択された場合には、その用紙種類パラメータに対応する印刷品質パラメータを印刷品質のメニューとして選択可能に表示する。   For example, in the printer driver 21, it is assumed that the paper size, the paper type, the layout, and the print quality are set as the priority order from the highest to the lowest. In this case, when a certain paper size parameter is selected from one or more paper size parameters included in the specification information 34, the printer driver 21 displays the paper size parameter in the paper type menu. The related paper type parameter is displayed in a selectable manner, and the layout menu displays the layout parameter related to the paper size parameter in a selectable manner, and is not supported by the paper size parameter (for example, the paper size Parameters that are not inserted between the first tag and the last tag are not displayed in a selectable manner. Similarly, when a certain paper type parameter is selected, the printer driver 21 displays a print quality parameter corresponding to the paper type parameter so that it can be selected as a print quality menu.

また、プリンタドライバ21は、優先順位の設定をユーザから受けてもよい。例えば、プリンタドライバ21は、用紙種類を最優先することを選択された場合には、仕様情報34に含まれている複数の用紙種類パラメータの全てを選択可能に表示し、その用紙種類パラメータから或る用紙種類パラメータが選択された場合には、その用紙種類パラメータに対応する用紙サイズパラメータを選択可能に表示しても良い。   Further, the printer driver 21 may receive a priority order setting from the user. For example, when the printer driver 21 is selected to give top priority to the paper type, the printer driver 21 displays all of the plurality of paper type parameters included in the specification information 34 so as to be selectable. When a paper type parameter to be selected is selected, a paper size parameter corresponding to the paper type parameter may be displayed so as to be selectable.

このように、プリンタドライバ21は、プリンタ15から仕様情報34を受信した場合には、その仕様情報34に基づいて、印刷パラメータを選択可能に表示するので、必ず、プリンタ15でサポートされている印刷パラメータを選択させ、且つ、各種印刷条件毎に選択された印刷パラメータの関係(例えば、用紙サイズ、用紙種類、印刷品質及びレイアウトの関係)も、プリンタ15でサポートされている関係とすることができる。   As described above, when the printer driver 21 receives the specification information 34 from the printer 15, the printer driver 21 displays the print parameters so as to be selectable based on the specification information 34, so that the printing supported by the printer 15 is always performed. The relationship between the parameters selected and the printing parameters selected for each printing condition (for example, the relationship between the paper size, the paper type, the printing quality, and the layout) can also be a relationship supported by the printer 15. .

なお、プリンタドライバ21は、プリンタ15が双方向通信を行うようになっていない場合、プリンタ15から仕様情報を受けることはできない。   The printer driver 21 cannot receive specification information from the printer 15 when the printer 15 is not configured to perform bidirectional communication.

この場合には、プリンタドライバ21は、所定の印刷パラメータ群26を記憶しており、その所定の印刷パラメータ群26に基づいて、各種印刷条件毎の印刷パラメータメニューの表示を制御することができる。所定の印刷パラメータ群26の構成も、プリンタ15から受信する仕様情報34と同様の入れ子構造になっていてもよい。所定の印刷パラメータ群26の構造及びそれに含まれている印刷パラメータは、プリンタの全ての機種に対応しているわけではないので、プリンタ15に送信される各種印刷条件毎の印刷パラメータの関係は、プリンタ15でサポートされていない場合もある。その場合に、プリンタ15が、後に詳述する補正処理を行うことで、ユーザの要求に近い印刷結果を出力することができる。   In this case, the printer driver 21 stores a predetermined print parameter group 26, and can control display of a print parameter menu for each of various printing conditions based on the predetermined print parameter group 26. The configuration of the predetermined print parameter group 26 may also have a nested structure similar to the specification information 34 received from the printer 15. Since the structure of the predetermined print parameter group 26 and the print parameters included in it do not correspond to all printer models, the relationship between the print parameters for each print condition transmitted to the printer 15 is as follows. The printer 15 may not be supported. In this case, the printer 15 can output a printing result close to the user's request by performing correction processing described in detail later.

さて、再び図8を参照する。上述した印刷パラメータ選択画面80を介して各種印刷条件毎に印刷パラメータが選択され、ユーザから印刷実行の命令を受けた場合には(S14)、プリンタドライバ21は、選択された印刷パラメータを用いた印刷処理を実行する(S15)。印刷パラメータ選択画面80で印刷パラメータの選択を受けずに、或いは印刷パラメータ選択画面80を表示することなく(S12でNO)、印刷実行の命令を受けた場合には(S14)、プリンタドライバ21は、デフォルトの印刷パラメータを用いた印刷処理を実行する(S15)。   Reference is now made to FIG. 8 again. When a print parameter is selected for each print condition via the print parameter selection screen 80 described above and a print execution command is received from the user (S14), the printer driver 21 uses the selected print parameter. Print processing is executed (S15). If a print execution command is received (S14) without receiving a print parameter selection on the print parameter selection screen 80 or without displaying the print parameter selection screen 80 (NO in S12), the printer driver 21 Then, a printing process using default printing parameters is executed (S15).

以上が、本実施形態に係るプリントシステムで行われる処理流れの概要である。   The above is the outline of the processing flow performed in the print system according to the present embodiment.

このプリントシステムにおいて、プリンタドライバ21は、プリンタの機種毎に対応させる必要の無いいわゆる汎用型のドライバとすることができる。そのため、プリンタドライバ21は、プリンタ15が双方向通信を行う場合には、プリンタ15に仕様を問合せ、それに応答して、仕様情報をプリンタ15から受信し、その仕様情報中の印刷パラメータを用いた印刷処理を行うことができる。つまり、プリンタ15は、プリンタ15から仕様情報を受信することで、どんな機種のプリンタ15が接続されても、その機種の仕様に応じた印刷処理を行うことができる。   In this printing system, the printer driver 21 can be a so-called general-purpose driver that does not need to correspond to each printer model. Therefore, when the printer 15 performs bidirectional communication, the printer driver 21 inquires of the printer 15 about the specification, and in response, receives the specification information from the printer 15 and uses the printing parameter in the specification information. Printing processing can be performed. In other words, the printer 15 receives the specification information from the printer 15 and can perform print processing according to the specifications of the model regardless of the model of the printer 15 connected.

また、プリンタドライバ15は、プリンタ15が双方向通信を行わないとわかった場合には、プリンタ15に対して仕様の問合せを行わない。プリンタ15が単方向プリンタであっても、プリンタドライバ21は、予め記憶されている印刷パラメータ群26中の印刷パラメータを用いて、印刷処理を行うことができる。   Further, the printer driver 15 does not inquire the specification of the printer 15 when it is determined that the printer 15 does not perform bidirectional communication. Even if the printer 15 is a unidirectional printer, the printer driver 21 can perform print processing using print parameters in the print parameter group 26 stored in advance.

S15で行われる印刷処理は、図7のS7において、プリンタ15が(a)又は(b)に該当するものであると判断された場合に行われる処理である。そのため、S15の印刷処理では、特定モードが実行され、その特定モード中に、特定言語で記述されたコマンドがプリンタドライバ21からプリンタ15に送信される。   The printing process performed in S15 is a process performed when it is determined in S7 of FIG. 7 that the printer 15 corresponds to (a) or (b). Therefore, in the printing process of S15, a specific mode is executed, and a command written in a specific language is transmitted from the printer driver 21 to the printer 15 during the specific mode.

図11Aは、特定言語で記述されたコマンドのフォーマット例を示す。   FIG. 11A shows a format example of a command described in a specific language.

特定言語で記述されたコマンド(以下、「特定言語コマンド」と称する)には、ヘッダフィールド251と、クラスフィールド253と、パラメータレングスフィールド255と、コマンド名フィールド257と、パラメータブロックフィールド259とがある。特定言語コマンド全体のデータサイズは、可変サイズとすることができる。   A command written in a specific language (hereinafter referred to as “specific language command”) includes a header field 251, a class field 253, a parameter length field 255, a command name field 257, and a parameter block field 259. . The data size of the entire specific language command can be variable.

ヘッダフィールド251は、所定サイズ、例えば1バイトである。ヘッダフィールド251には、例えば、所定のヘッダ情報が所定形式で記述される。   The header field 251 has a predetermined size, for example, 1 byte. In the header field 251, for example, predetermined header information is described in a predetermined format.

クラスフィールド253は、所定サイズ、例えば1バイトである。クラスフィールド253には、特定モードに関わる複数のクラスのうちの一つのクラスを表すクラス情報(例えばID)が例えば所定形式(例えばASCIIコード)で登録される。プリンタ15は、クラスフィールド253に書かれたクラス情報を参照することにより、受信した特定言語コマンドがどのクラスに属するコマンドであるかを特定することができる。   The class field 253 has a predetermined size, for example, 1 byte. In the class field 253, class information (for example, ID) representing one class among a plurality of classes related to the specific mode is registered, for example, in a predetermined format (for example, ASCII code). The printer 15 can identify the class to which the received specific language command belongs by referring to the class information written in the class field 253.

パラメータレングスフィールド255は、所定サイズ、例えば4バイトであり、そのフィールド255には、パラメータブロックフィールド259に登録されるパラメータブロックのデータ長を表すデータが登録される。そのデータとしては、例えば、リトルエンディアンが採用される。   The parameter length field 255 has a predetermined size, for example, 4 bytes. In the field 255, data representing the data length of the parameter block registered in the parameter block field 259 is registered. For example, little endian is used as the data.

コマンド名フィールド257は、所定サイズ、例えば4バイトであり、そのフィールド257には、コマンド名を表すデータが登録される。プリンタ15は、このフィールド257に書かれたコマンド名と、クラスフィールド253に書かれたクラスとにより、受信した特定言語コマンドを識別することができる。   The command name field 257 has a predetermined size, for example, 4 bytes, and data representing the command name is registered in the field 257. The printer 15 can identify the received specific language command based on the command name written in the field 257 and the class written in the class field 253.

パラメータブロックフィールド259は、可変サイズであり、そのフィールド259には、パラメータブロックが書かれる。パラメータブロックは、一又は複数のパラメータユニットで構成される。各パラメータユニットでは、コマンド毎に、各パラメータの値のサイズと順序が規定される。また、パラメータユニットにおいて、パラメータの値として所定バイト(例えば2バイト)以上の数値が用いられる場合には、各特定言語コマンドの定義で特に示さない限り、ビッグエンディアンが採用される。   The parameter block field 259 has a variable size, and a parameter block is written in the field 259. The parameter block is composed of one or a plurality of parameter units. In each parameter unit, the size and order of the values of each parameter are defined for each command. In the parameter unit, when a numerical value of a predetermined byte (for example, 2 bytes) or more is used as a parameter value, big endian is adopted unless otherwise indicated in the definition of each specific language command.

以下、各フィールドに書かれる情報について詳細に説明する。   Hereinafter, information written in each field will be described in detail.

図11Bは、クラスフィールドに書かれるクラスの種類の一例を示す。   FIG. 11B shows an example of the type of class written in the class field.

クラスフィールド253には、特定モードに関する複数種類のクラスの中からプリンタドライバ21によって選択されたクラスが登録される。特定モードに関する複数種類のクラスとして、例えば、LUT(ルックアップテーブル)、クオリティ、ジョブ、ページ及びデータの5種類が用意されている。   In the class field 253, a class selected by the printer driver 21 from a plurality of types of classes related to the specific mode is registered. As a plurality of types of classes related to the specific mode, for example, five types of LUT (Look Up Table), quality, job, page, and data are prepared.

クラス「LUT」は、ルックアップテーブルの提供を表すクラスである。クラス「LUT」を表すコード(例えば「l」)は、ルックアップテーブルがプリンタドライバ21からプリンタ15に送信される場合に、クラスフィールド253にセットされる。このクラスの特定言語コマンドと、或るルックアップテーブルとがプリンタ15に送信された場合、プリンタ15では、その送信された或るルックアップテーブルが、所定の画像処理、例えばハーフトーニング処理の際に使用される。一方、このクラスの特定言語コマンドがプリンタ15に送信されない場合には、プリンタ15に内蔵のデフォルトのルックアップテーブルが画像処理の際に使用される。   The class “LUT” is a class representing provision of a lookup table. A code representing the class “LUT” (for example, “l”) is set in the class field 253 when the lookup table is transmitted from the printer driver 21 to the printer 15. When a specific language command of this class and a certain look-up table are transmitted to the printer 15, the certain look-up table transmitted by the printer 15 is subjected to predetermined image processing, for example, halftoning processing. used. On the other hand, when a specific language command of this class is not transmitted to the printer 15, a default lookup table built in the printer 15 is used for image processing.

クラス「クオリティ」は、品質に関するパラメータの提供を表すクラスである。クラス「クオリティ」を表すコード(例えば「q」)は、パラメータがプリンタドライバ21からプリンタ15に送信される場合に、クラスフィールド253にセットされる。このクラス「クオリティ」の特定言語コマンドにおいて、パラメータユニットとしてセットされるパラメータとしては、複数種類、例えば、以下の(1)〜(9)の種類、
(1)用紙種類ID(バイトオフセット0、バイト長1)、
(2)印刷品質(バイトオフセット1、バイト長1)、
(3)カラー/モノクロ(バイトオフセット2、バイト長1)、
(4)明度強度設定(バイトオフセット3、バイト長1)、
(5)コントラスト強度設定(バイトオフセット4、バイト長1)、
(6)彩度強度設定(バイトオフセット5、バイト長1)、
(7)カラープレーン(バイトオフセット6、バイト長1)、
(8)パレットサイズ(バイトオフセット7、バイト長2)、
(9)パレットデータ(バイトオフセット8、データサイズ分のバイト長)、
のパラメータがある。この実施形態では、優先順位の高い方から低い方にかけて、用紙種類ID>印刷品質>カラープレーン>パレットサイズ>パレットデータとなっている。
The class “quality” is a class representing provision of a parameter relating to quality. A code representing the class “quality” (for example, “q”) is set in the class field 253 when the parameter is transmitted from the printer driver 21 to the printer 15. In the specific language command of this class “quality”, the parameters set as the parameter unit include a plurality of types, for example, the following types (1) to (9),
(1) Paper type ID (byte offset 0, byte length 1),
(2) Print quality (byte offset 1, byte length 1),
(3) Color / monochrome (byte offset 2, byte length 1),
(4) Lightness intensity setting (byte offset 3, byte length 1),
(5) Contrast intensity setting (byte offset 4, byte length 1),
(6) Saturation intensity setting (byte offset 5, byte length 1),
(7) Color plane (byte offset 6, byte length 1),
(8) Pallet size (byte offset 7, byte length 2),
(9) Pallet data (byte offset 8, byte length for data size),
There are parameters. In this embodiment, the paper type ID> print quality> color plane> pallet size> pallet data from the higher priority to the lower priority.

「用紙種類ID」は、用紙種類を表すIDである。用紙種類としては、写真用紙、普通紙、光沢紙など、様々な種類を採用することができる。   “Paper type ID” is an ID representing a paper type. Various types of paper such as photographic paper, plain paper, and glossy paper can be employed.

印刷品質とは、印刷結果となる画像の品質であり、例えば、前述したように、「Draft」、「Normal」及び「High」の三種類がある。   The print quality is the quality of an image that is a print result. For example, as described above, there are three types of “Draft”, “Normal”, and “High”.

「カラー/モノクロ」は、黒を、シアン、マゼンタ及びイエローの三色で表現するか(カラー)、或いは、黒インクのみで表現するか(モノクロ)を表す。   “Color / monochrome” represents whether black is expressed by three colors of cyan, magenta, and yellow (color) or only black ink (monochrome).

「明度強度設定」、「コントラスト強度設定」及び「彩度強度設定」は、いずれも、プリンタに指示する補正量を表すパラメータである。各種設定は、各色毎に行うことができる。各種設定は、例えば、第一の値(例えば−50)〜第二の値(例えば+50)の範囲で行うことができる。もし、第一の値よりも小さい値が設定された場合、プリンタ15では、第一の値が設定されたものとして補正が行われ、第二の値よりも大きい値が設定された場合、プリンタ15では、第二の値が設定されたものとして補正が行われる。   “Brightness intensity setting”, “contrast intensity setting”, and “saturation intensity setting” are all parameters representing the correction amount instructed to the printer. Various settings can be made for each color. Various settings can be made within a range of, for example, a first value (for example, −50) to a second value (for example, +50). If a value smaller than the first value is set, the printer 15 performs correction as if the first value is set. If a value larger than the second value is set, the printer 15 In 15, the correction is performed assuming that the second value is set.

「カラープレーン」は、プリンタ15に転倒される印刷データの種別を表す。例えば、「カラープレーン」には、フルカラーと256カラーというのがある。フルカラーは、RGB画像データの1ピクセルのカラーが3バイトで表現されていることを表し、256カラーは、RGB画像データの1ピクセルが1バイトで表現されていることを表す。   “Color plane” represents the type of print data to be overturned by the printer 15. For example, the “color plane” includes a full color and a 256 color. Full color indicates that the color of one pixel of the RGB image data is expressed by 3 bytes, and 256 color indicates that one pixel of the RGB image data is expressed by 1 byte.

「カラーパレットサイズ」は、「カラープレーン」で256カラーの場合のカラーパレットのサイズを表す。「カラープレーン」でフルカラーの場合、「カラーパレットサイズ」は0(ゼロ)と設定される。   The “color palette size” represents the size of the color palette when the “color plane” is 256 colors. In the case of “color plane” and full color, “color palette size” is set to 0 (zero).

「カラーパレットデータ」は、「カラーパレットサイズ」で設定された値のデータサイズを持つカラーパレットのデータ列である。つまり、「カラープレーン」で256カラーがセットされた場合、プリンタドライバ21は、或る記憶領域に記憶されたカラーパレット(例えばプリンタドライバ21が保持している)をプリンタ15に送信する。「カラープレーン」がフルカラーの場合、プリンタドライバ21は、カラーパレットのデータを送らない。   “Color palette data” is a data string of a color palette having the data size of the value set in “Color palette size”. That is, when 256 colors are set in the “color plane”, the printer driver 21 transmits a color palette (for example, held by the printer driver 21) stored in a certain storage area to the printer 15. When the “color plane” is full color, the printer driver 21 does not send color palette data.

クラス「ジョブ」は、印刷ジョブに関するジョブパラメータの提供を表すクラスである。クラス「ジョブ」の特定言語コマンドが送信される場合、例えば、そのコマンドのクラスフィールド253には、クラス「ジョブ」を表すコード(例えば「j」)がセットされ、コマンド名フィールド257に、ジョブのスタートを表すコード(例えば「setj」)と、ジョブのエンドを表すコード(例えば「endj」)とのいずれかがセットされる。また、ジョブのスタートを表すコードが特定言語コマンドにセットされた場合、そのコマンドのパラメータユニットには、複数種類のジョブパラメータ、例えば、以下の(1)〜(8)の種類のジョブパラメータ、
(1)定型用紙幅(バイトオフセット0、バイト長4)、
(2)定型用紙長(バイトオフセット4、バイト長4)、
(3)上マージン(バイトオフセット8、バイト長2)、
(4)左マージン(バイトオフセット10、バイト長2)、
(5)印刷領域幅(バイトオフセット12、バイト長4)、
(6)印刷領域長(バイトオフセット16、バイト長4)、
(7)入力画像密度(バイトオフセット20、バイト長1)、
(8)双方向印刷/単方向印刷(バイトオフセット21、バイト長1)、
がセットされる。
The class “job” is a class representing provision of job parameters related to a print job. When a specific language command of the class “job” is transmitted, for example, a code representing the class “job” (for example, “j”) is set in the class field 253 of the command, and the job name is stored in the command name field 257. Either a code representing the start (for example, “setj”) or a code representing the end of the job (for example, “endj”) is set. When a code representing a job start is set in a specific language command, the parameter unit of the command includes a plurality of types of job parameters, for example, the following types of job parameters (1) to (8),
(1) Standard paper width (byte offset 0, byte length 4),
(2) Standard paper length (byte offset 4, byte length 4),
(3) Top margin (byte offset 8, byte length 2),
(4) Left margin (byte offset 10, byte length 2),
(5) Print area width (byte offset 12, byte length 4),
(6) Print area length (byte offset 16, byte length 4),
(7) Input image density (byte offset 20, byte length 1),
(8) Bidirectional printing / unidirectional printing (byte offset 21, byte length 1),
Is set.

「定型用紙幅」は、用紙幅をあらわし、「定型用紙長」は、用紙長を表す。これらの値は、単位は例えばピクセル(例えば、インチ×360ppi(ピクセル/インチ))であり、プリンタ15でサポートされる値である。より具体的には、例えば、プリンタドライバ21は、各種用紙サイズ毎に、用紙幅及び用紙長を記憶しており、同様に、プリンタ15も、各種用紙サイズ毎に、用紙幅及び用紙長を記憶している。プリンタドライバ15は、印刷パラメータ選択画面80(図10参照)等で或る用紙サイズが選択された場合、記憶されている情報から、その用紙サイズに対応した用紙幅及び用紙長を特定し、特定された用紙幅及び用紙長をセットする(つまり、用紙サイズを用紙幅及び用紙長の値でセットする)。プリンタ15は、その用紙幅及び用紙長に基づいて、印刷画像データを生成する。なお、もし、セットされた用紙幅又は用紙長が、プリンタ15でサポートされていない値である場合には、プリンタ15が、その用紙幅又は用紙長を、プリンタ15の記憶域に設定されている複数の用紙幅又は用紙長のうちの最も近い用紙幅又は用紙長に変換し、変換後の用紙幅又は用紙長を用いて処理を進める。   “Standard paper width” represents the paper width, and “standard paper length” represents the paper length. The unit of these values is, for example, a pixel (for example, inch × 360 ppi (pixel / inch)), and is a value supported by the printer 15. More specifically, for example, the printer driver 21 stores a paper width and a paper length for each paper size, and similarly, the printer 15 stores a paper width and a paper length for each paper size. is doing. When a certain paper size is selected on the print parameter selection screen 80 (see FIG. 10) or the like, the printer driver 15 specifies the paper width and paper length corresponding to the paper size from the stored information, and specifies The paper width and paper length thus set are set (that is, the paper size is set by the paper width and paper length). The printer 15 generates print image data based on the paper width and paper length. If the set paper width or paper length is a value not supported by the printer 15, the printer 15 sets the paper width or paper length in the storage area of the printer 15. Conversion is made to the closest paper width or paper length among the plurality of paper widths or paper lengths, and the process proceeds using the converted paper width or paper length.

「上マージン」は、用紙上端から上端印刷ドットまでの距離を表し、「左マージン」は、用紙左端から左端印刷ドットまでの距離である。これらの値は、例えば単位はピクセル(例えば、インチ×入力画像密度(360又は720ppi))である。なお、入力画像密度とは、プリンタ15に送信されるRGB画像データの解像度である。それに対し、出力解像度とは、印刷される画像の解像度(印刷画像データの解像度)、換言すれば、印刷解像度である。   The “upper margin” represents the distance from the upper end of the paper to the upper end print dot, and the “left margin” is the distance from the left end of the paper to the left end print dot. For example, the unit of these values is a pixel (for example, inch × input image density (360 or 720 ppi)). The input image density is the resolution of RGB image data transmitted to the printer 15. On the other hand, the output resolution is the resolution of the image to be printed (the resolution of the print image data), in other words, the print resolution.

「印刷領域幅」は、印刷画像データの幅を表し、「印刷領域長」は、印刷画像データの長さを表す。これらの値は、例えば単位はピクセル(例えば、インチ×入力画像密度(360又は720ppi))である。   “Print area width” represents the width of the print image data, and “print area length” represents the length of the print image data. For example, the unit of these values is a pixel (for example, inch × input image density (360 or 720 ppi)).

「入力画像密度」は、プリンタ15に送信されるRGB画像データの画像密度(換言すれば解像度)を表す。例えば、水平方向密度×垂直方向密度で言うと、360×360ppiと、720×720ppiの二種類がある。例えば、前者は、印刷対象が画像の場合に採用され、後者は、印刷対象が画像と文字のいずれの場合にも採用されることができる。   “Input image density” represents the image density (in other words, resolution) of the RGB image data transmitted to the printer 15. For example, in terms of horizontal density × vertical density, there are two types of 360 × 360 ppi and 720 × 720 ppi. For example, the former can be employed when the print target is an image, and the latter can be employed when the print target is either an image or a character.

「双方向印刷/単方向印刷」は、前述した双方向印刷と単方向印刷のどちらをプリンタ15に実行させるかを表す。   “Bidirectional printing / unidirectional printing” represents whether the above-described bidirectional printing or unidirectional printing is to be executed by the printer 15.

クラス「ページ」は、ページに関する情報の提供を表すクラスである。クラス「ページ」の特定言語コマンドが送信される場合、例えば、そのコマンドのクラスフィールド253には、クラス「ページ」を表すコード(例えば「p」)がセットされ、コマンド名フィールド257に、ページのスタートを表すコード(例えば「sttp」)と、ページのエンドを表すコード(例えば「endp」)とのいずれかがセットされる。また、ページのエンドを表すコードが特定言語コマンドにセットされた場合、そのコマンドのパラメータユニットには、次のページが有るか無いかを表す情報がセットされる。プリンタは、次のページが有ることを表す情報を検出した場合には、所定タイミングで(例えばその検出と同時に)、次のページの給紙動作を実行することができる。   The class “page” is a class representing provision of information related to a page. When a specific language command of class “page” is transmitted, for example, a code representing the class “page” (for example, “p”) is set in the class field 253 of the command, and the page name is stored in the command name field 257. Either a code indicating the start (for example, “sttp”) or a code indicating the end of the page (for example, “endp”) is set. When a code representing the end of a page is set in a specific language command, information indicating whether or not there is a next page is set in the parameter unit of the command. When the printer detects information indicating that the next page is present, the printer can execute a paper feeding operation for the next page at a predetermined timing (for example, simultaneously with the detection).

クラス「データ」は、RGB画像データ(例えば一ラスタ分のRGBデータ)の提供を表すクラスである。クラス「データ」の特定言語コマンドが送信される場合、例えば、そのコマンドのクラスフィールド253には、クラス「データ」を表すコード(例えば「d」)がセットされ、パラメータユニットには、複数種類のデータパラメータ、例えば、以下の(1)〜(5)の種類のデータパラメータ、
(1)Xオフセット(バイトオフセット0、バイト長2)、
(2)Yオフセット(バイトオフセット2、バイト長2)、
(3)圧縮種別(バイトオフセット4、バイト長1)、
(4)ラスタデータサイズ(バイトオフセット5、バイト長2)、
(5)RGBラスタデータ(バイトオフセット7、RGBラスタデータそれ自体のバイト長)、
がセットされる。
The class “data” is a class representing provision of RGB image data (for example, RGB data for one raster). When a specific language command of class “data” is transmitted, for example, a code (for example, “d”) representing the class “data” is set in the class field 253 of the command, and a plurality of types of parameters are stored in the parameter unit. Data parameters, for example, data parameters of the following types (1) to (5),
(1) X offset (byte offset 0, byte length 2),
(2) Y offset (byte offset 2, byte length 2),
(3) Compression type (byte offset 4, byte length 1),
(4) Raster data size (byte offset 5, byte length 2),
(5) RGB raster data (byte offset 7, byte length of RGB raster data itself),
Is set.

「Xオフセット」とは、ページ基点(例えば左上隅)からのX座標(水平方向に沿った座標)のオフセットである(単位は例えばピクセル)。これは、例えば、入力画像密度に依存する。   The “X offset” is an offset of the X coordinate (coordinate along the horizontal direction) from the page base point (for example, the upper left corner) (the unit is, for example, a pixel). This depends, for example, on the input image density.

「Yオフセット」とは、ページ基点(例えば左上隅)からのY座標(垂直方向に沿った座標)のオフセットである(単位は例えばピクセル)。これは、例えば、入力画像密度に依存する。本実施形態では、1ラスタずつRGBデータが転送されるので、この「Yオフセット」の値は、1ずつインクリメントされる。   The “Y offset” is an offset of the Y coordinate (coordinate along the vertical direction) from the page base point (for example, the upper left corner) (the unit is, for example, a pixel). This depends, for example, on the input image density. In the present embodiment, since the RGB data is transferred one raster at a time, the value of this “Y offset” is incremented by one.

「圧縮種別」は、1ラスタのRGBデータの圧縮種別である。複数の圧縮種別として、例えば、非圧縮と、点順次ランレングス圧縮とがある。プリンタドライバ21は、1ラスタのRGBデータ毎に、点順次ランレングス圧縮を行い、非圧縮のRGBデータのデータサイズと、圧縮後のRGBデータのデータサイズとを比較し、非圧縮のRGBデータのデータサイズの方が小さければ、非圧縮でRGBデータを送信し、逆に、圧縮後のRGBデータのデータサイズの方が小さければ、圧縮後のRGBデータを送信する。また、非圧縮か圧縮かに応じて、プリンタドライバ21は、パラメータユニットとしてセットする「圧縮種別」の内容を違える。   “Compression type” is a compression type of RGB data of one raster. As a plurality of compression types, for example, there are non-compression and dot-sequential run-length compression. The printer driver 21 performs dot-sequential run-length compression for each raster RGB data, compares the data size of the uncompressed RGB data with the data size of the RGB data after compression, and compares the data size of the uncompressed RGB data. If the data size is smaller, the RGB data is transmitted without compression, and conversely, if the data size of the compressed RGB data is smaller, the compressed RGB data is transmitted. Further, the printer driver 21 changes the content of the “compression type” set as the parameter unit depending on whether it is uncompressed or compressed.

「ラスタデータサイズ」は、RGBラスタデータのデータサイズである。   “Raster data size” is the data size of RGB raster data.

「RGBラスタデータ」は、RGBラスタデータそれ自体である。フルカラーの場合、R、G、Bの順で、1ピクセルあたり3バイトのデータであり、256カラーの場合、1ピクセルあたり1バイトのデータである。   “RGB raster data” is RGB raster data itself. In the case of full color, the data is 3 bytes per pixel in the order of R, G, and B, and in the case of 256 colors, the data is 1 byte per pixel.

このクラス「データ」では、プリンタドライバ21は、同一のラスタのRGBデータを二回以上送信しないようになっている。もし、同一ラスタのRGBデータを二回以上送信されたならば、プリンタ15は、例えば、二回目以降のRGBデータがセットされたコマンドを読み捨てる。   In this class “data”, the printer driver 21 does not transmit RGB data of the same raster more than once. If RGB data of the same raster is transmitted more than once, the printer 15 reads and discards a command in which RGB data is set for the second time and thereafter, for example.

また、このクラス「データ」では、プリンタドライバ21は、同一ページにおけるクラス「データ」の特定言語コマンドにおいて、「Yオフセット」の値を、同一ページにおける前回の値(例えば5)以前の値(例えば4)にしないようにする。もし、「Yオフセット」の値が前回の値以前の値になって送信されたならば、プリンタ15は、例えば、その前回の値以前の値がセットされたコマンドを読み捨てる。   In this class “data”, the printer driver 21 sets the value of “Y offset” to a value (for example, 5) before the previous value (for example, 5) on the same page in the specific language command of the class “data” on the same page. 4) Don't do it. If the “Y offset” value is transmitted before the previous value, the printer 15 for example reads and discards the command in which the value before the previous value is set.

以上が、特定言語コマンドに関する説明である。特定言語コマンドは、図8のS15の印刷処理において、プリンタドライバ21からプリンタ15に送信される。   This completes the description of the specific language command. The specific language command is transmitted from the printer driver 21 to the printer 15 in the printing process of S15 of FIG.

図12は、図8のS15の印刷処理で行われる具体的な処理流れの一例を示す。   FIG. 12 shows an example of a specific processing flow performed in the printing process of S15 of FIG.

この図12に示すように、S15の印刷処理では、例えば、段階A〜段階Sの順で、処理が行われる。以下、各段階について、詳細に説明する。   As shown in FIG. 12, in the printing process of S15, for example, the process is performed in order of stage A to stage S. Hereinafter, each stage will be described in detail.

(1)段階A。   (1) Stage A.

プリンタ15が双方向通信を行う場合には、前述したように、プリンタドライバ21が、D4プロトコルに従う形式で、仕様情報取得コマンドをプリンタ15に送信し、プリンタ15は、そのコマンドに応答して、D4プロトコルで、入れ子構造の仕様情報をプリンタドライバ21に送信する。この場合、プリンタ15において、D4プロトコルに係るポートがオープンになっている。   When the printer 15 performs two-way communication, as described above, the printer driver 21 transmits a specification information acquisition command to the printer 15 in a format according to the D4 protocol. The specification information of the nested structure is transmitted to the printer driver 21 using the D4 protocol. In this case, in the printer 15, a port related to the D4 protocol is open.

しかし、プリンタ15が双方向通信ではなく単方向通信を行う場合には、前述したように、プリンタドライバ21は、プリンタ15の仕様情報を知ることはできない。単方向プリンタには、D4プロトコル層を有しているものもあれば、D4プロトコル層を有していないものもある。プリンタドライバ21は、プリンタ15が単方向プリンタの場合には、そのプリンタ15がD4プロトコル層を有しているのかどうかを知ることはできない。   However, when the printer 15 performs unidirectional communication instead of bidirectional communication, the printer driver 21 cannot know the specification information of the printer 15 as described above. Some unidirectional printers have a D4 protocol layer, while others do not have a D4 protocol layer. When the printer 15 is a unidirectional printer, the printer driver 21 cannot know whether the printer 15 has the D4 protocol layer.

そこで、まず、この段階Aで、プリンタドライバ21は、D4プロトコルをプリンタ15に解除させるためのコマンド(以下、D4プロトコル解除コマンド)を生成し、そのD4プロトコル解除コマンドを、プリンタ15に送信する。   Therefore, first, at this stage A, the printer driver 21 generates a command for causing the printer 15 to release the D4 protocol (hereinafter, D4 protocol release command), and transmits the D4 protocol release command to the printer 15.

プリンタ15は、双方向通信を行うが故にD4プロトコルに係るポートをオープンにしていれば、D4プロトコル解除コマンドを読み捨て、D4プロトコルの解除を行わないようにする。プリンタ15が双方向通信を行う場合には、プリンタドライバ21は、D4プロトコル層での通信を行うことができるので、そのコマンドがプリンタ15で読み捨てられても問題がない。   If the port related to the D4 protocol is open because the printer 15 performs bidirectional communication, the printer 15 discards the D4 protocol cancel command and does not cancel the D4 protocol. When the printer 15 performs bi-directional communication, the printer driver 21 can perform communication at the D4 protocol layer, so there is no problem even if the command is discarded by the printer 15.

一方、例えば、プリンタ15が、単方向プリンタである場合であって、且つ、D4プロトコル層を有している場合には、そのプリンタ15は、D4プロトコルを解除する。プリンタ15がD4プロトコル層を有していない場合には、そのプリンタ15は、D4プロトコル解除コマンドを読み捨てる。いずれにしても、単方向プリンタに対しては、プリンタドライバ21は、プリンタ15がD4プロトコル層を有していないという前提で、D4プロトコル層を利用しない通信を行うことができる。   On the other hand, for example, when the printer 15 is a unidirectional printer and has the D4 protocol layer, the printer 15 cancels the D4 protocol. When the printer 15 does not have the D4 protocol layer, the printer 15 reads and discards the D4 protocol release command. In any case, for the unidirectional printer, the printer driver 21 can perform communication without using the D4 protocol layer on the assumption that the printer 15 does not have the D4 protocol layer.

(2)段階B。   (2) Stage B.

プリンタドライバ21は、D4プロトコル解除コマンドを送信した後、或るタイミングで(例えば、D4プロトコル解除コマンドに対する所定の応答をプリンタ15から受けた場合に)、初期化コマンド(例えば「ESC@」というコードを含んだコマンド)を、プリンタ15に送信する。プリンタ15は、その初期化コマンドに応答して、所定の初期化処理を行う。この初期化処理では、例えば、プリンタ15は、プリンタ記憶域33に設定されている印刷パラメータを初期(デフォルト)のパラメータに戻す等の処理を行う。   The printer driver 21 transmits an initialization command (for example, a code “ESC @”) at a certain timing after transmitting the D4 protocol cancellation command (for example, when a predetermined response to the D4 protocol cancellation command is received from the printer 15). ) Including the command) is transmitted to the printer 15. The printer 15 performs a predetermined initialization process in response to the initialization command. In this initialization process, for example, the printer 15 performs a process such as returning the print parameters set in the printer storage area 33 to the initial (default) parameters.

(3)段階C。   (3) Stage C.

プリンタドライバ21は、初期化コマンドを送信した後、或るタイミングで(例えば、初期化コマンドに対する所定の応答を受けた場合に)、リモートモードに移行させるためのコマンド(以下、リモート移行コマンド)をプリンタ15に送信する。プリンタ15は、そのリモート移行コマンドに応答して、レガシーモードからリモートモードに移行する。   After transmitting the initialization command, the printer driver 21 sends a command (hereinafter referred to as a remote transition command) for shifting to the remote mode at a certain timing (for example, when a predetermined response to the initialization command is received). Send to the printer 15. The printer 15 shifts from the legacy mode to the remote mode in response to the remote shift command.

なお、この段階Cでは、プリンタドライバ21は、一旦、レガシーモードに移行させるためのコマンド(以下、レガシー移行コマンド)を送信し、その後で(例えば所定の応答が返って来た後で)、リモート移行コマンドを送信しても良い。この場合、プリンタ15は、レガシーモード以外のモードになっている場合には、レガシー移行コマンドに応答してレガシーモードに移行し、レガシーモードになっている場合にレガシー移行コマンドを受けた場合には、そのコマンドを読み捨てることができる。   In this stage C, the printer driver 21 once transmits a command for shifting to the legacy mode (hereinafter referred to as legacy shift command), and thereafter (for example, after a predetermined response is returned), A migration command may be sent. In this case, when the printer 15 is in a mode other than the legacy mode, the printer 15 shifts to the legacy mode in response to the legacy shift command. When the printer 15 is in the legacy mode, the printer 15 receives the legacy shift command. , You can discard the command.

(4)段階D。   (4) Stage D.

プリンタドライバ21は、或るタイミングで(例えば、リモート移行コマンドに対してモード以降完了通知をプリンタ15から受けた後に)、レガシーモードでのジョブ開始を意味するコマンド(以下、レガシージョブ開始コマンド)を、プリンタ15に送信する。プリンタ15は、レガシージョブ開始コマンドに応答して、ジョブ開始をプリンタ記憶域33(又はバッファ133)にセットし、それ以降、レガシーモードでのジョブ終了を意味するコマンド(以下、レガシージョブ終了コマンド)を受けるまでに、コマンドやデータを受信した場合には、そのコマンドやデータは、レガシーモードにおける一つの印刷ジョブに関わるコマンドやデータであると認識する。   The printer driver 21 sends a command (hereinafter referred to as a legacy job start command) indicating job start in the legacy mode at a certain timing (for example, after receiving a completion notification from the printer 15 regarding the remote transfer command after the mode). To the printer 15. In response to the legacy job start command, the printer 15 sets the job start in the printer storage area 33 (or buffer 133), and thereafter, a command meaning the job end in the legacy mode (hereinafter referred to as a legacy job end command). If a command or data is received before the command is received, the command or data is recognized as a command or data related to one print job in the legacy mode.

レガシーモードでは、例えば、コマンドやデータがストリームでプリンタドライバ21からプリンタ15に流れ込み、プリンタ記憶域33に蓄積されていく。このため、このままでは、プリンタ15は、プリンタ記憶域33のどこからどこまでは一つの印刷ジョブに係るコマンドやデータであるかを特定することができない。   In the legacy mode, for example, commands and data are streamed from the printer driver 21 to the printer 15 and accumulated in the printer storage area 33. For this reason, the printer 15 cannot specify from where in the printer storage area 33 to where it is a command or data relating to one print job.

そこで、レガシーモードでコマンドやデータを送信する前に、プリンタドライバ21が、プリンタ15における言語処理モードを、レガシーモードとは別のリモートモードに移行させ、そのリモートモードにおいて、ジョブの開始や終了を伝える。これにより、プリンタ15は、レガシーモードにおいてストリームでコマンドやデータを受信し記憶していっても、どこからどこまでが一つの印刷ジョブに関わるコマンドやデータで有るかを特定することができる。   Therefore, before sending a command or data in the legacy mode, the printer driver 21 shifts the language processing mode in the printer 15 to a remote mode different from the legacy mode, and starts or ends a job in the remote mode. Tell. As a result, even if the printer 15 receives and stores commands and data in a stream in the legacy mode, the printer 15 can specify from where to where the command or data is related to one print job.

(5)段階E。   (5) Stage E.

プリンタドライバ21は、或るタイミングで(例えば、レガシージョブ開始コマンドに応答してセット完了通知を受けた場合に)、レガシー移行コマンドを、プリンタ15に送信する。プリンタ15は、そのレガシー移行コマンドに応答して、リモートモードからレガシーモードに移行する。   The printer driver 21 transmits a legacy shift command to the printer 15 at a certain timing (for example, when a set completion notification is received in response to the legacy job start command). The printer 15 shifts from the remote mode to the legacy mode in response to the legacy shift command.

なお、この実施形態では、このレガシー移行コマンドが、リモートモードの解除と、レガシーモードへの移行との両方の意味を持っているが、リモートモードを解除するためのコマンドが送信された後に、レガシー移行コマンドが送信されても良い。   In this embodiment, the legacy transition command has both the meaning of canceling the remote mode and the transition to the legacy mode. However, after the command for canceling the remote mode is transmitted, A migration command may be sent.

(6)段階F。   (6) Stage F.

プリンタドライバ21は、或るタイミングで(例えば、レガシーモードへの移行の完了通知を受けたプリンタ15から場合に)、特定モードへ移行するためのコマンド(以下、特定モード移行コマンド)を、プリンタ15に送信する。プリンタ15は、その特定モード移行コマンドに応答して、レガシーモードから特定モードに移行する。   The printer driver 21 sends a command for shifting to the specific mode (hereinafter referred to as a specific mode shift command) to the printer 15 at a certain timing (for example, from the printer 15 that has received notification of completion of the shift to the legacy mode). Send to. In response to the specific mode shift command, the printer 15 shifts from the legacy mode to the specific mode.

(7)段階G。   (7) Stage G.

この段階Gから、後述の段階Mまでが、特定モードにおいて行われる処理である(図12で、点線枠で囲まれた部分)。特定モードにおいて送信されるコマンドやデータは、ストリームで、プリンタ15に流れ込むようになっている。この場合、プリンタ15は、ストリームで流れ込んで来るコマンドやデータを前述したバッファ133に蓄積していく。   From stage G to stage M, which will be described later, is processing performed in the specific mode (the part surrounded by a dotted frame in FIG. 12). Commands and data transmitted in the specific mode flow into the printer 15 as a stream. In this case, the printer 15 accumulates the commands and data flowing in the stream in the buffer 133 described above.

さて、この段階Gでは、プリンタドライバ21は、クラス「LUT」に関する特定言語コマンド(以下、LUTコマンド)を生成し、LUTコマンドをプリンタ15に送信する。ここでは、プリンタドライバ21は、そのLUTコマンドにより、LUTを送ることができる。プリンタ15は、LUTを受信した場合は、そのLUTを用いて画像処理(例えばハーフトーニング処理又は色変換処理)を行い、LUTを受信しない場合には、予めプリンタ記憶域33に記憶されているLUT(図示せず)を用いて画像処理を行う。   At this stage G, the printer driver 21 generates a specific language command (hereinafter referred to as LUT command) related to the class “LUT” and transmits the LUT command to the printer 15. Here, the printer driver 21 can send the LUT by the LUT command. When the LUT is received, the printer 15 performs image processing (for example, halftoning process or color conversion process) using the LUT. When the LUT is not received, the printer 15 stores the LUT stored in the printer storage area 33 in advance. Image processing is performed using (not shown).

(8)段階H。   (8) Stage H.

プリンタドライバ21は、LUTコマンドに続いて、クラス「クオリティ」に関する特定言語コマンド(以下、クオリティコマンド)をプリンタ15に送信する。プリンタドライバ21は、前述したように、用紙種類IDや印刷品質等のパラメータをクオリティコマンドにセットして送信する。プリンタドライバ21は、クオリティコマンドにセットするパラメータのうち、例えば、用紙種類ID及び印刷品質については、印刷パラメータ選択画面80を介してユーザに選択されたもの(例えば用紙種類パラメータ及び印刷品質パラメータ)に基づいて、セットすることができる。   Following the LUT command, the printer driver 21 transmits a specific language command related to the class “quality” (hereinafter, “quality command”) to the printer 15. As described above, the printer driver 21 sets the parameters such as the paper type ID and the print quality in the quality command and transmits it. The printer driver 21 sets, for example, the paper type ID and the print quality among the parameters set in the quality command to those selected by the user via the print parameter selection screen 80 (for example, the paper type parameter and the print quality parameter). Can be set based on.

プリンタ15は、受信したクオリティコマンドにセットされている各種印刷パラメータを抽出し、抽出された各種印刷パラメータを、プリンタ記憶域33に書き込む。   The printer 15 extracts various print parameters set in the received quality command, and writes the extracted various print parameters in the printer storage area 33.

(9)段階I。   (9) Stage I.

プリンタドライバ21は、クオリティコマンドに続いて、クラス「ジョブ」に関する特定言語コマンドであって、ジョブの開始を意味するコードを含んだコマンド(以下、特定ジョブ開始コマンド)を、プリンタ15に送信する。プリンタドライバ21は、前述したように、用紙サイズに関する情報(定型用紙幅、定型用紙長)や、印刷領域に関する情報(上マージン、左マージン、印刷領域幅、印刷領域長)等のパラメータを特定ジョブ開始コマンドにセットして送信する。プリンタドライバ21は、特定ジョブ開始コマンドにセットするパラメータのうち、例えば、用紙サイズに関する情報や印刷領域に関する情報については、印刷パラメータ選択画面80を介してユーザに選択されたもの(例えば用紙サイズパラメータ及びレイアウトパラメータ)に基づいて、算出し、算出された情報をセットすることができる。   Following the quality command, the printer driver 21 transmits to the printer 15 a command (hereinafter referred to as a specific job start command) that is a specific language command related to the class “job” and includes a code indicating the start of the job. As described above, the printer driver 21 specifies parameters such as information on the paper size (standard paper width, standard paper length) and information on the print area (upper margin, left margin, print area width, print area length) as the specific job. Set to start command and send. Among the parameters set in the specific job start command, the printer driver 21 selects, for example, information on the paper size and information on the print area, which is selected by the user via the print parameter selection screen 80 (for example, the paper size parameter and the print job). Based on the layout parameter), and the calculated information can be set.

プリンタ15は、特定ジョブ開始コマンドに応答して、特定モードにおけるジョブの開始をプリンタ記憶域33(又はバッファ133)にセットする。プリンタ15は、それ以降、特定モードでのジョブ終了を意味するコマンド(以下、特定ジョブ終了コマンド)を受けるまでに、コマンドやデータを受信した場合には、そのコマンドやデータは、特定モードにおける一つの印刷ジョブに関わるコマンドやデータであると認識することができる。   In response to the specific job start command, the printer 15 sets the start of the job in the specific mode in the printer storage area 33 (or the buffer 133). Thereafter, when the printer 15 receives a command or data before receiving a command indicating the job end in the specific mode (hereinafter referred to as a specific job end command), the command or data is stored in the specific mode. It can be recognized as commands and data related to one print job.

なお、段階Iまでが終了すると、プリンタ15が行う処理にとって必要な複数のパラメータがセットされることになる。しかし、セットされた複数のパラメータの全てが、特にプリンタ15が単方向プリンタである場合には、プリンタ15でサポートされているとは限らない。そのため、セットされた複数のパラメータのうちプリンタ15でサポートされていないパラメータについては、プリンタ15でサポートされているパラメータに補正する必要がある。その補正に関わる処理は、例えば、段階Iの終了時点から、1ページ分のRGBデータがプリンタ15に蓄積されてその1ページ分のRGBデータに基づく印刷画像データが生成されるまでの任意のタイミングで、プリンタ15が行うことができる。   Note that when step I is completed, a plurality of parameters necessary for processing performed by the printer 15 are set. However, all of the set parameters are not always supported by the printer 15, particularly when the printer 15 is a unidirectional printer. For this reason, parameters that are not supported by the printer 15 among the set parameters must be corrected to parameters that are supported by the printer 15. The processing related to the correction is, for example, an arbitrary timing from the end of stage I until RGB data for one page is accumulated in the printer 15 and print image data based on the RGB data for one page is generated. The printer 15 can do this.

プリンタ15は、パラメータの補正に関わる印刷条件の優先順位を例えばプリンタ記憶域33において記憶している。その印刷条件の優先順位は、例えば、高い方から低い方にかけて、用紙サイズ、用紙種類、レイアウト、印刷品質となっている。この優先順位の基準は、所定の観点、例えば、メモリカード等からRGB画像を読み込んで印刷するいわゆるダイレクト印刷では、プリンタ15が画像のレイアウトを行うが、本実施形態における特定モードでは、プリンタドライバ21が画像のレイアウトを行って出力する点に基づいて定められている。すなわち、プリンタドライバ21がRGB画像データのレイアウトを行っても、プリンタでなるべくエラーを起こさずに印刷することができるようにするということに基づいて、上記優先順位が定められている。なお、プリンタドライバ21が行うレイアウトとは、例えば、アプリケーションソフト22から出力された所定の解像度(ppi)の画像を、ユーザ所望の用紙サイズ及びレイアウトに基づいて、単位長あたりのピクセル数を増減してサイズ調整する行為である。   The printer 15 stores the priority order of printing conditions related to parameter correction, for example, in the printer storage area 33. The priority of the printing conditions is, for example, the paper size, paper type, layout, and print quality from the highest to the lowest. The standard for this priority order is that the printer 15 performs image layout in a predetermined viewpoint, for example, so-called direct printing in which an RGB image is read from a memory card or the like, and in the specific mode in the present embodiment, the printer driver 21. Is determined based on the point that the image is laid out and output. In other words, the priority order is determined based on the fact that even if the printer driver 21 performs the layout of the RGB image data, the printer can print without causing an error as much as possible. Note that the layout performed by the printer driver 21 is, for example, an image of a predetermined resolution (ppi) output from the application software 22 with the number of pixels per unit length increased or decreased based on the paper size and layout desired by the user. This is the act of adjusting the size.

プリンタ15は、上記優先順位に従って、パラメータの補正を行うことができる。   The printer 15 can correct the parameters according to the priority order.

例えば、プリンタ15は、プリンタドライバ21からの用紙サイズに関する情報(例えば定型用紙幅、定型用紙長)がプリンタ15でサポートされているどの用紙サイズに関する情報にもマッチしない場合には、プリンタドライバ21からの用紙サイズに関する情報を、プリンタ15がサポートしている最大の用紙サイズに関する情報に補正する。   For example, if the information about the paper size (for example, the standard paper width and the standard paper length) from the printer driver 21 does not match information about any paper size supported by the printer 15, the printer 15 Is corrected to information on the maximum paper size supported by the printer 15.

また、例えば、プリンタ15は、用紙サイズに関する情報はマッチしているが、用紙種類に関する情報(例えば用紙種類ID)がマッチしていない場合には、プリンタドライバ21からの用紙種類に関する情報を、上記マッチしている用紙サイズに関する情報に属する範囲内で、プリンタ15がサポートしている用紙種類に関する情報に補正する。具体的には、例えば、図2を参照して言えば、プリンタドライバ21から用紙サイズ「L判」で用紙種類「光沢紙」を受けた場合、プリンタ15は、その用紙種類「光沢紙」を採用するためには用紙サイズを例えば「A4」に変更すれば良いが、そうはせずに、用紙サイズ「L判」を優先的に採用し、プリンタドライバ21からの用紙種類「光沢紙」を、用紙サイズ「L判」に対応した用紙種類「写真用紙」に補正する。もし、その用紙サイズに対応した用紙種類が複数個存在する場合には、プリンタ15は、手動で又は自動で、一つの用紙種類を選択し、プリンタドライバ21からの用紙種類を、その選択された用紙種類に補正することができる。   For example, if the printer 15 matches the information regarding the paper size but does not match the information regarding the paper type (for example, the paper type ID), the printer 15 displays the information regarding the paper type from the printer driver 21 as described above. The information is corrected to the information on the paper type supported by the printer 15 within the range belonging to the information on the matching paper size. Specifically, for example, referring to FIG. 2, when receiving the paper type “glossy paper” with the paper size “L” from the printer driver 21, the printer 15 changes the paper type “glossy paper”. In order to adopt, the paper size may be changed to, for example, “A4”, but instead, the paper size “L” is preferentially adopted, and the paper type “glossy paper” from the printer driver 21 is selected. The paper type “photo paper” corresponding to the paper size “L” is corrected. If there are a plurality of paper types corresponding to the paper size, the printer 15 selects one paper type manually or automatically, and the paper type from the printer driver 21 is selected. The paper type can be corrected.

以降、プリンタ15は、レイアウト及び印刷品質についても、用紙種類についての補正と同様に、上記優先順位に基づいて、必要に応じて補正していく。なお、プリンタ15は、例えば、縁有りから縁無しに補正する場合には、印刷領域を拡大する補正も行うことができる。また、例えば、プリンタ15は、縁無しから縁有りに補正する場合には、印刷領域を縮小する(又は、印刷領域の所定端をマージンが生じる分だけカットする)補正も行うことができる。また、例えば、プリンタ15は、印刷品質「Draft」を補正する場合には、「Normal」の方を「High」よりも優先的に採用することができ、「Normal」を補正する場合には、「High」の方を「Draft」よりも優先的に採用することができ、「High」を補正する場合には、「Normal」の方を「Draft」よりも優先的に採用することができる(つまり、プリンタドライバ21からの印刷品質にできるだけ近い印刷品質に補正することができる)。   Thereafter, the printer 15 corrects the layout and the print quality as necessary based on the above priority order, similarly to the correction for the paper type. The printer 15 can also perform correction for enlarging the print area, for example, when correcting from the presence of a border to the absence of a border. Further, for example, when the printer 15 corrects from the absence of a border to the presence of a border, the printer 15 can also perform a correction that reduces the print area (or cuts a predetermined end of the print area by a margin). Further, for example, when correcting the print quality “Draft”, the printer 15 can adopt “Normal” preferentially over “High”, and when correcting “Normal”, “High” can be preferentially adopted over “Draft”, and when “High” is corrected, “Normal” can be preferentially adopted over “Draft” ( That is, it is possible to correct the print quality as close as possible to the print quality from the printer driver 21).

(10)段階J。   (10) Stage J.

プリンタドライバ21は、特定ジョブ開始コマンドに続いて、ページの開始を意味する特定言語コマンド(以下、ページ開始コマンド)を、プリンタ15に送信する。プリンタ15は、ページ開始コマンドに応答して、ページ開始をプリンタ記憶域33(又はバッファ133)にセットし、それ以降、ページ終了を意味する特定言語コマンド(以下、ページ終了コマンド)を受けるまでに、コマンドやデータを受信した場合には、そのコマンドやデータは、特定モードにおける一つのページに関わるコマンドやデータであると認識する。また、プリンタ15は、ページ開始コマンドに応答して、直ちに、給紙を開始してもよい。   Following the specific job start command, the printer driver 21 transmits a specific language command (hereinafter referred to as a page start command) indicating the start of a page to the printer 15. In response to the page start command, the printer 15 sets the page start in the printer storage area 33 (or buffer 133), and thereafter receives a specific language command (hereinafter referred to as a page end command) that means page end. When a command or data is received, the command or data is recognized as a command or data related to one page in the specific mode. Further, the printer 15 may start feeding immediately in response to the page start command.

(11)段階K。   (11) Stage K.

プリンタドライバ21は、ページ開始コマンドに続いて、一ラスタ分のRGBデータを有するデータコマンドをプリンタ15に送信する。プリンタドライバ21は、1ページ分のRGBラスタデータの送信を終えるまで、データコマンドを送り続ける。その際、プリンタドライバ21は、前述したように、RGBラスタデータの圧縮前と圧縮後のデータサイズの違いを比較し、より小さいデータサイズで送れる方法でRGBラスタデータを送信する。プリンタ15は、受信するデータコマンドをバッファ133に蓄積していく。プリンタ15は、所定ラスタ分(例えば一ページ分)のRGBラスタデータが蓄積された場合には、蓄積されたRGBラスタデータを、プリンタ記憶域33にセットされた各種パラメータに基づいて処理を行っても良い。また、プリンタ15は、入力されたRGBデータがあらかじめ指定された印刷領域(例えば、実際に受信したRGBラスタデータで構成される印刷領域長が、プリンタドライバ21からの印刷領域長)に満たない場合、残りは空白のデータが送られたものと判断してもよい。   The printer driver 21 transmits a data command having RGB data for one raster to the printer 15 following the page start command. The printer driver 21 continues to send data commands until the transmission of RGB raster data for one page is completed. At this time, as described above, the printer driver 21 compares the difference in data size before and after the compression of the RGB raster data, and transmits the RGB raster data by a method capable of sending with a smaller data size. The printer 15 accumulates received data commands in the buffer 133. When the RGB raster data for a predetermined raster (for example, for one page) is accumulated, the printer 15 performs processing on the accumulated RGB raster data based on various parameters set in the printer storage area 33. Also good. Further, the printer 15 determines that the input RGB data is less than the print area specified in advance (for example, the print area length formed by the RGB raster data actually received is the print area length from the printer driver 21). The remaining data may be determined to be sent as blank data.

(12)段階L。   (12) Stage L.

プリンタドライバ21は、一ページ分のRGBラスタデータを送信した場合、それに続いて、次のページが存在するか否かを表す次ページ有無情報がセットされたページ終了コマンドをプリンタ15に送信する。   When the printer driver 21 transmits RGB raster data for one page, the printer driver 21 subsequently transmits a page end command in which next page presence / absence information indicating whether or not the next page exists is set to the printer 15.

プリンタ15は、ページ終了コマンドに応答して、ページ終了をプリンタ記憶域33(又はバッファ133)にセットする。また、プリンタ15は、そのページ終了コマンドに応答して、次ページ有無情報を参照し、次ページがあれば、次の給紙処理を開始しても良いし、次ページが無ければ、所定の終了処理を行っても良い。   In response to the page end command, the printer 15 sets the page end in the printer storage area 33 (or the buffer 133). In response to the page end command, the printer 15 refers to the next page presence / absence information. If there is a next page, the printer 15 may start the next paper feed process. Termination processing may be performed.

一つのジョブにおいてn枚のページがあれば、段階J、K及びLが、n回繰り返される。   If there are n pages in one job, steps J, K and L are repeated n times.

(13)段階M。   (13) Stage M.

プリンタドライバ21は、最後のページのページ終了コマンドに続いて、特定ジョブ終了コマンドをプリンタ15に送信する。   The printer driver 21 transmits a specific job end command to the printer 15 following the page end command of the last page.

プリンタ15は、特定ジョブ終了コマンドに応答して、特定ジョブ終了をプリンタ記憶域33(又はバッファ133)にセットする。また、プリンタ15は、特定ジョブ終了コマンドを受けた場合には、バッファ133(又はプリンタ記憶域33)に蓄積されたデータを全て読み出し、排紙が未完了であれば排紙処理を行っても良い。   In response to the specific job end command, the printer 15 sets the specific job end in the printer storage area 33 (or the buffer 133). In addition, when the printer 15 receives a specific job end command, the printer 15 reads all the data stored in the buffer 133 (or the printer storage area 33), and performs paper discharge processing if paper discharge is incomplete. good.

(14)段階N。   (14) Stage N.

プリンタドライバ21は、例えば、特定ジョブ終了コマンドに続いて、レガシー移行コマンドを、プリンタ15に送信する。プリンタ15は、そのレガシー移行コマンドに応答して、特定モードからレガシーモードに移行する。   For example, the printer driver 21 transmits a legacy transfer command to the printer 15 following the specific job end command. The printer 15 shifts from the specific mode to the legacy mode in response to the legacy shift command.

なお、この実施形態では、このレガシー移行コマンドが、特定モードの解除と、レガシーモードへの移行との両方の意味を持っているが、特定モードを解除するためのコマンドが送信された後に、レガシー移行コマンドが送信されても良い。   In this embodiment, the legacy transition command has both the meaning of canceling the specific mode and the transition to the legacy mode. However, after the command for canceling the specific mode is transmitted, A migration command may be sent.

(15)段階O。   (15) Stage O.

プリンタドライバ21は、或るタイミングで(例えば、レガシー移行コマンドに対する所定の応答を受けた場合に)、リモート移行コマンドをプリンタ15に送信する。プリンタ15は、そのリモート移行コマンドに応答して、レガシーモードからリモートモードに移行する。   The printer driver 21 transmits a remote migration command to the printer 15 at a certain timing (for example, when a predetermined response to the legacy migration command is received). The printer 15 shifts from the legacy mode to the remote mode in response to the remote shift command.

(16)段階P。   (16) Stage P.

プリンタドライバ21は、或るタイミングで(例えば、リモート移行コマンドに対してモード以降完了通知をプリンタ15から受けた後に)、レガシージョブ終了コマンドを、プリンタ15に送信する。プリンタ15は、レガシージョブ終了コマンドに応答して、ジョブ終了をプリンタ記憶域33(又はバッファ133)にセットする。   The printer driver 21 transmits a legacy job end command to the printer 15 at a certain timing (for example, after receiving a notification of completion after the mode for the remote transition command from the printer 15). In response to the legacy job end command, the printer 15 sets the job end in the printer storage area 33 (or buffer 133).

(17)段階Q。   (17) Stage Q.

プリンタドライバ21は、或るタイミングで(例えば、レガシージョブ終了コマンドに応答して完了通知を受けた場合に)、レガシー移行コマンドを、プリンタ15に送信する。プリンタ15は、そのレガシー移行コマンドに応答して、リモートモードからレガシーモードに移行する。   The printer driver 21 transmits a legacy migration command to the printer 15 at a certain timing (for example, when a completion notification is received in response to the legacy job end command). The printer 15 shifts from the remote mode to the legacy mode in response to the legacy shift command.

なお、この実施形態では、このレガシー移行コマンドが、リモートモードの解除と、レガシーモードへの移行との両方の意味を持っているが、リモートモードを解除するためのコマンドが送信された後に、レガシー移行コマンドが送信されても良い。   In this embodiment, the legacy transition command has both the meaning of canceling the remote mode and the transition to the legacy mode. However, after the command for canceling the remote mode is transmitted, A migration command may be sent.

(18)段階R。   (18) Stage R.

プリンタドライバ21は、或るタイミングで(例えば、レガシー移行コマンドに対する所定の応答をプリンタ15から受けた場合に)、初期化コマンド(例えば「ESC@」というコードを含んだコマンド)を、プリンタ15に送信する。プリンタ15は、その初期化コマンドに応答して、所定の初期化処理を行う。この初期化処理では、例えば、プリンタ15は、特定モードにおいてプリンタ記憶域33に設定された印刷パラメータを初期(デフォルト)のパラメータに戻す等の処理を行う。   The printer driver 21 sends an initialization command (for example, a command including a code “ESC @”) to the printer 15 at a certain timing (for example, when a predetermined response to the legacy transition command is received from the printer 15). Send. The printer 15 performs a predetermined initialization process in response to the initialization command. In this initialization process, for example, the printer 15 performs a process such as returning the printing parameters set in the printer storage area 33 to the initial (default) parameters in the specific mode.

以上が、図8のS15の印刷処理についての説明である。なお、この印刷処理において、特定モードでは、送信される複数のクラスに関わるコマンドの送信手順(例えば入れ子構造になった手順)が、予め定められている。プリンタ15は、その送信手順とは異なる手順でコマンドを受信した場合(例えば、ページ終了コマンドを受ける前に新たなページ開始コマンドを受けた場合)には、そのコマンドを読み捨てる。   The above is the description of the printing process in S15 of FIG. In this printing process, in the specific mode, a command transmission procedure (for example, a nested procedure) related to a plurality of classes to be transmitted is determined in advance. When the printer 15 receives a command according to a procedure different from the transmission procedure (for example, when a new page start command is received before receiving a page end command), the printer 15 discards the command.

また、プリンタドライバ21は、特定言語で記述された新たな印刷ジョブをプリンタ15に実行させる場合には、特定ジョブ開始コマンドを送った後、特定モードを解除させること無く、特定ジョブ開始コマンドを送信してもよい。すなわち、特定モードにおいて、一旦レガシーモードに移行することなく、段階I〜段階Mが繰り返し行われても良い。   When the printer driver 21 causes the printer 15 to execute a new print job described in a specific language, the printer driver 21 transmits the specific job start command without releasing the specific mode after sending the specific job start command. May be. That is, in the specific mode, steps I to M may be performed repeatedly without once shifting to the legacy mode.

上述した実施形態によれば、プリンタドライバ21は、RGB画像データを送信することができるようになっている。また、ホスト装置1では、プリンタ15が単方向通信と双方向通信のどちらを行うかや、プリンタ15が特定言語をサポートしているかどうかが検出される。プリンタドライバ21は、プリンタ15が双方向通信を行い且つ特定言語をサポートしているとわかった場合に、プリンタ21の仕様情報を問い合わせ、それに応答して受信するプリンタ21の仕様情報中のパラメータを用いた印刷コマンドを送る。この場合、プリンタ15は、自分の仕様情報に基づく印刷コマンドを受けるので、その印刷コマンドを確実に処理できる。以上のことから、プリンタ15の機種別にプリンタドライバ21を構築することなく、汎用型のプリンタドライバ21を提供することができる。   According to the above-described embodiment, the printer driver 21 can transmit RGB image data. Further, the host device 1 detects whether the printer 15 performs unidirectional communication or bidirectional communication, and whether the printer 15 supports a specific language. When the printer driver 21 finds that the printer 15 performs bidirectional communication and supports a specific language, the printer driver 21 inquires about the specification information of the printer 21, and sets parameters in the specification information of the printer 21 received in response thereto. Send the print command used. In this case, since the printer 15 receives the print command based on its own specification information, it can reliably process the print command. From the above, the general-purpose printer driver 21 can be provided without constructing the printer driver 21 for each model of the printer 15.

ところで、上述した実施形態において、印刷パスを構成する複数のモジュールや、それら複数のモジュールを管理するDPC131等が、プロセッサ35に読み込まれて、処理を実行することで、プリンタ15からの印刷が行われる。そして、その処理は、以下に説明するソフトウェア群37の構成や機能の下で行われる。ゆえに、まず、図13A〜図15を参照して、プリンタ15におけるソフトウェア群37の構成や機能を説明し、その後、図16〜図18を参照して、プリンタ15における詳細な処理流れを説明する。   By the way, in the above-described embodiment, a plurality of modules constituting the print path, the DPC 131 managing the plurality of modules, and the like are read into the processor 35 and executed, whereby printing from the printer 15 is performed. Is called. The processing is performed under the configuration and function of the software group 37 described below. Therefore, first, the configuration and functions of the software group 37 in the printer 15 will be described with reference to FIGS. 13A to 15, and then the detailed processing flow in the printer 15 will be described with reference to FIGS. 16 to 18. .

図13Aは、ソフトウェア群37の構成例を示す。   FIG. 13A shows a configuration example of the software group 37.

ソフトウェア群37は、図13Aに示すような階層構造を有することができる。例えば、最下位に、オペレーティングシステム(OS)333があり、その上位に、プリンタ15の各種ハードウェア(例えばI/F13やエンジンコントローラ41)を制御する各種ハードウェア制御モジュール331が用意されている。各種ハードウェア制御モジュール331の上位には、モジュール群335がある。モジュール群335の上位には、モジュール群335中のモジュールや必要なハードウェア制御モジュール331を選択して印刷パスを構築するDPC131がある。DPC131の上位には、下位から上位へ、ファンクション327、サービス323、ユーザインタフェース(UI)321がある。   The software group 37 can have a hierarchical structure as shown in FIG. 13A. For example, there is an operating system (OS) 333 at the lowest level, and various hardware control modules 331 for controlling various hardware (for example, the I / F 13 and the engine controller 41) of the printer 15 are prepared at the upper level. A module group 335 is provided above the various hardware control modules 331. Above the module group 335, there is a DPC 131 that selects a module in the module group 335 and a necessary hardware control module 331 to construct a print path. On the upper side of the DPC 131, there are a function 327, a service 323, and a user interface (UI) 321 from the lower side to the upper side.

ファンクション327は、プリンタ15に元から用意されていた機能とは異なる一群の機能を実現するために用意されている。例えば、ファンクション327は、メモリカードが別のI/F71に挿されてそのメモリカードから画像が読み出される場合に呼び出される。   The function 327 is prepared for realizing a group of functions different from the functions originally prepared for the printer 15. For example, the function 327 is called when a memory card is inserted into another I / F 71 and an image is read from the memory card.

サービス323は、例えばUI321と協働して、プリンタ15に設けられた操作パネル(図示せず)からの要求や、外部の機器(例えばホスト装置1や別のデバイス73)からの要求を受け取り、各種の印刷処理を起動する。例えば、UI321を介して、外部からの要求を受け取ったサービス323は、ハーネス群325中の所定のハーネスを用いて、ファンクション327やDPC131、あるいはその他のモジュールを呼び出すことができる。ハーネスと呼ばれる機能別の単位を用意しているのは、プリンタ15の内部には、単純にソフトウェアにより処理される種々の機能以外に、それらの機能に関わるIFD101や各種ハードウェアのステータスを管理するステータス管理モジュールDSMなども存在するからである。ハーネスと呼ばれる機能別の単位を用意することで、ソフトウェアモジュール群の呼び出しを、DPC131を用いて行なうことができる。   For example, the service 323 cooperates with the UI 321 to receive a request from an operation panel (not shown) provided in the printer 15 or a request from an external device (for example, the host device 1 or another device 73). Start various printing processes. For example, the service 323 that has received a request from the outside via the UI 321 can call the function 327, the DPC 131, or other modules using a predetermined harness in the harness group 325. The unit for each function called a harness is prepared in the printer 15 in addition to various functions that are simply processed by software, and the status of the IFD 101 and various hardware related to those functions is managed. This is because there is a status management module DSM and the like. By preparing a unit for each function called a harness, a software module group can be called using the DPC 131.

DPC131は、例えば以下のことをきっかけとして動作することができる。すなわち、例えば、所定のイベント(例えば、UI321を介したユーザ操作、或いは、ホスト装置1からのコマンドの受信)が検出され、サービス323が、それの下層のハーネス群325の中から、イベントに関わるハードウェア(例えば、コマンドを受信したI/F13)に対応したハーネスを選択して呼び出した場合に、DPC131が、そのハーネスの呼び出しをきっかけとして、動作することができる。上位の層からみれば、DPC131に対して種々のアプリケーションインタフェース(例えば、モジュールの確保を行なわせる関数(例えば「LockProcess」)など)が定義されている。上位の層は、所望のアプリケーションインタフェース(以下、API)を用いて、DPC131を制御する。DPC131は、機能別の単位であるハーネスから呼び出されて動作を開始し、ハーネスが要求する処理を実現するのに必要なモジュールの組合わせを実現するのである。   The DPC 131 can operate, for example, triggered by the following. That is, for example, a predetermined event (for example, a user operation via the UI 321 or reception of a command from the host device 1) is detected, and the service 323 is related to the event from the harness group 325 below it. When a harness corresponding to hardware (for example, the I / F 13 that has received the command) is selected and called, the DPC 131 can operate with the call of the harness as a trigger. From the upper layer, various application interfaces (for example, a function (for example, “LockProcess”) for securing a module) for the DPC 131 are defined. The upper layer controls the DPC 131 using a desired application interface (hereinafter referred to as API). The DPC 131 is called from a harness, which is a unit for each function, and starts operation, and realizes a combination of modules necessary to realize processing required by the harness.

補足すれば、例えば、サービス323は、印刷アプリケーションを機種仕様に合わせて複数個保有することができる。その保有しているものはハーネス機能を含むファンクションモジュールという形で持つことができる。例えば、プリンタ15が、スキャナを有し、スキャナでスキャンされたイメージを印刷するといういわゆるコピー機能を有していれば、コピー機能のためのファンクションモジュールが、サービス323の管理下にぶら下がることができる。また、例えば、プリンタ15が、RGB画像データが記憶されたメモリカードからそのRGB画像データを読み込んで印刷する機能を有している場合には、カード印刷のためのファンクションモジュールが、サービス323の管理下にぶら下がることができる。ホスト装置1からのデータを受けるI/F13のハーネスも、上記と同様にファンクションという位置付けで、サービス323の管理下にぶら下がることができる。従って、サービス323が、モジュール実行の指示を各ファンクション(ハーネスという位置付けであっても良い)に対して行い、各ファンクションが、DPC131の定義する印刷パスを指定して(例えば、印刷処理IDをDPC131に通知して)、DPC131で定義されているAPIをそれの手続きに従って実行することができる。これにより、一つのアプリケーションに相当する印刷処理の実行が可能となる。   For example, the service 323 can have a plurality of print applications in accordance with the model specifications. The possession can be held in the form of a function module that includes a harness function. For example, if the printer 15 has a scanner and a so-called copy function of printing an image scanned by the scanner, a function module for the copy function can be suspended under the management of the service 323. . For example, when the printer 15 has a function of reading and printing the RGB image data from the memory card storing the RGB image data, the function module for card printing manages the service 323. Can hang down. The harness of the I / F 13 that receives data from the host device 1 can also be hung under the management of the service 323 in the same manner as described above. Accordingly, the service 323 issues a module execution instruction to each function (may be positioned as a harness), and each function designates a print path defined by the DPC 131 (for example, the print processing ID is set to the DPC 131). The API defined in the DPC 131 can be executed according to its procedure. As a result, it is possible to execute print processing corresponding to one application.

図13Bは、DPC131がコントロールするモジュール群335の一例を示す。   FIG. 13B shows an example of a module group 335 controlled by the DPC 131.

モジュール群335には、「イニシエータ」というモジュール種類に属する一以上のモジュール(以下、イニシエータモジュール)と、「ターミネータ」というモジュール種類に属する一以上のモジュール(以下、ターミネータモジュール)と、「メンバ」というモジュール種類に属する一以上のモジュール(以下、メンバモジュール)とがある。イニシエータモジュール(例えばデータ取得モジュール103)は、印刷パスの先頭に位置するものとして規定されているモジュールである。ターミネータモジュールは、印刷パスの終端に位置するものとして規定されているモジュールである。メンバモジュールは、イニシエータモジュールとターミネータモジュールとの間に位置するものとして規定されているモジュールである。   The module group 335 includes one or more modules belonging to the module type “initiator” (hereinafter referred to as initiator module), one or more modules belonging to the module type “terminator” (hereinafter terminator module), and “member”. There are one or more modules (hereinafter referred to as member modules) belonging to the module type. The initiator module (for example, the data acquisition module 103) is a module defined as being positioned at the head of the print path. The terminator module is a module defined as being located at the end of the print path. The member module is a module defined as being located between the initiator module and the terminator module.

モジュール群335に含まれる各モジュールがどのモジュール種類に属するかという情報(例えば、モジュールのIDと種類との対応付け)は、所定の場所(例えば、DPC131又はそれとは別のプリンタ記憶域33上の場所)に登録されている。DPC131が、その情報を参照することにより、モジュール群335に含まれる各モジュールがどのモジュール種類に属するかを特定することができる。   Information about which module type each module included in the module group 335 belongs to (for example, the correspondence between the module ID and the type) is stored in a predetermined location (for example, the DPC 131 or a printer storage area 33 different therefrom). Registered). The DPC 131 can specify which module type each module included in the module group 335 belongs by referring to the information.

イニシエータモジュール、メンバモジュール及びターミネータモジュールの配列については、実現すべき印刷処理の内容毎に予め決められている。具体的には、図13Cに例示するように、モジュールの配列(例えば、先頭から終端の順に並べられたモジュールID)が、印刷処理を識別するための印刷処理IDと、その印刷処理の際に呼び出されるハーネスのIDとに対応付けられている。モジュールの配列を表す情報(例えば、モジュール配列と、印刷処理IDと、呼び出しハーネスIDとの対応付け)は、所定の場所(例えば、DPC131又はそれとは別のプリンタ記憶域33上の場所)に登録されている。DPC131が、その情報を参照することにより、どの印刷処理を行うときにどのハーネスが呼び出されどのような印刷パスを構築すればよいかを特定することができる。   The arrangement of the initiator module, member module, and terminator module is determined in advance for each content of print processing to be realized. Specifically, as illustrated in FIG. 13C, the arrangement of modules (for example, module IDs arranged in order from the top to the end) includes a print processing ID for identifying the print processing, and the print processing ID. Corresponding to the ID of the harness to be called. Information indicating the arrangement of modules (for example, the correspondence between the module arrangement, the print processing ID, and the calling harness ID) is registered in a predetermined location (for example, a location on the DPC 131 or another printer storage area 33). Has been. By referring to the information, the DPC 131 can identify which harness is called and what print path should be constructed when performing which print processing.

この実施形態では、モジュール(特に、例えばモジュール群335中のモジュール)には幾つかのステータスがあり、そのステータスは例えば以下のように遷移する。   In this embodiment, a module (in particular, a module in the module group 335, for example) has several statuses, and the status transitions as follows, for example.

図13Dは、モジュールのステータスの遷移の様子を示す。   FIG. 13D shows the status transition of the module.

モジュールのステータスとしては、例えば、「STAND-BY」、「READY」及び「PROCESSING」の3つがある。「STAND-BY」は、モジュールがDPC131から呼び出し可能であることを意味する。「READY」は、モジュールが、「STAND-BY」の場合に、DPC131から後述するG-READY関数による呼び出しを受けることにより、ジョブの実行が可能になった状態であることを意味する。「PROCESSING」は、「READY」の場合に、DPC131から後述のSTART-J関数を受けることにより、ジョブの実行中になったことを意味する。モジュールは、「PROCESSING」状態の場合に、ジョブの終了を受けたならば、「READY」状態に戻り、「READY」状態の場合に、キャンセルを受けたならば、「STAND-BY」状態に戻る。   There are three module statuses, for example, “STAND-BY”, “READY”, and “PROCESSING”. “STAND-BY” means that the module can be called from the DPC 131. “READY” means that, when the module is “STAND-BY”, a job can be executed by receiving a call from the DPC 131 by a G-READY function described later. “PROCESSING” means that in the case of “READY”, a job is being executed by receiving a START-J function described later from the DPC 131. The module returns to the “READY” state if the job is finished in the “PROCESSING” state, and returns to the “STAND-BY” state if it is canceled in the “READY” state. .

次に、モジュールとモジュールとの間のデータのやりとりについて説明する。   Next, the exchange of data between modules will be described.

図14Aは、各モジュールが有する機能を示す。   FIG. 14A shows the functions of each module.

各モジュールは、下流側のモジュールに対する機能(換言すれば、上流側のモジュールとしての機能)と、上流側のモジュールに対する機能(換言すれば、下流側のモジュールとしての機能)とを有する。下流側のモジュールに対する機能には、以下の(A)又は(B)、
(A)RP(Read Providing):ストリームリード関数を提供する機能、
(B)WC(Write Call):ストリームライト関数を呼び出す機能、
がある。一方、上流側のモジュールに対する機能には、以下の(a)又は(b)、
(a)RC(Read Call):ストリームリード関数を呼び出す機能、
(b)WP(Write Providing):ストリームライト関数を提供する機能、
がある。
Each module has a function for a downstream module (in other words, a function as an upstream module) and a function for an upstream module (in other words, a function as a downstream module). The functions for the downstream module include the following (A) or (B),
(A) RP (Read Providing): a function that provides a stream read function,
(B) WC (Write Call): function to call a stream write function,
There is. On the other hand, the functions for the upstream module include the following (a) or (b),
(A) RC (Read Call): a function for calling a stream read function,
(B) WP (Write Providing): a function that provides a stream write function,
There is.

モジュール群335のうち、DPC131により指定された二以上のモジュールが、DPC131により指定された配列で並ぶことにより、印刷パス、すなわち、ストリームが流れるパス(換言すれば、データ処理の流れ)を構築する。その際、各モジュールは、上流側のモジュールの用意したデータを読み取るストリームリード関数、あるいはデータを下流側のモジュールに書き込むストリームライト関数のいずれかを用いてデータをやりとりする。   Two or more modules specified by the DPC 131 in the module group 335 are arranged in an array specified by the DPC 131, thereby constructing a print path, that is, a path through which a stream flows (in other words, a data processing flow). . At that time, each module exchanges data using either a stream read function for reading data prepared by the upstream module or a stream write function for writing data to the downstream module.

ここで、下流側のモジュールがデータを上流側へ読みに行く場合、データがおかれている場所(ポインタの位置)は、データを用意した上流側のモジュールが知っていると考えられる。一方、上流側のモジュールが下流側へデータを書きに行く場合、データを書き込む場所(ポインタの位置)は、データを受け取る下流側のモジュールが知っていると考えられる。   Here, when the downstream module reads the data upstream, it is considered that the upstream module that prepared the data knows the location where the data is placed (pointer position). On the other hand, when the upstream module writes data to the downstream side, it is considered that the downstream module that receives the data knows the location (pointer position) to write the data.

本出願人は、この点に着目し、本実施形態において、ストリームリード関数およびストリームライト関数については、その関数を提供する側と、その関数を用いてデータの読み書きを実際に行なう側とを区別し、モジュールの組み合わせによらず、データのやりとりが行なえる仕組みを用意している。これらの機能の組み合わせを示したのが、この図14Aである。   The present applicant pays attention to this point, and in this embodiment, for the stream read function and the stream write function, the side that provides the function is distinguished from the side that actually reads and writes data using the function. However, there is a mechanism that can exchange data regardless of the combination of modules. FIG. 14A shows a combination of these functions.

図14Bは、イニシエータモジュール、メンバモジュール及びターミネータモジュールの各々が有する機能を示す。   FIG. 14B shows functions of each of the initiator module, the member module, and the terminator module.

メンバモジュールは、上流側のモジュールとしての機能「RC」及び「WP」のうちのいずれかと、下流側のモジュールとしての機能「RP」及び「WC」のうちのいずれかとを有するので、図14Bに示す通り、全部で4通りのモジュールとなり得る。各モジュールがいずれの機能を有するかは、各モジュールの処理内容により決定することができるが、好適には、例えば、そのモジュール内部での処理によりバッファにデータを蓄えるタイプのモジュールは、機能「WC」を有するモジュールとして設計される。   The member module has one of the functions “RC” and “WP” as the upstream module and one of the functions “RP” and “WC” as the downstream module. As shown, there can be a total of four modules. Which function each module has can be determined by the processing content of each module. Preferably, for example, a module of a type that stores data in a buffer by processing inside the module has a function “WC”. Is designed as a module with

イニシエータモジュールは、データ処理の先頭に位置し、上流側にモジュールが存在することはないので、上流側のモジュールに対する機能「RP」及び「WC」を有する必要はなく、下流側のモジュールに対する機能「RC」又は「WP」を有すれば良い。   The initiator module is positioned at the beginning of data processing, and there is no module on the upstream side. Therefore, it is not necessary to have the functions “RP” and “WC” for the upstream module, and the function “for the downstream module“ It is sufficient to have “RC” or “WP”.

ターミネータモジュールは、データ処理の終端に位置し、下流側にモジュールが存在することはないので、下流側のモジュールに対する機能「RC」及び「WP」を有する必要はなく、上流側のモジュールに対する機能「RP」及び「WC」を有すれば良い。   Since the terminator module is located at the end of the data processing and there is no module on the downstream side, it is not necessary to have the functions “RC” and “WP” for the downstream module, and the function “ It is sufficient to have “RP” and “WC”.

DPC131は、ハーネスから所定の印刷処理の実施を指示された場合、図13Cに例示した情報(例えばテーブル)を参照し、その情報中の印刷パス定義に従って、組み合わせるべきモジュール特定する。次に、DPC131は、各モジュールに対して、G-READY関数を呼び出して、各モジュールの使用を予約する。各モジュールは、DPC131からの呼び出しに応答できる場合は、G-READY関数の引数に、次の値を入れて返す。DPC131からG-READY関数を呼び出す際、引数としては[X1,IX1,Y1,IY1]の四つが与えられる。この引数の内容は次の通りである。
(1)X1:下流側モジュールに対する機能として「RP」を有するイニシエータモジュール又はメンバモジュールが、自ら提供するストリームリード関数のポインタを入れて返す引数である。上流側に対する機能として「RC」を有するターミネータモジュール又はメンバモジュールは、この引数にヌル(NULL)を入れて返す。NULLは、何も指定されてないことを示す変数である。
(2)IX1:下流側モジュールに対する機能として「RP」を有するイニシエータモジュールまたはメンバモジュールが、自ら提供するストリームリード関数の呼び出しの際に指定すべきコンテクストIDを入れて返す引数である。上流側に対する機能として「RC」を有するターミネータモジュール又はメンバモジュールは、この引数に値0を入れて返す。各モジュールが、コンテクストIDを返すのは、同じモジュールが同時に二つの処理に用いられる場合が有り得るからである。この場合、DPC131は、各モジュールに対して処理開始や終了を指示する際、このコンテクストIDを用いて、処理の開始と終了のどちらであるかを特定する。
(3)Y1:上流側モジュールに対する機能として「WP」を有するメンバモジュール又はターミネータモジュールが、自ら提供するストリームライト関数のポインタを入れて返す引数である。下流側に対する機能として「WC」を有するイニシエータモジュール又はメンバモジュールは、この引数にヌル(NULL)を入れて返す。
(4)IY1:上流側モジュールに対する機能として「WP」を有するメンバモジュール又はターミネータモジュールが、自ら提供するストリームライト関数の呼び出しの際に指定すべきコンテクストIDを入れて返す引数である。下流側に対する機能として「WC」を有するイニシエータモジュール又はメンバモジュールは、この引数に値0を入れて返す。
When the DPC 131 is instructed to execute a predetermined printing process from the harness, the DPC 131 refers to information (for example, a table) illustrated in FIG. 13C and specifies modules to be combined according to the print path definition in the information. Next, the DPC 131 calls the G-READY function for each module and reserves the use of each module. When each module can respond to the call from the DPC 131, it returns the following value in the argument of the G-READY function. When the G-READY function is called from the DPC 131, four arguments [X1, IX1, Y1, IY1] are given as arguments. The contents of this argument are as follows:
(1) X1: This is an argument that the initiator module or member module having “RP” as a function for the downstream module puts and returns a pointer of the stream read function provided by itself. A terminator module or member module having “RC” as a function for the upstream side returns a null (NULL) in this argument. NULL is a variable indicating that nothing is specified.
(2) IX1: An argument returned by an initiator module or member module having “RP” as a function for the downstream module, with a context ID to be specified when the stream read function provided by itself is called. A terminator module or member module having “RC” as a function for the upstream side returns a value of 0 in this argument. Each module returns a context ID because the same module may be used for two processes at the same time. In this case, when the DPC 131 instructs each module to start or end the process, the DPC 131 uses the context ID to specify whether the process starts or ends.
(3) Y1: This is an argument returned by the member module or terminator module having “WP” as a function for the upstream module, with the pointer of the stream write function provided by itself. The initiator module or member module having “WC” as a function for the downstream side returns a null (NULL) in this argument.
(4) IY1: An argument returned by a member module or terminator module having “WP” as a function for the upstream module, with a context ID to be specified when calling the stream write function provided by itself. The initiator module or member module having “WC” as a function for the downstream side returns a value of 0 in this argument.

図15は、印刷パスにおけるデータ処理の流れの一例を示す。この図15では、説明をより分かりやすくするために、ストリームリード関数又はストリームライト関数のいずれかを提供するモジュールの部分がハッチングで示されている。この例では、印刷パスは、RGP印刷パスであり、先頭から終端にかけて、RPを有するイニシエータモジュールI−A(特定言語処理モジュール113)、RCとWCとを有するメンバモジュールM−E(色変換/ハーフトーニング処理モジュール115)、WPとRPとを有するメンバモジュールM−H(インターレース処理モジュール117)、及びRCを有するターミネータモジュールT−Aの順で配列される。   FIG. 15 shows an example of the data processing flow in the print pass. In FIG. 15, in order to make the description easier to understand, the portion of the module that provides either the stream read function or the stream write function is hatched. In this example, the print path is an RGP print path, and from the beginning to the end, an initiator module IA (specific language processing module 113) having RP, a member module ME (RC / WC) having RC and WC. Halftoning processing module 115), member module MH (interlace processing module 117) having WP and RP, and terminator module TA having RC are arranged in this order.

DPC131からG-READY関数が呼び出されると、イニシエータモジュールI−Aは、上記のG-READY関数の定義に従い、ストリームリード関数を提供するとして、その関数のポインタSR1と、そのコンテクストID(RID1)を有効な引数として、DPC131に返す。メンバモジュールM−Eは、自らは提供する関数がないとして、有効な引数は返さない。メンバモジュールM−Hは、ストリームリード関数とストリームライト関数とを提供するとして、下流側に対するポインタSR2、そのコンテクストID(RID2)、上流側に対するポインタSW1、及びそのコンテクストID(WID1)を、引数として返す。ターミネータモジュールT−Aは、自らは提供する関数がないとして、有効な引数は返さない。   When the G-READY function is called from the DPC 131, the initiator module IA provides a stream read function according to the definition of the G-READY function described above, and sets the function pointer SR1 and its context ID (RID1). It is returned to the DPC 131 as a valid argument. The member module M-E does not return a valid argument because it does not have a function to provide. The member module M-H provides a stream read function and a stream write function. The pointer SR2 for the downstream side, its context ID (RID2), the pointer SW1 for the upstream side, and its context ID (WID1) are used as arguments. return. The terminator module TA does not return a valid argument because it does not have a function to provide.

DPC131は、これらの引数を受け取った後、データ処理に必要なタイミングで、各モジュールに対して、START-J関数を呼び出すことで、データ処理の開始を指示する。このとき、START-J関数には、次の引数[U1,IU1,V1,IV1]が与えられる。この引数の内容は次の通りである。
(1)U1:モジュールが、使用するストリームリード関数のポインタを与える。このストリームリード関数のポインタは、上流側に位置しRPを有するイニシエータモジュール又はメンバモジュールが、提供するものである。WPを有するターミネータモジュール及びメンバモジュールは呼び出す際には、この引数をヌル(NULL)としなければならない。
(2)IU1:ストリームリード関数を利用するモジュールが指定すべきコンテクストIDである。このコンテクストIDは、上流側に位置しRPを有するイニシエータモジュール又はメンバモジュールが、提供するものである。WPを有するターミネータモジュールおよびメンバモジュールは呼び出す際には、この引数を値0としなければならない。
(3)V1:モジュールが、使用するストリームライト関数のポインタを与える。このストリームライト関数のポインタは、下流側に位置しWPを有するターミネータモジュールまたはメンバモジュールが、提供するものである。RPを有するイニシエータモジュールおよびメンバモジュールは呼び出す際には、この引数をヌル(NULL)としなければならない。
(4)IV1:ストリームライト関数を利用するモジュールが指定すべきコンテクストIDである。このコンテクストIDは、下流側に位置しWPを有するターミネータモジュールまたはメンバモジュールが、提供するものである。RPを有するイニシエータモジュールおよびメンバモジュールは呼び出す際には、この引数を値0としなければならない。
After receiving these arguments, the DPC 131 instructs each module to start data processing by calling a START-J function at a timing necessary for data processing. At this time, the following arguments [U1, IU1, V1, IV1] are given to the START-J function. The contents of this argument are as follows:
(1) U1: The module gives a pointer of a stream read function to be used. The pointer of the stream read function is provided by the initiator module or member module that is located upstream and has RP. When calling a terminator module and a member module having WP, this argument must be null.
(2) IU1: Context ID that should be specified by the module that uses the stream read function. This context ID is provided by an initiator module or member module having an RP located upstream. When calling a terminator module and a member module having WP, this argument must have a value of 0.
(3) V1: The module gives a pointer of the stream write function to be used. The pointer of the stream write function is provided by a terminator module or a member module having a WP located downstream. When calling an initiator module and a member module having an RP, this argument must be set to null.
(4) IV1: Context ID to be specified by the module using the stream write function. This context ID is provided by a terminator module or member module having a WP located downstream. When calling an initiator module and a member module having RP, this argument must have a value of 0.

上記の規則に従って、各モジュールに対してSTART-J関数の呼び出しの際に、引数が引き渡される。すなわち、ストリームリード関数については、上流側のモジュールが用意したポインタが下流側のモジュールに引き渡され、ストリームライト関数については、下流側のモジュールが用意したポインタが上流側のモジュールに引き渡される。この結果、図15の右側に示す通り、各モジュールは、ストリームリード関数を用いる場合には、下流側のモジュールが上流側のモジュールが用意したポインタを利用してデータを読み出し、ストリームライト関数を利用する場合には、上流側のモジュールが下流側のモジュールが用意したポインタを利用してデータを書き込む。こうして、各モジュールは、自らのデータを書き込んだり、相手のデータを読み出したりする条件について、DPC131により呼び出されるまで全く知らなくても、スムーズにデータのやりとりを行なうことができる。   According to the above rules, arguments are passed to each module when the START-J function is called. That is, for the stream read function, the pointer prepared by the upstream module is delivered to the downstream module, and for the stream write function, the pointer prepared by the downstream module is delivered to the upstream module. As a result, as shown on the right side of FIG. 15, when each module uses the stream read function, the downstream module reads data using the pointer prepared by the upstream module, and uses the stream write function. In this case, the upstream module writes data using the pointer prepared by the downstream module. In this way, each module can smoothly exchange data without knowing at all until it is called by the DPC 131 about the conditions for writing its own data or reading the data of the other party.

以上が、プリンタ15におけるソフトウェア群37の構成や機能についての説明である。次に、その構成や機能の下でプリンタ15において行われる処理流れの一例を説明する。   The above is the description of the configuration and functions of the software group 37 in the printer 15. Next, an example of a processing flow performed in the printer 15 under the configuration and function will be described.

図16乃至図18は、レガシー言語で記述されたコマンドを受信した後に特定言語で記述されたコマンドを受信した場合にプリンタ15で行われる一連の処理流れを示す。   FIGS. 16 to 18 show a series of processing flows performed by the printer 15 when a command described in a specific language is received after receiving a command described in a legacy language.

ホスト装置1からプリンタ15のI/F13がコマンドを受信した場合(S21)、IFD101が、ハーネス群325中のI/F13に対応したハーネス(以下、IFハーネス)303の第一のAPIをコールして、データ到着通知をIFハーネス303に送る(S22)。IFハーネス303は、複数のAPIを有しており、IFD101は、それら複数のAPIのうちS21の場合には第一のAPIをコールするように構成されている。   When the I / F 13 of the printer 15 receives a command from the host device 1 (S21), the IFD 101 calls the first API of the harness (hereinafter referred to as IF harness) 303 corresponding to the I / F 13 in the harness group 325. The data arrival notification is sent to the IF harness 303 (S22). The IF harness 303 has a plurality of APIs, and the IFD 101 is configured to call the first API in the case of S21 among the plurality of APIs.

IFハーネス303は、データ到着通知の受信に応答して、サービス323が有する一以上のAPIのうちの所定のAPIをコールし、データ到着通知をサービス323に送る(S23)。   In response to the reception of the data arrival notification, the IF harness 303 calls a predetermined API among one or more APIs of the service 323 and sends the data arrival notification to the service 323 (S23).

サービス323は、プリンタ15における印刷パスの排他を管理している。例えば、サービス323は、ダイレクト印刷のための印刷パスが構築されている場合には、他の印刷パスを構築しないようビジー状態になっておおり、どの印刷パスも構築されていない場合には、アイドル状態になっている。サービス323は、ビジー状態の場合には、コール元のIFハーネス303にエラーを返す。一方、サービス323は、アイドル状態の場合には、IFハーネス303の第二のAPIをコールして、印刷開始通知(コールバック関数)をIFハーネス303に送る(S24)。サービス323は、IFハーネス303からのデータ到着通知に対して印刷開始通知を出す場合にはIFハーネス303の第二のAPIをコールするように構成されている。第二のAPIがコールされると、その第二のAPIが実行されることにより、例えば以下のS25及びS28の処理が行われる。   The service 323 manages exclusion of print paths in the printer 15. For example, the service 323 is busy not to construct another print path when a print path for direct printing is constructed, and when no print path is constructed, Idle. When the service 323 is busy, the service 323 returns an error to the call source IF harness 303. On the other hand, if the service 323 is in the idle state, the service 323 calls the second API of the IF harness 303 and sends a print start notification (callback function) to the IF harness 303 (S24). The service 323 is configured to call the second API of the IF harness 303 when issuing a print start notification in response to the data arrival notification from the IF harness 303. When the second API is called, the second API is executed, and for example, the following processes of S25 and S28 are performed.

IFハーネス303は、印刷処理のIDと、その印刷処理のための印刷パスを構成するモジュールの確保要求とを、DPC131に出す(S25)。S21からS25の処理は、ホスト装置1からのコマンド受信に起因して行われたものであり、受信したコマンドは、レガシー言語で記述されている可能性が高い。そのため、このS25では、IFハーネス303は、印刷処理のIDとして、レガシー言語モード印刷をDPC131に通知する。   The IF harness 303 issues to the DPC 131 a print processing ID and a request for securing a module constituting a print path for the print processing (S25). The processing from S21 to S25 is performed due to command reception from the host device 1, and the received command is highly likely to be written in a legacy language. Therefore, in S25, the IF harness 303 notifies the legacy language mode printing to the DPC 131 as the ID of the printing process.

DPC131は、印刷処理IDの通知とモジュール確保要求とに応答して、受けた印刷処理IDに対応する印刷パス定義を、図13Cに例示した情報を参照することにより特定し、特定された印刷パス定義が表す印刷パスの構成にとりかかる。ここでは、DPC131は、印刷処理IDとしてレガシー言語モード印刷を受けるので、レガシーパスの構成にとりかかる。DPC131は、図13Cに例示した情報から、レガシーパスを構成するモジュールとして、データ取得モジュール103(イニシエータモジュールI−B)とレガシー言語処理モジュール105(ターミネータモジュールT−B)とを特定し、それぞれを、G-READY関数によって呼び出す(S26及びS27)。これにより、呼び出されたデータ取得モジュール103及びレガシー言語処理モジュール105は、「STAND-BY」状態から「READY」状態に遷移する。   In response to the print processing ID notification and the module securing request, the DPC 131 identifies the print path definition corresponding to the received print processing ID by referring to the information illustrated in FIG. 13C, and the identified print path Work on the configuration of the print path that the definition represents. Here, since the DPC 131 receives the legacy language mode printing as the print processing ID, it starts the configuration of the legacy path. The DPC 131 identifies the data acquisition module 103 (initiator module IB) and the legacy language processing module 105 (terminator module TB) as modules constituting the legacy path from the information illustrated in FIG. And G-READY function (S26 and S27). As a result, the called data acquisition module 103 and legacy language processing module 105 transition from the “STAND-BY” state to the “READY” state.

次に、IFハーネス303は、印刷処理の実行を、DPC131に要求する(S28)。DPC131は、その要求に応答して、データ取得モジュール103とレガシー言語処理モジュール105とに、START-J関数を送る(S29及びS30)。START-J関数を受けたデータ取得モジュール103及びレガシー言語処理モジュール105は、「READY」状態から「PROCESSING」状態に遷移する。これにより、レガシーパスが構築されたことになる。なお、この際、レガシー言語処理モジュール105は、PED107に対して排他要求を発行する。これより、PED107は、その後に別のモジュールから排他要求を受けても、排他状態を解除するまでは、その排他要求を受け付けない。   Next, the IF harness 303 requests the DPC 131 to execute the printing process (S28). In response to the request, the DPC 131 sends a START-J function to the data acquisition module 103 and the legacy language processing module 105 (S29 and S30). The data acquisition module 103 and the legacy language processing module 105 that have received the START-J function transition from the “READY” state to the “PROCESSING” state. As a result, a legacy path is constructed. At this time, the legacy language processing module 105 issues an exclusion request to the PED 107. Thus, even if the PED 107 subsequently receives an exclusion request from another module, the PED 107 does not accept the exclusion request until the exclusion state is released.

以降、印刷コマンドがレガシーパスに流れ込んできた場合には、印刷コマンドがバッファ133に蓄積され、その印刷コマンドに基づく処理が行われる。例えば、レガシー言語処理モジュール105は、データ取得モジュール103にデータを要求し(S31−1)、それに応答して、データ取得モジュール103が、補助バッファ(例えばバッファ133よりも容量の少ないバッファ)134から、データ(例えば所定サイズ分(例えば一バイト)のデータ)を読み出し、読み出したデータをレガシー言語処理モジュール105に渡す(S31−4)。レガシー言語処理モジュール105は、そのデータに基づくコマンドをPED107に送る。このS31−1及びS31−4の処理が、繰り返される。なお、このS31−1及びS31−4の処理は、例えば、図15を参照して説明した方法で行われる。そのため、補助バッファ(例えば256バイトの容量を持ったバッファ)134は、データ取得モジュール103が有していても良い。また、データ取得モジュール103は、補助バッファ134にデータが無い場合には、IFD101にデータを要求し(S31−2)、IFD101が、バッファ133からデータを取得し、取得したデータをデータ取得モジュール103に渡すことができる。   Thereafter, when the print command flows into the legacy path, the print command is accumulated in the buffer 133, and processing based on the print command is performed. For example, the legacy language processing module 105 requests data from the data acquisition module 103 (S31-1), and in response, the data acquisition module 103 receives data from the auxiliary buffer (for example, a buffer having a smaller capacity than the buffer 133) 134. , Data (for example, data of a predetermined size (for example, 1 byte)) is read, and the read data is passed to the legacy language processing module 105 (S31-4). The legacy language processing module 105 sends a command based on the data to the PED 107. The processes of S31-1 and S31-4 are repeated. Note that the processes of S31-1 and S31-4 are performed, for example, by the method described with reference to FIG. Therefore, the auxiliary buffer (for example, a buffer having a capacity of 256 bytes) 134 may be included in the data acquisition module 103. Further, when there is no data in the auxiliary buffer 134, the data acquisition module 103 requests data from the IFD 101 (S31-2), the IFD 101 acquires data from the buffer 133, and the acquired data is stored in the data acquisition module 103. Can be passed to.

レガシー言語処理モジュール105は、S31−4により取得されたコマンドを解析し、その解析結果に基づく処理を行う。例えば、レガシー言語処理モジュール105により、特定モード移行コマンドが検出されるまでは、例えば、前述した仕様情報をホスト装置1に通知することや、図12の段階A〜段階Eまでの処理が行われる。   The legacy language processing module 105 analyzes the command acquired in S31-4 and performs processing based on the analysis result. For example, until the specific language transition command is detected by the legacy language processing module 105, for example, the above-described specification information is notified to the host device 1, and the processing from the stage A to the stage E in FIG. .

S31−1及びS31−4の処理が繰り返し行われている間も、印刷コマンド(ストリーム)が流れ込んできた場合には、バッファ133にその印刷コマンドは蓄積される。これは、レガシー言語ではなく特定言語で書かれた印刷コマンドが流れ込んできた場合も同様である。レガシー言語処理モジュール105が所定のコマンド(例えばレガシージョブ終了コマンド又は特定モード移行コマンド)を検出するまで、図17に示すように、S31−1〜S31−4の処理が行われる(S32−1〜S32−4)。   If a print command (stream) flows while the processes of S31-1 and S31-4 are repeatedly performed, the print command is accumulated in the buffer 133. The same applies to a case where a print command written in a specific language instead of a legacy language is introduced. Until the legacy language processing module 105 detects a predetermined command (for example, a legacy job end command or a specific mode shift command), the processing of S31-1 to S31-4 is performed as shown in FIG. 17 (S32-1 to S32-1). S32-4).

S32−4において、レガシー言語処理モジュール105は、特定モード移行コマンドを検出した場合には、IFハーネス303の第三のAPIをコールし、RGB画像の印刷開始をIFハーネス303に通知する(S33)。すなわち、レガシーパスからRGB印刷パスへの切り替えのための処理が開始される。ここでは、データ取得モジュール103が、レガシー言語処理モジュール105から所定の通知を受け、それに応答して、IFハーネス303の第三のAPIをコールし、RGB画像の印刷開始をIFハーネス303に通知しても良い。第三のAPIは、コマンドの検出に応答してコールされるAPIなので、第一のAPIと類似した構成とすることができる。   In S32-4, when detecting the specific mode transition command, the legacy language processing module 105 calls the third API of the IF harness 303 and notifies the IF harness 303 of the start of RGB image printing (S33). . That is, processing for switching from the legacy path to the RGB print path is started. Here, the data acquisition module 103 receives a predetermined notification from the legacy language processing module 105, and in response, calls the third API of the IF harness 303 to notify the IF harness 303 of the start of RGB image printing. May be. Since the third API is an API that is called in response to detection of a command, the third API can be configured similarly to the first API.

RGB画像の印刷開始通知を受けたIFハーネス303は、図16のS25及びS28と実質的に同様の処理を行うことができる(S34及びS37)。   The IF harness 303 that has received the RGB image printing start notification can perform substantially the same processing as S25 and S28 in FIG. 16 (S34 and S37).

すなわち、IFハーネス303は、印刷処理のIDと、その印刷処理のための印刷パスを構成するモジュールの確保要求(例えば「LockProcess−RGB印刷パス」)を、DPC131に出す(S34)。IFハーネス303は、RGB画像の印刷開始通知を受けたので、印刷処理のIDとして、特定言語モード印刷をDPC131に通知する。   That is, the IF harness 303 issues a print processing ID and a request for securing a module constituting a print path for the print processing (for example, “LockProcess-RGB print path”) to the DPC 131 (S34). Since the IF harness 303 receives the RGB image printing start notification, it notifies the DPC 131 of the specific language mode printing as the ID of the printing process.

DPC131は、印刷処理IDとして特定言語モード印刷を受けるので、RGB印刷パスの構成にとりかかる。DPC131は、図13Cに例示した情報から、RGB印刷パスを構成するモジュールとして、特定言語処理モジュール113(イニシエータモジュールI−A)、色変換/ハーフトーニング処理モジュール115(メンバモジュールM−E)、インターレース処理モジュール117(メンバモジュールM−H)及び印刷処理モジュール119(ターミネータモジュールT−A)を特定し、それぞれを、G-READY関数によって呼び出す(S35及びS36)。   Since the DPC 131 receives the specific language mode printing as the print processing ID, the DPC 131 starts to configure the RGB print path. Based on the information illustrated in FIG. 13C, the DPC 131 uses the specific language processing module 113 (initiator module IA), the color conversion / halftoning processing module 115 (member module ME), and the interlace as modules constituting the RGB print path. The processing module 117 (member module MH) and the print processing module 119 (terminator module TA) are specified, and each is called by the G-READY function (S35 and S36).

次に、IFハーネス303は、印刷処理の実行(例えば「StartProcess−RGB印刷パス」)を、DPC131に要求する(S37)。DPC131は、その要求に応答して、各モジュール113、115、117及び119に、START-J関数を送る(S38及びS39)。START-J関数を受けた各モジュール113、115、117及び119は、「READY」状態から「PROCESSING」状態に遷移する。これにより、RGB印刷パスが構築されたことになる。なお、この際、RGB印刷パスのイニシエータとなる印刷処理モジュール119は、レガシーパスのイニシエータのように、PED107に対して排他要求を発行することは行わずに、データを送るようにする。なぜなら、レガシーパスの構築によって既にPED107の確保はできているので、排他要求を発行せずとも、PED107にデータを受け取ってもらえ、且つ、わざわざ排他要求を発行しても、PED107は前述したように既に別のイニシエータによって確保済みなので、その排他要求を受け付けてもらえないからである。   Next, the IF harness 303 requests the DPC 131 to execute a printing process (for example, “StartProcess-RGB printing pass”) (S37). In response to the request, the DPC 131 sends a START-J function to each of the modules 113, 115, 117, and 119 (S38 and S39). The modules 113, 115, 117, and 119 that have received the START-J function transition from the “READY” state to the “PROCESSING” state. Thereby, the RGB printing path is constructed. At this time, the print processing module 119 serving as the initiator of the RGB print path sends data without issuing an exclusive request to the PED 107 unlike the initiator of the legacy path. Because the PED 107 has already been secured by the construction of the legacy path, the PED 107 can receive the data without issuing the exclusive request, and the PED 107 can issue the exclusive request as described above. This is because the exclusion request is not accepted because it has already been secured by another initiator.

本実施形態では、印刷パスを構築しようとするタイミング(換言すれば、DPC131から各モジュールのAPI(G-READY、START-J等)が呼ばれるタイミング)で、DPCが、その印刷パス(例えばレガシーパスやRGB印刷パス)を構成する各モジュールに、印刷パスを表す情報(つまりデータ処理経路の情報)を伝える。具体的には、例えば、DPC131は、呼び出すAPIの引数に印刷パス情報を入れてそのAPIをコールする。印刷パス情報としては、例えば、該印刷パス情報の提供先となるモジュールの最も近くに位置する上流側及び下流側のうちの少なくとも一方のモジュールのIDとすることができる。   In the present embodiment, at the timing when the print path is to be constructed (in other words, when the API (G-READY, START-J, etc.) of each module is called from the DPC 131), Information representing the print path (that is, information on the data processing path) is transmitted to each module constituting the RGB print path). Specifically, for example, the DPC 131 calls the API by putting print path information in the argument of the API to be called. The print path information can be, for example, the ID of at least one of the upstream and downstream modules located closest to the module that provides the print path information.

S39までの処理が完了すると、レガシーパスの切り替え先となるRGB印刷パスが構築される。図16〜図18の処理流れ例では、RGB印刷パスは、プリンタ15において特定モード移行コマンドが検出されたときに、構築される。   When the processing up to S39 is completed, an RGB print path as a legacy path switching destination is constructed. In the processing flow examples of FIGS. 16 to 18, the RGB print path is established when a specific mode transition command is detected in the printer 15.

RGB印刷パスが構築されたならば、図17に点線枠703で示すように、前述した特定モードの実行(換言すれば、図12の段階G〜段階Mまでの処理)が可能となる。特定モードにおいて、図16〜図18の処理流れ例では、RGB印刷パスのイニシエータ(つまり特定言語処理モジュール113)は、レガシーパスのターミネータ(つまりレガシー言語処理モジュール)105からデータをもらい、そのデータを、下流へ流す。具体的には、例えば、特定言語処理モジュール113は、例えば、レガシー言語処理モジュール105にデータを要求する(S40)。レガシー言語処理モジュール105は、データ取得モジュール103にデータを要求し(S41−1)、それに応答して、データ取得モジュール103が、補助バッファ134から、データ(コマンド)を読み出し、読み出したデータをレガシー言語処理モジュール105に渡す(S41−4)。必要に応じて、図16のS31−2及びS31−3と同様の処理が行われる(S41−2及びS41−3)。レガシー言語処理モジュール105は、データ取得モジュール103からのデータを特定言語処理モジュール113に渡す(S42)。特定言語処理モジュール113は、渡されたデータ(特定言語で書かれたコマンド)を解析し、そのコマンドに基づく処理を実行する。渡されたものがRGBデータの場合、特定言語処理モジュール113は、取得したRGBデータを下流のモジュールに流す(S43)。流されたRGBデータは、各メンバモジュール115、117によって、色変換、ハーフトーニング及びインターレース等の処理が施される。それらの処理が施されたRGBデータに基づいて、印刷処理モジュール119によって、PED107の制御コマンドが作られ、その制御コマンドが、PED107に送られる(S44)。   If the RGB print path is constructed, the specific mode described above can be executed (in other words, the processes from stage G to stage M in FIG. 12) as indicated by the dotted frame 703 in FIG. In the specific mode, the RGB print path initiator (that is, the specific language processing module 113) receives data from the legacy path terminator (that is, the legacy language processing module) 105 in the processing flow examples of FIGS. , Flow downstream. Specifically, for example, the specific language processing module 113 requests data from, for example, the legacy language processing module 105 (S40). The legacy language processing module 105 requests data from the data acquisition module 103 (S41-1). In response, the data acquisition module 103 reads data (command) from the auxiliary buffer 134, and the read data is legacy. It is passed to the language processing module 105 (S41-4). If necessary, the same processing as S31-2 and S31-3 in FIG. 16 is performed (S41-2 and S41-3). The legacy language processing module 105 passes the data from the data acquisition module 103 to the specific language processing module 113 (S42). The specific language processing module 113 analyzes the passed data (command written in a specific language) and executes processing based on the command. If the passed data is RGB data, the specific language processing module 113 passes the acquired RGB data to the downstream module (S43). The passed RGB data is subjected to processing such as color conversion, halftoning, and interlacing by the member modules 115 and 117. Based on the RGB data subjected to such processing, the print processing module 119 creates a control command for the PED 107 and sends the control command to the PED 107 (S44).

レガシー言語処理モジュール105と特定言語処理モジュール113との間でデータの授受を可能にするために、モジュール105及び113は、イニシエータ又はターミネータであっても、メンバモジュールと実質的に同様の構成(つまり、上流側に対する機能と下流側に対する機能との双方を有する構成)になっていてもよい。   In order to enable data exchange between the legacy language processing module 105 and the specific language processing module 113, the modules 105 and 113 may be configured as substantially the same as the member modules even if they are initiators or terminators (that is, , A configuration having both a function for the upstream side and a function for the downstream side).

上記のように、特定モードになった場合、レガシー言語処理モジュール105は、取得されるコマンドを全く解析することなく、特定言語処理モジュール113にコマンドを流す。このため、レガシー言語処理モジュール105は、特定モードの実行中に、特定モードの解除を意味するレガシー移行コマンドが流れてきても、それを検出せずに、そのレガシー移行コマンドを特定言語処理モジュール113に流す。特定言語モジュール113は、そのレガシー移行コマンドを検出する。また、そのレガシー移行コマンドは、より下流に流れて、下流側のモジュール115、117及び119のうちの少なくとも一つも検出しても良い。また、この検出は、上流側から下流側にかけて順次に行われても良い。特定モードの解除を検出したモジュール(例えば113、115、117及び119)は、例えばその解除が検出された順に、DPC131に、特定モード解除通知(例えば「EndJob」)を出す(S45、S46)。各モジュール113、115、117及び119は、この場合に、「PROCESSING」状態から「READY」状態になることができる。   As described above, when the specific mode is entered, the legacy language processing module 105 sends the command to the specific language processing module 113 without analyzing the acquired command at all. Therefore, the legacy language processing module 105 does not detect the legacy migration command even if a legacy migration command meaning cancellation of the specific mode flows during execution of the specific mode, and sends the legacy migration command to the specific language processing module 113. Shed. The specific language module 113 detects the legacy migration command. Further, the legacy migration command may flow further downstream and detect at least one of the downstream modules 115, 117, and 119. Further, this detection may be performed sequentially from the upstream side to the downstream side. The modules (for example, 113, 115, 117, and 119) that have detected the release of the specific mode issue a specific mode release notification (for example, “EndJob”) to the DPC 131, for example, in the order in which the release was detected (S45, S46). In this case, each of the modules 113, 115, 117, and 119 can change from the “PROCESSING” state to the “READY” state.

各モジュールから特定モード解除通知を受けたDPC131は、IFハーネス303の第四のAPIをコールし、特定モードの解除のための処理要求(例えば「StartProcess−RGB印刷パス−コールバック」)を、IFハーネス303に出す(S47)。   The DPC 131 that has received the specific mode cancellation notification from each module calls the fourth API of the IF harness 303 and sends a processing request for canceling the specific mode (for example, “StartProcess-RGB printing pass-callback”) to the IF It takes out to the harness 303 (S47).

IFハーネス303は、S37で印刷処理の実行を要求してから、コールされるまで待ち状態となっている。その状態において、IFハーネス303は、特定モードの解除のための処理要求を受けた場合、DPC131の所定のAPIをコールし、特定モードの解除処理の要求(例えば「RelaeseProcess−RGB印刷パス)を出す(S48)。DPC131は、その要求に応答して、RGB印刷パスを構成する各モジュール113、115、117及び119に、キャンセル要求(例えば「CancelReady」)を出す(S49及びS50)。このキャンセル要求は、特定モード解除通知を受信した順序と同じ順序で発行することができる。各モジュール113、115、117及び119は、その要求に応答して、「READY」状態から「STAND-BY」状態になることができる。これにより、RGB印刷パスが解除される。換言すれば、RGB印刷パスがなくなる。   The IF harness 303 waits until it is called after requesting execution of the printing process in S37. In this state, when the IF harness 303 receives a processing request for canceling the specific mode, the IF harness 303 calls a predetermined API of the DPC 131 and issues a request for canceling the specific mode (for example, “RelaeseProcess-RGB printing pass”). (S48) In response to the request, the DPC 131 issues a cancel request (for example, “CancelReady”) to each of the modules 113, 115, 117, and 119 constituting the RGB print path (S49 and S50). This cancel request can be issued in the same order as the order in which the specific mode release notification is received. Each module 113, 115, 117 and 119 can go from a “READY” state to a “STAND-BY” state in response to the request. As a result, the RGB print path is canceled. In other words, there is no RGB print path.

また、IFハーネス303は、レガシー言語処理モジュール105に、特定モードの解除通知を出す(S51)。レガシー言語処理モジュール105は、その解除通知を受けてからは、再び、データ取得モジュール103から渡されるデータ(コマンド)の解析を行う。すなわち、例えば、図16のS31−1〜S31−4の処理が行われる(S52−1〜S52−4)。   Further, the IF harness 303 issues a specific mode release notification to the legacy language processing module 105 (S51). After receiving the release notification, the legacy language processing module 105 analyzes the data (command) delivered from the data acquisition module 103 again. That is, for example, the processing of S31-1 to S31-4 in FIG. 16 is performed (S52-1 to S52-4).

補助バッファ134が空になった場合、データ取得モジュール103が、IFD101にデータを要求する。しかし、バッファ133も空になっていれば、データはデータ取得モジュール103には送られて来ない(例えば、バッファ133が空になっていることを意味する通知がIFD101からデータ取得モジュール103に送られる)。   When the auxiliary buffer 134 becomes empty, the data acquisition module 103 requests data from the IFD 101. However, if the buffer 133 is also empty, the data is not sent to the data acquisition module 103 (for example, a notification indicating that the buffer 133 is empty is sent from the IFD 101 to the data acquisition module 103. ).

この場合には、レガシーパスも解除され、プリンタ15からレガシーパスが無くなる。具体的には、例えば、バッファ133が空になったことは、まず、データ取得モジュール103で検出され、レガシーモード解除通知(例えば「EndJob」)が、データ取得モジュール103からDPC131に送られる(S53)。その後、バッファ133が空になったことが、データ取得モジュール103からレガシー言語処理モジュール105に通知されて、レガシー言語処理モジュール105でも検出され、レガシーモード解除通知(例えば「EndJob」)が、レガシー言語処理モジュール105からDPC131に送られる(S54)。   In this case, the legacy path is also released, and the legacy path disappears from the printer 15. Specifically, for example, the fact that the buffer 133 is empty is first detected by the data acquisition module 103, and a legacy mode release notification (eg, “EndJob”) is sent from the data acquisition module 103 to the DPC 131 (S53). ). Thereafter, the fact that the buffer 133 is emptied is notified from the data acquisition module 103 to the legacy language processing module 105 and is also detected by the legacy language processing module 105, and the legacy mode release notification (for example, “EndJob”) is sent to the legacy language processing module 105. The data is sent from the processing module 105 to the DPC 131 (S54).

レガシーパスの構成要素である全てのモジュール103及び105からレガシーモード解除通知を受けたDPC131は、IFハーネス303の第五のAPIをコールし、レガシーモードの解除のための処理要求(例えば「StartProcess−レガシーパス−コールバック」)を、IFハーネス303に出す(S55)。各モジュール103、105は、この場合に、「PROCESSING」状態から「READY」状態になることができる。   The DPC 131 that has received the legacy mode release notification from all the modules 103 and 105 that are components of the legacy path calls the fifth API of the IF harness 303 and requests a process for releasing the legacy mode (for example, “StartProcess− Legacy pass-callback ") is output to the IF harness 303 (S55). In this case, each of the modules 103 and 105 can change from the “PROCESSING” state to the “READY” state.

IFハーネス303は、レガシーモードの解除のための処理要求を受けた場合、DPC131の所定のAPIをコールし、レガシーモードの解除処理の要求(例えば「RelaeseProcess−レガシーパス)を出す(S56)。DPC131は、その要求に応答して、レガシーパスを構成するモジュール103及び105に対し、例えば、レガシーモード解除通知を受けた順序と同じ順序で、キャンセル要求(例えば「CancelReady」)を出す(S57及びS58)。各モジュール103、105は、その要求に応答して、「READY」状態から「STAND-BY」状態になることができる。これにより、レガシーパスが解除される。換言すれば、RGB印刷パスがなくなる。   When the IF harness 303 receives a processing request for releasing the legacy mode, the IF harness 303 calls a predetermined API of the DPC 131 and issues a request for releasing the legacy mode (for example, “RelaeseProcess-legacy path”) (S56). In response to the request, a cancellation request (for example, “CancelReady”) is issued to the modules 103 and 105 configuring the legacy path, for example, in the same order as the order of receiving the legacy mode cancellation notification (S57 and S58). ). In response to the request, each of the modules 103 and 105 can change from the “READY” state to the “STAND-BY” state. As a result, the legacy path is released. In other words, there is no RGB print path.

最後に、IFハーネス303は、印刷終了通知をサービス305に出す(S59)。これにより、サービス305は、排他を解除し、印刷処理の要求を受け付けることができる。例えば、サービス305は、印刷終了通知を受けるまでは、他の印刷処理要求(例えばダイレクト印刷のための要求)を別のハーネスから受けても、その印刷処理要求を受け付けないが、印刷終了通知を受けた後は、その印刷処理要求を受け付けることができる。   Finally, the IF harness 303 issues a print end notification to the service 305 (S59). As a result, the service 305 can cancel the exclusion and accept the print processing request. For example, the service 305 does not accept the print processing request even if another print processing request (for example, a request for direct printing) is received from another harness until the print end notification is received. After receiving, the print processing request can be received.

以上、上述した実施形態によれば、プリンタ15では、ホスト装置1から受信されるデータの種別に関わらず、とりあえずは全てレガシーパスでデータを受け、特定の種別のデータであるということがレガシーパスの特定の場所で検出された場合に、特定の種別のデータが、その特定の種別のデータを処理するための別の印刷パスに転送され、その別の印刷パスで処理される。これにより、レガシーパスそれ自体の構成を変更するといった大きな設計変更を行うことなく、特定の種別のデータを処理するための機能を設けることができる。   As described above, according to the above-described embodiment, the printer 15 receives the data in the legacy path for the time being regardless of the type of data received from the host device 1, and the legacy path means that the data is of a specific type. Is detected at a specific location, the data of a specific type is transferred to another print pass for processing the data of the specific type, and is processed by the other print pass. This makes it possible to provide a function for processing a specific type of data without making a major design change such as changing the configuration of the legacy path itself.

ところで、上述した実施形態について、以下のような幾つかの変形例が考えられる。以下、それについて説明する。   By the way, about the embodiment mentioned above, the following some modifications can be considered. This will be described below.

(1)第一の変形例。   (1) First modification.

図19は、本発明の一実施形態の第一変形例におけるプリンタドライバの構成例を示す。図20は、図19のプリンタドライバからデータを受信するプリンタにおける印刷パスの構成例を示す。   FIG. 19 shows a configuration example of a printer driver in a first modification of one embodiment of the present invention. FIG. 20 shows a configuration example of a print path in a printer that receives data from the printer driver of FIG.

この第一変形例は、レガシーパスと、RGBデータ処理するパスとが同時に使用される別の例に関わる。具体的には、この第一変形例では、プリンタドライバ21から送信されるRGBデータを、XHTML-Print(MIME Multiplexed)のRGBデータとすることができる。   This first modified example relates to another example in which a legacy path and a path for processing RGB data are used simultaneously. Specifically, in the first modification, the RGB data transmitted from the printer driver 21 can be RGB data of XHTML-Print (MIME Multiplexed).

しかし、単純に、RGBデータを、XHTML-PrintのRGBデータとしてしまうことは好ましくないと考えられる。なぜなら、第一に、XHTML-Printでは、処理対象として画像が参照されるため、プリンタ15がホスト装置1から別途その画像を読み込むことになり、それゆえ、プリンタ15が双方向通信を行う能力を持っていなければならず、双方向通信を行えないプリンタでは、XHTML-Printを実行できないからである。また、第二に、処理対象の画像のデータサイズは大きいこともあるので、ホスト装置1からの読み込みに長い時間がかかり、印刷速度が遅くなってしまうことがあり得るからである。   However, it is considered undesirable to simply convert RGB data into XHTML-Print RGB data. First, in XHTML-Print, since an image is referred to as a processing target, the printer 15 separately reads the image from the host device 1, and therefore the printer 15 has the capability of performing bidirectional communication. This is because XHTML-Print cannot be executed on a printer that must have it and cannot perform two-way communication. Second, since the data size of the image to be processed may be large, it takes a long time to read from the host apparatus 1 and the printing speed may be slow.

そこで、この第一変形例では、図19に示すように、プリンタドライバ21が、パッキング処理部390を備え、その処理部390により、参照される画像もパッキング(エンコード)し、XHTML-Printに関わるコマンドをストリームデータでプリンタに送るように構成されている。プリンタ15では、レガシーパスでそのストリームデータを受け、レガシーパスの特定の場所(例えばレガシー言語処理モジュール105)で、XHTML-Printに関わるコマンドであると検出された場合に、DPC131により、また別のRGB印刷パスが構築され、そのまた別のRGB印刷パスにより、XHTML-Printに関わるコマンドが処理される。また別のRGB印刷パスは、例えば、前述したRGB印刷パスの特定言語処理モジュール113と、色変換/ハーフトーニング処理モジュールとの間に、上流側から下流側かにかけて、MIME(Multipurpose Internet Mail Extension)に関する処理を行うMIME処理モジュール441と、XHTML-Printに関わる処理(例えばデコード)を行うXHTML-Print印刷処理モジュール443とを有する。   Therefore, in this first modification, as shown in FIG. 19, the printer driver 21 includes a packing processing unit 390, and the processing unit 390 also packs (encodes) the referenced image, and is related to XHTML-Print. A command is sent to the printer as stream data. When the printer 15 receives the stream data in the legacy path and detects a command related to XHTML-Print at a specific location (for example, the legacy language processing module 105) in the legacy path, the DPC 131 performs another process. An RGB print path is constructed, and commands related to XHTML-Print are processed by the other RGB print path. Another RGB printing path is, for example, MIME (Multipurpose Internet Mail Extension) between the specific language processing module 113 of the RGB printing path described above and the color conversion / halftoning processing module from the upstream side to the downstream side. A MIME processing module 441 that performs processing related to XHTML-Print, and an XHTML-Print printing processing module 443 that performs processing related to XHTML-Print (for example, decoding).

(2)第二の変形例。   (2) Second modification.

プリンタ15(例えば、その中のサービス323)は、レガシーパスしか構築されていないときは、ホストからのRGBデータを処理するためのRGB印刷パスとは別のRGB印刷パス(例えば、ダイレクト印刷のための印刷パス)を構築しても良い。その場合、PED107は、レガシーパスにより予約をかけられて排他状態となっているから、排紙はできないが、RGBデータを、印刷の直前の状態(例えばインターレース処理まで済んだ状態)にしてプリンタ記憶域33に一時記憶させておき、レガシーパスの解除後に、その記憶させておいたデータを読み込んで印刷してもよい。   When only the legacy path is constructed, the printer 15 (for example, the service 323 therein) is different from the RGB print path for processing RGB data from the host (for example, for direct printing). May be constructed. In this case, since the PED 107 is reserved by the legacy path and is in an exclusive state, it cannot be discharged, but the RGB data is stored in the printer in the state immediately before printing (for example, after the interlace processing is completed). Alternatively, the data may be temporarily stored in the area 33, and after the legacy pass is released, the stored data may be read and printed.

(3)第三の変形例。   (3) Third modification.

プリンタ15は、ホスト装置1から何かしらデータを受信した場合にレガシーパスを構築するが、その場合に(例えば、レガシーパスの構築と同じ(例えば実質的に同じ)タイミングで)、RGB印刷パスも構築しても良い。   The printer 15 constructs a legacy path when any data is received from the host device 1, but in that case (for example, at the same timing (for example, substantially the same) as the construction of the legacy path), the printer 15 also constructs an RGB print path. You may do it.

(4)第四の変形例。   (4) Fourth modification.

補助バッファ134が無く、バッファ133から読み出されたデータをレガシー言語処理モジュール105が受けても良い。その場合、特定モード移行コマンドが読み出されて、RGB印刷パスが構築されたならば、それ以降のデータは、特定言語処理モジュール113が、バッファ133から直接取得しても良い。また、特定言語処理モジュール113がバッファ133から直接データを取得するようになった場合には、プリンタ15は、所定のイベントが検出されるまで(例えば特定言語処理モード113が特定モードの解除を検出するまで)、レガシーパスを解除してもよく、そのイベントが検出された場合に、再度、レガシーパスを構築しても良い。   The legacy language processing module 105 may receive the data read from the buffer 133 without the auxiliary buffer 134. In that case, if the specific mode transition command is read and the RGB print path is constructed, the specific language processing module 113 may directly acquire the subsequent data from the buffer 133. When the specific language processing module 113 acquires data directly from the buffer 133, the printer 15 detects that a predetermined event is detected (for example, the specific language processing mode 113 detects the release of the specific mode). The legacy path may be released, and when the event is detected, the legacy path may be reestablished.

以上、本発明の好適な実施形態及び幾つかの変形例を説明したが、これらは本発明の説明のための例示であって、本発明の範囲をこれらの実施形態及び変形例にのみ限定する趣旨ではない。本発明は、他の種々の形態でも実施することが可能である。例えば、ホスト装置1とプリンタ15とは、インターネット等の通信ネットワークを介して接続され、プリンタ15は、その通信ネットワークを介してホスト装置1にデバイスIDや仕様情報を送信してもよい。また、例えば、プリンタ15に記憶されている優先順位のどこまでがユーザが許容できるレベルであるかを、プリンタ15の操作パネル或いはプリンタドライバ21等のユーザインタフェースを介してプリンタ15に設定し、プリンタ15は、設定された順位よりも高い順位の印刷条件に関するパラメータも変更しなければいけない場合には、印刷できないことを表す情報(更に、このパラメータを設定してくれれば印刷できるということを表す情報が含まれていても良い)をプリンタドライバ21に送信してもよい。   The preferred embodiments and some modifications of the present invention have been described above, but these are examples for explaining the present invention, and the scope of the present invention is limited only to these embodiments and modifications. Not the purpose. The present invention can be implemented in various other forms. For example, the host device 1 and the printer 15 may be connected via a communication network such as the Internet, and the printer 15 may transmit a device ID and specification information to the host device 1 via the communication network. Further, for example, the priority level stored in the printer 15 is set to the printer 15 via the operation panel of the printer 15 or the user interface such as the printer driver 21 to determine the level that the user can accept. If the parameters related to the printing conditions higher than the set order have to be changed, information indicating that printing cannot be performed (in addition, information indicating that printing can be performed if this parameter is set). (Which may be included) may be transmitted to the printer driver 21.

図1は、本発明の一実施形態に係るプリントシステムの構成例を示す。FIG. 1 shows a configuration example of a print system according to an embodiment of the present invention. 図2は、レイアウト管理テーブル61の構成例を示す。FIG. 2 shows a configuration example of the layout management table 61. 図3は、印刷方法管理テーブル63の構成例を示す。FIG. 3 shows a configuration example of the printing method management table 63. 図4は、本実施形態に係るプリントシステムにおいて行われる通信を処理するプロトコル層の構成例を示す。FIG. 4 shows a configuration example of a protocol layer for processing communication performed in the print system according to the present embodiment. 図5は、ソフトウェア群に含まれる複数のコンピュータプログラムと、複数のコンピュータプログラムにより構成される印刷パスを示す。FIG. 5 shows a plurality of computer programs included in the software group and a print path constituted by the plurality of computer programs. 図6は、プリンタ15に存在する複数の言語処理モードと言語処理モードの遷移の流れとを示す。FIG. 6 shows a plurality of language processing modes existing in the printer 15 and the flow of transition between language processing modes. 図7は、本実施形態に係るプリントシステムで行われる処理流れの概要の一部を示す。FIG. 7 shows a part of an outline of a processing flow performed in the printing system according to the present embodiment. 図8は、本実施形態に係るプリントシステムで行われる処理流れの概要の他の一部を示す。FIG. 8 shows another part of the outline of the processing flow performed in the printing system according to the present embodiment. 図9Aは、デバイスIDの構成例を示す。図9Bは、ホスト装置1に送信される仕様情報の構造の概念を表す。図9Cは、ホスト装置1に送信される仕様情報の具体例を示す。FIG. 9A shows a configuration example of the device ID. FIG. 9B represents the concept of the structure of specification information transmitted to the host device 1. FIG. 9C shows a specific example of the specification information transmitted to the host device 1. 図10は、印刷パラメータ選択画面80の構成例を示す。FIG. 10 shows a configuration example of the print parameter selection screen 80. 図11Aは、特定言語で記述されたコマンドのフォーマット例を示す。図11Bは、クラスフィールドに書かれるクラスの種類の一例を示す。FIG. 11A shows a format example of a command described in a specific language. FIG. 11B shows an example of the type of class written in the class field. 図12は、図8のS15の印刷処理で行われる具体的な処理流れの一例を示す。FIG. 12 shows an example of a specific processing flow performed in the printing process of S15 of FIG. 図13Aは、ソフトウェア群37の構成例を示す。図13Bは、DPC131がコントロールするモジュール群335の一例を示す。図13Cは、モジュールの配列を表す情報の構成例を示す。図13Dは、モジュールのステータスの遷移の様子を示す。FIG. 13A shows a configuration example of the software group 37. FIG. 13B shows an example of a module group 335 controlled by the DPC 131. FIG. 13C shows a configuration example of information indicating the arrangement of modules. FIG. 13D shows the status transition of the module. 図14Aは、各モジュールが有する機能を示す。図14Bは、イニシエータモジュール、メンバモジュール及びターミネータモジュールの各々が有する機能を示す。FIG. 14A shows the functions of each module. FIG. 14B shows functions of each of the initiator module, the member module, and the terminator module. 図15は、印刷パスにおけるデータ処理の流れの一例を示す。FIG. 15 shows an example of the data processing flow in the print pass. 図16は、レガシー言語で記述されたコマンドを受信した後に特定言語で記述されたコマンドを受信した場合にプリンタ15で行われる一連の処理流れの一部を示す。FIG. 16 shows a part of a series of processing flow performed by the printer 15 when a command written in a specific language is received after receiving a command written in a legacy language. 図17は、図16で示した流れの続きの流れを示す。FIG. 17 shows a continuation of the flow shown in FIG. 図18は、図17で示した流れの続きの流れを示す。FIG. 18 shows a continuation of the flow shown in FIG. 図19は、本発明の一実施形態の第一変形例におけるプリンタドライバの構成例を示す。FIG. 19 shows a configuration example of a printer driver in a first modification of one embodiment of the present invention. 図20は、図19のプリンタドライバからデータを受信するプリンタにおける印刷パスの構成例を示す。FIG. 20 shows a configuration example of a print path in a printer that receives data from the printer driver of FIG.

符号の説明Explanation of symbols

1…ホスト装置 3…インタフェース回路 5…入力装置 7…ディスプレイ画面 13…インタフェース回路 15…プリンタ 17…プロセッサ 19…ホスト記憶域 21…プリンタドライバ 22…アプリケーションソフト 31…印刷コントローラ 33…プリンタ記憶域 35…プロセッサ 37…ソフトウェア群 41…エンジンコントローラ 43…印刷エンジン 61…レイアウト管理テーブル 63…印刷方法管理テーブル 101…インタフェースドライバ(IFD) 103…データ取得モジュール 105…レガシー言語処理モジュール 107…印刷エンジンドライバ(PED) 113…特定言語処理モジュール 115…色変換/ハーフトーニング処理モジュール 117…インターレース処理モジュール 119…印刷処理モジュール
DESCRIPTION OF SYMBOLS 1 ... Host apparatus 3 ... Interface circuit 5 ... Input device 7 ... Display screen 13 ... Interface circuit 15 ... Printer 17 ... Processor 19 ... Host storage area 21 ... Printer driver 22 ... Application software 31 ... Print controller 33 ... Printer storage area 35 ... Processor 37 ... Software group 41 ... Engine controller 43 ... Print engine 61 ... Layout management table 63 ... Printing method management table 101 ... Interface driver (IFD) 103 ... Data acquisition module 105 ... Legacy language processing module 107 ... Print engine driver (PED) 113 ... Specific language processing module 115 ... Color conversion / halftoning processing module 117 ... Interlace processing module 119 ... Print processing module

Claims (9)

データ種類を特定することができるネゴシエーション無しでデータの入力を受け、第一種のデータを処理する第一のデータ処理経路と、
前記第一のデータ処理経路に備えられ、該第一のデータ処理経路に入力されたデータが第二種のデータであるかどうかを判断する判断手段と、
前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断されるまで、第二種のデータを処理する第二のデータ処理経路は構築されておらず、前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断された場合に、前記第二のデータ処理経路を構築する手段と
を備えるデータ処理装置。
A first data processing path that receives data input without negotiation that can specify the data type and processes the first type of data;
A determination means provided in the first data processing path, for determining whether the data input to the first data processing path is a second type of data;
Until the data input to the first data processing path is determined to be the second type of data, the second data processing path for processing the second type of data has not been established, and the first A data processing apparatus comprising: means for constructing the second data processing path when it is determined that the data input to the data processing path is the second type of data.
データの入力を受け付ける複数のインタフェース手段と、
前記複数のインタフェース手段のうちの所定のインタフェース手段で前記ネゴシエーション無しにデータが入力された場合に、前記第一のデータ処理経路を構築する手段と
を更に備える請求項記載のデータ処理装置。
A plurality of interface means for accepting data input;
Given when the data is input without the negotiation interface means, the data processing apparatus of claim 1, further comprising a means for constructing said first data processing path of the plurality of interface means.
前記第二のデータ処理経路が構築された後に入力されたデータの種類が前記第二種のデータであるかどうかを判断する手段と、
前記入力されたデータの種類が前記第二種のデータでないと判断された場合に、前記第二のデータ処理経路を解除する手段と、
前記第二のデータ処理経路が解除された後、データの入力が検出されなくなった場合に、前記第一のデータ処理経路を解除する手段と
を更に備える請求項1記載のデータ処理装置。
Means for determining whether the type of data input after the second data processing path is constructed is the second type of data;
If the type of data that is the input is determined not to be data of the second kind, and means for releasing the second data processing route of
After the second data processing path is released, when the input data is not detected, the data processing apparatus further comprising claim 1, wherein the means for releasing the first data processing route.
前記第二のデータ処理経路が構築されても、前記第一のデータ処理経路を構築されたままにする手段、
を更に備える請求項1記載のデータ処理装置。
Means for leaving the first data processing path constructed even when the second data processing path is constructed ;
The data processing apparatus according to claim 1, further comprising:
前記データ処理装置に入力されたデータを蓄積するバッファと、
前記バッファに蓄積されたデータを前記第一のデータ処理経路に入力する手段と
を備え、
前記判断手段が、前記バッファから読み出されたデータが第二種のデータであるかどうかを判断し、
前記バッファから読み出されたデータが第二種のデータであると判断された場合に、前記入力する手段が、前記バッファに蓄積されたデータを前記第一のデータ処理経路に入力するのを止め、
前記構築された第二のデータ処理経路が、前記バッファからデータを取得する、
請求項1記載のデータ処理装置。
A buffer for accumulating data input to the data processing device;
Means for inputting the data accumulated in the buffer to the first data processing path;
The determination means determines whether the data read from the buffer is a second type of data;
When it is determined that the data read from the buffer is the second type of data, the input means stops inputting the data stored in the buffer to the first data processing path. ,
The constructed second data processing path obtains data from the buffer;
The data processing apparatus according to claim 1.
データ処理経路の構成要素となることができるプログラムモジュールを複数個記憶した記憶手段を更に備え、
前記第一のデータ処理経路と前記第二データ処理経路の各々は、前記複数個のプログラムモジュールの中から選択された、少なくとも、先頭に位置するイニシエータモジュールと、後尾に位置するターミネータモジュールとを含んだ二以上のプログラムモジュールで構成される、
請求項1記載のデータ処理装置。
It further comprises storage means for storing a plurality of program modules that can be constituent elements of the data processing path,
Each of the first data processing path and the second data processing path includes at least an initiator module located at the head and a terminator module located at the tail selected from the plurality of program modules. It consists of two or more program modules,
The data processing apparatus according to claim 1.
前記ネゴシエーション無しでデータの入力を受けた場合に、前記第一のデータ処理経路を構築する手段と、
前記ネゴシエーション有りでデータの入力を受けた場合に、前記第二のデータ処理経路を構築する手段と
を備える請求項1記載のデータ処理装置。
Means for constructing the first data processing path when data input is received without the negotiation;
The data processing apparatus according to claim 1, further comprising means for constructing the second data processing path when data input is received with the negotiation.
データソース装置とデータ処理装置とを備えたデータ処理システムであって、
データソース装置が、前記データ処理システムとの間で、データ種類を特定することができるネゴシエーション無しで第一種のデータと第二種のデータとのいずれかを前記データ処理装置に出力する手段を有し、
前記データ処理装置が、
前記ネゴシエーション無しでデータの入力を前記データソース機器から受け、第一種のデータを処理する第一のデータ処理経路と、
前記第一のデータ処理経路に備えられ、該第一のデータ処理経路に入力されたデータが第二種のデータであるかどうかを判断する判断手段と、
前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断されるまで、第二種のデータを処理する第二のデータ処理経路は構築されておらず、前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断された場合に、前記第二のデータ処理経路を構築する手段と
を備える、
データ処理システム。
A data processing system comprising a data source device and a data processing device,
Means for outputting either the first type data or the second type data to the data processing device without negotiation with which the data source device can specify the data type with the data processing system; Have
The data processing device is
A first data processing path for receiving data input from the data source device without the negotiation and processing the first type of data;
A determination means provided in the first data processing path, for determining whether or not the data input to the first data processing path is a second type of data;
Until the data input to the first data processing path is determined to be the second type of data, the second data processing path for processing the second type of data has not been established, and the first Means for constructing the second data processing path when it is determined that the data input to the data processing path is the second type of data,
Data processing system.
データ種類を特定することができるネゴシエーション無しで、第一種のデータを処理する第一のデータ処理経路にデータの入力を受けるステップと、
前記第一のデータ処理経路において、前記入力されたデータが第二種のデータであるかどうかを判断するステップと、
前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断されるまで、第二種のデータを処理する第二のデータ処理経路は構築されておらず、前記第一のデータ処理経路に入力されたデータが第二種のデータであると判断された場合に、前記第二のデータ処理経路を構築するステップと
を有するデータ処理方法。
Receiving data input to the first data processing path for processing the first type of data without negotiation capable of specifying the data type;
Determining whether the input data is second type data in the first data processing path;
Until the data input to the first data processing path is determined to be the second type of data, the second data processing path for processing the second type of data has not been established, and the first If the entered data to the data processing path is determined to be the second kind of data, the data processing method and a step of constructing the second data processing path.
JP2004373800A 2004-12-24 2004-12-24 Data processing apparatus and method Expired - Fee Related JP4449742B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004373800A JP4449742B2 (en) 2004-12-24 2004-12-24 Data processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004373800A JP4449742B2 (en) 2004-12-24 2004-12-24 Data processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2006180391A JP2006180391A (en) 2006-07-06
JP4449742B2 true JP4449742B2 (en) 2010-04-14

Family

ID=36734042

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004373800A Expired - Fee Related JP4449742B2 (en) 2004-12-24 2004-12-24 Data processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4449742B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4626298B2 (en) * 2004-12-24 2011-02-02 セイコーエプソン株式会社 Print control device, print system, printer
JP2010086555A (en) * 2010-01-12 2010-04-15 Seiko Epson Corp Printing control device, print system and printer
JP5614084B2 (en) * 2010-04-15 2014-10-29 セイコーエプソン株式会社 Information processing apparatus and information processing method
JP5587145B2 (en) 2010-11-15 2014-09-10 キヤノン株式会社 Client device, control method therefor, and bookbinding system
JP6060683B2 (en) * 2012-12-28 2017-01-18 カシオ電子工業株式会社 Printing method, information terminal device, and printing device
JP2023079524A (en) 2021-11-29 2023-06-08 ブラザー工業株式会社 Support program and printing system

Also Published As

Publication number Publication date
JP2006180391A (en) 2006-07-06

Similar Documents

Publication Publication Date Title
JP4626298B2 (en) Print control device, print system, printer
US7124212B2 (en) Data processing apparatus connected to a network connectable a plurality of devices
EP1448396B1 (en) Printing apparatus, control method therefor, and storage medium
AU2002334427A1 (en) Printing apparatus, control method therefor, and storage medium
US7295338B2 (en) Status information acquisition from plural functions included in image processing apparatus
US20040207869A1 (en) Image data transmitting device, and image data transmitting and receiving system
US20130235421A1 (en) Information processing apparatus, control method thereof, and storage medium storing program
JP4921190B2 (en) Printing control apparatus and method and printing system
JP4449742B2 (en) Data processing apparatus and method
JP2010086555A (en) Printing control device, print system and printer
US20020176108A1 (en) Printer with facsimile function capable of selectively printing fax data and selective printing method thereof
JP2003087536A (en) System and method for forming image
JP4072439B2 (en) Image processing apparatus, data communication method, and program
AU691762B2 (en) Data transmission apparatus
JP2005026774A (en) Facsimile communication system
JP4411189B2 (en) Print control apparatus, image forming system, and network communication method
US8320009B2 (en) Method, apparatus, and computer readable storage medium for predicting a data amount for image data prior to reading the image data
JP2002187315A (en) Printer and printing method
KR20050047764A (en) Printing system using preliminary set printing options and method thereof
KR20070075576A (en) Image forming system and image forming method
JP3936945B2 (en) Image forming apparatus and program
JP3213093B2 (en) Facsimile machine
JP3524309B2 (en) Image input / output device and image input / output method
KR100677160B1 (en) Method and apparatus for transmitting document in multi-function pheripheral
JP2005051441A (en) Color facsimile equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070727

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090903

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091006

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091125

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091208

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100118

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees