JP2785743B2 - Data processing device - Google Patents
Data processing deviceInfo
- Publication number
- JP2785743B2 JP2785743B2 JP7098955A JP9895595A JP2785743B2 JP 2785743 B2 JP2785743 B2 JP 2785743B2 JP 7098955 A JP7098955 A JP 7098955A JP 9895595 A JP9895595 A JP 9895595A JP 2785743 B2 JP2785743 B2 JP 2785743B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- determination
- language
- discrimination
- control
- 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
Links
Landscapes
- Accessory Devices And Overall Control Thereof (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、入力データを処理する
ことにより出力データを得るデータ処理装置に係り、特
にホストコンピュータなどの上位装置から受信したデー
タを記述する制御言語の種類を判別して、当該判別結果
に基づいて入力データを処理するデータ処理装置に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus which obtains output data by processing input data, and in particular, determines the type of control language describing data received from a host device such as a host computer. And a data processing device that processes input data based on the determination result.
【0002】[0002]
【従来の技術】従来、画像記録装置などにおいて、ホス
トコンピュータ等から受信した制御言語の種類を判別す
る手段として、特開平5−96823号公報及び特開平
5−147275号公報等に開示された技術があった。2. Description of the Related Art Conventionally, as means for determining the type of control language received from a host computer or the like in an image recording apparatus or the like, a technique disclosed in JP-A-5-96823 and JP-A-5-147275 has been proposed. was there.
【0003】特開平5−96823号公報によれば、制
御言語の種類毎、検索対象となるコード毎に重みを付け
たテーブルを用意し、入力された制御言語のコードが、
当該検索対象となるコードと一致すると、設定された重
みを制御言語の種類毎に加算し、加算された得点が基準
以上に達し、かつ最終的に最も大きい得点を示した制御
言語を選択する方法が開示されている。この方法は、2
番目との加算値の差がある点数以上になった時点又は判
別の対象となったデータ量が所定値以上に達した時点を
比較終了として確定判断を行うというものである。According to Japanese Patent Application Laid-Open No. 5-96823, a table is prepared in which weights are assigned for each type of control language and each code to be searched, and the code of the control language input is
When the code matches the code to be searched, the set weight is added for each type of control language, and the added score reaches a reference level or more, and a control language that finally shows the largest score is selected. Is disclosed. This method is 2
When the difference between the added value and the number of data exceeds a certain score or when the amount of data to be determined reaches a predetermined value or more, the determination is made as the end of comparison and the determination is made.
【0004】特開平5−147275号公報によれば、
受信バッファより所定量のデータ、例えば128バイト
のデータを取り出して判別処理を行い、この判別結果が
確定しない場合には、さらに128バイトのデータを取
り出して再判別を行うという技術が開示されている。According to Japanese Patent Application Laid-Open No. 5-147275,
A technique is disclosed in which a predetermined amount of data, for example, 128 bytes of data is extracted from a reception buffer and discrimination processing is performed. If the result of the determination is not determined, 128 bytes of data is further extracted and redetermined. .
【0005】[0005]
【発明が解決しようとする課題】しかしながら、上記従
来技術には、下記のような問題点があった。However, the above-mentioned prior art has the following problems.
【0006】特開平5−96823号公報に開示された
技術には、判別の対象となったデータ量が所定値以上に
達した時点で判別結果を確定する場合、その時点ではま
だ加算値の大小の判断がつかないこともあり得るので、
かかる場合には最適な制御言語の選択ができないおそれ
があった。[0006] The technique disclosed in Japanese Patent Application Laid-Open No. 5-96823 discloses a technique in which when the discrimination result is determined when the data amount to be discriminated reaches a predetermined value or more, the size of the added value is still small at that time. Because it may not be possible to judge
In such a case, there is a possibility that an optimal control language cannot be selected.
【0007】一方、特開平5−147275号公報に開
示された技術には、例えば1回目に128バイト読み出
して判別できなかった場合、2回目にそれ以降の128
バイトのデータが読み出されるため、複数バイトのコマ
ンドがその境界にまたがっているような場合、コマンド
が判別の対象として利用されず、最適な制御言語が選択
できないおそれがあった。On the other hand, the technique disclosed in Japanese Patent Application Laid-Open No. Hei 5-147275 includes, for example, when 128 bytes are read out for the first time and cannot be determined, the second 128 bytes thereafter.
Since byte data is read, if a command of a plurality of bytes straddles the boundary, the command is not used as a determination target, and there is a possibility that an optimum control language cannot be selected.
【0008】本発明は上記事実を考慮し、再度の判別の
対象として取得される入力データの範囲を好適化するこ
とにより、処理時間を短縮化すると共に、判別精度が優
れたデータ処理装置を提供することを目的とする。The present invention, in consideration of the above fact, provides a data processing apparatus which shortens the processing time by optimizing the range of input data acquired as a target of re-determination and which has excellent determination accuracy. The purpose is to do.
【0009】[0009]
【課題を解決するための手段】上記目的を達成するため
に、請求項1の発明は、入力データの所定範囲の判別デ
ータを取得するデータ取得手段と、このデータ取得手段
により得られた判別データに対して判別処理を実行する
ことにより、前記入力データを記述する制御言語の種類
を決定する判別手段と、この判別手段の判別処理により
制御言語の種類が決定できなかったとき、前記判別デー
タの最後の一部を包含する範囲の次の判別データを取得
するように前記データ取得手段を制御すると共に、前記
次の判別データに対して判別処理を実行するように前記
判別手段を制御する制御手段と、を含んで構成されてい
る。In order to achieve the above object, according to the present invention, there is provided a data acquisition means for acquiring discrimination data of a predetermined range of input data, and a discrimination data obtained by the data acquisition means. A determination means for determining the type of the control language describing the input data by executing the determination processing on the input data; and when the type of the control language cannot be determined by the determination processing of the determination means, Control means for controlling the data obtaining means so as to obtain the next determination data in a range including the last part, and controlling the determination means so as to execute a determination process on the next determination data And is configured.
【0010】請求項2の発明は、前記データ取得手段に
より取得されたデータがコマンド列の途中で終了してい
るか否かを判定するコマンド判定手段をさらに含み、請
求項1の前記制御手段が、このコマンド判定手段により
コマンド列の途中で判別データが終了していると判定さ
れた場合には、前記コマンド列の先頭から次の判別デー
タを取得するように前記データ取得手段を制御し、コマ
ンド列の最後で判別データが終了していると判定された
場合には、前記判別データの次から次の判別データを取
得するように前記データ取得手段を制御するようにした
ものである。[0010] The invention according to claim 2 further includes command determination means for determining whether or not the data acquired by the data acquisition means ends in the middle of a command sequence. If it is determined by the command determination means that the determination data has been completed in the middle of the command sequence, the data acquisition unit is controlled to obtain the next determination data from the beginning of the command sequence, and the command sequence If it is determined at the end of the determination that the determination data has been completed, the data acquisition means is controlled to acquire the next determination data from the next of the determination data.
【0011】請求項3の発明は、請求項1の前記制御手
段が、前記判別手段の判別処理により制御言語の種類が
決定できなかったとき、この判別処理において該当しな
いと判断された制御言語以外の制御言語の種類に基づい
て、前記データ取得手段に次に取得させるデータ量を決
定するようにしたものである。According to a third aspect of the present invention, when the control means of the first aspect cannot determine the type of the control language by the determination processing of the determination means, the control language other than the control language determined to be not applicable in the determination processing. The amount of data to be acquired next by the data acquisition means is determined based on the type of control language.
【0012】[0012]
【作用】請求項1の発明では、判別手段は、データ取得
手段により取得された入力データの所定範囲の判別デー
タに対して判別処理を実行することにより、入力データ
を記述する制御言語の種類を決定する。この判別手段の
判別処理により制御言語の種類が決定できなかったと
き、制御手段は、この判別データの最後の一部を包含す
る範囲の次の判別データを取得するようにデータ取得手
段を制御すると共に、再度取得された次の判別データに
対して判別処理を実行するように判別手段を制御する。According to the first aspect of the present invention, the discriminating means executes a discriminating process on discrimination data in a predetermined range of the input data acquired by the data acquiring means, thereby changing the type of the control language describing the input data. decide. When the type of the control language cannot be determined by the discriminating process of the discriminating unit, the control unit controls the data acquiring unit to acquire the next discriminating data in a range including the last part of the discriminating data. At the same time, it controls the determination means so as to execute the determination processing on the next determination data acquired again.
【0013】このように次に判別の対象となる判別デー
タを、先の判別データの最後の1部のデータを包含させ
るように取得することにより、従来のように、128バ
イト毎にデータを重複することなく取得する方法と比べ
て、入力データを構成するデータ列を寸断することによ
って生じる判別エラーを防止できる。In this manner, by obtaining the determination data to be determined next so as to include the last part of the previous determination data, the data is duplicated every 128 bytes as in the related art. As compared with the method of acquiring the input data without performing the determination, it is possible to prevent the determination error caused by cutting the data string constituting the input data.
【0014】なお、すべての先の判別データを包含し、
かつ、先頭が同じになるように次の判別データを取得す
る場合には、ソフトウェアが簡素化されるという効果が
ある。It should be noted that all preceding discrimination data are included,
In addition, when the next determination data is acquired such that the head is the same, there is an effect that the software is simplified.
【0015】請求項2の発明では、コマンド判定手段
は、データ取得手段により取得された判別データがコマ
ンド列の途中で終了しているか否かを判定する。制御手
段は、このコマンド判定手段によりコマンド列の途中で
判別データが終了していると判定された場合には、この
コマンド列の先頭から次の判別データを取得するように
データ取得手段を制御し、コマンド列の最後で判別デー
タが終了していると判定された場合には、先の判別デー
タの次から次の判別データを取得するようにデータ取得
手段を制御する。これにより、コマンド列が途中で終わ
っているような場合でも、後の判別では、当該コマンド
列の先頭から処理が開始されるので、コマンドエラーを
防ぐことができ、その結果、判別精度を向上させること
ができる。と同時に、コマンド列が寸断されなかった場
合には、先の入力データを重複して判別処理しないの
で、判別に要する処理時間を無用に延ばすこともなくな
る。According to the second aspect of the present invention, the command determining means determines whether the determination data obtained by the data obtaining means ends in the middle of the command sequence. The control means controls the data acquisition means to acquire the next determination data from the beginning of the command sequence when the command determination means determines that the determination data ends in the middle of the command sequence. If it is determined that the discrimination data has ended at the end of the command sequence, the data acquisition means is controlled so as to acquire the next discrimination data from the next to the previous discrimination data. Thus, even if the command sequence ends in the middle, in the subsequent determination, the processing is started from the beginning of the command sequence, so that a command error can be prevented, and as a result, the determination accuracy is improved. be able to. At the same time, if the command string is not cut, the input data is not redundantly determined, and the processing time required for the determination is not unnecessarily extended.
【0016】請求項3の発明では、制御手段は、判別手
段の判別処理により制御言語の種類が決定できなかった
とき、この判別処理において該当しないと判断された制
御言語以外の制御言語の種類に基づいて、データ取得手
段に次に取得させるデータ量を決定する。例えば、ワイ
ヤドットプリンタ関連の言語が残っている場合には、比
較的多くデータを取得し、ページ記述関連の言語が残っ
ている場合には、比較的少量のデータを取得する。これ
により、言語間に共通のテキスト出力が多く言語を特定
する為のコマンド出現頻度の低いワイヤドットプリンタ
言語でも判別可能となる確率を高められ、判別精度を向
上させることができる。また、ページ記述関連の制御言
語の場合には、特定のコマンドで特定しやすいため、判
定精度を下げることなく、データ取得にかかる時間を短
縮化することができる。According to the third aspect of the invention, when the type of the control language cannot be determined by the discriminating process of the discriminating unit, the control unit changes the control language type to a type of control language other than the control language determined not to be applicable in the discriminating process. Then, the data amount to be obtained next by the data obtaining means is determined. For example, if a language related to a wire dot printer remains, a relatively large amount of data is acquired. If a language related to a page description remains, a relatively small amount of data is acquired. As a result, it is possible to increase the probability that it is possible to determine even a wire dot printer language in which there is a large number of text outputs common to the languages and the frequency of appearance of a command for specifying the language is low, and the determination accuracy can be improved. Further, in the case of a control language related to page description, since it is easy to specify by a specific command, the time required for data acquisition can be reduced without lowering the determination accuracy.
【0017】[0017]
(第1実施例)以下、図面を参照して本発明の実施例を
詳細に説明する。図1に示すように、本発明の出力装置
としての画像記録装置11は、画像の記録を行う記録部
12、記録部12に画像情報を供給する画像供給装置1
3、電源部14、及び外部からの指示を入力するための
操作パネル15を備えている。(First Embodiment) An embodiment of the present invention will be described below in detail with reference to the drawings. As shown in FIG. 1, an image recording device 11 as an output device of the present invention includes a recording unit 12 that records an image, and an image supply device 1 that supplies image information to the recording unit 12.
3, a power supply unit 14, and an operation panel 15 for inputting external instructions.
【0018】記録部12は、例えばレーザプリンタ等か
ら構成され、画像供給装置13からの動作指令信号26
に基づき、画像供給装置13から供給された画像情報2
7を記録用紙23に印字出力(画像記録)する。この画
像記録を正常に実行させるために、記録部12は、図示
しないカセットトレイに収容された記録用紙23の種類
や図示しない定着部が定着温度に達したか否か等を示す
状態信号24を画像供給装置に13に送出する。また、
記録部12は、画像情報の転送について記録部12と同
期をとるための同期パルス25を画像供給装置13に送
出する。The recording section 12 is composed of, for example, a laser printer or the like, and has an operation command signal 26 from the image supply device 13.
Image information 2 supplied from the image supply device 13 based on
7 is printed out on a recording sheet 23 (image recording). In order to perform this image recording normally, the recording unit 12 sends a status signal 24 indicating the type of recording paper 23 stored in a cassette tray (not shown) and whether or not a fixing unit (not shown) has reached a fixing temperature. Send it to the image supply device 13. Also,
The recording unit 12 sends a synchronization pulse 25 for synchronizing the transfer of the image information with the recording unit 12 to the image supply device 13.
【0019】画像供給装置13には、ホストインターフ
ェイス端子17及び入力端子18が接続されている。ホ
ストインターフェイス端子17は、図示しないホストイ
ンターフェイスから印字データを入力させるための端子
であり、入力端子18は、図示しないネットワークから
印字データを入力させるための端子である。このホスト
インターフェイス端子17又は入力端子18を介して印
字データを2系統で入力することができる。なお、入力
端子18には、ネットワーク上の複数の装置が印字デー
タの供給源として接続される場合もある。A host interface terminal 17 and an input terminal 18 are connected to the image supply device 13. The host interface terminal 17 is a terminal for inputting print data from a host interface (not shown), and the input terminal 18 is a terminal for inputting print data from a network (not shown). Print data can be input in two systems via the host interface terminal 17 or the input terminal 18. A plurality of devices on the network may be connected to the input terminal 18 as a supply source of print data.
【0020】画像供給装置13は、記録部12から送ら
れてきた状態信号24及び同期パルス25に基づいて、
動作指令信号26を送出して記録部12を動作させると
共に、ホストインターフェイス端子17又は入力端子1
8から入力された印字データを画像情報27として記録
部12に送出して、画像記録を制御する。The image supply device 13 receives the status signal 24 and the synchronization pulse 25 sent from the recording unit 12 and
An operation command signal 26 is sent out to operate the recording unit 12, and the host interface terminal 17 or the input terminal 1
The print data input from 8 is sent to the recording unit 12 as image information 27 to control image recording.
【0021】操作パネル15は、キーやスイッチ等の入
力部と、液晶ディスプレイ(LCD)や発行ダイオード
(LED)等で構成された表示部とから構成され、オペ
レータの操作により画像供給装置13に記録に関する必
要な指示情報19を送出する。また、指示情報19を受
けた画像供給装置13から返送された応答情報21を表
示する。The operation panel 15 includes an input section such as keys and switches, and a display section including a liquid crystal display (LCD) and a light emitting diode (LED), and is recorded on the image supply device 13 by an operation of an operator. Necessary instruction information 19 is transmitted. Further, the response information 21 returned from the image supply device 13 that has received the instruction information 19 is displayed.
【0022】電源部14は、商用電源(AC)を所定の
直流又は交流に変換して、記録部12及び画像供給装置
13に電力を供給する。The power supply unit 14 converts a commercial power supply (AC) into a predetermined direct current or alternating current and supplies power to the recording unit 12 and the image supply device 13.
【0023】画像供給装置13は、図2に示すように、
各種制御の中枢的役割を果たすと共にシステムバス32
に接続されたCPU(中央処理装置)31を備えてい
る。システムバス32には、パネルI/F(インターフ
ェイス)回路33、ホストI/F回路34が接続されて
いる。The image supply device 13 is, as shown in FIG.
It plays a central role in various controls and has a system bus 32.
(Central processing unit) 31 connected to the CPU. A panel I / F (interface) circuit 33 and a host I / F circuit 34 are connected to the system bus 32.
【0024】パネルI/F回路33は、操作パネル15
とのインターフェイスをとるための回路であり、オペレ
ータが操作パネル15のキーを操作すると、これに対応
した信号が操作パネル15から出力され、パネルI/F
回路33を介してシステムバス32上を転送される。ま
た、システムバス32の表示情報は、パネルI/F回路
33を介して操作パネル15に転送され、表示が行われ
る。The panel I / F circuit 33 includes the operation panel 15
When an operator operates a key on the operation panel 15, a signal corresponding to the key is output from the operation panel 15 and the panel I / F
The data is transferred on the system bus 32 via the circuit 33. Further, the display information of the system bus 32 is transferred to the operation panel 15 via the panel I / F circuit 33 and displayed.
【0025】ホストI/F回路34は、ホストコンピュ
ータ等の上位装置とのインターフェイスをとるための回
路であり、例えば、ホストコンピュータから入力する印
字データをRS232C規格やセントロニクス準拠に基
づいて受信する回路で構成されている。The host I / F circuit 34 is a circuit for interfacing with a host device such as a host computer. For example, the host I / F circuit 34 receives print data input from the host computer based on the RS232C standard or Centronics. It is configured.
【0026】さらに、この画像供給装置13は、複数の
ホストインターフェイス端子を持つことが可能であり、
必要とするホストインターフェイスに合わせてホストI
/F回路35を増設できる。増設可能なインターフェイ
スとしては、例えば、セントロニクスインターフェイス
やイーサネット等がある。これにより、複数のホストイ
ンターフェイスから印字データを入力できる。Further, the image supply device 13 can have a plurality of host interface terminals,
Host I according to the required host interface
/ F circuit 35 can be added. Examples of interfaces that can be added include a Centronics interface and Ethernet. Thus, print data can be input from a plurality of host interfaces.
【0027】また、システムバス32には、不揮発性メ
モリ(NVM)37、RAM38、プログラムメモリ3
9、文字パターンメモリ41、記録部I/F回路43及
びビットマップコントローラ44が接続されている。A non-volatile memory (NVM) 37, a RAM 38, a program memory 3
9, a character pattern memory 41, a recording unit I / F circuit 43, and a bitmap controller 44 are connected.
【0028】NVM37は、図示しない電池によってバ
ックアップされたメモリであり、画像記録装置11自体
の電源がオフになった状態でも必要なデータを保持する
ことができる。The NVM 37 is a memory that is backed up by a battery (not shown) and can hold necessary data even when the power of the image recording apparatus 11 itself is turned off.
【0029】RAM38は、CPU31の作業用のメモ
リであり、画像記録装置11の各種の制御を行う上で必
要となるデータを保持する。また、RAM38は、ホス
トI/F回路34やホストI/F回路35から入力され
た印字データを一時的に保持する受信バッファとしても
機能する。なお、このRAM38には、発生した文字パ
ターン、イメージ等を記録用紙1ページに対応させて張
りつけて電子的な編集を行うためのビットデータを格納
するビットマップメモリ42が含まれている。The RAM 38 is a working memory of the CPU 31 and holds data necessary for performing various controls of the image recording apparatus 11. Further, the RAM 38 also functions as a reception buffer for temporarily holding print data input from the host I / F circuit 34 or the host I / F circuit 35. The RAM 38 includes a bitmap memory 42 for storing bit data for performing electronic editing by attaching the generated character patterns, images, and the like to one page of the recording paper.
【0030】プログラムメモリ39は、CPU31によ
る画像記録装置11の制御を行うためのプログラムを格
納したメモリである。なお、このプログラムメモリ39
に格納されているプログラムは、画像記録装置11の電
源がオンされた際に、CPU31により読み取られる。The program memory 39 is a memory in which a program for controlling the image recording apparatus 11 by the CPU 31 is stored. The program memory 39
Are read by the CPU 31 when the power of the image recording apparatus 11 is turned on.
【0031】文字パターンメモリ41は、プリントアウ
トを行う時の文字パターンを格納したメモリであり、い
わゆるフォントメモリと呼ばれるメモリである。The character pattern memory 41 is a memory for storing character patterns used for printing out, and is a so-called font memory.
【0032】記録部I/F回路43は、記録部12との
インターフェイスをとるための回路であり、例えば、ビ
ットマップメモリ42に展開されたビットデータを、画
像情報27として記録部12に供給したり、また、状態
信号24、同期パルス25及び動作指令信号26を送受
するインターフェイスとしての役割を有する。The recording unit I / F circuit 43 is a circuit for interfacing with the recording unit 12, and supplies, for example, bit data developed in the bit map memory 42 to the recording unit 12 as image information 27. It also has a role as an interface for transmitting and receiving the status signal 24, the synchronization pulse 25 and the operation command signal 26.
【0033】ビットマップコントローラ44は、ビット
マップメモリ42と記録部I/F回路43との間の画像
情報の転送に関する制御を行うための回路である。The bit map controller 44 is a circuit for controlling transfer of image information between the bit map memory 42 and the recording unit I / F circuit 43.
【0034】プログラムメモリ46及び文字パターンメ
モリ47は、それぞれプログラムメモリ39及び文字パ
ターンメモリ41と同様にプログラム及び文字パターン
を格納しておくためのメモリであるが、ユーザの要求に
合わせて選択的に画像記録装置11に接続できるように
なっている。プログラムメモリ46及び文字パターンメ
モリ47としては、着脱自在のICカード形式又はSI
MM形式のROM等を用いることができる。これによ
り、各種のホストコンピュータから送られてくる印字デ
ータや制御データに対応したプログラムや文字パターン
に幅広く対応可能となる。The program memory 46 and the character pattern memory 47 are memories for storing programs and character patterns in the same manner as the program memory 39 and the character pattern memory 41, respectively. It can be connected to the image recording device 11. As the program memory 46 and the character pattern memory 47, a removable IC card format or SI
An MM format ROM or the like can be used. As a result, programs and character patterns corresponding to print data and control data sent from various host computers can be widely supported.
【0035】ハードディスク48は、大量のデータを記
憶しておくための磁気記録装置であり、文字パターンの
追加、フォームデータ及びロゴデータの保存、ホストコ
ンピュータからの入力データの保存等に使用される。こ
のハードディスク48もユーザが必要に応じて接続する
ことが可能である。The hard disk 48 is a magnetic recording device for storing a large amount of data, and is used for adding a character pattern, storing form data and logo data, storing input data from a host computer, and the like. The hard disk 48 can also be connected by the user as needed.
【0036】次に、プロブラムメモリ39に記憶されて
いるプログラム、すなわちソフトウエアの構造を図3に
示す。図3に示すように、最下層には、ハードディスク
48等の各周辺機器を個別に制御するためのソフトウェ
ア群であるデバイス・ドライバーが位置している。Next, FIG. 3 shows a program stored in the program memory 39, that is, a software structure. As shown in FIG. 3, a device driver, which is a software group for individually controlling each peripheral device such as the hard disk 48, is located at the lowest layer.
【0037】次の階層には、OS(operating system)
が位置し、画像記録装置11を制御するソフトウェアの
中核的役割を果たしている。このOSは、タスク管理、
記憶管理、入出力管理等を行うことにより、CPU3
1、RAM38、各周辺機器等のハードウェアを管理す
る。また、ハードウェア資源の管理を土台として、ファ
イル管理、プログラム管理、通信制御等を行うことによ
り、ファイル、上位のプログラム等の論理資源を管理す
る。このような構成をとることによって、ハードウェア
の変更による上位の階層のソフトウェアの修正を最小化
できる。The next layer includes an operating system (OS).
And plays a core role in software for controlling the image recording device 11. This OS is task management,
By performing storage management, input / output management, and the like, the CPU 3
1. Manages hardware such as the RAM 38 and each peripheral device. Also, based on hardware resource management, file management, program management, communication control, and the like are performed to manage logical resources such as files and higher-order programs. By adopting such a configuration, it is possible to minimize the modification of the software in the upper layer due to the hardware change.
【0038】OSの上位には、制御用ライブラリー、ア
プリケーション・プログラム(application program )
が位置している。制御用ライブラリには、最上層にある
アプリケーション・プログラムに使用される制御用のプ
ログラム群が格納されている。Above the OS, a control library and an application program are provided.
Is located. The control library stores a group of control programs used for application programs in the uppermost layer.
【0039】アプリケーション・プログラムは、画像記
録装置11がユーザ所望の動作を実行するように作成さ
れた応用的なプログラムである。制御言語としてのプリ
ンタ言語を解釈し、画像に展開するデコンポーザは、こ
のアプリケーション・プログラムに属する。The application program is an application program created so that the image recording apparatus 11 executes a desired operation by the user. A decomposer that interprets a printer language as a control language and develops it into an image belongs to this application program.
【0040】図4に、アプリケーション・プログラムを
基本的な機能ブロックで示す。コントロール60はシス
テム全体の制御を行うもので、イン62及びアザーズ6
8からのジョブ開始の要求に基づいて、データプロセス
64及びアザーズ68を制御する。FIG. 4 shows an application program in basic functional blocks. The control 60 controls the entire system.
8 to control the data process 64 and the others 68 based on the job start request.
【0041】このコントロール60は、以下の(1)〜
(4)のモジュールから構成されている。なお、本実施
例では、コントロール60をシステム制御部と呼称す
る。 (1)システム・コントローラ 設定情報をチェック
し、各タスクを起動する。 (2)ジョブ・コントローラ ジョブを実行制御す
る。 (3)ページ・コントローラ ビットマップメモリを
管理する。 (4)タイマー・コントローラ メッセージによるタイ
マーを管理する。The control 60 includes the following (1) to
It consists of the module of (4). In this embodiment, the control 60 is called a system control unit. (1) System controller Checks setting information and starts each task. (2) Job controller The job controller controls the execution of the job. (3) Page controller Manages the bitmap memory. (4) Timer controller Manages timers by messages.
【0042】イン62は、ホストコンピュータとのデー
タの入出力を管理するものである。このような入出力を
行うため、イン62は、データプロセス64にデータを
受渡し、又はデータプロセス64からデータを受け取
る。さらに、データを受け渡したり、受け取ったりする
と、コントロール60にジョブの開始を要求する。The in 62 manages the input and output of data with the host computer. In order to perform such input / output, the IN 62 transfers data to or receives data from the data process 64. Further, when data is transferred or received, the control 60 requests the control 60 to start a job.
【0043】また、イン62は、例えば、以下のような
モジュールから構成されている。 (1)インターフェイスA ローカル・インターフェ
イスA (2)インターフェイスB ローカル・インターフェ
イスB (3)インターフェイスC ネットワーク・インター
フェイスC (4)インターフェイスD ネットワーク・インター
フェイスD (5)インターフェイスE ネットワーク・インター
フェイスE なお、ローカル・インターフェイスとしては、セントロ
ニクス、RS−232C等、ネットワーク・インターフ
ェイスとしては、イーサネット、ローカルトーク等が使
用できる。The in 62 is composed of, for example, the following modules. (1) Interface A Local interface A (2) Interface B Local interface B (3) Interface C Network interface C (4) Interface D Network interface D (5) Interface E Network interface E The local interface As the network interface, Ethernet, local talk, etc. can be used.
【0044】データプロセス64は、データを処理する
ものである。この処理すべきデータはイン62から受け
取ったデータであり、処理結果は、イン62又はアウト
66に受け渡す。The data process 64 is for processing data. The data to be processed is the data received from the IN 62, and the processing result is passed to the IN 62 or OUT 66.
【0045】また、データプロセス64は、本実施例で
規定する制御言語解釈部と同意語であり、本実施例で
は、デコンポーザと呼称する。The data process 64 is a synonym for the control language interpreter defined in this embodiment, and is called a decomposer in this embodiment.
【0046】デコンポーザは、データプロセス64とし
て実装され、下記の種類がある。これらは、それぞれ1
つ以上のタスクとして動作する。 (1)自動判別パーサ プリンタ言語(制御言
語)を判別するタスクである。 (2)言語Aデコンポーザ プリンタ言語A(製品ネ
イティブなページ記述言語)を解釈し実行するタスク群
である。 (3)言語Bデコンポーザ プリンタ言語B(業界標
準のページ記述言語)を解釈し実行するタスク群であ
る。 (4)言語Cデコンポーザ プリンタ言語C(X社開
発プロッタ制御言語)を解釈し実行するタスク群であ
る。 (5)言語Dデコンポーザ プリンタ言語D(Y社開
発ワイヤドットプリンタ制御言語)を解釈し実行するタ
スク群である。 (6)言語Eデコンポーザ プリンタ言語E(Z社開
発ワイヤドットプリンタ制御言語)を解釈し実行するタ
スク群である。 (7)ダンプ 16進ダンプの画像を形
成するタスクである。 (8)プリント・ユーテイ リテイ ・フォーマッタタスク 各種プリント・ユーティリティの画像を形成するタスク
である。The decomposer is implemented as a data process 64 and includes the following types. These are each 1
Work as one or more tasks. (1) Automatic determination parser This is a task for determining the printer language (control language). (2) Language A decomposer A task group that interprets and executes printer language A (product native page description language). (3) Language B decomposer This is a task group for interpreting and executing printer language B (an industry standard page description language). (4) Language C decomposer This is a task group for interpreting and executing the printer language C (plotter control language developed by Company X). (5) Language D decomposer A task group for interpreting and executing the printer language D (wire dot printer control language developed by Y Company). (6) Language E decomposer A task group for interpreting and executing the printer language E (wire dot printer control language developed by Company Z). (7) Dump This task forms a hexadecimal dump image. (8) Print Utility Formatter Task This is a task for forming images of various print utilities.
【0047】アウト66は、データプロセス64の処理
結果のデータを出力するものである。このアウト66
は、以下のモジュールから構成されている。 (1)エンジン・コントローラ プリンタエンジン
(記録部)を制御する。The output 66 outputs the data of the processing result of the data process 64. This out 66
Is composed of the following modules. (1) Engine controller Controls the printer engine (recording unit).
【0048】アザーズ68は、上述以外の他の各種機能
や複合的な機能を実行するものである。このアザーズ6
8は、以下のモジュールから構成されている。 (1)UI パネル15の制御を
行う。 (2)プリンタ管理エージェント ネットワークでのプ
リンタ管理システムを実現するための機能を有する。例
えば、クライアントに対して、プリンタ・リソース、状
態の設定、提供等の機能である。The others 68 execute various functions other than those described above and complex functions. This Others 6
8 is composed of the following modules. (1) The UI panel 15 is controlled. (2) Printer management agent The printer management agent has a function for realizing a printer management system on a network. For example, functions such as setting and providing printer resources and status to a client.
【0049】以上のように、アプリケーションプログラ
ムは、いくつかの構成要素からなり、各構成要素は、さ
らにいくつかの機能モジュールから構成されている。こ
れらの機能モジュールは実際には1つ又は複数のタスク
から構成されている。デコンポーザもいくつかのタスク
群を構成している。As described above, the application program is composed of several components, and each component is further composed of several functional modules. These functional modules are actually composed of one or more tasks. The decomposer also comprises several task groups.
【0050】これらのタスク群は、制御用ライブラリと
して用意されている様々な関数を使ってタスク間の同期
を取っている。デコンポーザも、制御用ライブラリを使
ってコントロール60、イン62及びアウト66を構成
するタスク群との同期を取りながらプリント機能を実現
している。These tasks are synchronized among the tasks using various functions prepared as a control library. The decomposer also realizes the print function while synchronizing with the task group constituting the control 60, the in 62 and the out 66 using the control library.
【0051】次に、画像記録装置11の作用について説
明する。各種のホストコンピュータやワークステーショ
ン等の情報処理装置から出力された印字データ及びその
印字データを如何に出力するかを定めた制御言語から構
成される制御データは、ホストインターフェイス端子1
7又は入力端子18を介して画像供給装置13に入力さ
れる。情報処理装置には多くの種類があるため、入力さ
れた制御データは、必ずしも統一されていない。例え
ば、ある情報処理装置が送出する制御データは、記録用
紙のサイズや文字の大きさ等を細かく指定できても、他
の装置の制御データはこのような指定を行うことができ
ない場合がある。Next, the operation of the image recording apparatus 11 will be described. Control data composed of print data output from various information processing apparatuses such as host computers and workstations and a control language that defines how to output the print data are stored in a host interface terminal 1.
7 or input to the image supply device 13 via the input terminal 18. Since there are many types of information processing devices, input control data is not always unified. For example, control data transmitted by a certain information processing apparatus may be able to specify the size of recording paper, character size, and the like in detail, but control data of another apparatus may not be able to perform such specification.
【0052】後者のように制御データに指定が無かった
場合、パネル15の表示部には、その旨が表示される。
そこで、オペレータがパネル15により当該記録に関す
る必要なデータをキー入力すると、当該指示情報19
が、画像供給装置13に伝達され、指示情報19に基づ
く記録制御が可能となる。When there is no designation in the control data as in the latter case, the display section of the panel 15 indicates that fact.
Then, when the operator key-inputs necessary data relating to the recording through the panel 15, the instruction information 19 is entered.
Is transmitted to the image supply device 13 and the recording control based on the instruction information 19 becomes possible.
【0053】なお、情報処理装置側で記録を行う用紙の
サイズや文字の大きさ等を制御データとして指定してき
た場合においても、パネル15からキー操作等により指
示情報19を入力することも可能である。このような場
合には、情報処理装置側の指示を常に優先させることも
できるし、パネル15側の入力を優先させることもでき
る。また、時間的に後で指示を与えた方を優先させるこ
とも可能である。It should be noted that, even when the information processing apparatus has designated the size of paper or characters to be recorded as control data as the control data, it is also possible to input the instruction information 19 from the panel 15 by key operation or the like. is there. In such a case, it is possible to always give priority to an instruction from the information processing device or to give an input to the panel 15. It is also possible to give priority to the one given the instruction later in time.
【0054】次に、画像供給装置13は、指示情報19
と記録部12からの状態信号とに基づいて印字可能か否
か等の判断を行い、その旨を応答情報21としてパネル
15に表示させる。例えば、指示情報19によって指示
されたサイズの用紙が記録部12にセットされていない
場合には、そのサイズの用紙をセットするように促す応
答をパネル15に表示させる。Next, the image supply device 13 sends the instruction information 19
A determination is made as to whether or not printing is possible based on the status signal from the recording unit 12, and that fact is displayed on the panel 15 as response information 21. For example, when a sheet of the size indicated by the instruction information 19 is not set in the recording unit 12, a response to prompt the user to set a sheet of the size is displayed on the panel 15.
【0055】以上のようにして記録準備が整うと、画像
供給装置13は、動作指令信号26を記録部12に送出
し、記録部12を制御データに基づいて動作させると共
に、記録部12からの同期パルス25により出力のタイ
ミングをとりながら入力された印字データを画像情報2
7として記録部12に転送する。When the recording preparation is completed as described above, the image supply device 13 sends an operation command signal 26 to the recording unit 12 to operate the recording unit 12 based on the control data, The print data input while taking the output timing by the synchronization pulse 25 is converted into image information 2.
7 and transferred to the recording unit 12.
【0056】次に、アプリケーションプログラムの全体
動作、特にジョブ開始にあたって起動されるデコンポー
ザの作用について説明する。ジョブ開始にあたって起動
されるデコンポーザは、入力ポート毎に設定されている
プリンタ言語(制御言語)のデコンポーザである。ジョ
ブの入力ポートに対して設定されている制御言語が自動
判別を指定するものであれば、自動判別パーサが起動さ
れ(自動判別モード)、自動判別が指定されていなけれ
ば、設定されている制御言語のデコンポーザが起動され
る(プリンタ言語固定モード)。以下、この2つの場合
におけるデコンポーザの処理について各々説明する。な
お、対象となるデコンポーザは、上記の言語A、言語
B、言語C、言語D、言語Eについてのデコンポーザ及
びダンプである。Next, the overall operation of the application program, in particular, the operation of the decomposer started at the start of a job will be described. The decomposer activated at the start of the job is a decomposer of a printer language (control language) set for each input port. If the control language set for the input port of the job specifies automatic discrimination, the automatic discrimination parser is started (auto discrimination mode), and if no auto discrimination is specified, the set control is performed. The language decomposer is started (printer language fixed mode). Hereinafter, the processing of the decomposer in these two cases will be described. The target decomposers are the decomposers and dumps for the languages A, B, C, D, and E described above.
【0057】まず、プリンタ言語固定モードの処理を図
5のフローチャート及び図6のブロック図を参照して説
明する。なお、図6において、インタスク74はイン6
2によるタスク、アウトタスク76はアウト66による
タスク、ジョブコントローラ72は前述したコントロー
ル60の1つの機能モジュール、デコンポーザ70は、
当該ジョブを実行する1つのデコンポーザである。First, the processing in the printer language fixed mode will be described with reference to the flowchart of FIG. 5 and the block diagram of FIG. In FIG. 6, the in-task 74 is the
2, the out task 76 is a task by the out 66, the job controller 72 is one functional module of the control 60 described above, and the decomposer 70 is
One decomposer that executes the job.
【0058】インタスク74がジョブを検出したか否か
を判定し(ステップ300)、否定判定の場合はジョブ
が検出されるまで、デコンポーザ70の待ち状態が保た
れる。ジョブが検出されると、インタスク74は、該当
入力ポートのプリンタ言語設定を参照して、対応するデ
コンポーザのジョブとしてジョブコントローラ72にジ
ョブを要求する(ステップ302)。なお、ジョブが検
出されたとは、あるインターフェイスに一連のデータが
入力されたことを意味する。It is determined whether or not the in-task 74 has detected a job (step 300). In the case of a negative determination, the waiting state of the decomposer 70 is maintained until a job is detected. When a job is detected, the intask 74 refers to the printer language setting of the corresponding input port, and requests the job controller 72 to issue a job as a corresponding decomposer job (step 302). Note that a job is detected means that a series of data has been input to an interface.
【0059】ジョブコントローラ(システム制御部)7
2は、インタスク74からのジョブ要求を受けて、その
デコンポーザ70にジョブ実行指示を出力する(ステッ
プ304)。Job controller (system control unit) 7
2 receives the job request from the in-task 74 and outputs a job execution instruction to the decomposer 70 (step 304).
【0060】非同期イベントとしてジョブ実行指示を受
けたデコンポーザ70は、デコンポーザ処理を開始する
(ステップ306)。このデコンポーザ70によるデコ
ンポーザ処理によって、インタスク74により受信され
た受信バッファ(RAM38)内のプリンタ言語は、設
定されたプリンタ言語に解釈されていく。The decomposer 70 that has received the job execution instruction as an asynchronous event starts decomposer processing (step 306). By the decomposer process by the decomposer 70, the printer language in the reception buffer (RAM 38) received by the intask 74 is interpreted into the set printer language.
【0061】デコンポーザ70が、受信バッファ内のプ
リンタ言語を読み取っている際にデータの終わりを示す
EOJが検出されたか否かが判定される(ステップ30
8)。EOJが検出されない場合は、デコンポーザ処理
(ステップ306)が続行され、EOJが検出される
と、デコンポーザ70はジョブの終了処理を行う。な
お、EOJは、ジョブの終了を示すデータの入力、デー
タ入力待ち時間のタイムアウト、パネル15からの強制
排出指示の入力、ファイルの終了、ネットワークコネク
ションの終了等を検出することで判断できる。It is determined whether or not the EOJ indicating the end of data is detected while the decomposer 70 is reading the printer language in the reception buffer (step 30).
8). If no EOJ is detected, the decomposer process (step 306) is continued. If an EOJ is detected, the decomposer 70 performs a job end process. The EOJ can be determined by detecting the input of data indicating the end of the job, the timeout of the data input waiting time, the input of the forced ejection instruction from the panel 15, the end of the file, the end of the network connection, and the like.
【0062】ジョブの終了処理として、デコンポーザ7
0は、先ずアウトタスク76にジョブ終了通知を出す
(ステップ310)。これにより、エンジンコントロー
ラは、当該処理データ以降の該当ジョブの出力依頼のな
いことを検出でき(ステップ312)、出力終了の準備
が可能となる。As the job end processing, the decomposer 7
0 first sends a job end notification to the outtask 76 (step 310). As a result, the engine controller can detect that there is no output request for the job after the process data (step 312), and preparation for the output end can be made.
【0063】そして、デコンポーザ70は、ジョブコン
トローラ72に対してジョブ終了報告を行う(ステップ
314)。Then, the decomposer 70 reports a job end to the job controller 72 (step 314).
【0064】以上のようにデコンポーザ処理の終了で、
デコンポーザ70は非同期イベント待ち状態に移行し
(ステップ316)、新たなデコンポーザ処理の実行指
示を待つ(ステップ304)。As described above, upon completion of the decomposer processing,
The decomposer 70 shifts to an asynchronous event waiting state (step 316), and waits for a new decomposer process execution instruction (step 304).
【0065】次に、自動判別モードにおける処理を図7
のフローチャート、このフローチャートに現れる機能ブ
ロックと制御の流れとを示す図8及び図9を参照して説
明する。なお、図8は自動判別ができた場合、図9は自
動判別ができなかった場合を示し、新たに付加された自
動判別パーサ78は、前述したデータプロセス64とし
て実装されるプリンタ言語判別タスクである。Next, the processing in the automatic discrimination mode will be described with reference to FIG.
8 and FIG. 9 showing the functional blocks and control flow appearing in this flowchart. FIG. 8 shows a case where automatic discrimination was successful, and FIG. 9 shows a case where automatic discrimination was not possible. The newly added automatic discrimination parser 78 is a printer language discrimination task implemented as the data process 64 described above. is there.
【0066】先ず、インタスク74がジョブを検出した
か否かが判定され(ステップ318)、否定判定の場合
は、ジョブが検出されるまで、デコンポーザ70の待ち
状態が保たれる。ジョブが検出されると、インタスク7
4は、ジョブコントローラ72に対して自動判別パーサ
78のジョブとしてジョブ要求を行う(ステップ32
0)。First, it is determined whether or not the in-task 74 has detected a job (step 318). In the case of a negative determination, the waiting state of the decomposer 70 is maintained until the job is detected. If a job is detected, in-task 7
4 issues a job request to the job controller 72 as a job of the automatic determination parser 78 (step 32).
0).
【0067】ジョブ要求を受けたジョブコントローラ7
2は、自動判別パーサ78にジョブ実行指示を出す(ス
テップ322)。Job controller 7 receiving a job request
2 issues a job execution instruction to the automatic determination parser 78 (step 322).
【0068】ジョブ実行指示を受けた自動判別パーサ7
8は、下記の、のいずれかの条件が満たされた時
に、受信した所定数のデータ又はEOJ検出までのデー
タを対象として自動判別処理を実行する(ステップ32
4)。Automatic determination parser 7 receiving job execution instruction
8 performs an automatic discrimination process on a predetermined number of data received or data up to EOJ detection when any of the following conditions is satisfied (step 32):
4).
【0069】 所定数のデータを受信した場合 EOJを検出した場合 この自動判別処理の詳細については後述する。When a predetermined number of data has been received When EOJ has been detected The details of this automatic determination processing will be described later.
【0070】自動判別パーサ78が自動判別処理を終了
すると、入力されたプリンタ言語がどの言語であるかが
判別できたか否かが判定される(ステップ326)。入
力されたプリンタ言語がどの言語であるかが判別できた
場合は、自動判別パーサ78は、ジョブコントローラ7
2に対して判別結果のプリンタ言語に対応するデコンポ
ーザ70への切替え要求を出し(ステップ334)、ジ
ョブコントローラ72は当該デコンポーザ70を起動さ
せるべくジョブ実行指示を出す(ステップ304)。こ
れ以降は、制御が当該デコンポーザ70に移行し、ステ
ップ304を含めた以後のステップは、図5のプリンタ
固定モードと同じであるので、図5と対応する部分には
同一符号を付して説明を省略する。When the automatic determination parser 78 completes the automatic determination processing, it is determined whether or not the input printer language has been determined (step 326). If it is possible to determine which language the input printer language is, the automatic determination parser 78
A request for switching to the decomposer 70 corresponding to the printer language of the discrimination result is issued to the printer 2 (step 334), and the job controller 72 issues a job execution instruction to activate the decomposer 70 (step 304). Thereafter, the control shifts to the decomposer 70, and the subsequent steps including step 304 are the same as those in the printer fixed mode in FIG. 5, so that the same reference numerals are given to the portions corresponding to FIG. Is omitted.
【0071】なお、自動判別パーサ78が判別したプリ
ンタ言語のデコンポーザがオプション・ソフトで装着さ
れているか否かの判断と処置は、自動判別パーサ78で
はなく、ジョブコントローラ72が行う。The job controller 72 determines whether or not the printer language decomposer determined by the automatic determination parser 78 is installed with optional software, instead of the automatic determination parser 78.
【0072】一方、ステップ326で、入力されたプリ
ンタ言語がどの言語であるか判別できなかった場合は、
自動判別パーサ78がジョブコントローラ72に対して
アボート(ABORT)要求を出す(ステップ32
8)。なお、この際、プリントログにプリント言語判別
不可である旨を登録する。On the other hand, if it is not determined in step 326 which language the input printer language is,
The automatic determination parser 78 issues an abort request to the job controller 72 (step 32).
8). At this time, the fact that the print language cannot be determined is registered in the print log.
【0073】アボート要求を受け取ったジョブコントロ
ーラ72は、自動判別パーサ78にアボート指示を出す
(ステップ330)。これにより、自動判別パーサ78
の処理が終了となる(ステップ332)。即ち、デコン
ポーザ71が非同期イベント待ち状態に移行する(図9
参照)。なお、この時、解放されたデコンポーザは特定
のものを指さず複数あるため、図9ではデコンポーザ7
1として単一のデコンポーザ70と区別している。The job controller 72 having received the abort request issues an abort instruction to the automatic determination parser 78 (step 330). Thereby, the automatic determination parser 78
Is completed (step 332). That is, the decomposer 71 shifts to an asynchronous event waiting state (FIG. 9).
reference). At this time, since the released decomposer does not indicate a specific one but is plural, in FIG.
1 is distinguished from a single decomposer 70.
【0074】そして、処理を終えた自動判別パーサ78
は、ジョブコントローラ72にアボート終了報告を行い
(ステップ333)、これにより自動判別処理は終了
し、最初のステップ318に戻る。なお、この時点では
まだアウトタスク76に対し出力依頼を行っていないた
め、判別ができた時とは異なり、アウトタスク76に対
してはジョブ終了を通知しない(図9参照)。Then, the automatic discrimination parser 78 after the processing is completed.
Sends an abort end report to the job controller 72 (step 333), thereby ending the automatic determination process and returning to the first step 318. At this point, since the output request has not been made to the out task 76, the end of the job is not notified to the out task 76 unlike the case where the determination can be made (see FIG. 9).
【0075】以上の自動判別モードを使用すれば、ホス
トコンピュータより受信されたデータがどのプリンタ言
語で記述されているか自動的に識別されるので、ユーザ
がプリンタ言語を指定しなくても、画像記録装置11は
受信されたデータに合わせて適切なプリンタ言語処理系
を選択し、プリント処理を行うことができる。When the above-described automatic discrimination mode is used, it is automatically determined in which printer language the data received from the host computer is described. Therefore, even if the user does not specify the printer language, the image recording can be performed. The apparatus 11 can select an appropriate printer language processing system in accordance with the received data and perform print processing.
【0076】次に、上記自動判別パーサ78内部の構成
と詳細な制御の流れについて説明する。図10に示すよ
うに、自動判別パーサ78は、ジョブコントローラ72
とのインターフェイスをとるためのジョブコントローラ
インターフェイス80を備えている。Next, the internal configuration of the automatic determination parser 78 and the detailed control flow will be described. As shown in FIG. 10, the automatic determination parser 78
A job controller interface 80 for interfacing with the job controller.
【0077】また、ジョブコントローラインターフェイ
ス80は、判別器コントローラ82にジョブ実行指示に
基づく判別開始指示を与えると共に、判別器コントロー
ラ82から送出された判別結果を受信する。また、ジョ
ブコントローラインターフェイス80は、ジョブコント
ローラ72からのジョブ実行指示を受信すると共に、デ
コンポーザ切替え要求やアボート要求をジョブコントロ
ーラ72に送出する。Further, the job controller interface 80 gives the discriminator controller 82 a discrimination start instruction based on the job execution instruction, and receives the discrimination result sent from the discriminator controller 82. The job controller interface 80 receives a job execution instruction from the job controller 72 and sends a decomposer switching request and an abort request to the job controller 72.
【0078】判別器コントローラ82は、ジョブコント
ローラインターフェイス80からの判別開始指示に基づ
いて、受信データが特定のプリンタ言語であるか否かを
判別する判別器の各々に起動指示を与えると共に、各判
別器からの判別結果(成功、失敗及び不定のいずれか)
を受け取る。The discriminator controller 82 gives a start instruction to each of the discriminators for discriminating whether or not the received data is in a specific printer language, based on a discrimination start command from the job controller interface 80, and performs each discrimination. Judgment result from the container (one of success, failure or indefinite)
Receive.
【0079】本実施例では、言語A判別器84、言語B
判別器86、言語C判別器88、言語D判別器90及び
言語E判別器92の5つの判別器が設けられ、受信デー
タが言語A、言語B、言語C、言語D及び言語Eで記述
されているか否かを各々判別する。In this embodiment, the language A discriminator 84 and the language B
There are provided five discriminators, a discriminator 86, a language C discriminator 88, a language D discriminator 90, and a language E discriminator 92, and the received data is described in language A, language B, language C, language D, and language E. It is determined whether or not each of them has been performed.
【0080】言語A判別器84、言語B判別器86及び
言語C判別器88は、各々直接判別器コントローラ82
と接続されており、判別器コントローラ82からの起動
指示により、各々対象とするプリンタ言語の判別を行
い、判別結果を判別器コントローラ82に送出する。The language A discriminator 84, the language B discriminator 86, and the language C discriminator 88 are each a direct discriminator controller 82.
In response to a start instruction from the discriminator controller 82, each of the target printer languages is discriminated, and the discrimination result is sent to the discriminator controller 82.
【0081】言語D判別器90及び言語E判別器92
は、グループ判別制御部94を介して判別器コントロー
ラ82と接続されており、グループ判別制御部94を介
して入力される起動指示により、各々対象とするプリン
タ言語の判別を行い、その判別結果をグループ判別制御
部94を介して判別器コントローラ82に送出する。Language D discriminator 90 and Language E discriminator 92
Are connected to a discriminator controller 82 via a group discrimination control unit 94, and perform a discrimination of a target printer language in response to a start instruction input via the group discrimination control unit 94, and determine the discrimination result. The data is transmitted to the discriminator controller 82 via the group discrimination controller 94.
【0082】なお、判別器同士を1つのグループで構成
するか否かは、例えば、対象とするプリンタ言語が互い
に共通のコマンドを持つことが1つの基準となり、共通
のコマンドを持つ場合には1つのグループで構成する。It should be noted that whether or not the discriminators are formed into one group is determined based on, for example, that the target printer languages have a common command with each other. Consists of two groups.
【0083】また、これらの判別器は、バッファ96と
接続されており、バッファに格納されている受信データ
を読み取ってその判別対象としている。このバッファ9
6はローカルなメモリであって、ここに格納されている
受信データは、受信バッファ(図2でいうRAM38)
から転送されてきたものである。These discriminators are connected to the buffer 96, and read the received data stored in the buffer to make the discrimination target. This buffer 9
Reference numeral 6 denotes a local memory, which stores reception data in a reception buffer (RAM 38 in FIG. 2).
It was transferred from.
【0084】各判別器は、受信データを所定のバイト数
だけ順次読み取り、各判別器が対象とする言語で用いら
れるコマンドがあるか否かを検索する。また、各判別器
は受信データを各判別器が対象とする言語であると仮定
して文法エラーがあるか否かも検索する。そして、「コ
マンドがあるか」「文法エラーがあるか」の2種類の検
索結果の組み合わせに基づいて以下の「成功」、「不
定」、「失敗」のいずれかの判別結果を出力する。Each discriminator sequentially reads the received data by a predetermined number of bytes, and searches each command for a command used in the target language. Each discriminator also searches for a grammatical error assuming that the received data is in the language targeted by each discriminator. Then, based on a combination of two types of search results, “whether there is a command” and “whether there is a grammatical error”, the following determination result of “success”, “undefined”, or “failure” is output.
【0085】 「成功」 : 「文法エラーなし」かつ「コマンドあ
り」 「不定」 : 「文法エラーなし」かつ「コマンドな
し」 「失敗」 : 「文法エラーあり」 「成功」の場合には、受信データのプリンタ言語は、当
該判別器の対象とする言語であり、「不定」の場合に
は、当該言語であるか否かが分からない状態、「失敗」
の場合には、受信データのプリンタ言語は当該言語では
ないということを示している。“Success”: “No syntax error” and “with command” “Undefined”: “No syntax error” and “no command” “Fail”: “Syntax error” Printer language is a language targeted by the discriminator, and in the case of "undefined", it is not known whether the language is the language, and "failure"
In this case, the printer language of the received data is not the language.
【0086】以上のように判別結果を定義することによ
り、「失敗」の場合には、「文法エラー」を検出した時
点で判別器による判別処理を打ち切ることが可能とな
る。これにより、該当しない制御言語のための判別処理
を最小限に抑えることができ、判別処理を高速化でき
る。By defining the discrimination result as described above, in the case of "failure", the discrimination processing by the discriminator can be terminated when a "grammar error" is detected. As a result, it is possible to minimize the discrimination processing for the control language that does not correspond, and to speed up the discrimination processing.
【0087】また、「文法エラー」を検出することによ
り、たまたま文字列として他の制御言語のコマンドを含
んでいる場合でも、誤判定を防止できるので、判別精度
を向上させることができる。Further, by detecting a "grammatical error", erroneous determination can be prevented even when a command of another control language is accidentally included as a character string, so that determination accuracy can be improved.
【0088】なお、この「文法エラー」は、制御言語と
しての矛盾が検出されたことを意味し、次のようにして
検出される。すなわち、各判別器は、受信データを記述
する制御言語の中から、その判別器が対象とする制御言
語にありえないような命令コードを検出した場合、又
は、その制御言語ではありえないような命令コードの組
み合わせを検出した場合に、「文法エラー」の判別結果
を出力する。また、ある特定の命令コードがデータ列の
特定の位置にあったり、命令コードの順番が定まってい
る制御言語の場合で当該位置にその命令コードがなかっ
た時も「文法エラー」に相当する。The "grammar error" means that a contradiction as a control language has been detected, and is detected as follows. That is, each discriminator detects an instruction code that cannot be included in the control language targeted by the discriminator from the control language describing the received data, or detects an instruction code that cannot be included in the control language. When a combination is detected, a result of determination of “grammar error” is output. Also, when a specific instruction code is at a specific position in the data string, or when there is no instruction code at that position in the case of a control language in which the order of the instruction codes is determined, this corresponds to a “grammar error”.
【0089】次に、自動判別パーサ78の処理の流れに
ついて図11のフローチャートに沿って説明する。Next, the flow of processing of the automatic determination parser 78 will be described with reference to the flowchart of FIG.
【0090】受信バッファ(RAM38)に一定量以上
受信データが格納されると、ローカルなメモリであるバ
ッファ96に所定数分の当該受信データ、例えば256
バイトや1024バイト分の受信データが転送される
(ステップ340)。但し、当該所定数未満で受信デー
タの終わりを示すEOJが検出された場合には、EOJ
までの受信データが転送される(ステップ340)。When a predetermined amount or more of received data is stored in the reception buffer (RAM 38), a predetermined number of the received data, for example, 256, is stored in a buffer 96 which is a local memory.
The received data of bytes or 1024 bytes is transferred (step 340). However, if an EOJ indicating the end of the received data is detected in a number less than the predetermined number, the EOJ is detected.
The received data up to is transferred (step 340).
【0091】そして、ジョブコントローラインターフェ
イス80にジョブコントローラ72からジョブ実行指示
があると、ジョブコントローラインターフェイス80
は、判別器コントローラ82に判別開始指示を与える。
そして、判別開始指示を受けた判別器コントローラ80
は、各判別器に起動指示を与え、順番に起動させる。When a job execution instruction is issued from the job controller 72 to the job controller interface 80, the job controller interface 80
Gives a discrimination start instruction to the discriminator controller 82.
Then, the discriminator controller 80 receiving the discrimination start instruction
Gives an activation instruction to each discriminator and activates them sequentially.
【0092】先ず、言語A判別器84が起動され(ステ
ップ342)、バッファ96内の受信データが言語Aで
あるか否かの判別処理が行われる。判別処理が終了する
と、その結果が判別器コントローラ82に伝達され、判
別結果の判定が行われる(ステップ344)。First, the language A discriminator 84 is activated (step 342), and a process for discriminating whether or not the received data in the buffer 96 is language A is performed. When the discrimination processing is completed, the result is transmitted to the discriminator controller 82, and the discrimination result is determined (step 344).
【0093】ステップ344の判定が「成功」の場合
は、言語Aが受信データのプリンタ言語であると判断さ
れる(ステップ372)。そして、その判別結果が言語
Aであるという情報がジョブコントローラインターフェ
イス80に伝達され、そこからその判別結果がシステム
に通知される(ステップ374)。又は、ジョブコント
ローラインターフェイス80よりジョブコントローラ7
2に言語Aを解釈するデコンポーザへの切替え要求が送
出される。If the determination in step 344 is "success", it is determined that language A is the printer language of the received data (step 372). Then, information that the determination result is in the language A is transmitted to the job controller interface 80, and the determination result is notified to the system therefrom (step 374). Or, from the job controller interface 80, the job controller 7
A request for switching to the decomposer that interprets the language A is sent to 2.
【0094】ステップ344の判定が「失敗」または
「不定」の場合は、次の言語B判別器86が起動され
(ステップ346)、バッファ96内の受信データが言
語Bであるか否かの判別が行われる。If the determination in step 344 is "failure" or "indeterminate", the next language B discriminator 86 is activated (step 346), and it is determined whether or not the received data in the buffer 96 is language B. Is performed.
【0095】その判別結果の判定(ステップ348)が
成功の場合は、言語Bが受信データのプリンタ言語であ
ると判断され、上記と同様の処理が実行される。If the result of the determination (step 348) is successful, the language B is determined to be the printer language of the received data, and the same processing as described above is executed.
【0096】ステップ348の判定が「失敗」又は「不
定」の場合には、次の言語C判別器88が起動され(ス
テップ350)、バッファ96内の受信データが言語C
であるか否かの判別が行われる。If the determination in step 348 is "failure" or "indeterminate", the next language C discriminator 88 is activated (step 350), and the received data in the buffer 96 is stored in the language C.
Is determined.
【0097】その判別結果の判定(ステップ352)が
成功の場合は、言語Cが受信データのプリンタ言語であ
ると判断され、上記と同様の処理が実行される。If the result of the determination (step 352) is successful, it is determined that the language C is the printer language of the received data, and the same processing as described above is performed.
【0098】このように、1つの判別器が「成功」と判
断した時点で自動判別処理を完了させることにより、該
当しない制御言語のための判別処理を行わなくて済み、
判別処理を高速化できる。As described above, by completing the automatic discrimination processing when one discriminator judges “success”, the discrimination processing for a control language that does not correspond can be omitted.
The discrimination process can be sped up.
【0099】ところが、ステップ352の判定が「失
敗」又は「不定」の場合には、判別器コントローラ82
は、グループ判別制御部94に起動指示を与え、言語D
・言語E判別処理を実行させる(ステップ354)。こ
の言語D・言語E判別処理は、次のようなステップから
構成される。However, if the determination in step 352 is “failure” or “indefinite”, the discriminator controller 82
Gives an activation instruction to the group discrimination control unit 94 and outputs the language D
A language E determination process is executed (step 354). The language D / language E discrimination processing includes the following steps.
【0100】先ず、言語D判別器90により、受信デー
タが言語Dであるか否かの判別処理(ステップ356)
が行われ、その判別結果がグループ判別制御部94に送
出され、そこで一旦保持される。次に、言語E判別器9
2により、受信データが言語Eであるか否かの判別処理
(ステップ358)が行われ、その判別結果がグループ
判別制御部94に送出される。グループ判別制御部94
は、言語D判別器90と言語E判別器92による判別結
果とをルールに照らして比較して、どちらに合致する
か、又はいずれでもないかを判別する(ステップ36
0)。例えば、一方の言語のみの判別が成功し、他方が
「失敗」又は「不定」の場合には、前者の言語を判別結
果とする。また、両者共に「成功」の場合は言語Dを判
別結果とし、両者共に「不定」の場合は、言語Eを判別
結果とする。そして、両者共に「失敗」の場合には判別
結果を「失敗」とし、一方が「不定」で他方が「失敗」
の場合には、判別結果を「不定」とする。判別結果が出
ると、グループ判別制御部94は、その判別結果と「成
功」の場合にはその言語の別を判別器コントローラ82
に通知する。そして、その判別結果が判定され(ステッ
プ362)、「成功」の場合には、言語Dと言語Eのい
ずれかの言語がプリンタ言語と判断され(ステップ37
2)、システムに通知される(ステップ374)。一
方、ステップ362の判定で、「失敗」又は「不定」の
場合には、次のステップで、上記の判別処理が1回目で
あるか否か、また、各判別器の判別結果に「不定」があ
るか否か、さらに判別したデータにEOJがあるか否か
が判定される(ステップ364)。判定の結果、判別処
理が1回目であり、かつ、各判別器の判別結果のいずれ
かに「不定」がある再判別可能な場合であり、かつ、受
信データがまだ終了していない場合には、ステップ34
0に戻り、2回目の判別処理が行われる。但し、無駄を
省くため、1回目の判別で「失敗」となった判別器の処
理は行わないように制御する。First, the language D discriminator 90 determines whether or not the received data is in language D (step 356).
Is performed, and the determination result is sent to the group determination control unit 94, where it is temporarily stored. Next, the language E discriminator 9
According to 2, a determination process (step 358) is performed to determine whether or not the received data is in the language E, and the determination result is sent to the group determination control unit 94. Group discrimination control unit 94
Compares the discrimination result of the language D discriminator 90 and the discrimination result of the language E discriminator 92 with reference to a rule, and determines which match or none (step 36).
0). For example, when the determination of only one language is successful and the other is “failure” or “indeterminate”, the former language is determined as the determination result. When both are "successful", the language D is determined as the determination result, and when both are "indeterminate", the language E is determined as the determination result. If both are “failed”, the result of the determination is “failed”, one is “indeterminate” and the other is “failed”.
In the case of, the determination result is “undefined”. When the discrimination result is obtained, the group discrimination control unit 94 determines the discrimination result and, in the case of “success”, the discrimination of the language in the discriminator controller 82.
Notify. Then, the result of the determination is determined (step 362), and in the case of “success”, one of the languages D and E is determined as the printer language (step 37).
2) The system is notified (step 374). On the other hand, if “failure” or “indeterminate” is determined in step 362, in the next step, whether or not the above-described determination processing is the first time, and the determination result of each determiner is “indeterminate” Then, it is determined whether or not there is an EOJ in the determined data (step 364). As a result of the determination, when the determination processing is the first time, and when any of the determination results of each of the classifiers can be re-determined with “undefined”, and when the received data has not been completed yet, , Step 34
Returning to 0, a second determination process is performed. However, in order to reduce waste, control is performed so that the processing of a discriminator that has failed in the first discrimination is not performed.
【0101】ステップ364の3つの条件のいずれか1
つでも条件を満たさない場合には、判別結果が「全て失
敗」かそれとも「不定あり」により分岐する(ステップ
366)。全て失敗の場合には、判別結果が「エラー」
とされ(ステップ370)、「不定あり」の場合には、
判別結果が言語Eとされて(ステップ368)、システ
ムに通知される(ステップ374)。この言語Eは、前
述したようにワイヤドットプリンタ制御言語の1つで、
単純なテキスト出力(文字列と復帰・改行等のコマンド
の組み合わせ)が可能な言語であるため、かかる処理が
可能となる。このように、相互に共通のコマンドがある
制御言語は1つのグループとして扱い、同じグループ内
の制御言語の判別については、これらの判別器による判
別が全て終了した時に、判別結果を出力するようにした
ので、同じグループ内の制御言語との誤判定が防止され
る。また、当該グループに属さない他の制御言語との誤
判定も避けられる。Any one of the three conditions in step 364
If at least one of the conditions is not satisfied, the process branches depending on whether the determination result is "all failed" or "indeterminate" (step 366). If all failed, the judgment result is "Error"
(Step 370), and in the case of “undefined”,
The result of the determination is set to language E (step 368), and the system is notified (step 374). This language E is one of the wire dot printer control languages as described above.
Since the language is capable of simple text output (combination of a character string and commands such as return and line feed), such processing can be performed. As described above, control languages having mutually common commands are treated as one group, and the determination results of the control languages in the same group are output when all the determinations by these classifiers are completed. Therefore, erroneous determination of a control language in the same group is prevented. Further, erroneous determination with another control language that does not belong to the group can be avoided.
【0102】さらに、ステップ360やステップ368
において扱ったように、プリンタ言語を特徴づけるコマ
ンドを含まずデータのみの「不定」の場合でも、ルール
として定めた適切な制御言語を当てはめることにより、
印字可能となる。Further, Step 360 and Step 368
As described in, even in the case of "undefined" data only, which does not include commands that characterize the printer language, by applying an appropriate control language defined as a rule,
Printing is possible.
【0103】なお、ステップ360において、同じグル
ープ内の複数の判別器が「成功」を出力した場合には、
グループ判別制御部94は、次のような方法によって判
別結果を出力するようにしてもよい。In step 360, when a plurality of discriminators in the same group output “success”,
The group determination control unit 94 may output the determination result by the following method.
【0104】先ず、個々の制御言語における命令コード
をユニークコマンドと共通コマンドとに分類し、この共
通コマンドについては各判別器毎に重み付テーブルを用
意し、入力された制御言語の命令コードと一致する毎に
各判別器毎にそれらに設定された重みを加算していく。
そして、最終的な加算結果を判別結果「成功」の補助情
報として利用する。即ち、グループ内のすべての判別器
の加算結果が出た後、「成功」を検出した判別器が複数
あった場合、それら判別器毎の加算結果の大小でグルー
プのどの制御言語であるかを決定するという方法であ
る。共通コマンドは、制御上の意味、重要度が各制御言
語毎に異なるため、この方法によって、グループ内の識
別ができ、判別精度を向上させることができる。First, an instruction code in each control language is classified into a unique command and a common command. For the common command, a weighting table is prepared for each discriminator, and the same as the input instruction code of the control language. Each time the judgment is made, the weight set for each discriminator is added.
Then, the final addition result is used as auxiliary information of the determination result “success”. That is, if there are a plurality of discriminators that have detected “success” after the addition result of all the discriminators in the group is output, which control language of the group is determined by the magnitude of the addition result for each discriminator. It is a method of determining. Since the common command has a different control meaning and importance for each control language, this method can identify the group within the group and improve the accuracy of determination.
【0105】さらにグループ内の制御言語群において、
予め優先順序を付けておき、グループ内でのすべての判
別器の結果が出た後、矛盾する命令コードを含んでいる
ことを検出した判別器を除き、この優先順序に従ってグ
ループのどの制御言語であるかを決定する方法も有効で
ある。この方法は、特にある制御言語にとって共通コマ
ンド(群)の制御上の意味が他の制御言語より重要であ
る場合に適用できる。即ち、グループ内で「成功」を検
出した判別器が複数あった場合、このことは入力データ
として共通のコマンドを含んでいることを意味する。よ
って、共通コマンド(群)の制御上の意味が他の制御言
語より重要である場合には、優先順序を確からしさの尺
度とみなすことができる。Further, in the control language group in the group,
Priorities are assigned in advance, and after the results of all the classifiers in the group are obtained, except for the classifiers that have detected inconsistent instruction codes, any control language of the group according to this priority order A method of determining whether there is is also effective. This method can be applied particularly when the control meaning of a common command (group) is more important for one control language than for another control language. That is, when there are a plurality of discriminators that have detected “success” in the group, this means that a common command is included as input data. Therefore, when the control meaning of the common command (group) is more important than other control languages, the priority order can be regarded as a measure of certainty.
【0106】この方法によれば、前述した方法と比べ
て、ユニークコマンドと共通コマンドの分類、重み検
索、加算処理が省略でき、処理時間が短縮されるという
利点がある。According to this method, as compared with the above-described method, there is an advantage that the classification, weight search, and addition processing of the unique command and the common command can be omitted, and the processing time is shortened.
【0107】また、2回目の判別処理において、判別対
象となる受信データを、ステップ340で次のような範
囲のデータとして取得することもできる。In the second discrimination process, the received data to be discriminated may be obtained in step 340 as data in the following range.
【0108】2回目に取得されるデータは、前述したよ
うに1回目のデータ量よりも多く、1回目に取得される
データを全て含むようにする。この関係について図12
に示す。As described above, the data obtained the second time is larger than the data amount of the first time and includes all the data obtained the first time. FIG. 12 shows this relationship.
Shown in
【0109】図12によれば、(a)は1回目に取得さ
れるデータを構成するコマンド列を示し、(b)は2回
目に取得されるデータを構成するコマンド列を示してい
る(図の下方が受信データの先頭よりを示す)。判別処
理の開始データは、1回目と2回目共に同じデータ
「%」であり、ソフトウェアの構成の簡素化を図ってい
る。また、2回目に取得されるデータの方がデータ量が
多く、1回目で最後のデータの境界付近になっていたデ
ータが2回目では、余裕で包含されている。従って、1
回目に取得したデータの最後が1続きのコマンド列の途
中だった場合、例えば、図12(a)のようにコマンド
列”<ESC>AB2”のうち、”<ESC>A”まで
が取得された時でも、2回目のデータ取得により当該コ
マンド列を判別の対象とすることができる。According to FIG. 12, (a) shows a command sequence constituting data acquired first time, and (b) shows a command sequence constituting data acquired second time (FIG. 12). Below the head of the received data). The start data of the discriminating process is the same data “%” in the first and second times, thereby simplifying the software configuration. In addition, the data amount acquired in the second time is larger than that in the first time, and the data which was near the boundary of the last data in the first time is included in the second time with a margin. Therefore, 1
When the last of the acquired data is in the middle of a continuous command sequence, for example, up to “<ESC> A” of the command sequence “<ESC> AB2” as shown in FIG. Even when the command sequence is executed, the command string can be set as a determination target by the second data acquisition.
【0110】なお、1回目と2回目の判別処理におい
て、共に同じデータから処理を開始することとしたの
は、仮に1回目に取得されたデータ以降からのデータを
処理の対象とした場合、コマンド列の途中から判別を開
始するおそれがあり、最悪の場合、コマンドエラーで判
別エラーの原因となるからである。In the first and second discriminating processes, the processing is started from the same data because the data after the first acquired data is to be processed. This is because the discrimination may start in the middle of the column, and in the worst case, a command error may cause a discrimination error.
【0111】しかし、上述のように同じデータから判別
処理を再開する場合、ソフトウェアの構成が簡素化され
コスト削減という利点がある一方、処理時間が多くなる
という問題が生じる。However, when the determination processing is restarted from the same data as described above, there is an advantage that the software configuration is simplified and the cost is reduced, but there is a problem that the processing time is increased.
【0112】そこで、第1実施例では、2回目の判別処
理の開始データを適宜変更することによって、処理の重
複を避け、処理時間の短縮化を図る方法を用意した。な
お、この方法に基づく処理の流れを図13のフローチャ
ートに示し、当該方法を図13に沿って説明する。Therefore, in the first embodiment, there is provided a method of shortening the processing time by appropriately changing the start data of the second discrimination processing to avoid duplication of the processing. The flow of processing based on this method is shown in the flowchart of FIG. 13, and the method will be described with reference to FIG.
【0113】図13によれば、判別がスタートし、先ず
1回目の判別処理が実行される(ステップ380)。1
回目に取得されたデータが検索され、1回目の判別が行
われている間に、1回目で取得されたデータがコマンド
列の途中で終了したか否かが判定される(ステップ38
2)。肯定判定、即ち当該データがコマンド列の途中で
終了している場合、途中終了しているコマンド列の先頭
アドレスSがメモリに記憶される(ステップ384)。
否定判定、即ち当該データがコマンド列の途中で終了し
ていない場合は、1回目の判別処理の対象となったデー
タの最後のデータの次のアドレスNがメモリに記憶され
る(ステップ385)。According to FIG. 13, the discrimination starts, and the first discrimination processing is executed (step 380). 1
The data acquired at the first time is searched, and while the first determination is being performed, it is determined whether the data acquired at the first time ends in the middle of the command sequence (step 38).
2). If the determination is affirmative, that is, if the data ends in the middle of the command sequence, the start address S of the command sequence that has ended halfway is stored in the memory (step 384).
If a negative determination is made, that is, if the data does not end in the middle of the command sequence, the address N next to the last data of the data subjected to the first determination processing is stored in the memory (step 385).
【0114】次に、1回目の判別処理が終了すると、そ
の判別結果等に基づいて、2回目の判別処理が必要であ
るか否かが判定される(ステップ386)。なお、この
ステップ386は、図11におけるステップ364に相
当する。Next, when the first discrimination processing is completed, it is judged whether or not the second discrimination processing is necessary based on the discrimination result and the like (step 386). This step 386 corresponds to step 364 in FIG.
【0115】ステップ386で否定判定、即ち2回目の
判別処理が必要ではない場合には、判別処理が終了す
る。肯定判定、即ち2回目に判別処理が必要な場合は、
2回目のデータ取得が行われ、再び1回目で取得された
データがコマンド列の途中で終了したか否かが判定され
る(ステップ388)。If a negative determination is made in step 386, that is, if the second determination process is not necessary, the determination process ends. If the determination is affirmative, that is, if the determination process is required for the second time,
The second data acquisition is performed, and it is determined again whether the data acquired in the first time ends in the middle of the command sequence (step 388).
【0116】1回目で取得されたデータがコマンド列の
途中で終了している場合には、ステップ384において
メモリに記憶されていた当該コマンド列の先頭アドレス
S以降のデータから2回目の判別処理を行う(ステップ
390)。If the data acquired at the first time ends in the middle of the command sequence, the second discrimination processing is performed at step 384 from the data after the head address S of the command sequence stored in the memory. Perform (step 390).
【0117】ステップ390の場合における1回目と2
回目のコマンド列と判別開始データを図14に示す。図
14によれば、図14(a)で示された1回目に取得さ
れたデータは、コマンド列”<ESC>AB2”のうち
途中の”A”までで終了している。従って、ステップ3
84で記憶されるアドレスSは、コマンド列の先頭にあ
る<ESC>のアドレスであり、よって、2回目の判別
処理の開始データは、図14(b)で示されたように2
回目に取得されるデータの途中にある<ESC>とな
る。これにより、1回目で判別対象となったデータを重
複して処理するという無駄が避けられ、処理時間が短縮
化される。また、コマンド列の途中から処理を行うこと
によるコマンドエラーも回避でき、判別精度が向上す
る。First and Second Steps in Step 390
FIG. 14 shows the second command string and determination start data. According to FIG. 14, the data acquired for the first time shown in FIG. 14A ends with "A" in the middle of the command string "<ESC>AB2". Therefore, step 3
The address S stored at 84 is the address of <ESC> at the beginning of the command string, and therefore, the start data of the second discrimination processing is 2 as shown in FIG.
This is <ESC> in the middle of the data acquired the third time. This avoids the waste of redundantly processing the data to be determined in the first time, and shortens the processing time. In addition, a command error caused by performing a process from the middle of the command sequence can be avoided, and the discrimination accuracy is improved.
【0118】一方、1回目で取得されたデータがコマン
ド列の途中で終了していない場合には、ステップ385
においてメモリに記憶されていたアドレスN以降のデー
タから2回目の判別処理を行う(ステップ392)。即
ち、1回目で判別処理を行った最後のデータの次のデー
タから2回目の判別処理が開始される。On the other hand, if the data obtained at the first time does not end in the middle of the command sequence, step 385
, A second discrimination process is performed from the data after the address N stored in the memory (step 392). That is, the second discrimination processing is started from the data next to the last data subjected to the discrimination processing in the first time.
【0119】ステップ392の場合における1回目と2
回目のコマンド列と判別開始データを図15に示す。図
15によれば、図15(a)で示された1回目に取得さ
れたデータは、コマンド列”<ESC>AB2”が区切
られることなく終了しており、その次のデータから新た
なコマンド列が開始される。従って、ステップ385で
記憶されるアドレスSは、次のコマンド列の先頭にある
<ESC>のアドレスである。よって、2回目の判別処
理の開始データは、図15(b)で示されたように、2
回目に取得されるデータの途中にあるコマンド列の先頭
データ<ESC>となる。これにより、1回目で判別対
象となったデータを重複して処理するという無駄が避け
られ、処理時間が短縮化される。また、コマンド列の先
頭から判別処理を開始するので、コマンドエラーが回避
され、判別精度も向上する。The first time and the second time in the case of step 392
FIG. 15 shows the second command string and determination start data. According to FIG. 15, the data acquired for the first time shown in FIG. 15A ends without separating the command string “<ESC> AB2”, and a new command is executed from the next data. The column starts. Therefore, the address S stored in step 385 is the address of <ESC> at the head of the next command string. Therefore, the start data of the second discrimination processing is 2 data as shown in FIG.
This is the head data <ESC> of the command string in the middle of the data acquired the third time. This avoids the waste of redundantly processing the data to be determined in the first time, and shortens the processing time. Further, since the discrimination processing is started from the beginning of the command string, a command error is avoided and the discrimination accuracy is improved.
【0120】なお、アドレスS又はアドレスNを同一の
レジスタ等に格納し、2回目の判別処理を当該レジスタ
に記憶されたアドレスが指定するデータから開始するよ
うにすれば、ステップ388の判定は必ずしも必要では
ない。また、2回目に取得するデータ量をステップ34
0において1024バイトとしたが、判別可能な制御言
語の種類や各制御言語の判別処理の能力等を考慮して増
減されてもよい。If the address S or the address N is stored in the same register or the like and the second determination processing is started from the data specified by the address stored in the register, the determination in step 388 is not necessarily performed. Not necessary. Also, the amount of data acquired for the second time is
Although 0 is set to 1024 bytes, the number may be increased or decreased in consideration of the type of control language that can be determined, the ability of determination processing of each control language, and the like.
【0121】(第2実施例)第1実施例では、1回目と
2回目の判別処理において、それぞれ一定量のデータを
取得し、それぞれ各判別器において同一の判別ルールを
適用したが、これらを可変とすることもできる。このよ
うな発明を第2実施例として以下に開示する。なお、ハ
ードウェア等の構成及びソフトウェアの構造については
第1実施例と同様であるので、説明を省略する。(Second Embodiment) In the first embodiment, in the first and second discrimination processes, a certain amount of data is obtained, and the same discrimination rule is applied to each discriminator. It can be variable. Such an invention is disclosed below as a second embodiment. The configuration of the hardware and the like and the configuration of the software are the same as those in the first embodiment, and a description thereof will be omitted.
【0122】第2実施例では、2回目に取得するデータ
量は、2回目の判別処理の対象となる制御言語、即ち1
回目の判別処理で「失敗」していない制御言語の種類に
基づいて変更する。In the second embodiment, the amount of data acquired the second time is the control language to be subjected to the second discrimination processing, ie, 1
The change is made based on the type of control language that has not failed in the second determination process.
【0123】具体的には、ワイヤドットプリンタ関連の
言語が残っている場合には、比較的多くデータを取得す
る。これにより、言語間に共通のテキスト出力が多く言
語を特定する為のコマンド出現頻度の低いワイヤドット
プリンタ言語でも判別可能となる確率を高められ、判別
精度を向上させることができる。また、このように大量
のデータを取得してもワイヤドットプリンタ言語の場合
には、文字データや復帰/改行等の標準的なコマンドが
多いため、それらが検索の対象とはならず、処理時間の
増大は避けられる。More specifically, if a language related to the wire dot printer remains, data is acquired in a relatively large amount. As a result, it is possible to increase the probability that it is possible to determine even a wire dot printer language in which there is a large number of text outputs common to the languages and the frequency of appearance of a command for specifying the language is low, and the determination accuracy can be improved. Even if such a large amount of data is acquired, in the case of the wire dot printer language, there are many standard commands such as character data and carriage return / line feed. Increase is avoided.
【0124】一方、ページ記述関連の言語が残っている
場合には、ページ記述関連言語毎にユニークであり、特
定しやすいため、比較的少量のデータを取得する。これ
により、ページ記述関連の制御言語の判定精度を下げる
ことなく、データ取得にかかる時間を短縮化することが
できる。On the other hand, if the language associated with the page description remains, it is unique for each page description-related language and is easy to specify, so a relatively small amount of data is acquired. As a result, it is possible to reduce the time required for data acquisition without lowering the determination accuracy of the control language related to the page description.
【0125】さらに、第2実施例では、各判別器におい
て適用される判別ルールを1回目と2回目の判別処理で
異なるルールとする。Further, in the second embodiment, the discrimination rules applied in each discriminator are different between the first and second discrimination processes.
【0126】第1実施例において、当該制御言語が「成
功」であると判別する基準は、その制御言語を特定でき
るユニークなコマンド群の存在を検出するということを
示した。第2実施例では、例えば、1回目の判別ルール
は、このようなユニークなコマンド群のうち、使用頻度
の高いコマンド(文字種の切替えや漢字モードへの切替
え等のコマンド)のみの有無を判断し、2回目は、これ
らコマンド群のすべてを対象としてその有無を検出す
る。これにより、1回目は、判別の対象となるコマンド
が少ないため、処理が高速になり、2回目は、制御言語
を特定できるコマンドすべてが判断の対象となるので、
より正確な判別が可能となる。従って、標準的なデータ
(使用頻度の高いコマンドを使用しているデータ)を判
別する場合には、処理時間を短縮することができ、ま
た、特別なデータ(使用頻度の高いコマンドを使用して
いないデータ)でも、正確な判別が可能となる。In the first embodiment, the criterion for determining that the control language is “success” indicates that the presence of a unique command group that can specify the control language is detected. In the second embodiment, for example, the first discrimination rule determines whether only frequently used commands (commands for switching the character type or switching to the kanji mode) among such unique command groups. In the second time, the presence / absence of all these command groups is detected. As a result, in the first time, the number of commands to be discriminated is small, so that the processing speed is increased. In the second time, all commands that can specify the control language are subjected to the judgment.
More accurate discrimination becomes possible. Therefore, when determining standard data (data using frequently used commands), the processing time can be shortened, and special data (frequently used commands are used). Data), accurate determination is possible.
【0127】なお、1回目と2回目で異なる判別ルール
を適用する上記の場合、2回目に取得されるデータは、
1回目に取得されたデータをすべて含め、かつ、判別の
開始は、1回目と同じデータの先頭から行う。1回目と
2回目とで、判別ルールが異なるため、2回目も先頭の
データから解析すべきだからである。In the above case where different discrimination rules are applied in the first and second times, the data acquired in the second time is
The determination is started from the beginning of the same data as the first data, including all the data acquired the first time. This is because the discrimination rules are different between the first and second times, and the second time should be analyzed from the first data.
【0128】以上が本発明に係る実施例であるが、上記
の例に限定されるわけではない。実施例では、1回目と
2回目に取得されるデータの先頭を合わせるようにした
が、2回目のデータの先頭が、1回目のデータの途中に
あってもよい。例えば、1回目にXバイト取得すること
とすると、2回目のデータは、1回目のデータの先頭か
らYバイト(X>Y)のところから取得するようにする
こともできる。このようにしても、コマンド列の最大バ
イト数がYバイト以下であれば、コマンド列の途中で1
回目のデータが終了していても、2回目のデータに当該
コマンド列を包含させることができる。また、各判別器
が検索する判別データと受信バッファから取得されるデ
ータの範囲は必ずしも一致していないが、これを一致さ
せることもできる。即ち、直接、受信バッファから当該
範囲の判別データを読み出すようにすることも可能であ
る。Although the embodiment according to the present invention has been described above, the present invention is not limited to the above embodiment. In the embodiment, the heads of the first and second data obtained are matched, but the head of the second data may be in the middle of the first data. For example, if X bytes are acquired for the first time, the second data may be acquired from Y bytes (X> Y) from the head of the first data. Even in this case, if the maximum number of bytes of the command string is Y bytes or less, 1
Even if the first data is completed, the command data can be included in the second data. Further, although the range of the discrimination data searched by each discriminator and the range of the data acquired from the reception buffer do not always match, it is also possible to match them. That is, it is possible to directly read the determination data in the range from the reception buffer.
【0129】また、判別処理を2回に限定せず、3回以
上行うようにしてもよい。かかる場合には、予め設定さ
れた回数まで又はデータの終了を検出するまで判別処理
を行う。この場合には、第1実施例及び第2実施例の処
理を3回目の判別処理以降まで適用できることはいうま
でもない。Further, the discriminating process is not limited to two times, but may be performed three times or more. In such a case, the determination process is performed up to a preset number of times or until the end of the data is detected. In this case, it goes without saying that the processes of the first and second embodiments can be applied to the third discrimination process and thereafter.
【0130】さらに、判別手段の構成と処理の流れ、回
路構成、機能ブロック、ソフトウェアの構成、制御や入
出力の流れ等も任意好適に変更可能である。例えば、自
動判別処理等をゲートアレイで実現することによって、
より高速化を達成することもできる。Further, the configuration of the determination means and the flow of processing, the circuit configuration, functional blocks, the configuration of software, the flow of control and input / output, and the like can be arbitrarily and suitably changed. For example, by realizing automatic discrimination processing and the like with a gate array,
Higher speeds can also be achieved.
【0131】[0131]
【発明の効果】以上詳細に説明したように、請求項1の
発明では、制御言語の種類が決定できなかったとき、先
の判別データの最後の一部を包含する範囲のデータを次
の判別データとして取得するようにしたので、従来のよ
うに、所定量毎にデータを重複することなく取得する方
法と比べて、データ列を寸断することによって生じる判
別エラーを防止できる、という効果が得られる。As described above in detail, according to the first aspect of the present invention, when the type of the control language cannot be determined, the data in the range including the last part of the previous determination data is determined by the next determination. Since the data is acquired as data, it is possible to obtain an effect that it is possible to prevent a discrimination error caused by cutting the data string, as compared with a method of acquiring data for each predetermined amount without duplication as in the related art. .
【0132】請求項2の発明では、先の判別データがコ
マンド列の途中で終了している場合には、このコマンド
列の先頭から次の判別データを取得し、コマンド列の最
後で終了している場合には、先の判別データの次から次
の判別データを取得するようにしたので、判別に要する
処理時間を無用に延ばすことなく、コマンドエラーを防
ぐことができる、という効果が得られる。According to the second aspect of the present invention, if the previous determination data ends in the middle of the command sequence, the next determination data is obtained from the beginning of the command sequence, and the processing ends at the end of the command sequence. In this case, the next determination data is obtained from the next to the previous determination data, so that an effect is obtained that a command error can be prevented without unnecessarily increasing the processing time required for the determination.
【0133】請求項3の発明では、判別処理によって制
御言語の種類が決定できなかったとき、この判別処理に
おいて該当しないと判断された制御言語以外の制御言語
の種類に基づいて、次に取得するデータ量を決定するよ
うにしたので、判定精度を下げることなく、処理時間を
短縮化することができる、という効果が得られる。According to the third aspect of the present invention, when the type of the control language cannot be determined by the discriminating process, the control language is acquired next based on the type of the control language other than the control language determined not to be applicable in the discriminating process. Since the data amount is determined, there is an effect that the processing time can be reduced without lowering the determination accuracy.
【図1】第1実施例に係る画像記録装置の概略の構成を
示すブロック図である。FIG. 1 is a block diagram illustrating a schematic configuration of an image recording apparatus according to a first embodiment.
【図2】第1実施例に係る画像記録装置の回路構成図で
ある。FIG. 2 is a circuit configuration diagram of the image recording apparatus according to the first embodiment.
【図3】第1実施例に係る画像記録装置のソフトウェア
の構造を示す図である。FIG. 3 is a diagram illustrating a software structure of the image recording apparatus according to the first embodiment.
【図4】アプリケーション・プログラムにおける基本的
な機能ブロック図である。FIG. 4 is a basic functional block diagram of an application program.
【図5】プリンタ言語固定モードにおける画像記録装置
の処理の流れを示すフローチャートである。FIG. 5 is a flowchart illustrating a flow of processing of the image recording apparatus in a printer language fixed mode.
【図6】プリンタ言語固定モードにおける画像記録装置
の機能ブロック図である。FIG. 6 is a functional block diagram of the image recording apparatus in a printer language fixed mode.
【図7】自動判別モードにおける画像記録装置の処理の
流れを示すフローチャートである。FIG. 7 is a flowchart illustrating a flow of processing of the image recording apparatus in the automatic determination mode.
【図8】自動判別モードで正常動作した場合における画
像記録装置の機能ブロック図である。FIG. 8 is a functional block diagram of the image recording apparatus when a normal operation is performed in the automatic determination mode.
【図9】自動判別モードでアボート要求が出された場合
における画像記録装置の機能ブロック図である。FIG. 9 is a functional block diagram of the image recording apparatus when an abort request is issued in the automatic determination mode.
【図10】自動判別パーサの構成を示したブロック図で
ある。FIG. 10 is a block diagram illustrating a configuration of an automatic determination parser.
【図11】自動判別パーサの処理の流れを示したフロー
チャート図である。FIG. 11 is a flowchart illustrating a flow of processing of an automatic determination parser.
【図12】図12(a)は、1回目に取得されたデータ
の構成例、図12(b)は2回目に取得されたデータの
構成例を示した図である。12A is a diagram illustrating a configuration example of data acquired first time, and FIG. 12B is a diagram illustrating a configuration example of data acquired second time.
【図13】第1実施例に係る判別処理の開始データを変
更する処理を示すフローチャートである。FIG. 13 is a flowchart illustrating a process of changing start data of the determination process according to the first embodiment.
【図14】図14(a)は、1回目に取得されたデータ
がコマンド列の途中で終了している場合のデータ構成
例、図14(b)は2回目に取得されたデータの構成例
と開始データを示した図である。14A is a data configuration example in a case where data acquired first time ends in the middle of a command sequence, and FIG. 14B is a configuration example of data acquired second time. FIG. 7 is a diagram showing start data and start data.
【図15】図15(a)は、1回目に取得されたデータ
がコマンド列の最後で終了している場合のデータ構成
例、図15(b)は2回目に取得されたデータの構成例
と開始データを示した図である。FIG. 15A is a data configuration example in a case where data acquired first time ends at the end of a command sequence, and FIG. 15B is a configuration example of data acquired second time. FIG. 7 is a diagram showing start data and start data.
70 デコンポーザ 78 自動判別パーサ 82 判別器コントローラ 70 decomposer 78 automatic discrimination parser 82 discriminator controller
───────────────────────────────────────────────────── フロントページの続き (72)発明者 新原 克久 埼玉県岩槻市府内3丁目7番1号 富士 ゼロックス株式会社岩槻事業所内 (72)発明者 塩見 雄仁 埼玉県岩槻市府内3丁目7番1号 富士 ゼロックス株式会社岩槻事業所内 (56)参考文献 特開 平5−96823(JP,A) 特開 平5−104826(JP,A) 特開 平5−270069(JP,A) 特開 平7−61058(JP,A) 特開 平7−104954(JP,A) 特開 平8−2067(JP,A) (58)調査した分野(Int.Cl.6,DB名) B41J 5/50 B41J 29/38 G06F 3/12────────────────────────────────────────────────── ─── Continuing on the front page (72) Katsuhisa Niihara, 3-7-1, Fuuchi, Iwatsuki-shi, Saitama Fuji Xerox Co., Ltd. Iwatsuki Office (72) Inventor, Yuji Shiomi 3-7-1, Fuuchi, Iwatsuki-shi, Saitama Fuji Xerox Co., Ltd. Iwatsuki Office (56) References JP-A-5-96823 (JP, A) JP-A-5-104826 (JP, A) JP-A-5-270069 (JP, A) JP-A-7- 61058 (JP, A) JP-A-7-104954 (JP, A) JP-A-8-2067 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) B41J 5/50 B41J 29 / 38 G06F 3/12
Claims (3)
得するデータ取得手段と、 このデータ取得手段により得られた判別データに対して
判別処理を実行することにより、前記入力データを記述
する制御言語の種類を決定する判別手段と、 この判別手段の判別処理により制御言語の種類が決定で
きなかったとき、前記判別データの最後の一部を包含す
る範囲の次の判別データを取得するように前記データ取
得手段を制御すると共に、前記次の判別データに対して
判別処理を実行するように前記判別手段を制御する制御
手段と、 を含むデータ処理装置。A control language for describing the input data by performing a determination process on the determination data obtained by the data acquisition means, the data acquisition means acquiring acquisition data in a predetermined range of the input data; Determination means for determining the type of the control language; and when the type of the control language cannot be determined by the determination processing of the determination means, the next determination data of a range including the last part of the determination data is obtained. Control means for controlling the data acquisition means and controlling the discrimination means so as to execute the discrimination processing on the next discrimination data.
ータがコマンド列の途中で終了しているか否かを判定す
るコマンド判定手段をさらに含み、 前記制御手段は、前記コマンド判定手段によりコマンド
列の途中で判別データが終了していると判定された場合
には、前記コマンド列の先頭から次の判別データを取得
するように前記データ取得手段を制御し、コマンド列の
最後で判別データが終了していると判定された場合に
は、前記判別データの次から次の判別データを取得する
ように前記データ取得手段を制御する請求項1に記載の
データ処理装置。2. The apparatus according to claim 1, further comprising a command determination unit configured to determine whether the data acquired by the data acquisition unit ends in the middle of the command sequence. If it is determined that the discrimination data has been completed, the data acquisition means is controlled to obtain the next discrimination data from the beginning of the command sequence, and the discrimination data ends at the end of the command sequence. 2. The data processing device according to claim 1, wherein when it is determined that the data is present, the data acquisition unit is controlled to acquire next determination data from the next of the determination data.
理により制御言語の種類が決定できなかったとき、この
判別処理において該当しないと判断された制御言語以外
の制御言語の種類に基づいて、前記データ取得手段に次
に取得させるデータ量を決定する請求項1に記載のデー
タ処理装置。3. The control means, when the type of the control language cannot be determined by the determination processing of the determination means, based on the type of the control language other than the control language determined not to be applicable in the determination processing. The data processing apparatus according to claim 1, wherein a data amount to be obtained next by the data obtaining unit is determined.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7098955A JP2785743B2 (en) | 1995-04-24 | 1995-04-24 | Data processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7098955A JP2785743B2 (en) | 1995-04-24 | 1995-04-24 | Data processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08290637A JPH08290637A (en) | 1996-11-05 |
JP2785743B2 true JP2785743B2 (en) | 1998-08-13 |
Family
ID=14233519
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP7098955A Expired - Fee Related JP2785743B2 (en) | 1995-04-24 | 1995-04-24 | Data processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2785743B2 (en) |
-
1995
- 1995-04-24 JP JP7098955A patent/JP2785743B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH08290637A (en) | 1996-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7310164B2 (en) | Printer, printing control apparatus and printing system using unique job identifiers, and control method therefor | |
EP0834800B1 (en) | Method and apparatus for controlling output of a printer | |
US7236262B2 (en) | Recording medium, printer control method, and printer control system | |
KR100199430B1 (en) | Output control device | |
US20080246994A1 (en) | Image forming device, program, and recording medium | |
JPH10333846A (en) | Output control method and device therefor | |
JP4401662B2 (en) | Print control apparatus and print control method | |
US6476938B1 (en) | Print control system and method | |
US20040156070A1 (en) | Printer | |
JPH05177884A (en) | Printer control device | |
JPH10177464A (en) | Printing controller | |
JP2785743B2 (en) | Data processing device | |
US5913016A (en) | Method and apparatus for controlling an output device based on received data | |
JP2861859B2 (en) | Output control device | |
JP2853606B2 (en) | Printer device | |
JP2785742B2 (en) | Printer device | |
JP3985135B2 (en) | Device initialization method in control system, control system, program for causing computer to execute device initialization method, and recording medium recording this program | |
US5975775A (en) | Information recording apparatus and program storage device readable by the apparatus having emulation processing with error recovery | |
JP2000187579A (en) | Printing system, printer, printing control method and recording medium | |
JP4306973B2 (en) | Printing control apparatus and data processing method | |
KR100334102B1 (en) | Method for management of history in the printer | |
JP3610194B2 (en) | Print control apparatus, print control method, and storage medium storing computer-readable program | |
JP4072405B2 (en) | Process management method and apparatus, control program for process management apparatus, and storage medium | |
JP2744025B2 (en) | Printing control device | |
JPH0926860A (en) | Printer and data communication method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |