JP3966276B2 - Information acquisition processing program, computer, and information acquisition processing system - Google Patents

Information acquisition processing program, computer, and information acquisition processing system Download PDF

Info

Publication number
JP3966276B2
JP3966276B2 JP2003434236A JP2003434236A JP3966276B2 JP 3966276 B2 JP3966276 B2 JP 3966276B2 JP 2003434236 A JP2003434236 A JP 2003434236A JP 2003434236 A JP2003434236 A JP 2003434236A JP 3966276 B2 JP3966276 B2 JP 3966276B2
Authority
JP
Japan
Prior art keywords
information
command
procedure
model
printer
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
JP2003434236A
Other languages
Japanese (ja)
Other versions
JP2005190407A (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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2003434236A priority Critical patent/JP3966276B2/en
Priority to US10/840,743 priority patent/US7773248B2/en
Priority to EP10007913.6A priority patent/EP2239656B1/en
Priority to EP04253262.2A priority patent/EP1521171B1/en
Publication of JP2005190407A publication Critical patent/JP2005190407A/en
Application granted granted Critical
Publication of JP3966276B2 publication Critical patent/JP3966276B2/en
Priority to US12/801,863 priority patent/US8018616B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、コンピュータが、コンピュータに接続されたデバイスから、デバイス側で更新されるデバイス情報を取得する情報取得処理を、コンピュータに実行させるための情報取得処理プログラム、前記情報取得処理を実行するコンピュータ、および前記情報取得処理を実行するコンピュータと当該コンピュータに接続されたデバイスとを備えた情報取得処理システムに関する。   The present invention relates to an information acquisition processing program for causing a computer to execute an information acquisition process in which the computer acquires device information updated on the device side from a device connected to the computer, and a computer that executes the information acquisition process And an information acquisition processing system comprising a computer that executes the information acquisition process and a device connected to the computer.

従来、コンピュータが、当該コンピュータに接続されたデバイスから、当該デバイス側で管理、更新されるデバイス情報を取得する技術が知られている(例えば、下記特許文献1参照)。   2. Description of the Related Art Conventionally, a technique is known in which a computer acquires device information managed and updated on the device side from a device connected to the computer (see, for example, Patent Document 1 below).

下記特許文献1に記載の技術は、コンピュータが、当該コンピュータに接続された画像形成装置から、当該画像形成装置内で管理、更新される画像形成装置の状態に関する情報(=デバイス情報)を取得し、取得した情報をネットワークを介して管理コンピュータに対して提供し、この情報の提供を受けた管理コンピュータが、ネットワーク上のコンピュータに接続された画像形成装置に関する情報を統括的に管理する、というものである。   In the technology described in Patent Document 1 below, a computer acquires information (= device information) on the state of an image forming apparatus managed and updated in the image forming apparatus from the image forming apparatus connected to the computer. The acquired information is provided to the management computer via the network, and the management computer that receives this information comprehensively manages the information related to the image forming apparatus connected to the computer on the network. It is.

また、コンピュータが、当該コンピュータに接続されたデバイスから、当該デバイスの機種を識別するための機種識別情報を取得する技術も知られている(例えば、下記特許文献2参照)。   There is also known a technique in which a computer acquires model identification information for identifying a model of the device from a device connected to the computer (for example, see Patent Document 2 below).

下記特許文献2に記載の技術は、コンピュータが、当該コンピュータに接続された画像形成装置から、当該画像形成装置の機種を識別するための機種識別情報を取得し、取得した機種識別情報等をネットワークを介してサーバに送信し、この機種識別情報等の提供を受けたサーバが、画像形成装置の機種等に応じた最適なデバイスドライバを、コンピュータにダウンロードさせる、というものである。   In the technique described in Patent Document 2 below, a computer acquires model identification information for identifying a model of the image forming apparatus from an image forming apparatus connected to the computer, and the acquired model identification information and the like are networked. The server that has received the provision of the model identification information and the like through the server causes the computer to download an optimal device driver corresponding to the model of the image forming apparatus.

なお、上記機種識別情報は、機種毎に決められている不変の情報なので、デバイス側で管理、更新されるデバイス情報には該当しない情報である。
特開2000−293324号公報 特開2002−229751号公報
Note that the model identification information is invariant information determined for each model, and thus does not correspond to device information managed and updated on the device side.
JP 2000-293324 A Japanese Patent Laid-Open No. 2002-229751

ところで、上記特許文献1に記載の如き技術において利用される手法として、コンピュータが画像形成装置から情報を取得する際、コンピュータ側から画像形成装置側へプリンタジョブ言語(PJL;Printer Job Language)で記述されたコマンド(以下、PJLコマンドともいう)を与え、画像形成装置側から返される情報をコンピュータ側でリードバックする、という手法が知られている。PJLは、画像形成装置が備える各種機能の制御を可能とするコマンド言語で、Hewlett-Packard社において開発され、その後他社でも採用された周知のものである。   By the way, as a technique used in the technique as described in Patent Document 1, when the computer acquires information from the image forming apparatus, it is described in the printer job language (PJL) from the computer side to the image forming apparatus side. There is known a technique in which a received command (hereinafter also referred to as a PJL command) is given and information returned from the image forming apparatus side is read back on the computer side. PJL is a command language that enables various functions of an image forming apparatus to be controlled, and is a well-known language that was developed by Hewlett-Packard and later adopted by other companies.

ただし、このPJLコマンドには、画像形成装置のメーカーや機種の違いに応じて独自拡張されて多種多様な仕様があり、すべての画像形成装置が、同一形式のPJLコマンドに対応している訳ではない。   However, this PJL command has a wide variety of specifications that are uniquely expanded depending on the manufacturer and model of the image forming apparatus, and not all image forming apparatuses support the same type of PJL command. Absent.

そのため、上記特許文献1に記載の技術において、PJLコマンドを利用する際、コンピュータが画像形成装置から所期の情報を取得するには、画像形成装置が情報を返すことができるような適切なPJLコマンドを用いる必要性があるが、数多くのPJLコマンドの中から適切なPJLコマンドを選択する技術について、上記特許文献1には開示されていない。   Therefore, in the technique described in Patent Document 1, when a PJL command is used, in order for the computer to acquire the desired information from the image forming apparatus, an appropriate PJL that can return the information to the image forming apparatus. Although there is a need to use a command, a technique for selecting an appropriate PJL command from among a large number of PJL commands is not disclosed in Patent Document 1.

また、上記特許文献2には、コンピュータが機種識別情報を取得する点が開示されているが、数多くのPJLコマンドの中から適切なPJLコマンドを選択する技術については、上記特許文献2にも記載されていない。   Moreover, although the point from which the computer acquires model identification information is disclosed in Patent Document 2, a technique for selecting an appropriate PJL command from among many PJL commands is also described in Patent Document 2. It has not been.

本発明は、上記諸問題を解決するためになされたものであり、適切なコマンドを選択してデバイスに与えるとともに、無駄なデータ送信を行うことのない処理を、コンピュータが実行できるようにすることにある The present invention has been made to solve the above problems, along with providing the device by selecting the appropriate command, without processing of performing useless data transmission, to be able to computer running It is in .

以下、本発明において採用した特徴的構成について説明する。
本発明の情報取得処理プログラムは、
コンピュータと通信可能に接続されたデバイスから、該デバイスに関する情報であるデバイス情報を取得する処理を、前記コンピュータに実行させるための情報取得処理プログラムであって、
前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する識別手順と、
複数のコマンドと各コマンドに対する応答が可能な一又は複数の前記デバイスの機種の情報とが関連付けて格納されたコマンド記憶手段を参照し、前記識別手順で識別された前記デバイスの機種が応答可能なコマンドを前記コマンド記憶手段から選択するコマンド選択手順と、
該コマンド選択手順によって選択されたコマンドを前記デバイスに送信することにより、前記デバイスに対して前記デバイス情報の提供を要求する情報要求手順と、
該情報要求手順によって送信されたコマンドに対する応答を受信することにより、前記デバイス情報を取得する情報取得手順と
前記コマンド選択手順により複数のコマンドが選択された場合、該選択された複数のコマンドのうち、一のコマンドを送信することで前記デバイス情報の提供を要求し、前記情報取得手順により該一のコマンドに対する応答を受信したことを条件に、前記選択された複数のコマンドのうち、他のコマンドを前記デバイスに送信する一方、前記情報取得手順により前記一のコマンドに対する応答を受信できなかったことを条件に、前記他のコマンドを送信しないよう前記情報要求手順を制御する情報要求制御手順と
を含むことを特徴とする。
The characteristic configuration employed in the present invention will be described below.
The information acquisition processing program of the present invention is
An information acquisition processing program for causing a computer to execute processing for acquiring device information, which is information about the device, from a device communicably connected to the computer,
An identification procedure for acquiring information indicating the model of the device from the device and identifying the model of the device;
Refer to command storage means in which a plurality of commands and information on one or a plurality of device models capable of responding to each command are stored in association with each other, and the device model identified in the identification procedure can respond A command selection procedure for selecting a command from the command storage means ;
An information request procedure for requesting the device to provide the device information by transmitting a command selected by the command selection procedure to the device;
An information acquisition procedure for acquiring the device information by receiving a response to the command transmitted by the information request procedure ;
When a plurality of commands are selected by the command selection procedure, the device information is requested by transmitting one command among the selected commands, and the command is obtained by the information acquisition procedure. On the condition that a response to the command is received, another command among the selected commands is transmitted to the device, while a response to the one command is not received by the information acquisition procedure. And an information request control procedure for controlling the information request procedure so as not to transmit the other command .

この情報取得処理プログラムに従ってコンピュータが上記各手順を実行すると、コンピュータは、デバイスの機種を示す情報を、デバイスから取得して、そのデバイスの機種を識別し、識別された機種に対応づけられたコマンドを、複数のコマンドの中から選択する。そのため、複数のコマンド中に、あるデバイスに対応するコマンドと対応しないコマンドとが混在していても、そのデバイスに対応するコマンドだけが選択される。その結果、デバイスに送信されるコマンドは、デバイスに対応するコマンドのみとなり、送信したコマンドに対する応答を受信することで、所期のデバイス情報を取得することができる。   When the computer executes each of the above procedures according to this information acquisition processing program, the computer acquires information indicating the device model from the device, identifies the device model, and a command associated with the identified model. Is selected from a plurality of commands. Therefore, even if a command corresponding to a certain device and a command not corresponding to a certain device are mixed in a plurality of commands, only the command corresponding to that device is selected. As a result, the command transmitted to the device is only the command corresponding to the device, and the desired device information can be acquired by receiving a response to the transmitted command.

したがって、送信したコマンドについては、所期のデバイス情報を取得することができる。また、デバイスに対応しないコマンドまでコンピュータが送信してしまうものとは異なり、コンピュータが無駄なデータ送信処理を行う必要が無い。さらに、デバイスに対応しないコマンドを送信した後、それに対する応答をコンピュータが受信するものとは異なり、コンピュータが無駄なデータ受信処理を行う必要が無い。 Thus, the transmitted command can retrieve the desired device information. Further, unlike the case where the computer transmits a command not corresponding to the device, the computer does not need to perform useless data transmission processing. Furthermore, unlike the case where the computer receives a response to the command after transmitting a command not corresponding to the device, the computer does not need to perform useless data reception processing.

なお、以上説明した情報取得処理プログラムは、さらに次のような特徴を有するものであると望ましい。
まず、前記コンピュータは、前記デバイスとローカル接続可能な複数のローカルポートを備えており、
前記複数のローカルポートから前記デバイスが接続されているローカルポートを抽出するローカルポート抽出手順と、
前記ローカルポート抽出手順によって抽出されたローカルポートに接続された前記デバイスが前記識別手順、前記コマンド選択手順、前記情報要求手順、前記情報取得手順、前記情報要求制御手順の処理対象となるように処理スレッドを作成する処理スレッド作成手順と
を含むものであるとよい。
また、前記ローカルポートに新たに前記デバイスが接続されることを検出する追加デバイス検出手順を含んでおり、
前記ローカルポート抽出手順は、前記追加デバイス検出手順により新たに検出された前記デバイスが接続されるローカルポートをさらに抽出する手順であり、
前記処理スレッド作成手段は、新たに検出された前記デバイスに対しても前記処理スレッドを作成する手順であるとよい。
また、前記デバイスで処理可能な一のジョブが処理終了したかを検知する終了検知手順と、
前記終了検知手順により前記一のジョブの処理が終了したと検知された場合、当該一のジョブ以外に前記デバイスに投入されているジョブ数をカウントするジョブ数カウント手順とを含んでおり、
前記識別手順は、前記ジョブ数カウント手順によりカウントされたジョブ数が、所定数以下であることを条件として、前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する手順であるとよい。
このような情報取得処理プログラムに従ってコンピュータが上記各手順を実行すれば、デバイスで処理可能な一のジョブが処理終了したか否かとは無関係にジョブ数をカウントするのに比べ、ジョブ数が所定数以下となるタイミングを見逃しにくくなり、デバイスから情報を取得する機会が増える。
また、前記識別手順は、所定期間毎に前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する手順であるとよい。
このような情報取得処理プログラムに従ってコンピュータが上記各手順を実行すれば、ジョブ数が所定数以下とならない環境下でも、デバイスの機種を示す情報を所定期間毎にデバイスから取得することができる。
また、前記コマンドは、前記デバイス情報を特定する情報を含むものであるとよい。
Note that the information acquisition processing program described above preferably has the following characteristics.
First, the computer includes a plurality of local ports that can be locally connected to the device.
A local port extraction procedure for extracting a local port to which the device is connected from the plurality of local ports;
Processing is performed so that the device connected to the local port extracted by the local port extraction procedure becomes a processing target of the identification procedure, the command selection procedure, the information request procedure, the information acquisition procedure, and the information request control procedure Process thread creation procedure to create a thread and
It is good to include.
And an additional device detection procedure for detecting that the device is newly connected to the local port,
The local port extraction procedure is a procedure for further extracting a local port to which the device newly detected by the additional device detection procedure is connected,
The processing thread creation means may be a procedure for creating the processing thread even for the newly detected device.
An end detection procedure for detecting whether one job that can be processed by the device has ended,
A job number counting procedure for counting the number of jobs input to the device in addition to the one job when the end detection procedure detects that the processing of the one job is completed,
In the identification procedure, information indicating the model of the device is acquired from the device on the condition that the number of jobs counted in the procedure for counting the number of jobs is equal to or less than a predetermined number, and the model of the device is identified. The procedure should be
If the computer executes each of the above procedures according to such an information acquisition processing program, the number of jobs is a predetermined number compared to counting the number of jobs regardless of whether or not one job that can be processed by the device is completed. It becomes difficult to miss the following timing, and the opportunity to acquire information from the device increases.
The identification procedure may be a procedure for acquiring information indicating the model of the device from the device every predetermined period and identifying the model of the device.
If the computer executes each of the above procedures according to such an information acquisition processing program, information indicating the device model can be acquired from the device every predetermined period even in an environment where the number of jobs does not become a predetermined number or less.
The command may include information for specifying the device information.

このようなコマンドを送信する手順を備えた情報取得処理プログラムであれば、そのコマンドの送信先となるデバイスが、複数種のデバイス情報を返すことができるデバイスであっても、複数種のデバイス情報のうちの一つを特定することで、所期のデバイス情報のみを取得することができる。したがって、コンピュータが、複数種のデバイス情報すべてをデバイスから取得した後で、その中から必要なデバイス情報と不要なデバイス情報とを取捨選択するような無駄な処理を行わなくてもよくなる。 If it is an information acquisition processing program having a procedure for transmitting such a command, even if the device to which the command is transmitted is a device that can return a plurality of types of device information, a plurality of types of device information By specifying one of them, only the desired device information can be acquired . Therefore, after the computer acquires all the plural types of device information from the device, it is not necessary to perform a useless process such as selecting necessary device information and unnecessary device information from the device information.

また、前記デバイス情報は、前記デバイスの交換部品の使用度合に関する情報を含むものであるとよい。
このようなデバイス情報を取得する手順を備えた情報取得処理プログラムであれば、デバイスの交換部品の使用度合に関する情報が取得できるので、利用者が参照してメンテナンスの必要性を判断することができる。
In addition, the device information may include information related to the degree of use of replacement parts of the device.
If it is an information acquisition processing program having a procedure for acquiring such device information, information on the degree of use of the replacement parts of the device can be acquired, so that the user can determine the necessity of maintenance by referring to it. .

また、前記デバイス情報は、前記デバイスの消耗品の消耗度合に関する情報を含むものであるとよい。
このようなデバイス情報を取得する手順を備えた情報取得処理プログラムであれば、デバイスの消耗品の消耗度合に関する情報が取得できるので、これも利用者が参照してメンテナンスの必要性を判断することができる。
The device information may include information on the degree of consumption of the consumables of the device.
If it is an information acquisition processing program having a procedure for acquiring such device information, information on the degree of consumption of the consumables of the device can be acquired, and this is also referred to by the user to determine the necessity of maintenance. Can do.

また、前記デバイス情報は、前記デバイスにおける異常の発生回数に関する情報を含むものであるとよい。
このようなデバイス情報を取得する手順を備えた情報取得処理プログラムであれば、デバイスにおける異常の発生回数に関する情報が取得できるので、利用者が参照して、異常の発生原因の除去や修理の必要性の判断などを行うことができる。
The device information may include information related to the number of occurrences of abnormality in the device.
If it is an information acquisition processing program with a procedure for acquiring device information like this, it is possible to acquire information on the number of occurrences of abnormalities in the device. Sexual judgment can be made.

また、本発明の情報取得処理プログラムは
前記識別手順において取得した前記デバイスの機種を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報と、前記情報取得手順において取得した前記デバイス情報とを、関連づけて格納するデバイス情報格納手
を含むものであるとよい。
The information acquisition processing program of the present invention is
Information indicating the model of the device acquired in the identification procedure, information indicating an input / output I / F used for connection between the computer and the device, and the device information acquired in the information acquisition procedure The device stores association information stored procedure
It is good to include .

この情報取得処理プログラムに従ってコンピュータが上記各手順を実行すると、コンピュータは、デバイスの機種を示す情報と、コンピュータとデバイスとの接続に用いられている入出力I/Fを示す情報と、デバイス情報とを、関連づけて格納する。そのため、利用者は、格納されたデバイス情報を参照する際に、そのデバイス情報に関連づけられたデバイスの機種を示す情報および入出力I/Fを示す情報をも併せて参照することができる。 If the computer in accordance with the information acquisition processing program to execute the above steps, the computer, information indicating the information indicating the model of the device, the input and output I / F used in the connection between the computer and the device, the device information Are stored in association with each other. Therefore, when the user refers to the stored device information, the user can also refer to information indicating the device model associated with the device information and information indicating the input / output I / F.

したがって、1台のコンピュータに接続された複数のデバイスの中に同じ機種が複数存在する場合であっても、あるデバイス情報がどのデバイスから取得した情報なのかを知りたい場合、利用者はデバイスの機種を示す情報および入出力I/Fを示す情報に基づいて、1つのデバイスを容易に特定することができる。   Therefore, even when there are multiple devices of the same model among multiple devices connected to a single computer, if a user wants to know which device information is obtained from which device, the user must One device can be easily specified based on the information indicating the model and the information indicating the input / output I / F.

また、前記識別手順において、前記デバイスに対するアクセスができなかった場合に、該アクセスができなかった旨を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報とを、関連づけて格納するアクセスエラー情報格納手順を含むとよい。 In the identification procedure, when access to the device is not possible, information indicating that the access was not possible and input / output I / F used for connection between the computer and the device are indicated. An access error information storing procedure for storing information in association with each other may be included.

この場合、利用者は、格納された情報を参照して、デバイスに対するアクセスができなかったことを知ることができ、特に、1台のコンピュータに接続された複数のデバイスが接続されている場合であっても、利用者は入出力I/Fを示す情報に基づいて、どの入出力I/Fに接続されているデバイスに対するアクセスができなかったのかを、容易に特定することができる。   In this case, the user can know that the device could not be accessed by referring to the stored information, particularly when a plurality of devices connected to one computer are connected. Even in such a case, the user can easily identify which input / output I / F the device connected to could not be accessed based on the information indicating the input / output I / F.

また、前記情報要求手順において、コマンドを前記デバイスに送信できなかった場合に、該送信ができなかった旨を示す情報と、前記識別手順において取得した前記デバイスの機種を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報とを、関連づけて格納する送信エラー情報格納手順を含むとよい。   In the information request procedure, when a command cannot be transmitted to the device, information indicating that the command could not be transmitted, information indicating the model of the device acquired in the identification procedure, and the computer A transmission error information storing procedure for storing information indicating the input / output I / F used for connection with the device in association with each other may be included.

この場合、利用者は、格納された情報を参照して、コマンドをデバイスに送信できなかったことを知ることができ、特に、1台のコンピュータに接続された複数のデバイスの中に同じ機種が複数存在する場合であっても、利用者はデバイスの機種を示す情報および入出力I/Fを示す情報に基づいて、どの入出力I/Fに接続されているデバイスに対し、コマンドを送信できなかったのかを、容易に特定することができる。   In this case, the user can know that the command could not be transmitted to the device by referring to the stored information, and in particular, the same model among a plurality of devices connected to one computer. Even if there are multiple devices, the user can send a command to any device connected to any input / output I / F based on the information indicating the device model and the information indicating the input / output I / F. It can be easily identified whether there was no.

また、前記情報取得手順において、前記デバイスからの応答を受信できなかった場合に、該受信できなかった旨を示す情報と、前記識別手順において取得した前記デバイスの機種を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報とを、関連づけて格納する受信エラー情報格納手順を含むとよい。   In the information acquisition procedure, when a response from the device cannot be received, information indicating that the device could not be received, information indicating the model of the device acquired in the identification procedure, and the computer A reception error information storing procedure for storing information indicating the input / output I / F used for connection with the device in association with each other may be included.

この場合、利用者は、格納された情報を参照して、デバイスからの応答を受信できなかったことを知ることができ、特に、1台のコンピュータに接続された複数のデバイスの中に同じ機種が複数存在する場合であっても、利用者はデバイスの機種を示す情報および入出力I/Fを示す情報に基づいて、どの入出力I/Fに接続されているデバイスからの応答を受信できなかったのかを、容易に特定することができる。   In this case, the user can know that the response from the device could not be received by referring to the stored information, and in particular, the same model among a plurality of devices connected to one computer. Even when there are multiple devices, the user can receive a response from the device connected to any input / output I / F based on the information indicating the device model and the information indicating the input / output I / F. It can be easily identified whether there was no.

次に、本発明のコンピュータは、
デバイスと通信可能に接続されており、前記デバイスから前記デバイス情報を取得する処理を実行するコンピュータであって、
前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する識別手段と、
複数のコマンドと各コマンドに対する応答が可能な一又は複数の前記デバイスの機種の情報とが関連づけて格納するコマンド記憶手段と、
前記コマンド記憶手段を参照し、前記識別手段で識別された前記デバイスの機種が応答可能なコマンドを前記コマンド記憶手段から選択するコマンド選択手段と、
該コマンド選択手段によって選択されたコマンドを前記デバイスに送信することにより、前記デバイスに対して前記デバイス情報の提供を要求する情報要求手段と、
該情報要求手段によって送信されたコマンドに対する応答を受信することにより、前記デバイス情報を取得する情報取得手段と
前記コマンド選択手段により複数のコマンドが選択された場合、該選択された複数のコマンドのうち、一のコマンドを送信することで前記デバイス情報の提供を要求し、前記情報取得手段により該一のコマンドに対する応答を受信したことを条件に、前記選択された複数のコマンドのうち、他のコマンドを前記デバイスに送信する一方、前記情報取得手段により前記一のコマンドに対する応答を受信できなかったことを条件に、前記他のコマンドを送信しないよう前記情報要求手段を制御する情報要求制御手段と
を備えていることを特徴とする。
Next, the computer of the present invention
Devices and which is communicably connected to a computer that executes a process of acquiring the device information from the previous SL device,
Information indicating the model of the device is obtained from the device, and identification means for identifying the model of the device;
Command storage means for storing a plurality of commands and information of one or a plurality of device types capable of responding to each command in association with each other;
Command selection means for referring to the command storage means and selecting from the command storage means a command to which the model of the device identified by the identification means can respond ;
Information request means for requesting the device to provide the device information by transmitting a command selected by the command selection means to the device;
An information acquisition means for acquiring the device information by receiving a response to the command transmitted by the information request means ;
When a plurality of commands are selected by the command selection means, the device information is requested to be provided by transmitting one command among the selected commands, and the information acquisition means requests the one command. On the condition that a response to the command is received, another command among the selected commands is transmitted to the device, while a response to the one command is not received by the information acquisition unit. And an information request control means for controlling the information request means so as not to transmit the other command .

このコンピュータにおいて、識別手段は、デバイスの機種を示す情報を、デバイスから取得して、そのデバイスの機種を識別し、コマンド選択手段は、識別手段によって識別された機種に対応づけられたコマンドを、複数のコマンドの中から選択する。そのため、複数のコマンド中に、あるデバイスに対応するコマンドと対応しないコマンドとが混在していても、そのデバイスに対応するコマンドだけが選択される。その結果、情報要求手段によって、デバイスに送信されるコマンドは、デバイスに対応するコマンドのみとなり、情報取得手段が、送信したコマンドに対する応答を受信することで、所期のデバイス情報を取得することができる。   In this computer, the identification unit obtains information indicating the model of the device from the device, identifies the model of the device, and the command selection unit selects a command associated with the model identified by the identification unit, Select from multiple commands. Therefore, even if a command corresponding to a certain device and a command not corresponding to a certain device are mixed in a plurality of commands, only the command corresponding to that device is selected. As a result, the command sent to the device by the information requesting unit is only the command corresponding to the device, and the information obtaining unit can obtain the desired device information by receiving a response to the transmitted command. it can.

したがって、送信したコマンドについては、所期のデバイス情報を取得することができる。また、デバイスに対応しないコマンドまでコンピュータが送信してしまうものとは異なり、コンピュータが無駄なデータ送信処理を行う必要が無い。さらに、デバイスに対応しないコマンドを送信した後、それに対する応答をコンピュータが受信するものとは異なり、コンピュータが無駄なデータ受信処理を行う必要が無い。 Thus, the transmitted command can retrieve the desired device information. Further, unlike the case where the computer transmits a command not corresponding to the device, the computer does not need to perform useless data transmission processing. Furthermore, unlike the case where the computer receives a response to the command after transmitting a command not corresponding to the device, the computer does not need to perform useless data reception processing.

さらに、本発明の情報取得処理システムは、
コンピュータと該コンピュータに接続されたデバイスとを備え、前記デバイスが、該デバイスに関する情報であるデバイス情報を記憶する記憶手段と、前記デバイスの作動に伴って前記デバイス側で前記デバイス情報を更新する更新手段とを備えており、前記コンピュータが前記デバイスから前記デバイス情報を取得する処理を実行するように構成されたシステムであって、
前記コンピュータは、
前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する識別手段と、
複数のコマンドと各コマンドに対する応答が可能な一又は複数の前記デバイスの機種の情報とが関連づけて格納するコマンド記憶手段と、
前記コマンド記憶手段を参照し、前記識別手段で識別された前記デバイスの機種が応答可能なコマンドを前記コマンド記憶手段から選択するコマンド選択手段と、
該コマンド選択手段によって選択されたコマンドを前記デバイスに送信することにより、前記デバイスに対して前記デバイス情報の提供を要求する情報要求手段と、
該情報要求手段によって送信されたコマンドに対する応答を受信することにより、前記デバイス情報を取得する情報取得手段と
前記コマンド選択手段により複数のコマンドが選択された場合、該選択された複数のコマンドのうち、一のコマンドを送信することで前記デバイス情報の提供を要求し、前記情報取得手段により該一のコマンドに対する応答を受信したことを条件に、前記選択された複数のコマンドのうち、他のコマンドを前記デバイスに送信する一方、前記情報取得手段により前記一のコマンドに対する応答を受信できなかったことを条件に、前記他のコマンドを送信しないよう前記情報要求手段を制御する情報要求制御手段と
を備えていることを特徴とする。
Furthermore, the information acquisition processing system of the present invention includes:
A computer and a device connected to the computer, wherein the device stores device information that is information about the device, and updates that update the device information on the device side as the device operates A system configured to execute a process of acquiring the device information from the device, the computer comprising:
The computer
Information indicating the model of the device is obtained from the device, and identification means for identifying the model of the device;
Command storage means for storing a plurality of commands and information of one or a plurality of device types capable of responding to each command in association with each other;
Command selection means for referring to the command storage means and selecting from the command storage means a command to which the model of the device identified by the identification means can respond ;
Information request means for requesting the device to provide the device information by transmitting a command selected by the command selection means to the device;
An information acquisition means for acquiring the device information by receiving a response to the command transmitted by the information request means ;
When a plurality of commands are selected by the command selection means, the device information is requested to be provided by transmitting one command among the selected commands, and the information acquisition means requests the one command. On the condition that a response to the command is received, another command among the selected commands is transmitted to the device, while a response to the one command is not received by the information acquisition unit. And an information request control means for controlling the information request means so as not to transmit the other command .

この情報取得処理システムにおいて、コンピュータは上記各手段を備えており、それら各手段のうち、識別手段は、デバイスの機種を示す情報を、デバイスから取得して、そのデバイスの機種を識別し、コマンド選択手段は、識別手段によって識別された機種に対応づけられたコマンドを、複数のコマンドの中から選択する。そのため、複数のコマンド中に、あるデバイスに対応するコマンドと対応しないコマンドとが混在していても、そのデバイスに対応するコマンドだけが選択される。その結果、情報要求手段によって、デバイスに送信されるコマンドは、デバイスに対応するコマンドのみとなり、情報取得手段が、送信したコマンドに対する応答を受信することで、所期のデバイス情報を取得することができる。   In this information acquisition processing system, the computer includes the above-described units. Among these units, the identification unit acquires information indicating the model of the device from the device, identifies the model of the device, and executes a command. The selecting means selects a command associated with the model identified by the identifying means from a plurality of commands. Therefore, even if a command corresponding to a certain device and a command not corresponding to a certain device are mixed in a plurality of commands, only the command corresponding to that device is selected. As a result, the command sent to the device by the information requesting unit is only the command corresponding to the device, and the information obtaining unit can obtain the desired device information by receiving a response to the transmitted command. it can.

したがって、送信したコマンドについては、所期のデバイス情報を取得することができる。また、デバイスに対応しないコマンドまでコンピュータが送信してしまうものとは異なり、コンピュータが無駄なデータ送信処理を行う必要が無い。さらに、デバイスに対応しないコマンドを送信した後、それに対する応答をコンピュータが受信するものとは異なり、コンピュータが無駄なデータ受信処理を行う必要が無い。 Thus, the transmitted command can retrieve the desired device information. Further, unlike the case where the computer transmits a command not corresponding to the device, the computer does not need to perform useless data transmission processing. Furthermore, unlike the case where the computer receives a response to the command after transmitting a command not corresponding to the device, the computer does not need to perform useless data reception processing.

以上説明したとおり、本発明によれば、適切なコマンドを選択してデバイスに与えるとともに、無駄なデータ送信を行うことのない処理を、コンピュータが実行できるようにすることが可能である。 As described above, according to the present invention, along with providing the device by selecting the appropriate command, without processing of performing useless data transmission, it is possible to make a computer can execute.

次に、本発明の実施形態について一例を挙げて説明する。
図1は、複数のパーソナルコンピュータを、LAN(Local Area Network)を介して相互に接続したネットワークシステムを示すブロック図である。
Next, an embodiment of the present invention will be described with an example.
FIG. 1 is a block diagram showing a network system in which a plurality of personal computers are connected to each other via a LAN (Local Area Network).

本発明の実施形態として例示する情報取得処理システムは、パーソナルコンピュータ1、1’、1”…上において作動するシステムとして構成され、パーソナルコンピュータ1、1’、1”…に接続されたデバイスであるプリンタ3、3’、3”…から、各3、3’、3”…において管理、更新されているプリンタ情報(本発明でいうデバイス情報)を取得する処理を行うようになっている。   The information acquisition processing system exemplified as an embodiment of the present invention is a device configured as a system that operates on personal computers 1, 1 ′, 1 ″... And connected to the personal computers 1, 1 ′, 1 ″. ... from the printers 3, 3 ', 3 "... to obtain printer information (device information in the present invention) managed and updated in each 3, 3', 3" ....

また、本実施形態において、パーソナルコンピュータ1、1’、1”…は、パーソナルコンピュータ2からの要求に応じて、プリンタ3、3’、3”…から取得したプリンタ情報を、パーソナルコンピュータ2に対して提供するようになっている。そして、パーソナルコンピュータ2は、パーソナルコンピュータ1、1’、1”…から提供されるプリンタ情報を取得し、ネットワーク上のパーソナルコンピュータ1、1’、1”…に接続されたプリンタ3、3’、3”…のプリンタ情報を管理する。   In the present embodiment, the personal computers 1, 1 ′, 1 ″... Send printer information acquired from the printers 3, 3 ′, 3 ″, etc. to the personal computer 2 in response to a request from the personal computer 2. To provide. The personal computer 2 acquires printer information provided from the personal computers 1, 1 ′, 1 ″, and the printers 3, 3 ′,... Connected to the personal computers 1, 1 ′, 1 ″,. 3 "... Printer information is managed.

なお、以下の説明においては、プリンタ情報を管理するパーソナルコンピュータ2を管理PC2、管理PC2によって管理されるパーソナルコンピュータ1、1’、1”…を被管理PC1、1’、1”…と称する。   In the following description, the personal computer 2 that manages printer information is referred to as a management PC 2, and personal computers 1, 1 ', 1 ",... Managed by the management PC 2 are referred to as managed PCs 1, 1', 1",.

被管理PC1は、図2に示すように、CPU111、ROM112、RAM113等を中心に構成された制御部101と当該制御部101と各種デバイスとを接続するためのI/F部102とを備えてなる本体部11、キーボードやポインティングデバイスなどの入力部12、ディスプレイなどの表示部13、およびハードディスクなどの補助記憶部14を備えている。   As shown in FIG. 2, the managed PC 1 includes a control unit 101 mainly composed of a CPU 111, a ROM 112, a RAM 113, and the like, and an I / F unit 102 for connecting the control unit 101 and various devices. A main body unit 11, an input unit 12 such as a keyboard and a pointing device, a display unit 13 such as a display, and an auxiliary storage unit 14 such as a hard disk.

本体部11には、OS(Operating System)としてWindows(登録商標)が搭載され、プリンタI/F機能部121、LANI/F機能部122、印刷スプーラ123など、アプリケーションから共通して利用される機能は、OSの一部として実装されたソフトウェアモジュールによって構成されている。また、この他、キーボード入力、画面出力といった入出力機能やハードディスクやメモリの管理などの機能もOSによって提供される。なお、同等の機能を実現できれば、被管理PC1には、他のOS(例えば、Linux(登録商標)、MacOS(登録商標)等)が搭載されていても構わないが、以下の説明においては、被管理PC1が、Windows(登録商標)によって提供される各種機能を有するとの前提で説明を続ける。   Windows (registered trademark) is installed in the main body 11 as an OS (Operating System), and functions commonly used by applications such as a printer I / F function unit 121, a LAN I / F function unit 122, and a print spooler 123. Is composed of software modules implemented as part of the OS. In addition, the OS also provides input / output functions such as keyboard input and screen output, and functions such as hard disk and memory management. As long as an equivalent function can be realized, the managed PC 1 may be mounted with another OS (for example, Linux (registered trademark), MacOS (registered trademark), etc.), but in the following description, The description will be continued on the assumption that the managed PC 1 has various functions provided by Windows (registered trademark).

本体部11のI/F部102としては、上述の入力部12、表示部13、および補助記憶部14とのI/Fの他、LANカードなどのLAN I/F114、USB(Universal Serial Bus)ポートあるいはパラレルポートなどのプリンタI/F115が設けられ、LAN I/F114に接続されたLANケーブルを介して被管理PC1はLANに接続され、プリンタI/F115に接続されたプリンタケーブルを介して被管理PC1とプリンタ3とが接続されている。   The I / F unit 102 of the main unit 11 includes a LAN I / F 114 such as a LAN card, USB (Universal Serial Bus), in addition to the I / F with the input unit 12, the display unit 13, and the auxiliary storage unit 14 described above. A printer I / F 115 such as a port or a parallel port is provided. The managed PC 1 is connected to the LAN via a LAN cable connected to the LAN I / F 114, and is connected via a printer cable connected to the printer I / F 115. The management PC 1 and the printer 3 are connected.

この被管理PC1には、被管理PC1に接続されたプリンタ3からプリンタ情報を取得し、そのプリンタ情報を管理PC2に対して提供する機能を実現するためのソフトウェアがインストールされ、このソフトウェアがCPU111上で動作することにより、プリンタ情報取得部124として機能するように構成されている。   The managed PC 1 is installed with software for realizing a function of acquiring printer information from the printer 3 connected to the managed PC 1 and providing the printer information to the management PC 2. This software is installed on the CPU 111. Is configured to function as the printer information acquisition unit 124.

なお、被管理PC1’、1”…は、被管理PC1と同様に構成され、被管理PC1と同等の機能を有するものなので、詳細な説明を省略する。
管理PC2も、基本的には被管理PC1と同様に構成されたものであり、本体部21、入力部22、表示部23、補助記憶部24等を備え、本体部21には、OSとしてWindows(登録商標)が搭載されている。管理PC2についても、同等の機能を実現できれば、他のOS(例えば、Linux(登録商標)、MacOS(登録商標)等)が搭載されていても構わないが、以下の説明においては、管理PC2が、Windows(登録商標)によって提供される各種機能を有するとの前提で説明を続ける。
The managed PCs 1 ′, 1 ″,... Are configured in the same manner as the managed PC 1 and have the same functions as the managed PC 1. Therefore, detailed description thereof is omitted.
The management PC 2 is basically configured in the same manner as the managed PC 1 and includes a main body unit 21, an input unit 22, a display unit 23, an auxiliary storage unit 24, and the like. The main body unit 21 includes Windows as an OS. (Registered trademark) is installed. As long as the management PC 2 can realize an equivalent function, another OS (for example, Linux (registered trademark), MacOS (registered trademark), etc.) may be mounted. However, in the following description, the management PC 2 The description will be continued on the assumption that various functions provided by Windows (registered trademark) are provided.

この管理PC2には、被管理PC1、1’、1”…等のネットワーク上のコンピュータに対し、それら各コンピュータに接続されたプリンタ3、3’、3”…に関する情報の提供を要求するとともに、その要求に応じて他のコンピュータから提供されるプリンタ情報を一括して管理する機能を実現するためのソフトウェアがインストールされている。   This management PC 2 requests the computers on the network such as the managed PCs 1, 1 ′, 1 ″... To provide information regarding the printers 3, 3 ′, 3 ″. In response to the request, software for realizing a function of collectively managing printer information provided from other computers is installed.

プリンタ3、3’、3”…は、管理PC2による管理対象となる被管理プリンタである。これらプリンタ3、3’、3”…は、いずれもプリンタジョブ言語(PJL;Printer Job Language)に対応したものである。   The printers 3, 3 ', 3 "... are managed printers to be managed by the management PC 2. These printers 3, 3', 3" ... are all compatible with a printer job language (PJL). It is a thing.

また、このプリンタ3、3’、3”…は、前記プリンタI/F115を介して、IEEE1284デバイスID(以下、1284IDと称す)を、被管理PC1、1’、1”…に返すことができる。この1284IDは、I/Fがパラレルの場合には、IEEE1284規格により規定されており、また、I/FがUSBの場合には、USBプリンタクラス仕様により規定されている公知のものである。   Further, the printers 3, 3 ′, 3 ″,... Can return the IEEE1284 device ID (hereinafter referred to as 1284ID) to the managed PCs 1, 1 ′, 1 ″,... Via the printer I / F 115. . The 1284 ID is defined by the IEEE1284 standard when the I / F is parallel, and is known by the USB printer class specification when the I / F is USB.

次に、被管理PC1において実行されるプリンタ情報取得部124の処理について、図3のフローチャートに基づいて説明する。この処理は、被管理PC1の起動に伴って開始される処理である。なお、この処理は、被管理PC1’、1”…においても同様に実行されるが、ここでは被管理PC1において実行される処理を例に挙げながら説明を続ける。   Next, processing of the printer information acquisition unit 124 executed in the managed PC 1 will be described based on the flowchart of FIG. This process is started when the managed PC 1 is activated. This process is executed in the same way on the managed PCs 1 ′, 1 ″..., But the description will be continued here taking the process executed on the managed PC 1 as an example.

本処理を開始すると、被管理PC1は、まず、プリンタが接続されているローカルポートのリストを作成する(S101)。この処理では、被管理PC1に接続されているすべてのプリンタ(本実施形態の場合、プリンタ3)に対応するすべてのローカルポートがリストに登録される。続いて、S101の処理で作成されたリストから、1つのローカルポートを抽出して(S103)、抽出されたローカルポートに対応する処理スレッドを作成する(S105)。これらS103およびS105の処理は、上記リストに登録されたローカルポートの総数に対応する回数だけ繰り返される(S107:NO)。その結果、本処理の他に、ローカルポート総数と同数の処理スレッドにおける処理が並列に実行される状態になる。なお、新たに作成された処理スレッドでは、各処理スレッドの対象ローカルポートを介して接続されたプリンタからプリンタ情報(例えば、ドラム交換時期など、交換部品の使用度合に関する情報、トナーないしインク残量、記録用紙残量など、消耗品の消耗度合に関する情報、紙詰まり回数など、異常の発生回数に関する情報、その他プリンタ3側において管理、更新される各種情報)を取得して、データベース(以下、DBと略称する)である補助記憶部14内の結果ファイル133に記録する処理などが行われるが、詳しい処理内容については後述する。   When this process is started, the managed PC 1 first creates a list of local ports to which the printer is connected (S101). In this process, all local ports corresponding to all printers connected to the managed PC 1 (in this embodiment, the printer 3) are registered in the list. Subsequently, one local port is extracted from the list created in S101 (S103), and a processing thread corresponding to the extracted local port is created (S105). The processes in S103 and S105 are repeated a number of times corresponding to the total number of local ports registered in the list (S107: NO). As a result, in addition to this processing, processing in the same number of processing threads as the total number of local ports is executed in parallel. In the newly created processing thread, the printer information (for example, information on the degree of use of replacement parts, such as drum replacement time, toner or ink remaining amount, etc., from the printer connected via the target local port of each processing thread) Acquire information on the consumption level of consumables, such as the remaining amount of recording paper, information on the number of occurrences of abnormalities, such as the number of paper jams, and various other information managed and updated on the printer 3 side. The process of recording in the result file 133 in the auxiliary storage unit 14 is abbreviated, and the details of the process will be described later.

さて、ローカルポート総数と同数の処理スレッドを作成したら(S107:YES)、続いて、設定ファイル134から設定時刻を読み取って、設定時刻までの時間を計算し(S109)、S109の処理で算出した時間をタイマーにセットする(S111)。設定ファイル134は、補助記憶部14内に記憶されているファイルであり、この設定ファイル134には、管理者が任意に設定する設定時刻が記録されている。このタイマーは、S111の処理後、S109の処理で算出した時間が経過するとタイマーイベントを発生させる。   When the same number of processing threads as the total number of local ports are created (S107: YES), the setting time is read from the setting file 134, the time until the setting time is calculated (S109), and calculated in the processing of S109. The time is set in the timer (S111). The setting file 134 is a file stored in the auxiliary storage unit 14, and the setting time arbitrarily set by the administrator is recorded in the setting file 134. This timer generates a timer event when the time calculated in the process of S109 elapses after the process of S111.

続いて、被管理PC1は、関連イベントの発生を待ち(S113)、発生したイベントがプリンタ追加イベントであれば(S115:YES)、ローカルポートをリストに追加して(S117)、追加されたローカルポートに対応する処理スレッドを作成する(S119)。プリンタ追加イベントは、例えば周知のプラグアンドプレイ機能等により、プリンタの電源ONやケーブルの挿し込みを検出した場合に発生するイベントである。このプリンタ追加イベントの発生により、新たに利用可能なプリンタが追加されたことがわかり、そのプリンタが接続されているローカルポートもわかる。そこで、S117およびS119の処理により、リストを更新するとともに、リストに追加されたローカルポートに対応する処理スレッドを作成することにより、S105の処理において作成した処理スレッドと同等の処理を行う処理スレッドを追加する。なお、S119の処理を終えたらS113の処理へと戻る。   Subsequently, the managed PC 1 waits for the occurrence of a related event (S113). If the generated event is a printer addition event (S115: YES), the local port is added to the list (S117), and the added local A processing thread corresponding to the port is created (S119). The printer addition event is an event that occurs when, for example, a known plug-and-play function is used to detect whether the printer is turned on or a cable is inserted. The occurrence of this printer addition event indicates that a newly available printer has been added and the local port to which the printer is connected. Therefore, by updating the list by the processing of S117 and S119 and creating a processing thread corresponding to the local port added to the list, a processing thread that performs processing equivalent to the processing thread created in the processing of S105 is created. to add. When the process of S119 is completed, the process returns to S113.

一方、S115の処理による判定の結果、発生したイベントがプリンタ追加イベントでなかった場合(S115:NO)、発生したイベントがタイマーイベントであれば(S121:YES)、読み込み/DB化処理2を実行する(S123)。ここで発生するタイマーイベントは、先に説明したS109およびS111の処理によるものである。S123の読み込み/DB化処理2では、被管理PC1に接続されているすべてのプリンタから状態を取得してデータベース(DB)に記録する処理などが行われるが、詳しい処理内容については後述する。そして、タイマーに24時間をセットして(S125)、24時間後に再びタイマーイベントが発生する状態とし、S113の処理へと戻る。   On the other hand, if the event that has occurred is not a printer addition event as a result of the determination in S115 (S115: NO), if the event that has occurred is a timer event (S121: YES), read / DB processing 2 is executed. (S123). The timer event generated here is due to the processing of S109 and S111 described above. In the reading / DB conversion process 2 in S123, a process of acquiring the status from all the printers connected to the managed PC 1 and recording it in the database (DB) is performed. Details of the process will be described later. Then, the timer is set to 24 hours (S125), and after 24 hours, a timer event occurs again, and the process returns to S113.

また、S121の処理による判定の結果、発生したイベントがタイマーイベントでなかった場合(S121:NO)、発生したイベントが終了指示イベントであれば(S127:YES)、本処理を終了する。終了指示イベントは、利用者が入力部12を利用して所定の終了操作を行った際に発生するイベントである。一方、終了指示イベントでなければ(S127:NO)、S113の処理へと戻り、再び関連イベントの発生を待つ状態になる。すなわち、被管理PC1が作動状態にある場合、利用者が終了操作を行わない限り、本処理が終了することはなく、本処理は被管理PC1上の常駐プロセスとして実行され続けることになる。   As a result of the determination in S121, if the event that has occurred is not a timer event (S121: NO), the process ends if the event that has occurred is an end instruction event (S127: YES). The end instruction event is an event that occurs when the user performs a predetermined end operation using the input unit 12. On the other hand, if it is not an end instruction event (S127: NO), the process returns to the process of S113 and again waits for the occurrence of a related event. That is, when the managed PC 1 is in an operating state, this process does not end unless the user performs an end operation, and this process continues to be executed as a resident process on the managed PC 1.

さて、次に上記S105およびS119の各処理において作成される処理スレッドの処理(以下、スレッド処理という)について、図4のフローチャートに基づいて説明する。このスレッド処理は、上述の通り、プリンタが接続されているローカルポートの総数と同数が並列に実行され、それら複数のスレッド処理は、それぞれが一つのローカルポートに対応するスレッド処理となっている。   Next, processing of processing threads (hereinafter referred to as thread processing) created in the processes of S105 and S119 will be described with reference to the flowchart of FIG. As described above, this thread process is executed in parallel with the same number as the total number of local ports to which the printer is connected, and each of these thread processes is a thread process corresponding to one local port.

このスレッド処理を開始すると、被管理PC1は、プリンタ関連イベントの発生を待ち(S201)、発生したイベントが印字終了イベントであれば(S203:YES)、本スレッド処理に対応するプリンタを出力先とする印字ジョブを列挙する(S205)。具体的には、プリンタ情報取得部124が印刷スプーラ123(図2参照)から情報を取得し、S205の処理時点においてキュー131に入れられている印字ジョブに関する情報(印字ジョブ情報)がリストアップされる。キュー131は、1つのプリンタに対してリクエストされた印字ジョブが補助記憶部14(あるいはRAM113)に記憶され、OSによって順序づけて管理された集合体である。そして、リストアップされた印字ジョブ情報を参照してジョブ数を計数し(S207)、そのジョブ数が設定値N以下かどうかをチェックする(S209)。   When this thread process is started, the managed PC 1 waits for the occurrence of a printer-related event (S201). If the generated event is a print end event (S203: YES), the printer corresponding to this thread process is set as the output destination. The print jobs to be listed are listed (S205). Specifically, the printer information acquisition unit 124 acquires information from the print spooler 123 (see FIG. 2), and information (print job information) related to the print job that is queued at the time of the processing of S205 is listed. The The queue 131 is an aggregate in which print jobs requested for one printer are stored in the auxiliary storage unit 14 (or RAM 113) and are managed in order by the OS. Then, the number of jobs is counted with reference to the listed print job information (S207), and it is checked whether the number of jobs is equal to or less than a set value N (S209).

本実施形態においては、設定値N=0とされており、S209の処理ではジョブ数が0かどうかがチェックされることになる。ジョブ数が0かどうかをチェックするための具体的な手順は、最も基本的には、S205の処理によってリストアップされた印字ジョブ情報の数が0であるかどうかを調べるだけでもよい。ただし、本実施形態の場合、S205の処理によってリストアップされる印字ジョブ情報内には、ジョブステータスという項目があり、一つの印字ジョブにおいて出力データの送信が完了すると、まずジョブステータスに「送信済み」という情報がセットされ、その後、OS側で管理する所定のタイミングで印字ジョブ情報そのものが消去されるようになっている。そのため、S205の処理によってリストアップされた印字ジョブ情報が1つだけ存在する場合でも、その印字ジョブ情報内のジョブステータスに「送信済み」という情報がセットされていれば、該当するジョブは既に存在しないものと見なすことができる。そこで、本実施形態におけるS209の処理では、リストアップされた印字ジョブ情報の数が0の場合はもちろんのこと、印字ジョブ情報の数が1の場合でも、印字ジョブ情報内のジョブステータスが「送信済み」となっていれば、ジョブ数が0であると判定する。   In the present embodiment, the setting value N = 0, and it is checked whether the number of jobs is 0 in the processing of S209. The specific procedure for checking whether or not the number of jobs is 0 is most basically just to check whether or not the number of print job information listed in S205 is zero. However, in the case of this embodiment, the print job information listed in the process of S205 includes an item called job status. When transmission of output data is completed in one print job, the job status is first set to “Sent. Is set, and then the print job information itself is erased at a predetermined timing managed on the OS side. Therefore, even if there is only one print job information listed in the process of S205, if the information “sent” is set in the job status in the print job information, the corresponding job already exists. It can be regarded as not. Therefore, in the processing of S209 in this embodiment, not only when the number of listed print job information is 0, but also when the number of print job information is 1, the job status in the print job information is “Send”. If it is “completed”, it is determined that the number of jobs is zero.

S209の処理において、ジョブ数が設定値N以下の場合(S209:YES)、被管理PC1は、機種判定・DB書込処理を実行する(S211)。このS211の機種判定・DB書込処理は、詳しくは図5のフローチャートに示すような処理になる。   If the number of jobs is equal to or less than the set value N in the process of S209 (S209: YES), the managed PC 1 executes a model determination / DB write process (S211). The model determination / DB writing process in S211 is the process shown in detail in the flowchart of FIG.

機種判定・DB書込処理を開始すると、被管理PC1は、まず、先に説明した1284IDを対象プリンタから取得する(S231)。このS231の処理では、対象プリンタがデバイスIDをサポートしているプリンタであれば、そのプリンタから1284IDを取得することができる。一方、IEEE1284規格に準拠していないプリンタや、IEEE1284規格に準拠していてもデバイスIDをサポートしていないプリンタの場合、そのプリンタから1284IDを取得することはできない。   When the model determination / DB writing process is started, the managed PC 1 first obtains the 1284 ID described above from the target printer (S231). In the process of S231, if the target printer supports a device ID, 1284 ID can be acquired from the printer. On the other hand, in the case of a printer that does not conform to the IEEE1284 standard or a printer that conforms to the IEEE1284 standard but does not support the device ID, the 1284ID cannot be acquired from the printer.

そこで、被管理PC1は、1284IDの取得に失敗したかどうかをチェックし(S233)、失敗していなければ(S233:NO)、非対象プリンタかどうかをチェックする(S235)。被管理PC1は、本システムによる管理対象として想定しているプリンタの機種すべてについての1284IDを登録したリストを備えており、取得した1284IDがリスト中に登録されていれば、対象プリンタであると判定し、取得した1284IDがリスト中に登録されていなければ、非対象プリンタであると判定する。   Therefore, the managed PC 1 checks whether or not the acquisition of 1284 ID has failed (S233), and if it has not failed (S233: NO), it checks whether or not it is a non-target printer (S235). The managed PC 1 has a list in which 1284 IDs are registered for all printer models that are assumed to be managed by this system. If the acquired 1284 ID is registered in the list, the managed PC 1 is determined to be a target printer. If the acquired 1284 ID is not registered in the list, it is determined that the printer is a non-target printer.

S235の処理において、対象プリンタであった場合は(S235:NO)、読み取り/DB化処理1を実行する(S237)。このS237の読み取り/DB化処理1は、詳しくは図6のフローチャートに示すような処理になる。   In the process of S235, if it is the target printer (S235: NO), the reading / DB conversion process 1 is executed (S237). The reading / DB conversion processing 1 in S237 is the processing shown in detail in the flowchart of FIG.

読み取り/DB化処理1を開始すると、被管理PC1は、まず、対象プリンタをオープンする(S301)。この際に、UELコマンドが印刷スプーラ123を介して対象プリンタに送られる。この処理により、対象プリンタは、PJLコマンドを処理可能となる。そして、被管理PC1は、コマンドファイル132からのコマンド取り出し処理を実行する(S305)。このS305のコマンド取り出し処理は、詳しくは図7のフローチャートに示すような処理になる。   When the reading / DB conversion processing 1 is started, the managed PC 1 first opens the target printer (S301). At this time, a UEL command is sent to the target printer via the print spooler 123. With this process, the target printer can process the PJL command. The managed PC 1 executes command extraction processing from the command file 132 (S305). The command extraction process in S305 is the process shown in detail in the flowchart of FIG.

コマンド取り出し処理を開始すると、被管理PC1は、まず、テーブルの次行を選択する(S331)。S331の処理において読み出し対象となるテーブルは、コマンドファイル132に格納されているテーブルである。コマンドファイル132には、図8に示すようなデータ形式のテーブルが格納されており、このテーブルの1行は、機種項、コマンド項、キー項、ラベル項によって構成されている。   When the command retrieval process is started, the managed PC 1 first selects the next row of the table (S331). The table to be read in the processing of S331 is a table stored in the command file 132. The command file 132 stores a table in a data format as shown in FIG. 8, and one line of this table is composed of a model item, a command item, a key item, and a label item.

機種項は、同じ行内のコマンド項およびキー項に格納された文字列から生成されるPJLコマンドについて、当該PJLコマンドに対する応答を返すことができる機種(以下、対応機種という)の情報を格納する領域である。より具体的には、機種項には、“*”、“¥”、“−”、および「機種名を示す文字列」の組み合わせにより、対応機種に関する情報が格納されている。これらのうち、“*”はすべての機種を表し、“¥”は「機種名を示す文字列」を複数列挙する際に用いるデリミタとして用いられ、“−”は後続する「機種名を示す文字列」が、その前に挙げられた対応機種から除外される機種であることを示す。例えば、図8に示すテーブルの1行目にある“Device1¥Device2”は、機種“Device1”と機種“Device2”が対応機種であることを示している。また、同図に示すテーブルの2行目にある“*−Device1¥Device2”は、すべての機種から機種“Device1”と機種“Device2”を除外したものが対応機種であることを示している。さらに、同図に示すテーブルの3、4行目にある“*”は、すべての機種が対応機種であることを示している。なお、“*”と“−”に後続しない「機種名を示す文字列」が、本発明でいう応答可能機種情報に相当し、“−”に後続する「機種名を示す文字列」が、本発明でいう応答不能機種情報に相当する。   The model item is an area for storing information on a model (hereinafter referred to as a supported model) that can return a response to the PJL command for the PJL command generated from the character string stored in the command item and the key item in the same line. It is. More specifically, in the model item, information on the corresponding model is stored by a combination of “*”, “¥”, “−”, and “character string indicating the model name”. Among these, “*” represents all models, “¥” is used as a delimiter used when enumerating a plurality of “character strings indicating model names”, and “-” is a subsequent “character indicating model name” "Column" indicates that the model is excluded from the corresponding models listed before. For example, “Device1 ¥ Device2” on the first line of the table shown in FIG. 8 indicates that the model “Device1” and the model “Device2” are compatible models. Further, “* -Device1 ¥ Device2” in the second row of the table shown in FIG. 5 indicates that a model obtained by excluding the model “Device1” and the model “Device2” from all models is a compatible model. Furthermore, “*” in the third and fourth rows of the table shown in FIG. 4 indicates that all models are compatible models. The “character string indicating the model name” not following “*” and “−” corresponds to the respondable model information referred to in the present invention, and the “character string indicating the model name” following “-” is This corresponds to the unresponsive model information in the present invention.

コマンド項およびキー項は、PJLコマンドを生成するために使われる文字列を格納する領域である。PJLコマンドを生成する際には、“@PJL 「コマンド項の文字列」 「キー項の文字列」”という形式でPJLコマンドを生成することになる。例えば、図8に示すテーブルの1行目にあるデータからPJLコマンドを生成する場合であれば、“@PJL INFO PAGES”というPJLコマンドが生成される。   The command term and key term are areas for storing character strings used to generate a PJL command. When the PJL command is generated, the PJL command is generated in the format of “@PJL“ character string of command item ”“ character string of key item ”, for example, the first line of the table shown in FIG. If a PJL command is to be generated from data in the PJL command, a PJL command “@PJL INFO PAGES” is generated.

ラベル項は、同じ行内のコマンド項およびキー項に格納された文字列から生成されるPJLコマンドについて、当該PJLコマンドによって取得されるプリンタ情報の内容を表す文字列を格納する領域である。なお、このラベル項に格納された文字列は、後述するS353〜S355の処理において利用される。   The label term is an area for storing a character string representing the content of the printer information acquired by the PJL command for the PJL command generated from the character string stored in the command term and the key term in the same line. Note that the character string stored in the label item is used in the processing of S353 to S355 described later.

なお、図8に示すようなデータ形式のテーブルは、多くの場合、CSV(Comma Separated Values)形式などの汎用性が高いデータ構造を持つファイルとして格納されるが、実質的に同等のデータを読み書きできるものであれば、データを格納したファイルの物理的構造や論理的構造については任意である。   Note that the data format table shown in FIG. 8 is often stored as a file having a highly versatile data structure such as CSV (Comma Separated Values) format, but substantially equivalent data is read and written. If possible, the physical structure and logical structure of the file storing the data are arbitrary.

上記S331の処理では、テーブルから1行もデータが読み出されていなければ、テーブルの1行目が次行として選択され、既にテーブルのn行目までデータが読み出されていれば、テーブルのn+1行目が次行として選択され、既にテーブルの最終行までデータが読み出されていれば、全行終了ということになる。   In the processing of S331, if no data has been read from the table, the first row of the table is selected as the next row, and if data has already been read up to the nth row of the table, If the (n + 1) th row is selected as the next row and data has already been read up to the last row of the table, it means that all rows have been completed.

全行終了でない場合(S333:NO)、選択された1行を対象にしてテーブルから機種項を読み出す(S335)。そして、機種項に格納されていた文字列を解析し、先にS231の処理で取得した1284IDの示す機種を含むか否かをチェックする(S337)。例えば、図8に示すテーブルの1行目を対象とする場合、S335の処理では、文字列“Device1¥Device2”が読み出されるので、先に取得した1284IDの示す機種が、“Device1”または“Device2”であれば、S337の処理では、1284IDの示す機種を含むとの判定がなされる。   If it is not the end of all lines (S333: NO), the model item is read from the table for the selected one line (S335). Then, the character string stored in the model item is analyzed, and it is checked whether or not the model indicated by 1284ID previously acquired in the process of S231 is included (S337). For example, when the first row of the table shown in FIG. 8 is targeted, since the character string “Device1 ¥ Device2” is read in the process of S335, the model indicated by the previously acquired 1284ID is “Device1” or “Device2”. If "," in the process of S337, it is determined that the model indicated by 1284ID is included.

S337の処理において、1284IDの示す機種を含む場合(S337:YES)、選択された1行を対象にして順次コマンド(=コマンド項に格納された文字列)とデータ(キー項に格納された文字列)とを読み出し(S339)、送信文字列を生成する(S341)。例えば、図8に示すテーブルの1行目を対象とする場合、S339の処理では、文字列“INFO”と文字列“PAGES”が読み出され、S341の処理では“@PJL INFO PAGES”という送信文字列(PJLコマンド)が生成される。   In the process of S337, when the model indicated by 1284ID is included (S337: YES), the command (= character string stored in the command item) and data (characters stored in the key item) are sequentially applied to the selected one line. Column) is read (S339), and a transmission character string is generated (S341). For example, when the first row of the table shown in FIG. 8 is targeted, the character string “INFO” and the character string “PAGES” are read out in the process of S339, and the transmission “@PJL INFO PAGES” is executed in the process of S341. A character string (PJL command) is generated.

また、S337の処理において、1284IDの示す機種を含まない場合は(S337:NO)、S331の処理へと戻り、再びS331〜S337の処理が繰り返されることになる。そして、この繰り返し処理の中で何回か実行されるS337の処理において、1284IDの示す機種を含むと判定された場合も(S337:YES)、上記S339およびS341の処理を実行する。   In the process of S337, when the model indicated by 1284ID is not included (S337: NO), the process returns to S331, and the processes of S331 to S337 are repeated again. If it is determined that the model indicated by 1284ID is included in the process of S337 that is executed several times during this repetition process (S337: YES), the processes of S339 and S341 are executed.

そして、上記S339およびS341の処理を実行した場合か、もしくは、S331〜S337の処理を何回か繰り返した結果、S333の処理において全行終了となった場合は(S333:YES)、本処理を終了する。   Then, when the processes of S339 and S341 are executed, or when the process of S331 to S337 is repeated several times, and all the lines are completed in the process of S333 (S333: YES), this process is performed. finish.

こうしてS331〜S341の処理を終えると、図6に示したS303の処理を終えたことになるので、続いて、被管理PC1は、全コマンド終了か否かをチェックする(S305)。ここで全コマンド終了と判定されるのは、上記S333の処理において全行終了(S333:YES)となった場合であり、これ以外の場合は、上記S339およびS341の処理により、送信文字列(PJLコマンド)が生成されている。   When the processing of S331 to S341 is completed in this way, the processing of S303 shown in FIG. 6 is completed, and then the managed PC 1 checks whether all commands are completed (S305). Here, it is determined that the end of all commands is the end of all lines (S333: YES) in the processing of S333. In other cases, the transmission character string (S339 and S341) is processed. PJL command) is generated.

そこで、全コマンド終了でない場合は(S305:NO)、生成した送信文字列(PJLコマンド)をプリンタに送信する(S307)。このS307の処理で送信されるデータは、プリンタ情報取得部124により印刷スプーラ123に渡され、一つの印字ジョブとしてキュー131に入れられ、後は通常の印字ジョブと同様に処理されて、印刷スプーラ123によりプリンタI/F機能部121(図2参照)に渡され、プリンタ側へと出力される。   Therefore, if not all commands are completed (S305: NO), the generated transmission character string (PJL command) is transmitted to the printer (S307). The data transmitted in the process of S307 is transferred to the print spooler 123 by the printer information acquisition unit 124, is put in the queue 131 as one print job, and is then processed in the same manner as a normal print job. 123 is passed to the printer I / F function unit 121 (see FIG. 2) and output to the printer side.

続いて、送信が成功したか否かをチェックし(S309)、送信成功であれば(S309:YES)、対象プリンタから送信されてくる情報(プリンタ情報)を受信する(S311)。このS311の処理は、被管理PC1側においてプリンタ側から返されるプリンタ情報をリードバックする処理であるが、より具体的な処理方法は対象プリンタによっても異なる。例えば、対象プリンタがパラレルI/Fを介して接続されている場合は、プリンタ情報取得部124がOSのプリンタI/F機能部121を通じて、まず被管理PC1側へ返される情報の有無をチェックした後、情報が存在する場合にその情報の受信を行う。また、対象プリンタがUSB I/Fを介して接続されている場合は、プリンタ情報取得部124がOSのプリンタI/F機能部121を通じて、まず情報の受信を行った後、情報量が0であった場合に再び情報の受信を繰り返す、といった処理になる。   Subsequently, it is checked whether or not the transmission is successful (S309). If the transmission is successful (S309: YES), information (printer information) transmitted from the target printer is received (S311). The process of S311 is a process of reading back the printer information returned from the printer side on the managed PC 1 side, but a more specific processing method differs depending on the target printer. For example, when the target printer is connected via a parallel I / F, the printer information acquisition unit 124 first checks whether there is information returned to the managed PC 1 side through the printer I / F function unit 121 of the OS. Thereafter, when the information exists, the information is received. If the target printer is connected via the USB I / F, the printer information acquisition unit 124 first receives information through the printer I / F function unit 121 of the OS, and the amount of information is 0. In such a case, the information reception is repeated again.

ただし、いずれの場合とも、受信後は、受信が成功したか否かをチェックし(S313)、受信成功であれば(S313:YES)、何らかのデータを受信するので、そのデータが有効データであるかどうかをチェックし(S315)、有効データでない場合は(S315:NO)、S311以降の処理をやり直し、有効データであった場合は(S315:YES)、DB(結果ファイル)書き込み処理を実行する(S317)。このS317のDB(結果ファイル)書き込み処理は、詳しくは図9のフローチャートに示すような処理になる。   However, in any case, after reception, it is checked whether or not the reception is successful (S313). If the reception is successful (S313: YES), some data is received, so that data is valid data. If the data is not valid data (S315: NO), the processing after S311 is performed again. If the data is valid data (S315: YES), DB (result file) writing processing is executed. (S317). The DB (result file) writing process in S317 is the process shown in detail in the flowchart of FIG.

DB(結果ファイル)書き込み処理を開始すると、被管理PC1は、まず、リードバックデータを解析し、キーと値の分割を行う(S351)。このS351処理について、具体例を挙げながら説明すると、例えば、図8に示すテーブルの2行目に基づき、PJLコマンドである送信文字列“@PJL INFO PAGECOUNT”を生成し、プリンタへと送信した場合、リードバックデータとしては、例えば、文字列“@PJL INFO PAGECOUNT<CR>PAGECOUNT=2098<CR><FF>”を受信する。この受信文字列中、前半部分は送信したPJLコマンドそのものであり、その後ろの“<CR>”は改行コード、“PAGECOUNT=”はPJLコマンドに応じて付加される文字列、“2098”がデバイス内で管理されていた値(この場合は、印刷枚数)、その後ろの“<CR>”も改行コード、その後ろの“<FF>”は改ページコードである。S351の処理では、この受信文字列を解析し、キーである“PAGECOUNT”と、値である“2098”を、受信文字列中から切り出す処理が行われる。   When the DB (result file) writing process is started, the managed PC 1 first analyzes the readback data and divides the key and the value (S351). The S351 process will be described with a specific example. For example, when a transmission character string “@PJL INFO PAGE COUNT”, which is a PJL command, is generated and transmitted to the printer based on the second line of the table shown in FIG. As the read back data, for example, the character string “@PJL INFO PAGE COUNT <CR> PAGE COUNT = 2209 <CR> <FF>” is received. In this received character string, the first half is the transmitted PJL command itself, “<CR>” after that is a line feed code, “PAGECOUNT =” is a character string added according to the PJL command, and “2098” is the device. The value managed in (in this case, the number of printed sheets), the “<CR>” after that is a line feed code, and the “<FF>” after that is a page break code. In the process of S351, this received character string is analyzed, and a process of extracting “KEY COUNT” as a key and “2098” as a value from the received character string is performed.

続いて、被管理PC1は、S351の処理によって得たキーに対応するラベルをコマンドファイル132より読み出す(S353)。コマンドファイル132には、先に説明した通り、図8に示すようなデータ形式のテーブルが格納されているので、このテーブルのラベル項からラベルとなる文字列を読み出す。   Subsequently, the managed PC 1 reads the label corresponding to the key obtained by the process of S351 from the command file 132 (S353). Since the command file 132 stores a table in a data format as shown in FIG. 8 as described above, a character string serving as a label is read from the label section of this table.

そして、“機種,ポート,ラベル,値<CR>”の形式を持つカンマ区切りの文字列を作成する(S355)。このS355の処理で作成する文字列中、“機種”は、先に説明したS231の処理で取得した1284IDに対応する機種名を表す文字列(例えば、“Device1”)、“ポート”は、本処理が対象としているローカルポート(注:本処理は、ローカルポート毎に作成されるスレッドの中で呼ばれる処理であり、特定のローカルポートのみが処理対象となっている)を表す文字列(例えば、“LPT1”)、“ラベル”は、上記S353の処理で読み出した文字列(例えば“Pages”)、“値”は、上記S351の処理で取り出された値を示す文字列(例えば、“2098”)である。これらの文字列をカンマで区切るとともに、末尾に改行コード<CR>を付加してなる文字列が、S355の処理によって作成される。   Then, a comma-delimited character string having a format of “model, port, label, value <CR>” is created (S355). In the character string created in the process of S355, “model” is a character string (for example, “Device1”) representing the model name corresponding to the 1284 ID acquired in the process of S231 described above, and “port” is A character string (for example, this process is called in a thread created for each local port, and only a specific local port is the target of processing) “LPT1”) and “label” are character strings read out in the process of S353 (for example, “Pages”), and “value” is a character string indicating the value extracted in the process of S351 (for example, “2098”). ). A character string formed by separating these character strings with a comma and adding a carriage return code <CR> at the end is created by the process of S355.

その後、S355の処理によって作成された文字列をDB(結果ファイル133)に書き出して(S357)、本処理を終える。
こうしてS351〜S357の処理を終えると、図6に示したS317の処理を終えたことになる。このS317の処理により、補助記憶部14内に確保されたDB(結果ファイル133)には、S307の処理によって対象プリンタに対して要求した1コマンド分の要求に対応する応答情報が記録されることになる。
After that, the character string created by the process of S355 is written to the DB (result file 133) (S357), and this process ends.
When the processing of S351 to S357 is finished in this way, the processing of S317 shown in FIG. 6 is finished. By the process of S317, response information corresponding to the request for one command requested to the target printer by the process of S307 is recorded in the DB (result file 133) secured in the auxiliary storage unit 14. become.

これらS303〜S317の処理は、途中でエラーが発生しない限り、全コマンド終了まで繰り返し実行される(S305:NO)。この繰り返し処理において、S303の処理では、コマンドファイル132に記録された複数のコマンドが順に取り出されることになる。そして、それら複数のコマンドすべてが処理(プリンタ側へ送信)されると、全コマンド終了となる(S305:YES)。その結果、補助記憶部14内に確保されたDB(結果ファイル133)には、対象プリンタに対して要求した全コマンド分の要求に対応する応答情報が記録されることになる。その後は、対象プリンタをクローズして(S319)、本処理を終える。   The processes in S303 to S317 are repeatedly executed until the end of all commands unless an error occurs in the middle (S305: NO). In this repetitive process, in the process of S303, a plurality of commands recorded in the command file 132 are extracted in order. When all the commands are processed (sent to the printer), all commands are completed (S305: YES). As a result, response information corresponding to requests for all commands requested to the target printer is recorded in the DB (result file 133) secured in the auxiliary storage unit 14. Thereafter, the target printer is closed (S319), and this process is finished.

なお、S303〜S317の処理途中でエラーが発生する場合もある。
具体的には、まず、S309の処理において送信失敗と判定される場合がある(S309:NO)。この場合、被管理PC1は、プリンタのステータスを取得し(S321)、DB(結果ファイル133)にプリンタのステータスを書き込み(S323)、対象プリンタをクローズして(S319)、本処理を終える。S323の処理では、“機種,ポート,エラー原因,<CR>”の形式を持つカンマ区切りの文字列を作成し、この文字列をDB(結果ファイル133)に書き出す。この文字列中、“機種”および“ポート”は、上記S355の処理で利用した文字列と同様のものであり、“エラー原因”は、S321の処理で取得したステータスによっても変わり得る文字列であるが、例えば、紙切れが原因でPJLコマンドが受け付けられない状態になっている場合であれば、S321の処理で紙切れを示すステータスが得られるので、文字列“PE エラー”などが使われる。
An error may occur during the processing of S303 to S317.
Specifically, first, it may be determined that transmission has failed in the process of S309 (S309: NO). In this case, the managed PC 1 acquires the printer status (S321), writes the printer status in the DB (result file 133) (S323), closes the target printer (S319), and ends this processing. In the process of S323, a comma-delimited character string having the format “model, port, error cause, <CR>” is created, and this character string is written to the DB (result file 133). In this character string, “model” and “port” are the same as the character string used in the process of S355, and “cause of error” is a character string that can change depending on the status acquired in the process of S321. However, for example, if the PJL command cannot be accepted due to running out of paper, a character string “PE error” or the like is used because a status indicating running out of paper is obtained in the process of S321.

また、S313の処理において受信失敗と判定される場合がある(S313:NO)。この場合、被管理PC1は、DB(結果ファイル133)に受信失敗を示すエラー情報を書き込む(S325)。このS325の処理でも、“機種,ポート,エラー原因,<CR>”の形式を持つカンマ区切りの文字列を作成し、この文字列をDB(結果ファイル133)に書き出す。この文字列中、“機種”および“ポート”は、上記S355またはS323の処理で利用した文字列と同様のものである。“エラー原因”は、プリンタからの応答が無かったことを示すため、例えば、文字列“NotResponse”などが使われる。そして、対象プリンタをクローズして(S319)、本処理を終える。なお、対象プリンタをクローズする際には、クローズに先立ち、プリンタにUELが送られ、PJLコマンドモードが解除される。   Moreover, it may be determined that the reception has failed in the process of S313 (S313: NO). In this case, the managed PC 1 writes error information indicating reception failure in the DB (result file 133) (S325). Also in the process of S325, a comma-delimited character string having the format “model, port, error cause, <CR>” is created, and this character string is written to the DB (result file 133). In this character string, “model” and “port” are the same as the character strings used in the processing of S355 or S323. “Error cause” indicates that there is no response from the printer. For example, a character string “NotResponse” is used. Then, the target printer is closed (S319), and this process is finished. When closing the target printer, UEL is sent to the printer prior to closing, and the PJL command mode is canceled.

以上のようにして、S301〜S319の処理を終えると、図5に示したS237の処理(読み取り/DB化処理1)を終えたことになる(この場合、正常終了)。
なお、上記S233またはS235の処理でエラーが発生する場合もある。
When the processing of S301 to S319 is completed as described above, the processing of S237 (reading / DB conversion processing 1) shown in FIG. 5 is finished (in this case, normal termination).
An error may occur in the process of S233 or S235.

具体的には、まず、上記S233の処理において、1284IDの取得に失敗する場合がある(S233:YES)。この場合、10回まではS231の処理へと戻ることにより(S241:NO)、1284IDの再取得を試みる。そして、S234の処理へ10回戻ったにもかかわらず、1284IDの取得に失敗した場合(S241:YES)、被管理PC1は、電源/ケーブル確認のメッセージを表示部13に表示する(S243)。   Specifically, first, in the process of S233, acquisition of 1284ID may fail (S233: YES). In this case, by returning to the processing of S231 up to 10 times (S241: NO), reacquisition of 1284ID is attempted. If the acquisition of 1284 ID fails (S241: YES) despite returning to the processing of S234 10 times, the managed PC 1 displays a power / cable confirmation message on the display unit 13 (S243).

ここで、利用者は、入力部12を利用して、OK/Cancelのいずれかの指示を入力する操作を行うことができる。利用者がプリンタの電源やケーブルを確認し、その結果、エラー原因を解消することができ、本処理を継続したいと考えた場合、利用者はOKの指示を入力すればよい。また、利用者が本処理を中断してもよいと考えた場合、利用者はCancelの指示を入力すればよい。   Here, the user can use the input unit 12 to perform an operation to input any instruction of OK / Cancel. If the user confirms the printer power supply or cable, and as a result, the cause of the error can be resolved, and the user wishes to continue this process, the user may input an OK instruction. If the user thinks that this process may be interrupted, the user may input a cancel instruction.

OKの指示が入力された場合(S245:YES)、S231の処理へと戻り、被管理PC1は、本処理を最初からやり直す。一方、Cancelの指示が入力された場合(S245:NO)、被管理PC1は、プリンタが準備できていない旨をDB(結果ファイル133)に書き込んで(S247)、本処理を終える(この場合、エラー終了)。なお、S247の処理では、“ ,ポート,エラー原因,<CR>”の形式を持つカンマ区切りの文字列を作成し、この文字列をDB(結果ファイル133)に書き出す。この文字列中、ポート”は、上記S355、S323、S325の処理で利用した文字列と同様のものである。“エラー原因”は、適切な1284IDを取得できていないことを示すため、例えば、文字列“1284ID エラー”などが使われる。また、上記S355、S323、S325の処理とは異なり、適切な1284IDを取得できていないことから、作成する文字列中に“機種名”を入れることができないので、“機種名”に相当する部分はブランクとされる。   When an OK instruction is input (S245: YES), the process returns to the process of S231, and the managed PC 1 restarts this process from the beginning. On the other hand, when the Cancel instruction is input (S245: NO), the managed PC 1 writes in the DB (result file 133) that the printer is not ready (S247) and ends this process (in this case, Error Exit). In the process of S247, a comma-delimited character string having the format “, port, error cause, <CR>” is created, and this character string is written to the DB (result file 133). In this character string, “port” is the same as the character string used in the processing of S355, S323, and S325. “Error cause” indicates that an appropriate 1284 ID has not been acquired. A character string “1284ID error”, etc. is used, and unlike the processes of S355, S323, and S325, an appropriate 1284ID has not been acquired, so “model name” may be included in the character string to be created. Since this is not possible, the part corresponding to “model name” is blank.

また、上記S235の処理において、非対象プリンタであった場合(S235:YES)、被管理PC1は、機種確認のメッセージを表示部13に表示する(S249)。
ここで、利用者は、入力部12を利用して、OK/Cancelのいずれかの指示を入力する操作を行うことができる。利用者が機種を確認し、その結果、本処理を継続したいと考えた場合、利用者はOKの指示を入力すればよい。また、利用者が本処理を中断してもよいと考えた場合、利用者はCancelの指示を入力すればよい。
In the process of S235, if the printer is a non-target printer (S235: YES), the managed PC 1 displays a model confirmation message on the display unit 13 (S249).
Here, the user can use the input unit 12 to perform an operation to input any instruction of OK / Cancel. If the user confirms the model and, as a result, wishes to continue this process, the user may input an OK instruction. If the user thinks that this process may be interrupted, the user may input a cancel instruction.

以降は、先に説明したS245の処理へと移行し、OKの指示が入力された場合(S245:YES)、S231の処理へと戻り、被管理PC1は、本処理を最初からやり直す。一方、Cancelの指示が入力された場合(S245:NO)、被管理PC1は、プリンタが準備できていない旨をDB(結果ファイル133)に書き込んで(S247)、本処理を終える(この場合、エラー終了)。なお、上記S245〜S247の処理は、上記S243の処理を終えた場合と上記S249の処理を終えた場合、これら2つのケースで別になっていてもよく、その場合、いずれのケースであったのかがわかるようなエラー情報を残すことができる。また、上記S247の処理の中で、上記2つのケースのいずれであったのかを判定した上で、いずれのケースであったのかがわかるようなエラー情報を残してもよい。   Thereafter, the process proceeds to the process of S245 described above, and if an OK instruction is input (S245: YES), the process returns to the process of S231, and the managed PC 1 restarts the process from the beginning. On the other hand, when the Cancel instruction is input (S245: NO), the managed PC 1 writes in the DB (result file 133) that the printer is not ready (S247) and ends this process (in this case, Error Exit). Note that the processes of S245 to S247 may be different in these two cases when the process of S243 is finished and when the process of S249 is finished. In which case, which was the case? It is possible to leave error information that can be understood. Further, in the process of S247, after determining which of the above two cases was made, it is possible to leave error information so as to know which case it was.

以上のようにしてS231〜S247の処理を終えると、図4に示したS211の処理を終えたことになるので、その後は、S211の処理を正常終了した場合は(S213:YES)、S201の処理へと戻る一方、S211の処理をエラー終了した場合は、本スレッド処理を終了する。また、S207の処理で計数したジョブ数が設定値Nを超える場合も(S209:NO)、そのままS201の処理へと戻る。さらに、S203の処理において、印字終了イベントでないと判定した場合も(S203:NO)、そのままS201の処理へと戻る。   When the processes of S231 to S247 are completed as described above, the process of S211 shown in FIG. 4 is completed. Thereafter, when the process of S211 is normally completed (S213: YES), the process of S201 is completed. On the other hand, if the process of S211 ends with an error while returning to the process, the present thread process ends. Also, when the number of jobs counted in the process of S207 exceeds the set value N (S209: NO), the process returns to the process of S201 as it is. Furthermore, if it is determined in the process of S203 that the event is not a print end event (S203: NO), the process directly returns to the process of S201.

したがって、以上説明したスレッド処理は、プリンタが接続されたローカルポートが存在する場合に、処理スレッドが作成されるのに伴って処理を開始し、以後は、エラーが発生しない限り、処理を継続することになる。そして、その処理の中で、印字終了イベントが発生するたびに印字ジョブ数を調べ、印字ジョブ数が設定値N以下であれば、ローカルポートを介して接続されたプリンタからプリンタ情報を取得、そのプリンタ情報を補助記憶部14内に確保されたDB(結果ファイル133)に書き込むのである。また、エラー情報についても、プリンタ情報を書き込む場合と互換性のあるレコード形式(本実施形態の場合、1行4項目のカンマ区切り形式(CSV形式))でDB(結果ファイル133)に書き込む。その結果、DB(結果ファイル133)には、図10に例示するようなデータ群が保存されることになる。   Therefore, the thread processing described above starts when a processing thread is created when there is a local port to which the printer is connected, and continues thereafter unless an error occurs. It will be. During this process, the number of print jobs is checked each time a print end event occurs. If the number of print jobs is equal to or less than the set value N, printer information is acquired from the printer connected via the local port. The printer information is written in a DB (result file 133) secured in the auxiliary storage unit 14. The error information is also written in the DB (result file 133) in a record format compatible with the case of writing printer information (in this embodiment, a comma-separated format (CSV format) with four items per line). As a result, a data group as illustrated in FIG. 10 is stored in the DB (result file 133).

なお、上記処理のように印字終了イベントが発生するたびに印字ジョブ数を調べれば、印字終了イベントの発生とは無関係に印字ジョブ数を調べるのに比べ、印字ジョブ数が設定値N以下とるタイミングを見逃しにくくなり、対象プリンタからプリンタ情報を取得する機会が増えることになる。また、本実施形態の場合、設定値N=0となっているので、印字ジョブ数が0となった時にだけ、S211の処理により対象プリンタからプリンタ情報を取得する。そのため、印字処理完了までに時間を要する印字ジョブが先にキュー131に入れられていることが原因で、対象プリンタからプリンタ情報を取得するまでに時間を要することはない。 Incidentally, by examining the number of print jobs whenever a print end event as described above process occurs, compared to determine the number of independent print job generation and printing end event, it the number of print jobs is equal to or smaller than a set value N This makes it difficult to overlook the timing of printing and increases the opportunity to acquire printer information from the target printer. In the present embodiment, since the set value N = 0, only when the number of print jobs becomes 0, the printer information is acquired from the target printer by the process of S211. For this reason, it takes no time to acquire printer information from the target printer because a print job that takes time to complete the printing process is queued first.

ところで、上記スレッド処理によるDB(結果ファイル133)への情報記録は、上述の通り、印字ジョブ数が0となった時にのみ実施されるので、理論的には、絶え間なく印字ジョブが発生しているような環境下では、なかなか印字ジョブ数が0とならず、その結果、上記スレッド処理だけでは、DB(結果ファイル133)への情報記録がなされないということも起こり得る。しかし、本システムにおいては、このスレッド処理に加え、上記S109〜S111、およびS121〜S125の処理も実行することにより、事前に設定された設置時刻となった場合には、DB(結果ファイル133)への情報記録を実施するようになっている。   By the way, the information recording to the DB (result file 133) by the thread processing is performed only when the number of print jobs becomes 0 as described above. Therefore, theoretically, print jobs are generated continuously. In such an environment, the number of print jobs does not easily become zero, and as a result, it may happen that information is not recorded in the DB (result file 133) only by the thread processing. However, in this system, in addition to this thread processing, the processing of S109 to S111 and S121 to S125 is also executed, so that when the preset installation time is reached, the DB (result file 133) Information recording is to be implemented.

より詳しく説明すると、先に説明した通り、本システムでは、S109およびS111の処理により、設定時刻が到来するとタイマーイベントが発生するようになっており、タイマーイベントが発生した場合は、S123の処理(読み込み/DB化処理2)を実行するようになっている。このS123の処理は、詳しくは図11のフローチャートに示すような処理になる。   More specifically, as described above, in the present system, a timer event is generated when the set time arrives by the processes of S109 and S111. If a timer event occurs, the process of S123 ( Reading / DB conversion processing 2) is executed. More specifically, the process of S123 is as shown in the flowchart of FIG.

読み込み/DB化処理2を開始すると、被管理PC1は、まずリストより1つのローカルポートを抽出し(S401)、抽出したローカルポートを出力先とする印字ジョブを計数し(S403)、そのジョブ数が0かどうかをチェックする(S405)。このS403およびS405の処理は、先に説明したS207およびS209の処理と同等の方法で実施するとよい。   When the reading / DB conversion processing 2 is started, the managed PC 1 first extracts one local port from the list (S401), counts print jobs that have the extracted local port as an output destination (S403), and the number of jobs. Whether or not is 0 is checked (S405). The processes of S403 and S405 may be performed by a method equivalent to the processes of S207 and S209 described above.

S405の処理による判定の結果、ジョブ数が0でない場合は(S405:NO)、機種判定・DB書込処理を実行してから(S407)、S409の処理へと進み、一方、ジョブ数が0であった場合は(S405:YES)、S407の機種判定・DB書込処理を実行することなく、S409の処理へと進む。   If the number of jobs is not 0 as a result of the determination in S405 (S405: NO), the model determination / DB writing process is executed (S407), and then the process proceeds to S409, while the number of jobs is 0. If it is (S405: YES), the process proceeds to S409 without executing the model determination / DB writing process of S407.

このS407の機種判定・DB書込処理は、先に説明したS211の処理(詳しくは図5および図6に示した処理)と同様の処理なので、ここでの詳細な説明は省略するが、S211の処理と同様に、対象プリンタからプリンタ情報を取得、そのプリンタ情報を補助記憶部14内に確保されたDB(結果ファイル133)に書き込む処理が実行される。以上のようにジョブ数が0でない場合に機種判定・DB書込処理を実行するのは、印字ジョブ数が0とならない環境下でも、本処理によってDB(結果ファイル133)への情報記録を行うためである。一方、ジョブ数が0であった場合に機種判定・DB書込処理を実行しないのは、ジョブ数が0となった時点で、先に説明したスレッド処理による情報記録がなされているはずであり、その後、対象プリンタの状態には変化がないと考えられるためである。   The model determination / DB writing process in S407 is the same as the process in S211 described above (specifically, the process shown in FIGS. 5 and 6), and thus detailed description thereof is omitted here. Similar to the above process, a process of acquiring printer information from the target printer and writing the printer information in a DB (result file 133) secured in the auxiliary storage unit 14 is executed. As described above, when the number of jobs is not 0, the model determination / DB writing process is executed because information is recorded in the DB (result file 133) by this process even in an environment where the number of print jobs is not 0. Because. On the other hand, when the number of jobs is 0, the model determination / DB writing process is not executed because the information recording by the thread processing described above should be performed when the number of jobs becomes 0. This is because it is considered that there is no change in the state of the target printer thereafter.

ここでの機種判定・DB書込処理は、印字ジョブがある状態にて実行されるため、PJLコマンドを送信した場合、それに伴って生成される印字ジョブは、先にキュー131に入っていた印字ジョブの最後に付加される。そのため、その後のリードバックデータに関しても、先にキュー131に溜まっていた印字ジョブがすべて終了するまでは返されることがない。   Since the model determination / DB writing process is executed in a state where there is a print job, when a PJL command is transmitted, the print job generated along with the print job is the print that was previously in the queue 131. Appended to the end of the job. Therefore, the subsequent readback data is not returned until all the print jobs previously accumulated in the queue 131 are completed.

なお、S409の処理へと進んだ際に、リスト上の全ローカルポートに対する処理が終了していなければ(S409:NO)、S401への処理へと戻る。これにより、S401〜S409の処理が、被管理PC1においてプリンタが接続されているローカルポートの総数と同数回分だけ繰り返され、その後、リスト上の全ローカルポートに対する処理が終了するので(S409:YES)、本処理を終了する。   If the process for all local ports on the list is not completed when the process proceeds to S409 (S409: NO), the process returns to S401. As a result, the processing of S401 to S409 is repeated the same number of times as the total number of local ports to which the printer is connected in the managed PC 1, and then the processing for all the local ports on the list is completed (S409: YES). This process is terminated.

このように、被管理PC1においては、印字終了イベントが発生した際、印字ジョブ数がN以下(本実施形態では0)となった場合には、S211の処理が実行されて、対象プリンタから迅速にプリンタ情報が取得される一方、設定時刻が到来する毎に、印字ジョブ数がN以下(本実施形態では0)とならなくても、S407の処理が実行されて、対象プリンタからプリンタ情報が取得される。 As described above, in the managed PC 1, when the print end event occurs, if the number of print jobs is equal to or less than N (0 in the present embodiment), the process of S211 is executed, and the target printer quickly one printer information is acquired, each time the set time arrives, without becoming the number of print jobs is N or less (0 in this embodiment), the process of S407 is executed, the target printer or Lapu printer Information is acquired.

次に、管理PC2おいて実行される処理について、図12のフローチャートに基づいて説明する。この処理は、管理PC2の起動に伴って開始される処理である。
本処理を開始すると、管理PC2は、まずデータ処理を実行する(S601)。このデータ処理は、先に説明した被管理PC1での処理により被管理PC1がプリンタ3から取得・DBに記録したプリンタ情報を、管理PC2側で利用するための処理で、詳しくは図13のフローチャートに示すような処理になる。
Next, processing executed in the management PC 2 will be described based on the flowchart of FIG. This process is started when the management PC 2 is activated.
When this processing is started, the management PC 2 first executes data processing (S601). This data processing is processing for using on the management PC 2 side the printer information acquired by the managed PC 1 from the printer 3 and recorded in the DB by the processing in the managed PC 1 described above. It becomes processing as shown in.

この処理では、まず、管理PC2が、被管理PCの抽出を行う(S701)。S701の処理では、複数の被管理PC1、1’、1”…の中から、処理対象となる一つの被管理PCが抽出される。ここでは、被管理PC1が抽出されたものとして、以降の説明を続ける。続いて、管理PC2が、ネットワーク越しに被管理PCからファイルの読み込みを行う(S703)。ここで読み込まれるファイルは、先に説明した被管理PC1によるS313の処理において、プリンタから受信したプリンタ情報を書き込んだDB(結果ファイル133)であり、このファイルは、他のPCからのネットワーク越しの読み取りを許可する属性が、被管理PC1側において付与されている。すなわち、被管理PC1は、管理PC2から要求があった場合に、補助記憶部14のDBから読み取ったプリンタ情報を管理PC2に対して提供できるように構成されている。   In this process, first, the management PC 2 extracts managed PCs (S701). In the process of S701, one managed PC to be processed is extracted from the plurality of managed PCs 1, 1 ′, 1 ″... Here, it is assumed that the managed PC 1 has been extracted. Subsequently, the management PC 2 reads a file from the managed PC over the network (S703), and the file read here is received from the printer in the process of S313 by the managed PC 1 described above. This file is a DB (result file 133) in which the printer information is written, and this file has an attribute that allows reading from other PCs over the network on the managed PC 1 side. When there is a request from the management PC 2, the printer information read from the DB of the auxiliary storage unit 14 is provided to the management PC 2. It is configured to be able.

続いて、読み取ったファイル中に含まれていたプリンタ情報に対し、さらに管理PC2側で管理する情報(例えば、本処理の開始時刻やファイルアクセス時刻などのログ情報)を付加するなど、後述する出力/表示処理において必要となる情報を補うためのデータ処理を施す(S705)。次に、全ての被管理PCに対し上記処理を行ったか判断し(S707)、上記処理を行っていない他の被管理PC(例えば被管理PC1’、1”…)が残っていれば(S707:NO)、S701の処理へと戻り、他の被管理PCに対しても同様の処理を行う。   Subsequently, information to be managed on the management PC 2 side (for example, log information such as the start time of this process and the file access time) is added to the printer information included in the read file. / Data processing for supplementing information necessary for display processing is performed (S705). Next, it is determined whether or not the above processing has been performed for all managed PCs (S707), and if there are other managed PCs (for example, managed PCs 1 ′, 1 ″...) That have not performed the above processing remaining (S707). : NO), the process returns to S701, and the same process is performed for other managed PCs.

こうして全ての被管理PCに対し、上記S701〜S705の処理を行う結果、管理PC2側において、全ての被管理PCから取得したプリンタ情報を含む結果ファイルが作成されることになる。そして、この管理PC2側の結果ファイルに基づいて、管理PC2は、出力/表示処理を実行する(S709)。このS709の出力/表示処理は、詳しくは図14のフローチャートに示すような処理になる。   In this way, as a result of performing the processing of S701 to S705 on all managed PCs, a result file including printer information acquired from all managed PCs is created on the management PC 2 side. Then, based on the result file on the management PC 2 side, the management PC 2 executes output / display processing (S709). The output / display process in S709 is the process shown in detail in the flowchart of FIG.

出力/表示処理を開始すると、管理PC2は、管理PC2側の結果ファイルについて解析/整形を行う(S721)。具体的には、LOGファイルへの出力を行うための整形として、見出しとなる文字列を加えたり、後からLOGの表示や印刷等を行った際に1行分の情報が予期しない位置で折り返されてしまうのを防止するため、適切な箇所に改行コードを加えるなどの整形が行なわれる。また、画面表示用の整形として、LOG出力用の整形と同等の整形に加え、HTML(HyperText Markup Language)による記述(例えば、タグと呼ばれる所定の制御文字列など)を加える箇所の解析、およびその記述を追加する整形などが行なわれる。   When the output / display process is started, the management PC 2 analyzes / formats the result file on the management PC 2 side (S721). Specifically, as formatting for output to a LOG file, when a character string as a headline is added, or when a LOG is displayed or printed later, the information for one line is folded at an unexpected position. In order to prevent this from happening, formatting such as adding a line feed code at an appropriate place is performed. Also, as the formatting for screen display, in addition to the formatting equivalent to the formatting for LOG output, the analysis of the place where the description (for example, a predetermined control character string called a tag) by HTML (HyperText Markup Language) is added, and Formatting to add a description is performed.

続いて、管理PC2は、S721の処理で作成した画面表示用データの表示を行い(S723)、LOG出力用データのLOGファイルへの出力を行う(S725)。S725の処理によって作成されるLOGファイルには、図15に例示するようなテキストデータが格納される。   Subsequently, the management PC 2 displays the screen display data created in the process of S721 (S723), and outputs the LOG output data to the LOG file (S725). Text data as illustrated in FIG. 15 is stored in the LOG file created by the processing of S725.

このテキストデータ中には、被管理PCの名称(図15に例示したデータの場合、“PC1”、“PC2”)、プリンタの機種名(図15に例示したデータの場合、“Device1”、“Device2”)、ローカルポート名(図15に例示したデータの場合、“LPT1”、“USB001”)、および各種プリンタ情報(図15に例示したデータの場合、“Pages=2098”、“Drum Life=4039”、…など)が記述されている。特に、被管理PCの名称を1つ記述する毎に、その被管理PCに接続されているすべてのプリンタについて、“プリンタの機種名 on ローカルポート名”の形式を持つ記述を加え、この記述を行う毎に、各プリンタから取得したプリンタ情報を列挙してある。そのため、系内に同じ機種のプリンタが多数存在している場合であっても、利用者は、ある被管理PCに接続されているプリンタの機種が何であるか、ある被管理PCに接続されている複数のプリンタについて、どの機種がどのローカルポートに接続されているかなどを容易に理解できる。すなわち、被管理PCの名称、その被管理PCに接続されたプリンタの機種名、およびそのプリンタと被管理PCとの接続に利用されているローカルポート名、これら三者の対応関係が記述されているので、同一のプリンタ機種名や同一のローカルポート名がいくつか存在する場合でも、利用者は各プリンタ情報がどのプリンタのものなのかを簡単に把握できるのである。   In this text data, the name of the managed PC (in the case of the data illustrated in FIG. 15, “PC1” and “PC2”), the printer model name (in the case of the data illustrated in FIG. 15, “Device1”, “ Device 2 ”), local port name (in the case of data illustrated in FIG. 15,“ LPT1 ”,“ USB001 ”), and various printer information (in the case of data illustrated in FIG. 15,“ Pages = 2098 ”,“ Drum Life = 4039 ″,... In particular, every time one managed PC name is described, a description having the format “printer model name on local port name” is added to all printers connected to the managed PC. The printer information acquired from each printer is listed each time it is performed. For this reason, even when there are many printers of the same model in the system, the user is connected to a managed PC to determine what type of printer is connected to the managed PC. For a plurality of printers, it is possible to easily understand which model is connected to which local port. That is, the name of the managed PC, the model name of the printer connected to the managed PC, and the name of the local port used for connection between the printer and the managed PC are described. Therefore, even when there are several identical printer model names and identical local port names, the user can easily grasp which printer information each printer information belongs to.

さて、以上説明した表示およびログ出力においては、原則として、被管理PCから取得したすべてのプリンタ情報が出力されることになるが、プリンタ情報の中には、プリンタのメンテナンス(例えば、ドラム交換、トナーカートリッジ交換、クリーニングなど)を行うべき状況になっていることを示す情報が含まれていることもある。そこで、以降の処理では、メンテナンスを行うべき状況になっていると思われるプリンタ情報について、利用者に電子メールで通知する処理を行う。   In the display and log output described above, in principle, all printer information acquired from the managed PC is output. In the printer information, printer maintenance (for example, drum replacement, (Information such as toner cartridge replacement and cleaning) may be included. Therefore, in the subsequent processing, processing for notifying the user by e-mail of printer information that is considered to be in a state of maintenance is performed.

具体的には、管理PC2は、S725の処理を終えた後、すべての被管理PCから取得した個々のプリンタ情報すべての中から、まだ評価していないプリンタ情報を1つ選び出し、そのプリンタ情報について、あらかじめ決められている評価基準に従い、メンテナンスの必要性について評価を行う(S727)。具体例を挙げれば、例えば、選び出したプリンタ情報が“Pages=2098”であれば、2098枚という値が、あらかじめ決められている枚数より多いかどうかを評価し、多い場合はメンテナンス必要あり、少ない場合はメンテナンス必要なしとの評価を行う。   Specifically, after finishing the processing of S725, the management PC 2 selects one piece of printer information that has not yet been evaluated from all the individual printer information acquired from all managed PCs, and about the printer information. Then, the necessity for maintenance is evaluated in accordance with a predetermined evaluation standard (S727). As a specific example, for example, if the selected printer information is “Pages = 2098”, it is evaluated whether the value of 2098 sheets is larger than a predetermined number of sheets. In that case, it is evaluated that no maintenance is required.

そして、メンテナンスの必要ありと評価した場合は(S729:YES)、評価対象となったプリンタ情報の取得元である被管理PCの名称をキーにして、あらかじめ用意されているアドレス帳ファイルを検索し、キーにした被管理PCの名称に対応づけて記録されているメールアドレス(=被管理PCを管理している使用者のメールアドレス)を取得する(S731)。   If it is evaluated that the maintenance is necessary (S729: YES), the address book file prepared in advance is searched using the name of the managed PC from which the printer information as the evaluation target is obtained as a key. The e-mail address (= the e-mail address of the user who manages the managed PC) recorded in association with the name of the managed PC as the key is acquired (S731).

続いて、評価対象となったプリンタ情報中のラベル名(例えば、“Pages”)をキーにして、あらかじめ用意されている警告メッセージファイルを検索し、キーにしたラベル名に対応づけられている警告フォーマット(警告メッセージのひな形)を1つ選択する(S733)。警告メッセージファイルは、図16に例示するように、ラベル名と警告フォーマットとを組み合わせたものを1つのレコードとして、複数のレコードを記録したものであり、管理PC2は、評価対象となったプリンタ情報中のラベル名が決まれば、それに対応する警告フォーマットを、警告メッセージファイルの中から選び出すことができる。   Next, a warning message file prepared in advance is searched using the label name (for example, “Pages”) in the printer information to be evaluated as a key, and the warning associated with the label name used as the key is searched. One format (warning message template) is selected (S733). As illustrated in FIG. 16, the warning message file is a record in which a combination of a label name and a warning format is used as one record, and the management PC 2 receives the printer information that has been evaluated. Once the label name is determined, the corresponding warning format can be selected from the warning message file.

警告フォーマットを選び出したら、管理PC2は、警告フォーマット中の“%s”にポート名、機種名をいれ警告文を作成する(S735)。警告フォーマットは、図16に例示するように、例えば“%sに接続されている%sのドラムを交換してください。トナーを交換してください。”といった文字列であり、2カ所に“%s”という記述が含まれている。これら2カ所の“%s”の部分に、評価対象となったプリンタ情報に対応する“ローカルポート名”と“機種名”とを埋め込む。例えば、ローカルポート名“LPT1”、機種名“Device1”の場合、“LPT1に接続されているDevice1のドラムを交換してください。トナーを交換してください。”という警告文が作成されることになる。   After selecting the warning format, the management PC 2 creates a warning text by entering the port name and model name in “% s” in the warning format (S735). As illustrated in FIG. 16, the warning format is a character string such as “Please replace the drum of% s connected to% s. Replace the toner.” The description “s” is included. In these “% s” portions, “local port name” and “model name” corresponding to the printer information to be evaluated are embedded. For example, in the case of the local port name “LPT1” and the model name “Device1”, a warning message “Please replace the drum of Device1 connected to LPT1. Replace the toner.” Is created. Become.

そして、S375の処理で作成した警告文を本文とする電子メールを、S731の処理で取得したメールアドレス宛に送信する(S737)。このようにすることで、プリンタの状態を集中管理し、異常があれば即時に管理者に連絡することができる。   Then, an e-mail with the warning text created in the process of S375 as the text is transmitted to the e-mail address acquired in the process of S731 (S737). In this way, the printer status can be centrally managed, and if there is an abnormality, the administrator can be immediately contacted.

以上のようにして上記S731〜S737の処理を終えるか、あるいは、S729の処理においてメンテナンスの必要なしと評価した場合は(S729:YES)、評価対象となった1つのプリンタ情報について処理を終えたことになるので、すべての被管理PCから取得した個々のプリンタ情報すべての中に、まだ評価していないプリンタ情報が残っているかどうかをチェックし(S739)、全プリンタ情報に対する処理を終えていなければ(S739:NO)、S727の処理へと戻る。その結果、すべての被管理PCから取得した個々のプリンタ情報すべてと同数分、上記S727〜S739の処理が繰り返されることになる。この繰り返し処理の結果、全プリンタ情報に対する処理を終えたら(S739:YES)、本処理を終了する。   As described above, when the processes of S731 to S737 are completed, or when it is evaluated that the maintenance is not necessary in the process of S729 (S729: YES), the process is completed for one printer information to be evaluated. Therefore, it is checked whether printer information that has not yet been evaluated remains in all individual printer information acquired from all managed PCs (S739), and processing for all printer information must be completed. If (S739: NO), the process returns to S727. As a result, the processing of S727 to S739 is repeated by the same number as all the individual printer information acquired from all managed PCs. As a result of this repeated processing, when the processing for all the printer information is finished (S739: YES), this processing is finished.

こうしてS721〜S739の処理を終えると、図13に示したS709の処理を終えたことになり、その結果、S701〜S709の処理も終えたことになるので、図12におけるS601の処理を終えたことになり、引き続いて管理PC2は、設定ファイルから調査設定時刻を読み込んで(S603)、次に調査設定時刻が到来するまでの時間を計算、算出した時間をタイマーにセットする(S605)。設定ファイルは、補助記憶部24内に記憶されているファイルであり、この設定ファイルには、管理者が任意に設定する調査設定時刻が記録されている。タイマーは、S605の処理後、S605の処理で算出した時間が経過するとタイマーイベントを発生させるものである。   When the processing of S721 to S739 is completed in this way, the processing of S709 shown in FIG. 13 is completed. As a result, the processing of S701 to S709 is also completed, so the processing of S601 in FIG. Subsequently, the management PC 2 reads the investigation setting time from the setting file (S603), calculates the time until the next investigation setting time arrives, and sets the calculated time in the timer (S605). The setting file is a file stored in the auxiliary storage unit 24, and the setting time of investigation set by the administrator is recorded in the setting file. The timer generates a timer event when the time calculated in the process of S605 has elapsed after the process of S605.

続いて、管理PC2は、関連イベントの発生を待ち(S607)、発生したイベントがタイマーイベントであれば(S609:YES)、タイマーに24時間をセットして(S611)、24時間後に再びタイマーイベントが発生する状態とし、データ処理を実行する(S613)。このデータ処理は、先に説明したS601の処理と同様の処理で、詳しくは図13のフローチャートに示すような処理になるが、この処理については既に説明したので、ここでは説明を省略する。   Subsequently, the management PC 2 waits for the occurrence of a related event (S607). If the generated event is a timer event (S609: YES), the timer is set to 24 hours (S611), and the timer event is again 24 hours later. The data processing is executed (S613). This data processing is the same as the processing of S601 described above, and details are shown in the flowchart of FIG. 13, but since this processing has already been described, description thereof is omitted here.

また、S609の処理による判定の結果、発生したイベントがタイマーイベントでなかった場合(S609:NO)、利用者が入力部22を利用して所定の操作を行うことにより、データ処理の起動を手動で指示したのであれば(S615:YES)、この場合も上記データ処理を実行する(S613)。   If the event that has occurred is not a timer event as a result of the determination in S609 (S609: NO), the user performs a predetermined operation using the input unit 22 to manually start the data processing. If the instruction is issued (S615: YES), the data processing is also executed in this case (S613).

さらに、S615の処理による判定の結果、利用者による手動起動ではなかった場合(S615:NO)、あるいは、上記S613のデータ処理を終えた場合、発生したイベントが終了指示イベントであれば(S617:YES)、本処理を終了する。終了指示イベントは、利用者が入力部22を利用して所定の終了操作を行った際に発生するイベントである。一方、終了指示イベントでなければ(S617:NO)、S607の処理へと戻り、再び関連イベントの発生を待つ状態になる。すなわち、管理PC2が作動状態にある場合、利用者が終了操作を行わない限り、本処理が終了することはなく、本処理は管理PC2上の常駐プロセスとして実行され続けることになる。   Furthermore, when the result of determination in S615 is that the user has not manually activated (S615: NO), or when the data processing in S613 has been completed, if the event that has occurred is an end instruction event (S617: YES), this process ends. The end instruction event is an event that occurs when the user performs a predetermined end operation using the input unit 22. On the other hand, if it is not an end instruction event (S617: NO), the process returns to the process of S607 and again waits for the occurrence of a related event. That is, when the management PC 2 is in an operating state, this process will not be completed unless the user performs a termination operation, and this process will continue to be executed as a resident process on the management PC 2.

なお、本実施形態において、S605の処理によってセットされる調査設定時刻は、先に説明したS111の処理によって被管理PC1、1’、1”…においてセットされる時刻よりも10分程度遅い時刻とされている。このような時刻を管理PC2側で設定すると、被管理PC1、1’、1”…側でタイマーイベントが発生した後、10分程度遅れて管理PC2側でタイマーイベントが発生するため、この10分の間に被管理PC1、1’、1”…側でプリンタ情報が最新の状態に更新されている可能性が高くなるものと期待できる。すなわち、被管理PC1、1’、1”…側と管理PC2側とでほぼ同時にタイマーイベントが発生するような設定にした場合、もしくは管理PC2側で被管理PC1、1’、1”…側よりも早くタイマーイベントが発生するような設定にした場合、管理PC2側から被管理PC1、1’、1”…側のファイルを読み取った後に、被管理PC1、1’、1”…側のファイルが更新されることがある。この場合、管理PC2側で取得したプリンタ情報は、必ずしも最新の状態ではない可能性が高くなるが、これに対し、本実施形態の如く構成すれば、被管理PC1、1’、1”…側のファイルが更新された後に、管理PC2側から被管理PC1、1’、1”…側のファイルを読み取るので、管理PC2側で取得したプリンタ情報は、最新の状態になっている可能性が高いのである。   In the present embodiment, the survey setting time set by the process of S605 is about 10 minutes later than the time set in the managed PCs 1, 1 ′, 1 ″... By the process of S111 described above. When such a time is set on the management PC 2 side, a timer event occurs on the management PC 2 side after about 10 minutes after a timer event occurs on the managed PC 1, 1 ′, 1 ″. It can be expected that there is a high possibility that the printer information is updated to the latest state on the managed PC 1, 1 ′, 1 ″... When the setting is made so that timer events occur almost simultaneously on the "... side and the management PC 2 side, or the managed PC 1, 1 ', 1" ... side on the management PC 2 side When the management PC 2 side reads the file on the managed PC 1, 1 ', 1 "... side, the file on the managed PC 1, 1', 1" ... side is updated. In this case, there is a high possibility that the printer information acquired on the management PC 2 side is not necessarily the latest state, but if configured as in this embodiment, the managed PCs 1, 1 ′, After the file on the 1 "... side is updated, the file on the managed PC 1, 1 ', 1" ... side is read from the management PC 2 side, so the printer information acquired on the management PC 2 side is in the latest state. The possibility is high.

以上説明した通り、本実施形態において、被管理PC1は、プリンタ3の1284ID(本発明でいうデバイスの機種を示す情報)を、プリンタ3から取得して、そのプリンタ3の機種を識別し、S331〜S341の処理により、識別された機種に対応づけられたPJLコマンドを、複数のPJLコマンドの中から選択する。そのため、複数のPJLコマンド中に、プリンタ3に対応するPJLコマンドと対応しないPJLコマンドとが混在していても、プリンタ3に対応するPJLコマンドだけが選択される。その結果、プリンタ3に送信されるPJLコマンドは、プリンタ3に対応するPJLコマンドのみとなり、送信したPJLコマンドに対する応答を受信することで、所期のプリンタ情報を取得することができる。   As described above, in the present embodiment, the managed PC 1 acquires the 1284 ID (information indicating the device model in the present invention) of the printer 3 from the printer 3, identifies the model of the printer 3, and S331 The PJL command associated with the identified model is selected from the plurality of PJL commands by the processes of ~ S341. Therefore, even if a PJL command corresponding to the printer 3 and a PJL command not corresponding to the printer 3 are mixed in a plurality of PJL commands, only the PJL command corresponding to the printer 3 is selected. As a result, the PJL command transmitted to the printer 3 is only the PJL command corresponding to the printer 3, and the expected printer information can be acquired by receiving a response to the transmitted PJL command.

したがって、送信したPJLコマンドについては、所期のプリンタ情報を取得することができる。また、プリンタに対応しないPJLコマンドまで被管理PCが送信してしまうものとは異なり、被管理PC1が無駄なデータ送信処理を行う必要が無い。さらに、プリンタに対応しないPJLコマンドを送信した後、それに対する応答を被管理PCが受信して対処する(例えば、データを破棄する)ものとは異なり、被管理PC1が無駄なデータ受信処理を行う必要が無い。 Therefore, the PJL command transmitted can get the expected printer information. Unlike the case where the managed PC transmits a PJL command that does not correspond to the printer, the managed PC 1 does not need to perform useless data transmission processing. Furthermore, unlike the case where the managed PC receives and responds to the response after transmitting a PJL command not corresponding to the printer (for example, discards the data), the managed PC 1 performs useless data reception processing. There is no need.

また、本実施形態において、被管理PC1は、プリンタ3の1284IDを、プリンタ3から取得して、そのプリンタ3の機種を識別し、また、PJLコマンドをプリンタ3に送信することにより、プリンタ3に対してプリンタ情報の提供を要求し、送信されたPJLコマンドに対する応答を受信することにより、プリンタ情報を取得する。そして、プリンタ3の1284IDに応じて決まるプリンタ3の機種名と、被管理PC1とプリンタ3との接続に用いられているローカルポート名と、プリンタ情報とを、関連づけて格納する。そのため、利用者は、格納されたプリンタ情報を参照する際に、そのプリンタ情報に関連づけられたプリンタ3の機種名と、被管理PC1−プリンタ3の接続に使っているローカルポート名とを、併せて参照することができる。   In the present embodiment, the managed PC 1 acquires the 1284 ID of the printer 3 from the printer 3, identifies the model of the printer 3, and transmits a PJL command to the printer 3. The printer information is obtained by requesting the provision of the printer information and receiving a response to the transmitted PJL command. Then, the model name of the printer 3 determined according to the 1284 ID of the printer 3, the local port name used for connection between the managed PC 1 and the printer 3, and the printer information are stored in association with each other. Therefore, when referring to the stored printer information, the user combines the model name of the printer 3 associated with the printer information and the local port name used for connection of the managed PC 1 to the printer 3 together. Can be referred to.

したがって、1台の被管理PC1に接続されたプリンタ3が複数接続され、その複数のプリンタの中に同じ機種が複数存在する場合であっても、あるプリンタ情報がどのプリンタから取得した情報なのかを知りたい場合、利用者はプリンタの機種名およびローカルポート名に基づいて、1つのプリンタ3を容易に特定することができる。   Accordingly, even when a plurality of printers 3 connected to one managed PC 1 are connected and a plurality of the same models exist among the plurality of printers, which printer information is obtained from which printer When the user wants to know, the user can easily identify one printer 3 based on the printer model name and the local port name.

以上、本発明の実施形態について説明したが、本発明は上記の具体的な一実施形態に限定されず、この他にも種々の形態で実施することができる。
例えば、上記実施形態では、コンピュータに接続されるデバイスの例として、PJLコマンドに対応した単機能のプリンタ3を例示したが、他のデバイスであってもよい。
As mentioned above, although embodiment of this invention was described, this invention is not limited to said specific one Embodiment, In addition, it can implement with a various form.
For example, in the above-described embodiment, the single-function printer 3 corresponding to the PJL command is illustrated as an example of a device connected to the computer, but another device may be used.

具体例を挙げれば、PJLコマンドに対応したデバイスとしては、プリンタ機能に加えて、ファクシミリ機能、コピー機能、イメージスキャナ機能などを兼ね備えた複合機が知られており、このような複合機も本発明でいうデバイスに含まれる。   As a specific example, as a device corresponding to the PJL command, a multifunction device having a facsimile function, a copy function, an image scanner function and the like in addition to a printer function is known. It is included in the device.

また、これらプリンタ3や上記複合機のような、プリンタ機能を有するデバイスである必要もなく、その場合、コマンドとしては、PJLに準拠したコマンドである必要はなく、コマンドを印刷スプーラ経由でデバイスに送信する必要もない。すなわち、PJLコマンド非対応の各種デバイスであっても、コンピュータ側との入出力I/Fを介して、コンピュータ側からデバイス側へコマンドを送信でき、そのコマンドに応じてデバイス側からコンピュータ側へ応答を返すことができ、その応答中にデバイス側で管理、更新されるデバイス情報が含まれているのであれば、そのようなデバイスを対象にして、本発明を適用することができる。そのようなデバイスとしては、例えば、イメージスキャナ、デジタルカメラ、USBカメラ、各種ストレージデバイス、ラベルプリンタなどを考えることができる。   Further, it is not necessary to be a device having a printer function, such as the printer 3 or the above-described multifunction device. In this case, the command does not need to be a command compliant with PJL, and the command is sent to the device via the print spooler. There is no need to send. That is, even for various devices that do not support PJL commands, commands can be sent from the computer side to the device side via the input / output I / F with the computer side, and a response is sent from the device side to the computer side according to the command. If the device information managed and updated on the device side is included in the response, the present invention can be applied to such a device. As such a device, for example, an image scanner, a digital camera, a USB camera, various storage devices, a label printer, and the like can be considered.

また、上記実施形態では、被管理PC1においてプリンタ3から取得したプリンタ情報を管理PC2側に提供し、管理PC2側において、すべての被管理PC1、1’、1”…から集めたプリンタ情報を管理する例を示したが、被管理PC1においてプリンタ3から取得したプリンタ情報を、被管理PC1自身で管理する場合にも、本発明の構成を採用することができる。   In the above embodiment, the managed PC 1 provides the printer information acquired from the printer 3 to the management PC 2 side, and the management PC 2 side manages the printer information collected from all the managed PCs 1, 1 ′, 1 ″. However, the configuration of the present invention can also be adopted when the managed PC 1 itself manages the printer information acquired from the printer 3 in the managed PC 1.

上記実施形態において例示したハードウェアの構成を示すブロック図である。It is a block diagram which shows the structure of the hardware illustrated in the said embodiment. 被管理PCの構成を示すブロック図である。It is a block diagram which shows the structure of managed PC. 被管理PCにおける主処理のフローチャートである。It is a flowchart of the main process in a managed PC. 被管理PCにおけるスレッド処理のフローチャートである。6 is a flowchart of thread processing in a managed PC. 被管理PCにおける機種判定・DB書込処理のフローチャートである。10 is a flowchart of model determination / DB writing processing in a managed PC. 被管理PCにおける読み込み/DB化処理1のフローチャートである。It is a flowchart of the reading / DB conversion processing 1 in the managed PC. 被管理PCにおけるコマンド取り出し処理のフローチャートである。It is a flowchart of the command extraction process in a managed PC. コマンドファイルに格納されたデータを示す図である。It is a figure which shows the data stored in the command file. 被管理PCにおけるDB(結果ファイル)書き込み処理のフローチャートである。It is a flowchart of DB (result file) write processing in a managed PC. DB(結果ファイル)に格納されたデータを示す図である。It is a figure which shows the data stored in DB (result file). 被管理PCにおける読み込み/DB化処理2のフローチャートである。It is a flowchart of the reading / DB conversion processing 2 in the managed PC. 管理PCにおける主処理のフローチャートである。It is a flowchart of the main process in management PC. 管理PCにおけるデータ処理のフローチャートである。It is a flowchart of the data processing in management PC. 管理PCにおける出力/表示処理のフローチャートである。It is a flowchart of the output / display process in management PC. LOGファイルに格納されたテキストデータを示す図である。It is a figure which shows the text data stored in the LOG file. 警告メッセージファイルに格納されたデータを示す図である。It is a figure which shows the data stored in the warning message file.

符号の説明Explanation of symbols

1、1’、1”・・・被管理PC(パーソナルコンピュータ)、2・・・管理PC(パーソナルコンピュータ)、3、3’、3”・・・プリンタ、11,21・・・本体部、12,22・・・入力部、13,23・・・表示部、14,24・・・補助記憶部、101・・・制御部、102・・・I/F部、111・・・CPU、112・・・ROM、113・・・RAM、121・・・プリンタI/F機能部、122・・・LAN I/F機能部、123・・・印刷スプーラ、124・・・プリンタ情報取得部、131・・・キュー、132・・・コマンドファイル、133・・・結果ファイル(データベース)、134・・・設定ファイル。   1, 1 ', 1 "... managed PC (personal computer), 2 ... management PC (personal computer), 3, 3', 3" ... printer, 11, 21 ... main body, 12, 22 ... input unit, 13, 23 ... display unit, 14, 24 ... auxiliary storage unit, 101 ... control unit, 102 ... I / F unit, 111 ... CPU, 112... ROM, 113... RAM, 121... Printer I / F function unit, 122... LAN I / F function unit, 123... Print spooler, 124. 131... Queue, 132... Command file, 133... Result file (database), 134.

Claims (15)

コンピュータと通信可能に接続されたデバイスから、該デバイスに関する情報であるデバイス情報を取得する処理を、前記コンピュータに実行させるための情報取得処理プログラムであって、
前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する識別手順と、
複数のコマンドと各コマンドに対する応答が可能な一又は複数の前記デバイスの機種の情報とが関連付けて格納されたコマンド記憶手段を参照し、前記識別手順で識別された前記デバイスの機種が応答可能なコマンドを前記コマンド記憶手段から選択するコマンド選択手順と、
該コマンド選択手順によって選択されたコマンドを前記デバイスに送信することにより、前記デバイスに対して前記デバイス情報の提供を要求する情報要求手順と、
該情報要求手順によって送信されたコマンドに対する応答を受信することにより、前記デバイス情報を取得する情報取得手順と
前記コマンド選択手順により複数のコマンドが選択された場合、該選択された複数のコマンドのうち、一のコマンドを送信することで前記デバイス情報の提供を要求し、前記情報取得手順により該一のコマンドに対する応答を受信したことを条件に、前記選択された複数のコマンドのうち、他のコマンドを前記デバイスに送信する一方、前記情報取得手順により前記一のコマンドに対する応答を受信できなかったことを条件に、前記他のコマンドを送信しないよう前記情報要求手順を制御する情報要求制御手順と
を含むことを特徴とする情報取得処理プログラム。
An information acquisition processing program for causing a computer to execute processing for acquiring device information, which is information about the device, from a device communicably connected to the computer,
An identification procedure for acquiring information indicating the model of the device from the device and identifying the model of the device;
Refer to command storage means in which a plurality of commands and information on one or a plurality of device models capable of responding to each command are stored in association with each other, and the device model identified in the identification procedure can respond A command selection procedure for selecting a command from the command storage means ;
An information request procedure for requesting the device to provide the device information by transmitting a command selected by the command selection procedure to the device;
An information acquisition procedure for acquiring the device information by receiving a response to the command transmitted by the information request procedure ;
When a plurality of commands are selected by the command selection procedure, the device information is requested by transmitting one command among the selected commands, and the command is obtained by the information acquisition procedure. On the condition that a response to the command is received, another command among the selected commands is transmitted to the device, while a response to the one command is not received by the information acquisition procedure. And an information request control procedure for controlling the information request procedure so as not to transmit the other command .
前記コンピュータは、前記デバイスとローカル接続可能な複数のローカルポートを備えており、
前記複数のローカルポートから前記デバイスが接続されているローカルポートを抽出するローカルポート抽出手順と、
前記ローカルポート抽出手順によって抽出されたローカルポートに接続された前記デバイスが前記識別手順、前記コマンド選択手順、前記情報要求手順、前記情報取得手順、前記情報要求制御手順の処理対象となるように処理スレッドを作成する処理スレッド作成手順と
を含むことを特徴とする請求項1に記載の情報取得処理プログラム。
The computer includes a plurality of local ports that can be locally connected to the device,
A local port extraction procedure for extracting a local port to which the device is connected from the plurality of local ports;
Processing is performed so that the device connected to the local port extracted by the local port extraction procedure becomes a processing target of the identification procedure, the command selection procedure, the information request procedure, the information acquisition procedure, and the information request control procedure Process thread creation procedure to create a thread and
The information acquisition processing program according to claim 1, further comprising:
前記ローカルポートに新たに前記デバイスが接続されることを検出する追加デバイス検出手順を含んでおり、  Including an additional device detection procedure for detecting that the device is newly connected to the local port;
前記ローカルポート抽出手順は、前記追加デバイス検出手順により新たに検出された前記デバイスが接続されるローカルポートをさらに抽出する手順であり、  The local port extraction procedure is a procedure for further extracting a local port to which the device newly detected by the additional device detection procedure is connected,
前記処理スレッド作成手段は、新たに検出された前記デバイスに対しても前記処理スレッドを作成する手順である  The processing thread creation means is a procedure for creating the processing thread for the newly detected device.
ことを特徴とする請求項2に記載の情報取得処理プログラム。  The information acquisition processing program according to claim 2, wherein:
前記デバイスで処理可能な一のジョブが処理終了したかを検知する終了検知手順と、  An end detection procedure for detecting whether one job that can be processed by the device is completed;
前記終了検知手順により前記一のジョブの処理が終了したと検知された場合、当該一のジョブ以外に前記デバイスに投入されているジョブ数をカウントするジョブ数カウント手順とを含んでおり、  A job number counting procedure for counting the number of jobs input to the device in addition to the one job when the end detection procedure detects that the processing of the one job is completed,
前記識別手順は、前記ジョブ数カウント手順によりカウントされたジョブ数が、所定数以下であることを条件として、前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する手順である  In the identification procedure, information indicating the model of the device is acquired from the device on the condition that the number of jobs counted in the procedure for counting the number of jobs is equal to or less than a predetermined number, and the model of the device is identified. Is the procedure to
ことを特徴とする請求項1〜請求項3のいずれかに記載の情報取得処理方法プログラム。  The information acquisition processing method program according to any one of claims 1 to 3, wherein
前記識別手順は、所定期間毎に前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する手順である  The identification procedure is a procedure for acquiring information indicating the model of the device every predetermined period from the device and identifying the model of the device.
ことを特徴とする請求項1〜請求項4のいずれかに記載の情報取得処理プログラム。  The information acquisition processing program according to any one of claims 1 to 4, wherein
前記コマンドは、前記デバイス情報を特定する情報を含む  The command includes information for specifying the device information.
ことを特徴とする請求項1〜請求項5のいずれかに記載の情報取得処理プログラム。  The information acquisition processing program according to any one of claims 1 to 5, wherein
前記デバイス情報は、前記デバイスの交換部品の使用度合に関する情報を含む  The device information includes information on the degree of use of replacement parts of the device.
ことを特徴とする請求項1〜請求項6のいずれかに記載の情報取得処理プログラム。  The information acquisition processing program according to any one of claims 1 to 6, wherein
前記デバイス情報は、前記デバイスの消耗品の消耗度合に関する情報を含む  The device information includes information on the degree of wear of the consumables of the device.
ことを特徴とする請求項1〜請求項7のいずれかに記載の情報取得処理プログラム。  The information acquisition processing program according to any one of claims 1 to 7, wherein
前記デバイス情報は、前記デバイスにおける異常の発生回数に関する情報を含む  The device information includes information related to the number of occurrences of an abnormality in the device.
ことを特徴とする請求項1〜請求項8のいずれかに記載の情報取得処理プログラム。  The information acquisition processing program according to any one of claims 1 to 8, wherein
前記識別手順において取得した前記デバイスの機種を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報と、前記情報取得手順において取得した前記デバイス情報とを、関連づけて格納するデバイス情報格納手
を含むことを特徴とする請求項1〜請求項9のいずれかに記載の情報取得処理プログラム。
Information indicating the model of the device acquired in the identification procedure, information indicating an input / output I / F used for connection between the computer and the device, and the device information acquired in the information acquisition procedure The device stores association information stored procedure
10. The information acquisition processing program according to claim 1 , further comprising:
記デバイスに対するアクセスができなかった場合に、該アクセスができなかった旨を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報とを、関連づけて格納するアクセスエラー情報格納手順
を含むことを特徴とする請求項1〜請求項10のいずれかに記載の情報取得処理プログラム。
When unable to access to the previous SL device, and information indicating that could not the access, and information indicating the input and output I / F used in the connection between the said computer device, in association with claims 1 to 10 information obtaining processing program according to any one of which comprises an access error information storing procedure for storing.
前記情報要求手順において、コマンドを前記デバイスに送信できなかった場合に、該送信ができなかった旨を示す情報と、前記識別手順において取得した前記デバイスの機種を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報とを、関連づけて格納する送信エラー情報格納手順
を含むことを特徴とする請求項1〜請求項11のいずれかに記載の情報取得処理プログラム。
In the information request procedure, when a command cannot be transmitted to the device, information indicating that the command could not be transmitted, information indicating the model of the device acquired in the identification procedure, the computer and the device 12. The information acquisition according to claim 1, further comprising: a transmission error information storage procedure for storing information indicating the input / output I / F used for connection with the transmission error information in association with each other. Processing program.
前記情報取得手順において、前記デバイスからの応答を受信できなかった場合に、該受信できなかった旨を示す情報と、前記識別手順において取得した前記デバイスの機種を示す情報と、前記コンピュータと前記デバイスとの接続に用いられている入出力I/Fを示す情報とを、関連づけて格納する受信エラー情報格納手順
を含むことを特徴とする請求項1〜請求項12のいずれかに記載の情報取得処理プログラム。
In the information acquisition procedure, when a response from the device could not be received, information indicating that the device could not be received, information indicating the model of the device acquired in the identification procedure, the computer and the device information acquisition according to any one of the information indicating the input and output I / F used in the connection, according to claim 1 to claim 12, characterized in that it comprises a reception error information storing procedure for storing in association with Processing program.
デバイスと通信可能に接続されており、前記デバイスから前記デバイス情報を取得する処理を実行するコンピュータであって、
前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する識別手段と、
複数のコマンドと各コマンドに対する応答が可能な一又は複数の前記デバイスの機種の情報とが関連づけて格納するコマンド記憶手段と、
前記コマンド記憶手段を参照し、前記識別手段で識別された前記デバイスの機種が応答可能なコマンドを前記コマンド記憶手段から選択するコマンド選択手段と、
該コマンド選択手段によって選択されたコマンドを前記デバイスに送信することにより、前記デバイスに対して前記デバイス情報の提供を要求する情報要求手段と、
該情報要求手段によって送信されたコマンドに対する応答を受信することにより、前記デバイス情報を取得する情報取得手段と
前記コマンド選択手段により複数のコマンドが選択された場合、該選択された複数のコマンドのうち、一のコマンドを送信することで前記デバイス情報の提供を要求し、前記情報取得手段により該一のコマンドに対する応答を受信したことを条件に、前記選択された複数のコマンドのうち、他のコマンドを前記デバイスに送信する一方、前記情報取得手段により前記一のコマンドに対する応答を受信できなかったことを条件に、前記他のコマンドを送信しないよう前記情報要求手段を制御する情報要求制御手段と
を備えていることを特徴とするコンピュータ。
Devices and which is communicably connected to a computer that executes a process of acquiring the device information from the previous SL device,
Information indicating the model of the device is obtained from the device, and identification means for identifying the model of the device;
Command storage means for storing a plurality of commands and information of one or a plurality of device types capable of responding to each command in association with each other;
Command selection means for referring to the command storage means and selecting from the command storage means a command to which the model of the device identified by the identification means can respond ;
Information request means for requesting the device to provide the device information by transmitting a command selected by the command selection means to the device;
An information acquisition means for acquiring the device information by receiving a response to the command transmitted by the information request means ;
When a plurality of commands are selected by the command selection means, the device information is requested to be provided by transmitting one command among the selected commands, and the information acquisition means requests the one command. On the condition that a response to the command is received, another command among the selected commands is transmitted to the device, while a response to the one command is not received by the information acquisition unit. And an information request control means for controlling the information request means so as not to transmit the other command .
コンピュータと該コンピュータに接続されたデバイスとを備え、前記デバイスが、該デバイスに関する情報であるデバイス情報を記憶する記憶手段と、前記デバイスの作動に伴って前記デバイス側で前記デバイス情報を更新する更新手段とを備えており、前記コンピュータが前記デバイスから前記デバイス情報を取得する処理を実行するように構成されたシステムであって、  A computer and a device connected to the computer, wherein the device stores device information that is information about the device, and updates that update the device information on the device side as the device operates A system configured to execute a process of acquiring the device information from the device, the computer comprising:
前記コンピュータは、  The computer
前記デバイスの機種を示す情報を、前記デバイスから取得して、該デバイスの機種を識別する識別手段と、  Information indicating the model of the device is obtained from the device, and identification means for identifying the model of the device;
複数のコマンドと各コマンドに対する応答が可能な一又は複数の前記デバイスの機種の情報とが関連づけて格納するコマンド記憶手段と、  Command storage means for storing a plurality of commands and information of one or a plurality of device types capable of responding to each command in association with each other;
前記コマンド記憶手段を参照し、前記識別手段で識別された前記デバイスの機種が応答可能なコマンドを前記コマンド記憶手段から選択するコマンド選択手段と、  Command selection means for referring to the command storage means and selecting from the command storage means a command to which the model of the device identified by the identification means can respond;
該コマンド選択手段によって選択されたコマンドを前記デバイスに送信することにより、前記デバイスに対して前記デバイス情報の提供を要求する情報要求手段と、  Information request means for requesting the device to provide the device information by transmitting a command selected by the command selection means to the device;
該情報要求手段によって送信されたコマンドに対する応答を受信することにより、前記デバイス情報を取得する情報取得手段と、  An information acquisition means for acquiring the device information by receiving a response to the command transmitted by the information request means;
前記コマンド選択手段により複数のコマンドが選択された場合、該選択された複数のコマンドのうち、一のコマンドを送信することで前記デバイス情報の提供を要求し、前記情報取得手段により該一のコマンドに対する応答を受信したことを条件に、前記選択された複数のコマンドのうち、他のコマンドを前記デバイスに送信する一方、前記情報取得手段により前記一のコマンドに対する応答を受信できなかったことを条件に、前記他のコマンドを送信しないよう前記情報要求手段を制御する情報要求制御手段と  When a plurality of commands are selected by the command selection means, the device information is requested to be provided by transmitting one command among the selected commands, and the information acquisition means requests the one command. On the condition that a response to the command is received, another command among the selected commands is transmitted to the device, while a response to the one command is not received by the information acquisition unit. And information request control means for controlling the information request means so as not to transmit the other command.
を備えていることを特徴とする情報取得処理システム。  An information acquisition processing system comprising:
JP2003434236A 2003-09-30 2003-12-26 Information acquisition processing program, computer, and information acquisition processing system Expired - Fee Related JP3966276B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2003434236A JP3966276B2 (en) 2003-12-26 2003-12-26 Information acquisition processing program, computer, and information acquisition processing system
US10/840,743 US7773248B2 (en) 2003-09-30 2004-05-07 Device information management system
EP10007913.6A EP2239656B1 (en) 2003-09-30 2004-06-02 Device information management system
EP04253262.2A EP1521171B1 (en) 2003-09-30 2004-06-02 Device information management system
US12/801,863 US8018616B2 (en) 2003-09-30 2010-06-29 Device information management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003434236A JP3966276B2 (en) 2003-12-26 2003-12-26 Information acquisition processing program, computer, and information acquisition processing system

Publications (2)

Publication Number Publication Date
JP2005190407A JP2005190407A (en) 2005-07-14
JP3966276B2 true JP3966276B2 (en) 2007-08-29

Family

ID=34791361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003434236A Expired - Fee Related JP3966276B2 (en) 2003-09-30 2003-12-26 Information acquisition processing program, computer, and information acquisition processing system

Country Status (1)

Country Link
JP (1) JP3966276B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100474231C (en) * 2006-05-31 2009-04-01 株式会社理光 Information processing apparatus and information processing system
CN101526932A (en) * 2008-03-03 2009-09-09 株式会社理光 A device control apparatus, device information acquiring method and readable computer recording medium
JP2009259094A (en) * 2008-04-18 2009-11-05 Kyocera Mita Corp Information processor, status monitoring program, image forming device driver and program set
JP5045777B2 (en) 2010-03-30 2012-10-10 ブラザー工業株式会社 Batch file transfer method
JP5728946B2 (en) 2011-01-05 2015-06-03 セイコーエプソン株式会社 CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM

Also Published As

Publication number Publication date
JP2005190407A (en) 2005-07-14

Similar Documents

Publication Publication Date Title
EP2239656B1 (en) Device information management system
JP4018622B2 (en) Information processing apparatus, information processing system, information processing method, information processing program, and storage medium
US8264720B2 (en) Printing control apparatus and printing control method that can prompt a user to set additional information which is effective later as a part of a print log
US7256909B2 (en) Proxy print processing apparatus, proxy print processing method, program, and memory medium
US8749817B2 (en) Information processing apparatus, method, medium, and system for print job transmission
JP2008158766A (en) Information processing device having print job retrieval function, information processing method, program, and storage medium
JP2014149624A (en) Management server, management server control method and program
US20050286078A1 (en) Print control device and method for automatically resuming a printing operation of remaining pages
US9645770B2 (en) Information processing system, information processing apparatus, information processing method, and storage medium storing program
JPH07230372A (en) Print system
US7420696B2 (en) Job management apparatus, job management system, job management method, and storage medium storing program
JP3966276B2 (en) Information acquisition processing program, computer, and information acquisition processing system
JP6992496B2 (en) Control program and information processing device
JP5034993B2 (en) Information processing apparatus and information processing method
CN102622193B (en) Print control unit and control method thereof
US7839518B2 (en) Print control method, information processing apparatus, printing system, print control program and record medium
JP4196835B2 (en) Information acquisition processing program, computer, and information acquisition processing system
JP4222173B2 (en) Image forming apparatus information management system
JP2009123075A (en) Print controller, print control method, and storage medium
US7623253B1 (en) Indirect processing of print jobs
JP2009025952A (en) Image forming system, image-forming program and image forming device
JP3880434B2 (en) Job management system, job management apparatus, data processing apparatus, job management method, data processing method, and control program
JP2005242741A (en) Information processing device, print system, and print processing method
JP2022045527A (en) Image processing device, method for controlling image processing device, and program
JP3221211B2 (en) Queue management device and method for electronic printing system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060828

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060905

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061102

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070521

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3966276

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110608

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130608

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees