JP7338461B2 - Program, program group, and information processing device - Google Patents

Program, program group, and information processing device Download PDF

Info

Publication number
JP7338461B2
JP7338461B2 JP2019236253A JP2019236253A JP7338461B2 JP 7338461 B2 JP7338461 B2 JP 7338461B2 JP 2019236253 A JP2019236253 A JP 2019236253A JP 2019236253 A JP2019236253 A JP 2019236253A JP 7338461 B2 JP7338461 B2 JP 7338461B2
Authority
JP
Japan
Prior art keywords
information
port
program
request
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019236253A
Other languages
Japanese (ja)
Other versions
JP2021105800A (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 JP2019236253A priority Critical patent/JP7338461B2/en
Publication of JP2021105800A publication Critical patent/JP2021105800A/en
Application granted granted Critical
Publication of JP7338461B2 publication Critical patent/JP7338461B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Computer And Data Communications (AREA)
  • Facsimiles In General (AREA)

Description

本発明は、デバイスポートを介してデバイスにデバイスリクエストを送信するためのプログラム等に関する。 The present invention relates to a program or the like for transmitting a device request to a device via a device port.

下記特許文献に記載されているように、近年のプリンタ、スキャナ等のデバイスには、サーバ、所謂、EW S(Embedded Web Serverの略)が組み込まれており、PC等の情報処理装置により、そのサーバにアクセスすることで、そのデバイスの状態、設定情報等を確認することが可能とされている。 As described in the following patent documents, recent devices such as printers and scanners incorporate a server, a so-called EWS (Embedded Web Server), and an information processing device such as a PC can be used to access the server. By accessing the server, it is possible to check the status of the device, setting information, and the like.

特開2007-079940号公報JP 2007-079940 A

PC等の情報処理装置では、例えば、デバイスのEWSにアクセスする際にデバイスリクエストが出力される。この際、デバイスポートを介してデバイスリクエストが出力される。一方で、デバイスポートのポート番号等のポート情報は有限な情報であるため、有限な情報の範囲内でポート情報を利用して、デバイスポートを作成する必要がある。そこで、本発明は、有限な情報の範囲内でポート情報を利用して、デバイスポートを作成することを課題とする。 In an information processing apparatus such as a PC, for example, a device request is output when accessing the EWS of the device. At this time, a device request is output via the device port. On the other hand, since the port information such as the port number of the device port is limited information, it is necessary to use the port information within the limited information to create the device port. Accordingly, an object of the present invention is to create a device port by using port information within a limited range of information.

上記課題を解決するために、実施例に開示するプログラムは、第1通信インタフェースおよび第2通信インタフェースを備える情報処理装置のコンピュータが読み取り可能なプログラムであって、前記コンピュータを、デバイスを指定するデバイス指定情報を取得する取得手段と、前記取得手段により前記デバイス指定情報が取得される毎に、当該デバイス指定情報により指定されるデバイスに対応させるポート情報を特定する特定手段として機能させ、前記ポート情報は、対応する前記デバイスへのデバイスリクエストを受け付けるために用いられる情報であって、前記特定手段は、複数の前記デバイス指定情報によりそれぞれ指定された複数の前記デバイスに対応させるポート情報として、それぞれ異なる複数のポート情報を特定し、前記特定手段により特定されたポート情報に応じたデバイスポートを作成する第1作成手段として機能させ、前記ポート情報は前記情報処理装置において有限な情報であり、前記デバイスリクエストは第1プロトコルによるリクエストであり、前記第1プロトコルは前記第1通信インタフェースで用いられるプロトコルであり、前記デバイスポートは、前記プログラムがインストールされているコンピュータにインストールされたプログラムであって前記プログラムとは異なるプログラムから、前記第1プロトコルによって、前記第1通信インタフェースを介さずリクエストを受け付けるためのポートであり、前記コンピュータを、前記第1作成手段により作成されたデバイスポートへの前記デバイスリクエストを受け付けた場合に、当該デバイスリクエストを前記第2通信インタフェースに接続されたデバイスに、第2プロトコルによって送信する送信手段と、前記送信手段により送信された前記デバイスリクエストに対する返信を前記デバイスから前記第2通信インタフェースを介して受信する受信手段として機能させ、前記第2プロトコルは前記第2通信インタフェースで用いられるプロトコルであり、前記コンピュータを、前記受信手段により受信した返信を、前記デバイスポートへの前記デバイスリクエストのリクエスト元のプログラムに、前記第1プロトコルで出力する第1出力手段と、前記特定手段によって特定されたポート情報の量が、前記有限な情報の量のうちの所定の範囲を超えたか否かを判断する第1判断手段と、前記第1判断手段により前記ポート情報の量が前記所定の範囲を超えたと判断された場合に、前記第1作成手段により作成されたデバイスポートを閉じる閉鎖手段と、して機能させ、前記特定手段は、前記閉鎖手段によりデバイスポートが閉じられた後に、前記デバイスポートを示すポート情報として、当該閉鎖手段により閉じられたデバイスポートを示すポート情報を特定することを特徴とする。 In order to solve the above problems, a program disclosed in an embodiment is a computer-readable program for an information processing apparatus having a first communication interface and a second communication interface, wherein the computer designates a device an acquiring means for acquiring designation information; and functioning as specifying means for specifying port information corresponding to a device specified by the device specifying information each time the device specifying information is acquired by the acquiring means, the port information. is information used for accepting a device request to the corresponding device, wherein the identifying means selects different port information as port information corresponding to the plurality of devices respectively designated by the plurality of device designation information. specifying a plurality of pieces of port information and functioning as first creating means for creating a device port corresponding to the port information specified by said specifying means, said port information being finite information in said information processing apparatus, said device The request is a request according to a first protocol, the first protocol is a protocol used in the first communication interface, the device port is a program installed in a computer in which the program is installed, and the program is a port for accepting a request from a program different from the above according to the first protocol without going through the first communication interface, and the computer receives the device request to the device port created by the first creating means. transmitting means for transmitting the device request to the device connected to the second communication interface according to a second protocol when the device request is accepted, and sending a reply to the device request transmitted by the transmitting means from the device to the second functioning as receiving means for receiving data via a communication interface, wherein the second protocol is a protocol used in the second communication interface, and the computer transmits a reply received by the receiving means to the device port whether or not the amount of port information specified by the first output means for outputting to the request source program of the request according to the first protocol and by the specifying means exceeds a predetermined range of the finite amount of information; and closing means for closing the device port created by the first creating means when the first determining means determines that the amount of the port information exceeds the predetermined range. and, after the device port is closed by the closing means, the identifying means identifies port information indicating the device port closed by the closing means as the port information indicating the device port. characterized by

実施例に開示するプログラムは、デバイスを指定するデバイス指定情報を取得する毎に、デバイスポートのポート情報として、異なるポート情報を特定し、特定したポート情報のデバイスポートを作成する。なお、ポート情報は有限な情報とされている。そこで、複数のデバイスポートが作成されることで、デバイスポート用に特定されるポート情報の量が、有限な情報の量のうちの所定の範囲を超えた場合に、作成済みのデバイスポートがクローズされる。このため、クローズされたデバイスポートのポート情報を用いて、新たにデバイスポートを作成することができる。これにより、有限な情報の範囲内でポート情報を利用して、デバイスポートを作成することができる。 A program disclosed in an embodiment identifies different port information as port information of a device port each time it acquires device designation information that designates a device, and creates a device port of the identified port information. Note that the port information is limited information. Therefore, when multiple device ports are created and the amount of port information specified for the device port exceeds a predetermined range of the finite amount of information, the created device port is closed. be done. Therefore, a new device port can be created using the port information of the closed device port. This makes it possible to create a device port using port information within a limited range of information.

通信システム1のブロック図である。1 is a block diagram of a communication system 1; FIG. 通信システム1での処理を示すシーケンス図である。4 is a sequence diagram showing processing in the communication system 1; FIG. 通信システム1での処理を示すシーケンス図である。4 is a sequence diagram showing processing in the communication system 1; FIG. 通信システム1での処理を示すシーケンス図である。4 is a sequence diagram showing processing in the communication system 1; FIG. 通信システム1での処理を示すシーケンス図である。4 is a sequence diagram showing processing in the communication system 1; FIG. 通信システム1での処理を示すシーケンス図である。4 is a sequence diagram showing processing in the communication system 1; FIG.

以下、適宜図面を参照して本発明の実施形態について説明する。なお、以下に説明する実施形態は、本発明の一例にすぎず、本発明の要旨を変更しない範囲で、本発明の実施形態を適宜変更できることは言うまでもない。例えば、後述する各処理の実行順序は、本発明の要旨を変更しない範囲で、適宜変更できる。 Hereinafter, embodiments of the present invention will be described with reference to the drawings as appropriate. It should be noted that the embodiment described below is merely an example of the present invention, and it goes without saying that the embodiment of the present invention can be changed as appropriate without changing the gist of the present invention. For example, the execution order of each process to be described later can be changed as appropriate without changing the gist of the present invention.

図1は、本実施形態に係る通信システム1のブロック図である。図1に示す通信システム1は、PC(情報処理装置の一例)10、MFP(デバイスの一例)50、MFP56を備える。MFP50,56は、スキャン処理,印刷処理等の各種処理を実行可能なデバイスである。また、MFP50には、EWS52が組み込まれており、MFP56には、EWS58が組み込まれている。EWS52,58は、ウェブサーバと同等の機能を有しており、EWS52,58には、MFP50,56の状態を示す情報,設定情報などに関するHTMLのウェブページを示す情報(以下、「EWS情報」と記載する)(サーバ情報の一例)が蓄積されている。 FIG. 1 is a block diagram of a communication system 1 according to this embodiment. A communication system 1 shown in FIG. The MFPs 50 and 56 are devices capable of executing various types of processing such as scanning processing and printing processing. The MFP 50 incorporates an EWS 52 and the MFP 56 incorporates an EWS 58 . The EWSs 52 and 58 have functions equivalent to those of web servers, and the EWSs 52 and 58 contain information indicating the status of the MFPs 50 and 56 and information indicating HTML web pages regarding setting information (hereinafter referred to as "EWS information"). ) (an example of server information) is accumulated.

PC10は、CPU(コンピュータの一例)12、メモリ14、LCD16、入力I/F18、ネットワークI/F(第1通信インタフェースの一例)19、USBI/F(第2通信インタフェースの一例)20を主に備えている。これらの構成要素は、バス22を介して互いに通信可能とされている。 The PC 10 mainly includes a CPU (an example of a computer) 12, a memory 14, an LCD 16, an input I/F 18, a network I/F (an example of a first communication interface) 19, and a USB I/F (an example of a second communication interface) 20. I have. These components can communicate with each other via bus 22 .

CPU12は、メモリ14内の制御プログラム(プログラム及び第1プログラムの一例)30,アプリケーション(別プログラム及び第2プログラムの一例)32,設定ツール(別プログラム及び第2プログラムの一例)34,ブラウザ36,OS38に従って処理を実行する。制御プログラム30は、MFP50のEWS52からサーバ情報を取得するためのアプリケーションプログラムである。また、アプリケーション32は、MFP50を用いて各種処理を実行するためのアプリケーションプログラムである。また、設定ツール34は、MFP50,56のEWS52,58に蓄積されているEWS情報に基づいて各種設定を行うためのアプリケーションプログラムである。なお、アプリケーション32は、ライブラリ40を含んでおり、設定ツール34は、ライブラリ42を含んでいる。ライブラリ40とライブラリ42とは、同じアプリケーションプログラムであり、制御プログラム30の処理によりMFP50のEWS52からサーバ情報を取得する際に用いられる。また、ブラウザ36は、ネットワークI/F19を介してHTTPを用いてHTML形式のデータを取得し、ウェブページをLCD16に表示するためのアプリケーションプログラムである。また、OS38は、制御プログラム30等に利用される基本的な機能を提供するプログラムである。なお、以下の説明では、制御プログラム30等を実行するCPU12のことを、単にプログラム名でも記載する場合がある。例えば、「制御プログラム30が」という記載は、「制御プログラム30を実行するCPU12が」ということを意味する場合がある。 The CPU 12 includes a control program (an example of a program and a first program) 30 in the memory 14, an application (an example of a separate program and a second program) 32, a setting tool (an example of a separate program and a second program) 34, a browser 36, Processing is executed according to the OS38. The control program 30 is an application program for acquiring server information from the EWS 52 of the MFP 50 . Also, the application 32 is an application program for executing various processes using the MFP 50 . The setting tool 34 is an application program for making various settings based on the EWS information accumulated in the EWSs 52, 58 of the MFPs 50, 56. FIG. Note that the application 32 includes a library 40 and the setting tool 34 includes a library 42. FIG. The library 40 and the library 42 are the same application program, and are used when server information is acquired from the EWS 52 of the MFP 50 by processing of the control program 30 . The browser 36 is an application program for acquiring HTML format data using HTTP via the network I/F 19 and displaying a web page on the LCD 16 . Also, the OS 38 is a program that provides basic functions used by the control program 30 and the like. In the following description, the CPU 12 that executes the control program 30 and the like may be simply referred to as a program name. For example, the statement "the control program 30" may mean "the CPU 12 that executes the control program 30".

また、メモリ14は、データ記憶領域(メモリの一例)46を備える。データ記憶領域46は、制御プログラム30等の実行に必要なデータなどを記憶する領域である。なお、メモリ14は、RAM、ROM、フラッシュメモリ、HDD、PC10に着脱されるUSBメモリ等の可搬記憶媒体、CPU12が備えるバッファなどが組み合わされて構成されている。 The memory 14 also includes a data storage area (an example of memory) 46 . The data storage area 46 is an area for storing data necessary for executing the control program 30 and the like. The memory 14 is configured by combining a RAM, a ROM, a flash memory, an HDD, a portable storage medium such as a USB memory detachable from the PC 10, a buffer provided in the CPU 12, and the like.

なお、メモリ14は、コンピュータが読み取り可能なストレージ媒体であってもよい。コンピュータが読み取り可能なストレージ媒体とは、non-transitoryな媒体である。non-transitoryな媒体には、上記の例の他に、CD-ROM、DVD-ROM等の記録媒体も含まれる。また、non-transitoryな媒体は、tangibleな媒体でもある。一方、インターネット上のサーバなどからダウンロードされるプログラムを搬送する電気信号は、コンピュータが読み取り可能な媒体の一種であるコンピュータが読み取り可能な信号媒体であるが、non-transitoryなコンピュータが読み取り可能なストレージ媒体には含まれない。 Note that the memory 14 may be a computer-readable storage medium. A computer-readable storage medium is a non-transitory medium. In addition to the above examples, non-transitory media include recording media such as CD-ROMs and DVD-ROMs. A non-transitory medium is also a tangible medium. On the other hand, an electrical signal that carries a program downloaded from a server on the Internet is a computer-readable signal medium, which is a kind of computer-readable medium, but is a non-transitory computer-readable storage. Not included in media.

また、LCD16は、PC10の各種情報を表示する。なお、本願のディスプレイは、液晶ディスプレイに限らず、有機ELディスプレイ等の他の表示方式のディスプレイでも良い。入力I/F18は、キーボード、マウス等を含み、ユーザ操作を入力するためのインタフェースである。なお、入力I/F18は、キーボード等に限らず、LCD16の表示画面に重畳された膜状のタッチセンサでも良い。 Also, the LCD 16 displays various information of the PC 10 . The display of the present application is not limited to a liquid crystal display, and may be a display of another display method such as an organic EL display. The input I/F 18 includes a keyboard, mouse, etc., and is an interface for inputting user operations. The input I/F 18 is not limited to a keyboard or the like, and may be a film-like touch sensor superimposed on the display screen of the LCD 16 .

ネットワークI/F19は、HTTP(第1プロトコルの一例)を用いてデバイスと通信を行うためのものであり、ネットワーク60を介してMFP56と通信可能とされている。また、USBI/F20は、USBプロトコル(第2プロトコルの一例)を用いてデバイスと通信を行うためのものであり、MFP50と通信可能とされている。 The network I/F 19 is for communicating with devices using HTTP (an example of the first protocol), and is capable of communicating with the MFP 56 via the network 60 . The USB I/F 20 is for communicating with devices using a USB protocol (an example of a second protocol), and is capable of communicating with the MFP 50 .

なお、本明細書では、基本的に、プログラムに記述された命令に従ったCPU12の処理を示す。すなわち、以下の説明における「判断」、「抽出」、「選択」、「算出」、「決定」、「特定」、「取得」、「受付」、「制御」「設定 」等の処理は、CPU12の処理を表している。CPU12による処理は、OS38を介したハードウェア制御も含む。なお、「取得」は要求を必須とはしない概念で用いる。すなわち、CPU12が要求することなくデータを受信するという処理も、「CPU12がデータを取得する」という概念に含まれる。また、本明細書中の「データ」とは、コンピュータに読取可能なビット列で表される。そして、実質的な意味内容が同じでフォーマットが異なるデータは、同一のデータとして扱われるものとする。本明細書中の「情報」についても同様である。また、「命令」「応答」「要求」等の処理は、「命令」「応答」「要求」等を示す情報を通信することにより行われる。また、「命令」「応答」「要求」等の文言を、「命令」「応答」「要求」等を示す情報そのものという意味で記載してもよい。また、CPUによる、情報Aは事柄Bであることを示しているか否かを判断する処理を、「情報Aから、事柄Bであるか否かを判断する」のように概念的に記載することがある。CPUによる、情報Aが事柄Bであることを示しているか、事柄Cであるかを示しているかを判断する処理を、「情報Aから、事柄Bであるか事柄Cであるかを判断する」のように概念的に記載することがある。 Note that this specification basically shows the processing of the CPU 12 according to the instructions described in the program. That is, the processing such as “judgment”, “extraction”, “selection”, “calculation”, “decision”, “specification”, “acquisition”, “acceptance”, “control”, “setting” in the following description is performed by the CPU 12 represents the processing of Processing by CPU 12 also includes hardware control via OS 38 . Note that "acquisition" is used as a concept that does not require a request. That is, the process of receiving data without the CPU 12 requesting it is also included in the concept of "the CPU 12 acquires data." Also, "data" in this specification is represented by a computer-readable bit string. Data having substantially the same meaning and content but different formats are treated as the same data. The same applies to "information" in this specification. Processing such as "command", "response" and "request" is performed by communicating information indicating "command", "response", "request" and the like. Also, words such as "command", "response", "request", etc. may be described in the sense of information itself indicating "command", "response", "request", etc. Also, the process of judging by the CPU whether or not the information A indicates that the matter B is conceptually described as "judging whether or not the information A is the matter B". There is The process of judging whether information A indicates matter B or matter C by the CPU is referred to as "determining whether information A is matter B or matter C." It may be described conceptually as

通信システム1では、上述した構成に従って、PC10とネットワークI/F19を介して通信可能とされたMFP56から、ブラウザ36がEWS情報を取得し、EWS情報に基づいてウェブページをLCD16に表示することが可能とされている。このような処理は、従来から行われている処理であり、ブラウザ36がHTTPを用いることで好適にMFP56からEWS情報を取得することができる。一方で、PC10とUSBI/F20を介して通信可能とされたMFP50、つまり、USB接続されたMFP50から、ブラウザ36は、従来の手法ではHTTPを用いてEWS情報を取得することはできなかったが、通信システム1では、USB接続されたMFP50から、ブラウザ36がHTTPを用いてEWS情報を取得することが可能とされている。以下に、USB接続されたMFP50から、ブラウザ36がHTTPを用いてEWS情報を取得する際の制御プログラム30等の処理について、図2及び図3に示すシーケンス図を用いて、詳しく説明する。 In the communication system 1, according to the configuration described above, the browser 36 can acquire the EWS information from the MFP 56 that can communicate with the PC 10 via the network I/F 19, and display the web page on the LCD 16 based on the EWS information. It is possible. Such processing is conventionally performed, and the EWS information can be preferably obtained from the MFP 56 by the browser 36 using HTTP. On the other hand, the browser 36 cannot acquire the EWS information from the MFP 50 that is communicable with the PC 10 via the USB I/F 20, that is, from the MFP 50 that is USB-connected, using HTTP in the conventional method. In the communication system 1, the browser 36 can acquire EWS information from the USB-connected MFP 50 using HTTP. Processing of the control program 30 and the like when the browser 36 uses HTTP to acquire EWS information from the USB-connected MFP 50 will be described in detail below with reference to the sequence diagrams shown in FIGS.

詳しくは、制御プログラム30は、アプリケーション32のライブラリ40の処理により起動する(図2参照:S100)。そして、制御プログラム30は、受付ポートを作成する(S102)。続いて、制御プログラム30は、その受付ポートを「Accept」で待ち受け状態とする(S104)。つまり、制御プログラム30は、受付ポートを、情報を受け付け可能な状態(以下、「受付可能状態」と記載する)とする。なお、受付ポートのポート番号は、HTTPに従ったものであり、50000とされている。そして、制御プログラム30は、その受付ポートによりアプリケーション32のライブラリ40と通信を行う。制御プログラム30は、例えば、既知のSocket方式に従ってポートの作成、ポートの状態の変更、ポートの削除などを行う。 Specifically, the control program 30 is activated by the processing of the library 40 of the application 32 (see FIG. 2: S100). The control program 30 then creates a reception port (S102). Subsequently, the control program 30 puts the acceptance port into a standby state with "Accept" (S104). That is, the control program 30 puts the receiving port into a state in which information can be received (hereinafter referred to as a "receivable state"). The port number of the reception port is 50000 according to HTTP. The control program 30 then communicates with the library 40 of the application 32 through the reception port. The control program 30, for example, creates a port, changes the state of the port, deletes the port, etc. according to the known Socket method.

このように、PC10では、ライブラリ40の処理により制御プログラム30が起動し、アプリケーション32と通信を行うための受付ポートを作成する。一方で、アプリケーション32はユーザ操作により起動し、アプリケーション32が起動すると、アプリケーション32に含まれるライブラリ40が、ポート番号50000の受付ポートに接続を確認するための情報を出力する(S106)。なお、ライブラリ40には、通信対象のポートのポート番号が50000であることがプログラミングされている。そして、制御プログラム30は、受付ポートに接続確認の情報が入力されると、「OK」をライブラリ40に返信する(S108)。なお、受付ポートに接続確認の情報が入力されない場合には、「NG」がライブラリ40に返信される。ちなみに、制御プログラム30は、ポート番号50000のデバイスポートを作成することができない場合に(例えば、ポート番号50000のポートが、他のプログラムによって既に使用されている場合に)、受付ポート決定の所定のルールに従って、そのポート番号50000と異なるポート番号を受付ポートのポート番号として決定し、そのポート番号のポートを受付ポートとして作成する。この場合、ライブラリ40がポート番号50000のポートに接続確認の情報を入力しようとしても、入力できない。そこで、ライブラリ40にも、受付ポート決定の所定のルールがプログラミングされている。接続確認の情報を入力できなかった場合、ライブラリ40は、ルールに従って、異なるポート番号のポートに接続確認の情報などを入力する。ライブラリ40は、接続確認の情報を入力できたポート番号を、受付ポートの番号として使用する。便宜上、本実施例ではポート番号50000のポートを受付ポートとして説明を続ける。 As described above, in the PC 10 , the control program 30 is activated by the processing of the library 40 to create a receiving port for communicating with the application 32 . On the other hand, the application 32 is activated by a user operation, and when the application 32 is activated, the library 40 included in the application 32 outputs information for confirming connection to the receiving port with port number 50000 (S106). The library 40 is programmed with a port number of 50000 for the communication target port. Then, when the connection confirmation information is input to the receiving port, the control program 30 returns "OK" to the library 40 (S108). If the connection confirmation information is not input to the reception port, "NG" is returned to the library 40. FIG. Incidentally, when the control program 30 cannot create a device port with port number 50000 (for example, when the port with port number 50000 is already in use by another program), According to the rule, a port number different from the port number 50000 is determined as the port number of the reception port, and the port with that port number is created as the reception port. In this case, even if the library 40 tries to input connection confirmation information to the port with port number 50000, it cannot be input. Therefore, the library 40 is also programmed with predetermined rules for determining reception ports. If the connection confirmation information could not be input, the library 40 inputs the connection confirmation information to a port with a different port number according to the rule. The library 40 uses the port number for which the connection confirmation information has been input as the acceptance port number. For the sake of convenience, in this embodiment, the port with port number 50000 is assumed to be the receiving port.

また、アプリケーション32は、上述したように、MFP50等のデバイスを用いて各種処理を実行するためのアプリケーションプログラムであり、ブラウザ36を利用して、デバイスのEWS情報に基づくウェブページをLCD16に表示することも可能とされている。このため、アプリケーション32が、EWS情報に基づくウェブページの表示要求のユーザ操作を受け付けると、ライブラリ40が、ポート番号50000の受付ポートに、ポート情報の要求を出力する(S110)。この際、ライブラリ40は、ポート情報の要求とともに、デバイス指定情報も受付ポートに出力する。デバイス指定情報は、EWS情報の取得先のデバイスを指定する情報であり、ここでは、MFP50を指定するデバイス指定情報が受付ポートに出力される。また、デバイス指定情報は、USBプロトコルで用いられる文字列の情報とされている。具体的には、例えば、デバイス指定情報として「VID/PID」が受付ポートに出力される。ちなみに、VIDは、VenderID(メーカ番号)であり、PIDは、ProductID(製品番号)である。このため、「VID/PID」により、デバイスの機種(モデル)を特定することができる。なお、1台のPCに、複数の同じ機種のプリンタをUSBで接続して利用する形態は一般的ではないと考えられる。そのため、本願実施例ではデバイス指定情報である「VID/PID」が、デバイスの個体を識別する情報としても用いられる。もちろん、「VID/PID」以外の情報、例えばシリアル番号などを、デバイスの個体を識別する情報として用いることとし、「VID/PID」と、デバイスの個体を識別する情報とを合わせてデバイス指定情報としてもよい。 Also, as described above, the application 32 is an application program for executing various processes using a device such as the MFP 50, and uses the browser 36 to display a web page based on the EWS information of the device on the LCD 16. is also possible. Therefore, when the application 32 receives a user operation requesting to display a web page based on the EWS information, the library 40 outputs a request for port information to the receiving port with port number 50000 (S110). At this time, the library 40 outputs the device designation information to the receiving port together with the port information request. The device designation information is information that designates the device from which the EWS information is obtained. Here, the device designation information that designates the MFP 50 is output to the reception port. The device designation information is character string information used in the USB protocol. Specifically, for example, "VID/PID" is output to the reception port as the device designation information. Incidentally, VID is VenderID (manufacturer number), and PID is ProductID (product number). Therefore, the type (model) of the device can be specified by "VID/PID". Note that it is not common to use a plurality of printers of the same model connected to a single PC via USB. Therefore, in the embodiment of the present application, the device designation information "VID/PID" is also used as information for identifying individual devices. Of course, information other than "VID/PID", such as a serial number, is used as information for identifying the individual device. may be

そして、制御プログラム30は、受付ポートがポート情報の要求を受け付けると、その要求に含まれるデバイス指定情報により指定されるデバイス(以下、「対象デバイス」と記載する場合がある)の確認要求をOS38に出力する(S112)。この確認要求は、対象デバイスがHTTPに対応するデバイスであるか否かを確認するためのものであり、OS38は、対象デバイスがHTTPに対応するデバイスであれば、「true」を制御プログラム30に出力する(S114)。一方、OS38は、対象デバイスがHTTPに対応するデバイスでなければ、「false」を制御プログラム30に出力する(S114)。OS38は、例えば、レジストリと呼ばれる領域にUSBデバイスの情報を記憶しており、S112では、その情報の出力をOSに要求している。USBデバイスの情報は、PC10にUSB接続したデバイスから取得した情報であってもよいし、PC10のデータ記憶領域46や、デバイスメーカのサーバから取得した情報であってもよい。対象デバイスがHTTPに対応するデバイスであるか否かを示す情報は「true」「false」以外の情報であってもよい。 Then, when the reception port receives the request for port information, the control program 30 sends a confirmation request to the OS 38 for the device designated by the device designation information included in the request (hereinafter sometimes referred to as "target device"). (S112). This confirmation request is for confirming whether or not the target device is a device that supports HTTP. If the target device is a device that supports HTTP, the OS 38 sends "true" to the control program 30. Output (S114). On the other hand, if the target device does not support HTTP, the OS 38 outputs "false" to the control program 30 (S114). The OS 38 stores USB device information in an area called registry, for example, and requests the OS to output the information in S112. The information of the USB device may be information obtained from a device USB-connected to the PC 10, information obtained from the data storage area 46 of the PC 10, or information obtained from a device manufacturer's server. Information indicating whether or not the target device supports HTTP may be information other than "true" and "false".

この際、制御プログラム30は、「true」をOS38から受け付けると、対象デバイスと通信を行うためのデバイスポートのポート番号を特定し、特定したポート番号(以下、「特定ポート番号」と記載する)が「52000」を超えているか否かを判断する(S118)。詳しくは、デバイスと通信を行うためのデバイスポートのポート番号は、有限な数値であり、51000~52000とされている。そして、制御プログラム30は、デバイスポートのポート番号を、まず、「51000」に特定し、順次、「10」ずつカウントアップされた数値に特定する。つまり、制御プログラム30は、最初のデバイスポートのポート番号を「51000」に特定し、2番目以降のデバイスポートのポート番号を、「51010」,「51020」,「51030」,「51040」,「51050」・・・に特定する。このように、デバイスポートのポート番号が特定されると、最終的に、デバイスポートのポート番号が「52000」に特定される。そして、そのポート番号「52000」の次に、ポート番号を「52010」に特定してもそのポート番号「52010」のデバイスポートを作成することはできない。このため、制御プログラム30は、特定ポート番号を特定し、その特定ポート番号が「52000」を超えているか否かを判断する(S118)。ここでは、制御プログラム30が最初のポート番号を特定するため、特定ポート番号は「51000」に特定され、「52000」を超えていないと判断される。 At this time, when receiving "true" from the OS 38, the control program 30 specifies the port number of the device port for communicating with the target device, and specifies the specified port number (hereinafter referred to as "specific port number"). exceeds "52000" (S118). Specifically, the port number of the device port for communicating with the device is a finite numerical value and is set to 51000-52000. Then, the control program 30 first identifies the port number of the device port as "51000" and then sequentially identifies numerical values incremented by "10". That is, the control program 30 specifies the port number of the first device port as "51000", and the port numbers of the second and subsequent device ports as "51010", "51020", "51030", "51040", and "51000". 51050” . . . When the port number of the device port is specified in this way, the port number of the device port is finally specified as "52000". Then, even if the port number "52010" is specified next to the port number "52000", the device port with the port number "52010" cannot be created. Therefore, the control program 30 identifies the specific port number and determines whether or not the specific port number exceeds "52000" (S118). Here, since the control program 30 identifies the first port number, the specific port number is identified as "51000" and is determined not to exceed "52000".

このように、デバイスポートのポート番号が特定され、その特定ポート番号が「52000」を超えていないと判断されると(S118:NO)、制御プログラム30は、リセットフラグをOFFに設定する(S120)。リセットフラグは、デバイスポートのポート番号をリセットするためのフラグであり、後に詳しく説明する。そして、制御プログラム30は、サブスレッドを作成する(S122)。サブスレッドは、デバイスポートに関する処理を実行するためのスレッドであり、デバイスポート毎に作成される。このため、特定ポート番号が「51000」である場合には、ポート番号「51000」のデバイスポートに関する処理を実行するためのサブスレッドが作成される。なお、上記した制御プログラム30の処理は、メインスレッドにおいて行われる。 In this way, the port number of the device port is specified, and when it is determined that the specified port number does not exceed "52000" (S118: NO), the control program 30 sets the reset flag to OFF (S120). ). A reset flag is a flag for resetting the port number of the device port, and will be described later in detail. The control program 30 then creates a sub-thread (S122). A subthread is a thread for executing processing related to a device port, and is created for each device port. Therefore, when the specific port number is "51000", a sub-thread is created to execute the process related to the device port with the port number "51000". Note that the processing of the control program 30 described above is performed in the main thread.

デバイスポートに関する処理を実行するためのサブスレッドが作成されると、図3に示すように、制御プログラム30は、そのサブスレッドにおいて、特定ポート番号に応じたデバイスポート、つまり、ポート番号「51000」のデバイスポートを作成する(S152)。なお、デバイスポートのポート番号も、HTTPに従ったものであり、制御プログラム30は、そのデバイスポートによりブラウザ36と通信を行う。そして、制御プログラム30は、作成したデバイスポートのポート番号を示す情報(以下、「ポート情報」と記載する)と、S110で受け付けているデバイス指定情報とを関連付けて、データ記憶領域46に記憶する(S154)。次に、制御プログラム30は、リセットフラグがONに設定されているか否かを判断する(S156)。ここでは、S120においてリセットフラグがOFFに設定されているため、リセットフラグはONに設定されていないと判断され(S156:NO)、制御プログラム30は、S152において作成したデバイスポートを「Accept」で待ち受け状態とする(S158)。つまり、制御プログラム30は、デバイスポートを受付可能状態とする。 When a subthread for executing processing related to the device port is created, as shown in FIG. 3, the control program 30 creates a device port corresponding to the specific port number, that is, the port number "51000", in the subthread. device port is created (S152). The port number of the device port also conforms to HTTP, and the control program 30 communicates with the browser 36 using the device port. Then, the control program 30 associates information indicating the port number of the created device port (hereinafter referred to as "port information") with the device designation information received in S110, and stores the information in the data storage area 46. (S154). Next, the control program 30 determines whether or not the reset flag is set to ON (S156). Here, since the reset flag is set to OFF in S120, it is determined that the reset flag is not set to ON (S156: NO), and the control program 30 accepts the device port created in S152. A standby state is set (S158). In other words, the control program 30 puts the device port into an acceptable state.

なお、サブスレッドにおいてデバイスポートが作成され、そのデバイスポートが受付可能状態とされると、制御プログラム30は、図2に示すように、メインスレッドにおいて、S152で作成されたデバイスポートのポート番号を示すポート情報をライブラリ40に出力する(S124)。この際、制御プログラム30は、HTTP形式のポート情報をライブラリ40に出力する。具体的には、例えば、デバイスポートのポート番号が51000である場合に、制御プログラム30は、ポート情報「http://localhost:51000/」をライブラリ40に出力する。 Note that when a device port is created in a subthread and the device port is placed in a receivable state, the control program 30, as shown in FIG. The indicated port information is output to the library 40 (S124). At this time, the control program 30 outputs HTTP format port information to the library 40 . Specifically, for example, when the port number of the device port is 51000, the control program 30 outputs port information “http://localhost:51000/” to the library 40 .

ライブラリ40は、制御プログラム30からポート情報を受け付けると、ブラウザ36を起動する(S126)。そして、ライブラリ40は、制御プログラム30から受け付けたポート情報「http://localhost:51000/」をブラウザ36に出力する(S128)。これにより、ブラウザ36は、ポート番号51000のデバイスポートにアクセスすることが可能となる。このため、ブラウザ36は、図3に示すように、ライブラリ40から受け付けたポート情報を利用してポート番号「51000」のデバイスポートに、EWS情報の要求情報をHTTPで出力する(S160)。この際、制御プログラム30は、ポート番号51000のデバイスポートにHTTPでのEWS情報の要求情報を受け付けると、そのポート番号のポート情報と関連付けて記憶されているデバイス指定情報に応じたデバイス、つまり、MFP50に、EWS情報の要求情報をUSBプロトコルで出力する(S162)。このとき、制御プログラム30は、デバイスポートにHTTPで受け取った要求情報を変換することなく、USBプロトコルでMFP50に送信する。すなわち、MFP50が制御プログラム30から受信する要求情報と、仮に、MFP50がブラウザ36から直接HTTPで受信するとして、MFP50がHTTPで受信する要求情報とは、同じ要求情報である。したがって、MFP50は、制御プログラム30から受信する場合と、HTTPで受信する場合とで、要求情報に対する処理を基本的には変更する必要がない。 When receiving the port information from the control program 30, the library 40 activates the browser 36 (S126). The library 40 then outputs the port information "http://localhost:51000/" received from the control program 30 to the browser 36 (S128). This allows the browser 36 to access the device port with port number 51000. FIG. Therefore, as shown in FIG. 3, the browser 36 uses the port information received from the library 40 to output the EWS information request information to the device port with the port number "51000" by HTTP (S160). At this time, when the control program 30 receives the EWS information request information in HTTP to the device port with the port number 51000, the control program 30 receives the device corresponding to the device designation information stored in association with the port information of the port number, that is, The request information for the EWS information is output to the MFP 50 using the USB protocol (S162). At this time, the control program 30 transmits the request information received by HTTP to the device port to the MFP 50 by the USB protocol without converting it. That is, the request information that the MFP 50 receives from the control program 30 and the request information that the MFP 50 receives via HTTP, assuming that the MFP 50 receives directly from the browser 36 via HTTP, are the same request information. Therefore, the MFP 50 basically does not need to change the processing for the request information depending on whether the request information is received from the control program 30 or via HTTP.

次に、MFP50は、EWS情報の要求情報を受け付けると、EWS情報を制御プログラム30にUSBプロトコルで返信する(S164)。そして、制御プログラム30は、受け付けたEWS情報をブラウザ36にHTTPで出力する(S166)。このように、PC10では、制御プログラム30を介することで、ブラウザ36がHTTPを用いてEWS情報を取得することが可能とされている。そして、ブラウザ36は、取得したEWS情報に基づいてウェブページをLCD16に表示する(S168)。なお、MFP50が制御プログラム30に返信するEWS情報と、仮に、MFP50がブラウザ36に直接HTTPで返信するとして、MFP50がHTTPで返信するEWS情報とは、同じEWS情報である。また、制御プログラム30は、USBプロトコルで受信したEWS情報を変換することなく、HTTPでブラウザ36に出力する。したがって、ブラウザ36は、制御プログラム30から受け取る場合と、HTTPで受信する場合とで、EWS情報に対する処理を基本的には変更する必要がない。 Next, when the MFP 50 receives the request information for the EWS information, it returns the EWS information to the control program 30 using the USB protocol (S164). The control program 30 then outputs the received EWS information to the browser 36 via HTTP (S166). In this way, in the PC 10, the browser 36 can acquire the EWS information using HTTP through the control program 30. FIG. The browser 36 then displays the web page on the LCD 16 based on the acquired EWS information (S168). Note that the EWS information returned by the MFP 50 to the control program 30 and the EWS information returned by the MFP 50 via HTTP, assuming that the MFP 50 directly replies to the browser 36 via HTTP, are the same EWS information. Also, the control program 30 outputs the EWS information received by the USB protocol to the browser 36 by HTTP without conversion. Therefore, the browser 36 basically does not need to change the processing of the EWS information depending on whether it receives it from the control program 30 or via HTTP.

なお、デバイスポートは情報を受け付けると、次の情報を受け付けることができない状態、つまり、次の情報の受付が不能な状態となる。このため、制御プログラム30は、ブラウザからEWS情報の要求情報を受け付けたデバイスポートを、その要求情報に応じたEWS情報をブラウザ36に出力した後に(S166)、S156に戻る。これにより、制御プログラム30は、S156の処理を経由して、デバイスポートを受付可能状態とする(S158)。これにより、ブラウザ36が、再度、そのデバイスポートにEWS情報の要求情報をHTTPで出力した場合(S160)において、そのデバイスポートが、EWS情報の要求情報を受け付けることができる。なお、以降の処理(S162~S168)は、先に説明した処理と同じである。 When the device port receives the information, it enters a state in which it cannot receive the next information, that is, cannot receive the next information. Therefore, the control program 30 outputs the device port that received the EWS information request information from the browser and the EWS information corresponding to the request information to the browser 36 (S166), and then returns to S156. As a result, the control program 30 puts the device port in the receivable state via the process of S156 (S158). As a result, when the browser 36 again outputs the EWS information request information to the device port by HTTP (S160), the device port can receive the EWS information request information. It should be noted that subsequent processing (S162 to S168) is the same as the processing described above.

また、制御プログラム30のメインスレッドでは、図2に示すように、制御プログラム30がポート情報をライブラリ40に出力すると、S110に戻る。このため、制御プログラム30は、ライブラリ40からポート情報の要求を受け付ける毎に、S112以降の処理を実行する。つまり、制御プログラム30は、ライブラリ40から2番目のポート情報の要求を受け付けると(S110)、2番目のデバイスポートのポート番号を「51010」に特定する(S118)。この際、特定ポート番号「51010」は「52000」を超えていないと判断され(S118:NO)、そのポート番号「51010」のデバイスポートに関する処理を実行するためのサブスレッドが作成される(S122)。そして、そのサブスレッドにおいて、図3に示すように、ポート番号「51010」のデバイスポートに関する処理(S152~S168)が実行される。 Also, in the main thread of the control program 30, as shown in FIG. 2, when the control program 30 outputs the port information to the library 40, the process returns to S110. For this reason, the control program 30 executes the processing from S112 onward each time a request for port information is received from the library 40. FIG. That is, when the control program 30 receives the request for the second port information from the library 40 (S110), the port number of the second device port is specified as "51010" (S118). At this time, it is determined that the specific port number '51010' does not exceed '52000' (S118: NO), and a sub-thread is created to execute the process related to the device port with the port number '51010' (S122). ). Then, in that subthread, as shown in FIG. 3, processing (S152 to S168) relating to the device port with port number "51010" is executed.

さらに、制御プログラム30が、ライブラリ40から3番目のポート情報の要求を受け付けると(図2参照:S110)、3番目のデバイスポートのポート番号を「51020」に特定する(S118)。この際、特定ポート番号「51020」は「52000」を超えていないと判断され(S118:NO)、そのポート番号「51020」のデバイスポートに関する処理を実行するためのサブスレッドが作成される(S122)。そして、そのサブスレッドにおいて、ポート番号「51020」のデバイスポートに関する処理(図3参照:S152~S168)が実行される。 Further, when the control program 30 receives a request for the third port information from the library 40 (see FIG. 2: S110), the port number of the third device port is specified as "51020" (S118). At this time, it is determined that the specific port number '51020' does not exceed '52000' (S118: NO), and a sub-thread is created to execute the process related to the device port with the port number '51020' (S122). ). Then, in that subthread, the process for the device port with the port number "51020" (see FIG. 3: S152 to S168) is executed.

このように、制御プログラム30は、ライブラリ40からポート情報の要求を受け付ける毎に、異なるポート番号を特定し、そのポート番号のデバイスポートに関する処理を実行するためのサブスレッドを作成する。そして、各サブスレッドにおいて、サブスレッドに応じたポート番号のデバイスポートに関する処理が実行される。ただし、デバイスポートのポート番号は、上述したように、51000~52000とされており、有限な数値である。このため、ポート番号「52000」のデバイスポートが作成された後に、制御プログラム30が、ライブラリ40からポート情報の要求を受け付けると(図2参照:S110)、デバイスポートのポート番号を「52010」に特定するが、その特定ポート番号「52010」は「52000」を超えていると判断される(S118:YES)。このため、制御プログラム30は、デバイスポートを作成することができないため、ポート情報の要求に対する返信として、エラー情報をライブラリ40に出力する(S170)。そして、制御プログラム30は、リセットフラグをONに設定する(S172)。このリセットフラグは、デバイスポートに関する処理を実行するサブスレッドにおいて監視されており、サブスレッドで作成されたデバイスポートをクローズする際に用いられる。また、制御プログラム30は、S118において特定するポート番号をリセットする(S174)。つまり、「52000」までカウントアップされた特定ポート番号を、「51000」にリセットする。 In this way, the control program 30 identifies a different port number each time it receives a request for port information from the library 40, and creates a subthread for executing processing related to the device port of that port number. Then, in each subthread, processing relating to the device port with the port number corresponding to the subthread is executed. However, the port number of the device port is 51000 to 52000 as described above, which is a finite number. Therefore, when the control program 30 receives a port information request from the library 40 after the device port with the port number "52000" is created (see FIG. 2: S110), the port number of the device port is changed to "52010". However, it is determined that the specific port number "52010" exceeds "52000" (S118: YES). Therefore, since the control program 30 cannot create a device port, it outputs error information to the library 40 as a reply to the port information request (S170). Then, the control program 30 sets the reset flag to ON (S172). This reset flag is monitored in a subthread that executes processing related to device ports, and is used when closing a device port created in the subthread. Also, the control program 30 resets the port number specified in S118 (S174). That is, the specific port number counted up to "52000" is reset to "51000".

また、デバイスポートに関する処理を実行するサブスレッドでは、上述したように、リセットフラグが監視されている。詳しくは、図3に示すように、サブスレッドにおいて、デバイスポートが作成され(S152)、ポート情報とデバイス指定情報とが関連付けてデータ記憶領域46に記憶されると、制御プログラム30は、リセットフラグがONに設定されているか否かを判断する(S156)。この際、リセットフラグがOFFに設定されている場合(S156:NO)には、上述したように、制御プログラム30は、デバイスポートを受付可能状態とし(S158)、S160以降の処理を実行する。一方、リセットフラグがONに設定されている場合(S156:YES)に、制御プログラム30は、デバイスポートをクローズする(S180)。つまり、制御プログラム30は、デバイスポートを受付可能状態とする前にデバイスポートをクローズする。このため、ブラウザ36からEWS情報の要求情報を受け付けていない状態でデバイスポートをクローズすることが可能となり、安全にデバイスポートをクローズすることができる。また、制御プログラム30が、ブラウザ36からEWS情報の要求情報を受け付けた後に(S160)、リセットフラグがONに設定された場合であっても、そのEWS情報の要求情報に対する返信、つまり、EWS情報をブラウザ36に出力した後に、S156においてリセットフラグがONに設定されているか否かが判断される。このため、ブラウザ36からEWS情報の要求情報を受け付けている場合であっても、その要求情報に対する処理が完了した後に、デバイスポートがクローズされる。これにより、要求情報の処理に対する途中でデバイスポートがクローズされることはなくなり、安全にデバイスポートをクローズすることができる。そして、デバイスポートがクローズされると、サブスレッドによる処理が終了する。このように、サブスレッドでは、デバイスポートのポート番号がリセットされると、リセットされたポート番号のデバイスポートがクローズされる。なお、上述したデバイスポートの監視処理は、作成された全てのサブスレッドにおいて実行されているため、ポート番号のリセットに伴って、全てのサブスレッドにおいてデバイスポートがクローズされる。 Also, in the sub-thread that executes processing related to the device port, the reset flag is monitored as described above. Specifically, as shown in FIG. 3, when a device port is created in a subthread (S152) and the port information and the device designation information are associated and stored in the data storage area 46, the control program 30 resets the reset flag. is set to ON (S156). At this time, if the reset flag is set to OFF (S156: NO), as described above, the control program 30 puts the device port in the receivable state (S158), and executes the processing from S160 onwards. On the other hand, if the reset flag is set to ON (S156: YES), the control program 30 closes the device port (S180). In other words, the control program 30 closes the device port before making the device port available for reception. Therefore, it is possible to close the device port in a state in which request information for EWS information is not received from the browser 36, and the device port can be closed safely. Even if the reset flag is set to ON after the control program 30 receives the EWS information request information from the browser 36 (S160), the reply to the EWS information request information, that is, the EWS information is output to the browser 36, it is determined in S156 whether or not the reset flag is set to ON. Therefore, even if request information for EWS information is received from the browser 36, the device port is closed after processing for the request information is completed. As a result, the device port is not closed in the middle of processing the request information, and the device port can be safely closed. Then, when the device port is closed, the processing by the subthread ends. Thus, in a subthread, when the port number of a device port is reset, the device port with the reset port number is closed. Since the device port monitoring process described above is executed in all created subthreads, the device ports are closed in all subthreads when the port numbers are reset.

このように、全てのサブスレッドにおいてデバイスポートがクローズされると、クローズされたデバイスポートのポート番号を再度、用いることが可能となる。このため、図2に示すように、特定ポート番号がリセットされた後に(S174)、制御プログラム30が、ライブラリ40からEWS情報の要求情報を受け付けると(S110)、デバイスポートのポート番号を「51000」に特定する(S118)。これにより、ポート番号「51000」は「52000」を超えていないと判断され(S118:NO)、制御プログラム30は、リセットフラグをOFFに設定する(S120)。そして、制御プログラム30は、ポート番号「51000」のデバイスポートに関する処理を実行するためのサブスレッドを作成する(S122)。これにより、そのサブスレッドにおいて、図3に示すように、ポート番号「51000」のデバイスポートに関する処理(S152~S168,180)が実行される。 When the device ports are closed in all subthreads in this way, the port numbers of the closed device ports can be used again. Therefore, as shown in FIG. 2, after the specific port number is reset (S174), when the control program 30 receives the EWS information request information from the library 40 (S110), the port number of the device port is changed to "51000." ” (S118). Accordingly, it is determined that the port number "51000" does not exceed "52000" (S118: NO), and the control program 30 sets the reset flag to OFF (S120). Then, the control program 30 creates a sub-thread for executing processing related to the device port with the port number "51000" (S122). As a result, in that subthread, as shown in FIG. 3, processing (S152 to S168, 180) relating to the device port with port number "51000" is executed.

このように、PC10では、デバイスポートのポート番号として用いることができる範囲の数値(51000~52000)の全てがデバイスポートのポート番号として使用された場合に、作成済みの全てのデバイスポートがクローズされ、ポート番号がリセットされる。これにより、制御プログラム30は、ライブラリ40からの要求に応じて、永続的にデバイスポートを作成することが可能となる。 In this way, in the PC 10, all device ports that have been created are closed when all of the numbers within the range (51000 to 52000) that can be used as device port numbers are used as device port numbers. , the port number is reset. This allows the control program 30 to permanently create device ports in response to requests from the library 40 .

また、アプリケーション32では、ポート情報の要求を抑制することで、デバイスポートのポート番号の使用量が抑制されている。詳しくは、図4に示すように、アプリケーション32はユーザ操作により起動する(S200)。また、アプリケーション32は、上述したように、MFP50等のデバイスを用いて各種処理を実行するためのアプリケーションプログラムであり、ブラウザ36を利用して、デバイスのEWS情報に基づくウェブページをLCD16に表示することも可能となされている。このため、アプリケーション32は、デバイスを指定するユーザ操作及び、その指定されたデバイスのEWS情報に基づくウェブページの表示要求を、入力I/F18を介して受け付けると(S202)、アプリケーション32は、ポート情報の要求をライブラリ40に出力する(S204)。なお、ポート情報の要求には、S202で受け付けたユーザ操作により指定されるデバイスのデバイス指定情報が含まれている。 Also, in the application 32, by suppressing requests for port information, usage of port numbers of device ports is suppressed. Specifically, as shown in FIG. 4, the application 32 is activated by user operation (S200). Also, as described above, the application 32 is an application program for executing various processes using a device such as the MFP 50, and uses the browser 36 to display a web page based on the EWS information of the device on the LCD 16. is also possible. Therefore, when the application 32 receives a user operation specifying a device and a web page display request based on the EWS information of the specified device via the input I/F 18 (S202), the application 32 receives the port An information request is output to the library 40 (S204). The request for port information includes device designation information of the device designated by the user operation received in S202.

そして、ライブラリ40は、その要求を受け付けると、データ記憶領域46に通信情報が記憶されているか否かを判断する(S206)。通信情報は、EWS情報の取得先を示すデバイス及び、そのデバイスとの通信を行うためのデバイスポートを示す情報であり、その通信情報については、後に詳しく説明するが、ここでは、通信情報は、まだデータ記憶領域46に記憶されていない。このため、データ記憶領域46に通信情報は記憶されていないと判断され(S206:NO)、ライブラリ40は、制御プログラム30にポート情報の要求を出力する(S208)。なお、この処理は、先に説明した図2のS110と同じ処理であり、この処理により出力されるポート情報の要求には、S204のポート情報の要求に含まれるデバイス指定情報が含まれている。このため、ライブラリ40は、制御プログラム30により作成された受付ポートに、ポート情報の要求を出力する。これにより、図2のS112~S124の処理が実行され、ライブラリ40は、制御プログラム30により出力されたポート情報を受け付ける(S210)。つまり、例えば、S208のポート情報の要求にMFP50を指定するデバイス指定情報が含まれている場合に、図2のS122において、MFP50と通信を行うためのデバイスポートに関する処理を実行するためのサブスレッドが作成される。そして、そのサブスレッドにおいて、MFP50と通信を行うためのデバイスポートが作成され、図2のS124において、MFP50と通信を行うためのデバイスポートのポート情報が、制御プログラム30からライブラリ40に出力される。 Upon receiving the request, the library 40 determines whether communication information is stored in the data storage area 46 (S206). The communication information is information indicating a device indicating an acquisition source of EWS information and a device port for communicating with the device. The communication information will be described in detail later. Not yet stored in data storage area 46 . Therefore, it is determined that communication information is not stored in the data storage area 46 (S206: NO), and the library 40 outputs a request for port information to the control program 30 (S208). This processing is the same processing as S110 in FIG. 2 described above, and the request for port information output by this processing includes the device designation information included in the request for port information in S204. . Therefore, the library 40 outputs a port information request to the reception port created by the control program 30 . 2 are executed, and the library 40 receives the port information output by the control program 30 (S210). That is, for example, when the device designation information designating the MFP 50 is included in the request for port information in S208, the subthread for executing processing related to the device port for communicating with the MFP 50 in S122 of FIG. is created. Then, in that subthread, a device port for communicating with the MFP 50 is created, and in S124 of FIG. .

そして、ライブラリ40は、受け付けたポート情報をブラウザ36に出力する(S212)。この処理は、図2のS128と同じ処理であり、この処理により、ブラウザ36は、図3に示すように、EWS情報の要求情報をデバイスポートに出力し(S160)、S162~S168の処理により、EWS情報に基づくウェブページをLCD16に表示することができる。また、ライブラリ40は、図4に示すように、制御プログラム30からポート情報を受け付けると(S210)、そのポート情報と、S204及びS208のポート情報の要求に含まれるデバイス指定情報とを関連付けて、データ記憶領域46に記憶する(S214)。この際、例えば、ポート情報の要求にMFP50を指定するデバイス指定情報が含まれている場合には、MFP50と通信を行うためのデバイスポートのポート情報と、MFP50を指定するデバイス指定情報とが関連付けてデータ記憶領域46に記憶される。なお、ここで記憶されるポート情報とデバイス指定情報とが、先に説明した通信情報となる。つまり、ライブラリ40がポート情報を制御プログラム30から受け付けることで、通信情報がデータ記憶領域46に記憶される。 The library 40 then outputs the received port information to the browser 36 (S212). This process is the same process as S128 in FIG. 2. By this process, as shown in FIG. 3, the browser 36 outputs the EWS information request information to the device port (S160), , a web page based on the EWS information can be displayed on the LCD 16 . Also, as shown in FIG. 4, when the library 40 receives the port information from the control program 30 (S210), it associates the port information with the device designation information included in the port information requests of S204 and S208, It is stored in the data storage area 46 (S214). At this time, for example, if the device designation information designating the MFP 50 is included in the port information request, the port information of the device port for communicating with the MFP 50 and the device designation information designating the MFP 50 are associated. is stored in the data storage area 46. The port information and device designation information stored here are the previously described communication information. That is, when the library 40 receives the port information from the control program 30 , the communication information is stored in the data storage area 46 .

そして、ライブラリ40による処理では、ポート情報とデバイス指定情報とが関連付けてデータ記憶領域46に記憶されると、S204に戻るが、その際に、ライブラリ40が、アプリケーション32からポート情報の要求を受け付けると、そのポート情報の要求に含まれているデバイス指定情報が、通信情報としてデータ記憶領域46に記憶されているか否かを判断する(S206)。具体的には、例えば、S214において、MFP50と通信を行うためのデバイスポートのポート情報と、MFP50を指定するデバイス指定情報とが関連付けてデータ記憶領域46に記憶されており、S204において、MFP50以外のデバイスを指定するデバイス指定情報を含むポート情報の要求を受け付けた場合には、デバイス指定情報が、通信情報としてデータ記憶領域46に記憶されていないと判断される(S206:NO)。この際、ライブラリ40は、そのデバイス指定情報を含むポート情報の要求を、制御プログラム30に出力する(S208)。そして、S210以降の処理が実行される。これにより、そのデバイス指定情報により指定されるデバイス、つまり、MFP50以外のデバイスと通信を行うためのポート情報を、ライブラリ40は制御プログラム30から取得する(S210)。そして、ライブラリ40が、そのポート情報をブラウザ36に出力する(S212)。これにより、図3のS160~S168の処理が実行されることで、MFP50以外のデバイスのEWS情報に基づくウェブページがLCD16に表示される。 In the processing by the library 40, when the port information and the device designation information are associated and stored in the data storage area 46, the process returns to S204. Then, it is determined whether or not the device designation information included in the port information request is stored in the data storage area 46 as communication information (S206). Specifically, for example, in S214, the port information of the device port for communicating with the MFP 50 and the device designation information designating the MFP 50 are stored in the data storage area 46 in association with each other. If a request for port information including device designation information designating a device is received, it is determined that the device designation information is not stored in the data storage area 46 as communication information (S206: NO). At this time, the library 40 outputs a request for port information including the device designation information to the control program 30 (S208). Then, the processes after S210 are executed. As a result, the library 40 acquires from the control program 30 the device designated by the device designation information, that is, the port information for communicating with a device other than the MFP 50 (S210). The library 40 then outputs the port information to the browser 36 (S212). As a result, the web page based on the EWS information of the device other than the MFP 50 is displayed on the LCD 16 by executing the processes of S160 to S168 of FIG.

一方、例えば、S214において、MFP50と通信を行うためのデバイスポートのポート情報と、MFP50を指定するデバイス指定情報とが関連付けてデータ記憶領域46に記憶されており、S204において、MFP50を指定するデバイス指定情報を含むポート情報の要求を受け付けた場合には、デバイス指定情報が、通信情報としてデータ記憶領域46に記憶されていると判断される(S206:YES)。この際、ライブラリ40は、そのデバイス指定情報と関連付けて記憶されているポート情報を抽出する(S220)。つまり、MFP50を指定するデバイス指定情報と関連付けてデータ記憶領域46に記憶されている、MFP50と通信を行うためのポート情報を抽出する。そして、ライブラリ40は、そのポート情報をブラウザ36に出力する(S222)。これにより、図3のS160~S168の処理が実行されることで、MFP50のEWS情報に基づくウェブページがLCD16に表示される。 On the other hand, for example, in S214, the port information of the device port for communicating with the MFP 50 and the device designation information designating the MFP 50 are stored in the data storage area 46 in association with each other. If the request for port information including designation information is accepted, it is determined that the device designation information is stored in the data storage area 46 as communication information (S206: YES). At this time, the library 40 extracts the port information stored in association with the device designation information (S220). That is, the port information for communicating with the MFP 50, which is stored in the data storage area 46 in association with the device designation information designating the MFP 50, is extracted. The library 40 then outputs the port information to the browser 36 (S222). As a result, the web page based on the EWS information of MFP 50 is displayed on LCD 16 by executing the processes of S160 to S168 of FIG.

つまり、ライブラリ40は、ポート情報を制御プログラム30から受け付けると、そのポート情報と、そのポート情報が示すデバイスポートと通信を行うデバイスのデバイス指定情報とを関連付けて、通信情報としてデータ記憶領域46に記憶する。そして、ライブラリ40は、通信情報として記憶されているデバイス指定情報を含むポート情報の要求を、アプリケーション32から受け付けると、ポート情報の要求を制御プログラム30に出力せずに、データ記憶領域46に通信情報として記憶されているポート情報を、ブラウザ36に出力する。また、ライブラリ40は、通信情報として記憶されているデバイス指定情報を含まないポート情報の要求を、アプリケーション32から受け付けると、ポート情報の要求を制御プログラム30に出力する。そして、そのポート情報の要求の出力に応じて、ライブラリ40は、制御プログラム30からポート情報を取得し、そのポート情報をブラウザ36に出力する。 That is, when the port information is received from the control program 30, the library 40 associates the port information with the device designation information of the device that communicates with the device port indicated by the port information, and stores the port information in the data storage area 46 as communication information. Remember. When the library 40 receives from the application 32 a request for port information including the device designation information stored as communication information, the library 40 communicates the port information request to the data storage area 46 without outputting it to the control program 30 . The port information stored as information is output to the browser 36 . Also, when the library 40 receives from the application 32 a request for port information that does not contain device designation information stored as communication information, the library 40 outputs the port information request to the control program 30 . Then, in response to the output of the port information request, the library 40 acquires the port information from the control program 30 and outputs the port information to the browser 36 .

このように、アプリケーション32では、ライブラリ40が、通信情報として記憶されているデバイス指定情報を含むポート情報の要求をアプリケーション32から受け付けると、その通信情報を利用することで、制御プログラム30に出力されるポート情報の要求が抑制される。これにより、制御プログラム30では、ポート情報の要求に応じたデバイスポートの作成が抑制され、デバイスポートのポート番号の使用量が抑制される。 In this way, in the application 32, when the library 40 receives a request for port information including device designation information stored as communication information from the application 32, the request is output to the control program 30 by using the communication information. request for port information is suppressed. As a result, in the control program 30, creation of device ports in response to requests for port information is suppressed, and usage of port numbers of device ports is suppressed.

なお、上記説明では、アプリケーション32のライブラリ40からのポート情報の要求に応じて、制御プログラム30がデバイスポートを作成し、そのデバイスポートのポート情報をアプリケーション32のライブラリ40に出力しているが、設定ツール34にも、アプリケーション32のライブラリ40と同じライブラリ42が含まれている。このため、設定ツール34のライブラリ42も、アプリケーション32のライブラリ40と同様の処理を行うことができる。つまり、上述したライブラリ40による処理と同じ処理を、設定ツール34のライブラリ42も実行することが可能とされている。 In the above description, the control program 30 creates a device port in response to a port information request from the library 40 of the application 32, and outputs the port information of the device port to the library 40 of the application 32. Configuration tool 34 also includes library 42 that is the same as library 40 of application 32 . Therefore, the library 42 of the setting tool 34 can also perform processing similar to that of the library 40 of the application 32 . That is, the library 42 of the setting tool 34 can also execute the same processing as the processing by the library 40 described above.

また、上記実施形態では、制御プログラム30により作成された全てのサブスレッドにおいて、リセットフラグが監視されており、リセットフラグがONに設定されたことをトリガとして、各サブスレッドにおいて作成されたデバイスポートがクローズされているが、制御プログラム30の再起動によりデバイスポートがクローズされてもよい。詳しくは、図5に示すように、制御プログラム30が、ライブラリ40の処理により起動し(S100)、特定ポート番号が「52000」を超えているか否かを判断する(S118)処理までは、上記実施形態と同じである。そして、特定ポート番号が「52000」を超えていないと判断された場合(S118:NO)に、制御プログラム30は、サブスレッドを作成し(S122)、ポート情報をライブラリ40に出力する(S124)。それらの処理は、上記実施形態と同じであり、それ以降の処理(S126~S128)も、上記実施形態と同じである。また、作成されたサブスレッドでの処理は、図3のシーケンス図において、S156及びS180の処理のみが実行されない。つまり、作成されたサブスレッドでの処理は、リセットフラグに関する処理を除いて、上記実施形態と同じである。 In the above embodiment, reset flags are monitored in all subthreads created by the control program 30, and the device port created in each subthread is triggered by the reset flag being set to ON. is closed, the device port may be closed by restarting the control program 30 . More specifically, as shown in FIG. 5, the control program 30 is started by the processing of the library 40 (S100), and the processing up to the processing of determining whether or not the specific port number exceeds "52000" (S118) is performed as described above. Same as the embodiment. Then, when it is determined that the specific port number does not exceed "52000" (S118: NO), the control program 30 creates a sub-thread (S122) and outputs the port information to the library 40 (S124). . These processes are the same as in the above embodiment, and the subsequent processes (S126 to S128) are also the same as in the above embodiment. Also, as for the processing in the created sub-thread, only the processing of S156 and S180 in the sequence diagram of FIG. 3 is not executed. In other words, the processing in the created subthread is the same as in the above embodiment except for the processing regarding the reset flag.

また、特定ポート番号が「52000」を超えていると判断された場合(S118:YES)に、制御プログラム30は、エラー情報をライブラリ40に出力する(S300)。そして、ライブラリ40は、エラー情報を受け付けたことに応じて、終了指令を制御プログラム30に出力する(S302)。これにより、制御プログラム30は終了する。この際、制御プログラム30の終了に伴って、制御プログラム30により作成された全てのデバイスポートがクローズされる。そして、ライブラリ40は、終了指令を出力し、所定時間の経過後に、制御プログラム30を起動させる(S304)。そして、制御プログラム30は、S102以降の処理を実行する。このように、制御プログラム30を再起動させることでも、制御プログラム30により作成された全てのデバイスポートをクローズすることができ、上記実施形態と同様の効果を得ることが可能となる。 Also, when it is determined that the specific port number exceeds "52000" (S118: YES), the control program 30 outputs error information to the library 40 (S300). Then, in response to receiving the error information, the library 40 outputs a termination command to the control program 30 (S302). Thus, the control program 30 ends. At this time, as the control program 30 ends, all device ports created by the control program 30 are closed. The library 40 then outputs a termination command, and activates the control program 30 after a predetermined period of time has elapsed (S304). Then, the control program 30 executes the processes after S102. By restarting the control program 30 in this way, all device ports created by the control program 30 can be closed, and the same effects as in the above embodiment can be obtained.

また、上記実施形態では、制御プログラム30が作成したデバイスポートに、ブラウザ36がデバイスリクエストとして、EWS情報の要求情報を出力することで、MFP50からEWS情報を取得しているが、制御プログラム30が作成したデバイスポートに、アプリケーション32がデバイスリクエストとして、各種画像処理の要求を出力することで、MFP50に各種画像処理を実行させることができる。 In the above embodiment, the browser 36 outputs the EWS information request information as a device request to the device port created by the control program 30, thereby acquiring the EWS information from the MFP 50. The application 32 outputs various image processing requests as device requests to the created device port, thereby allowing the MFP 50 to execute various image processing.

詳しくは、制御プログラム30は、図6に示すように、サブスレッドを作成すると(S500)、そのサブスレッドにおいてデバイスポートを作成する(S502)。そして、制御プログラム30は、作成したデバイスポートのポート情報と、デバイス指定情報とを関連づけてデータ記憶領域46に記憶し(S504)、作成したデバイスポートを受付可能状態とする(S506)。次に、制御プログラム30は、そのデバイスポートのポート情報をアプリケーション32に出力する(S508)。これにより、アプリケーション32は、制御プログラム30が作成したデバイスポートにアクセス可能となり、そのデバイスポートにコピー処理の要求をHTTPで出力する(S510)。そして、制御プログラム30は、デバイスポートにHTTPでのコピー処理の要求を受け付けると、そのデバイスポートのポート情報と関連付けて記憶されているデバイス指定情報に応じたデバイス、つまり、MFP50に、コピー処理の要求をUSBプロトコルで出力する(S512)。これにより、MFP50においてコピー処理が実行される(S514)。この際、MFP50は、コピー処理を完了させると、制御プログラム30にコピー処理が完了したことを示す情報をUSBプロトコルで送信する(S516)。また、MFP50は、コピー処理にエラーが発生した場合には、エラーが発生したことを示す情報を制御プログラム30にUSBプロトコルで送信する(S516)。そして、制御プログラム30は、コピー処理が完了したことを示す情報、若しくは、エラーが発生したことを示す情報を、HTTPでアプリケーション32に出力する(S518)。このように、制御プログラム30が作成したデバイスポートに、アプリケーション32がデバイスリクエストとして、各種画像処理の要求を出力することで、MFP50に各種画像処理を実行させることもできる。 Specifically, as shown in FIG. 6, when the control program 30 creates a subthread (S500), it creates a device port in the subthread (S502). Then, the control program 30 associates the port information of the created device port with the device designation information and stores it in the data storage area 46 (S504), and puts the created device port into an acceptable state (S506). Next, the control program 30 outputs the port information of that device port to the application 32 (S508). As a result, the application 32 can access the device port created by the control program 30, and outputs a copy processing request to the device port using HTTP (S510). Then, when the control program 30 receives a request for copy processing by HTTP to the device port, the control program 30 sends the copy processing to the device corresponding to the device designation information stored in association with the port information of the device port, that is, to the MFP 50 . The request is output using the USB protocol (S512). As a result, copy processing is executed in the MFP 50 (S514). At this time, when the copy processing is completed, the MFP 50 transmits information indicating the completion of the copy processing to the control program 30 using the USB protocol (S516). Also, when an error occurs in the copy process, the MFP 50 transmits information indicating that the error has occurred to the control program 30 using the USB protocol (S516). Then, the control program 30 outputs information indicating that the copy processing is completed or information indicating that an error has occurred to the application 32 via HTTP (S518). In this manner, the application 32 outputs various image processing requests as device requests to the device port created by the control program 30, thereby causing the MFP 50 to execute various image processing.

なお、S110を実行するCPU12は、取得手段、受付手段及び第3出力手段の一例である。S118を実行するCPU12は、特定手段及び第1判断手段の一例である。S122,S500を実行するCPU12は、第2作成手段の一例である。S152,S502を実行するCPU12は、第1作成手段の一例である。S162,S512を実行するCPU12は、送信手段の一例である。S164,S516を実行するCPU12は、受信手段の一例である。S166,S518を実行するCPU12は、第1出力手段の一例である。S170を実行するCPU12は、第2出力手段の一例である。S180を実行するCPU12は、閉鎖手段の一例である。S202を実行するCPU12は、操作受付手段の一例である。S210を実行するCPU12は、第4出力手段の一例である。S214を実行するCPU12は、記憶制御手段の一例である。S222を実行するCPU12は、公開手段の一例である。S302を実行するCPU12は、閉鎖手段の一例である。 Note that the CPU 12 that executes S110 is an example of an acquisition unit, a reception unit, and a third output unit. The CPU 12 that executes S118 is an example of specifying means and first determining means. The CPU 12 that executes S122 and S500 is an example of second creating means. The CPU 12 that executes S152 and S502 is an example of first creating means. CPU12 which performs S162 and S512 is an example of a transmission means. The CPU 12 that executes S164 and S516 is an example of receiving means. The CPU 12 that executes S166 and S518 is an example of first output means. The CPU 12 that executes S170 is an example of second output means. The CPU 12 executing S180 is an example of closing means. The CPU 12 that executes S202 is an example of an operation reception unit. The CPU 12 executing S210 is an example of fourth output means. The CPU 12 that executes S214 is an example of storage control means. The CPU 12 that executes S222 is an example of disclosure means. The CPU 12 executing S302 is an example of closing means.

上記した実施形態によれば、以下の効果を奏する。 According to the above-described embodiment, the following effects are obtained.

上記実施形態では、制御プログラム30が、ライブラリ40からポート情報の要求を受け付ける毎に、デバイスポートのポート番号を特定し、特定したポート番号のデバイスポートを作成している。なお、ポート番号は、51000~52000の範囲内の有限な数値とされている。そこで、デバイスポートが累積的に作成されることで、デバイスポート用に特定されるポート番号が「52000」を超える場合に、既に作成済みのデバイスポートがクローズされる。これにより、クローズされたデバイスポートのポート番号を用いて、新たにデバイスポートを作成することが可能となり、有限な数値の範囲内でポート番号を利用して、デバイスポートを作成することが可能となる。 In the above embodiment, the control program 30 identifies the port number of the device port each time it receives a request for port information from the library 40, and creates a device port with the identified port number. The port number is a finite number within the range of 51000-52000. Therefore, by cumulatively creating device ports, if the port number specified for the device port exceeds "52000", the already created device port is closed. This makes it possible to create a new device port using the port number of a closed device port, and to create a device port using port numbers within a finite numerical range. Become.

また、デバイスポート用に特定されるポート番号が「52000」を超えない場合に、制御プログラム30は、特定されたポート番号に応じたデバイスポートを作成する。これにより、新たなデバイスポートを作成することが可能となる。 Also, when the port number specified for the device port does not exceed "52000", the control program 30 creates a device port according to the specified port number. This makes it possible to create a new device port.

また、上記実施形態では、アプリケーション32のライブラリ40だけでなく、設定ツール34のライブラリ42も、制御プログラム30にポート情報の要求を出力することが可能とされている。このため、制御プログラム30により作成されるデバイスポートの数が多くなり、そのデバイスポートに用いられるポート番号の使用量も多くなる。これにより、デバイスポート用に特定されるポート番号をリセットする効果が充分に発揮される。 In addition, in the above embodiment, not only the library 40 of the application 32 but also the library 42 of the setting tool 34 can output requests for port information to the control program 30 . For this reason, the number of device ports created by the control program 30 increases, and the usage of port numbers used for the device ports also increases. This has the full effect of resetting the port number specified for the device port.

また、上記実施形態では、制御プログラム30が再起動されることで、制御プログラム30により作成されたデバイスポートがクローズされる。これにより、制御プログラム30により作成された全てのデバイスポートを確実にクローズすることができる。 Further, in the above embodiment, the device port created by the control program 30 is closed by restarting the control program 30 . This ensures that all device ports created by the control program 30 are closed.

また、上記実施形態では、デバイスポート用に特定されるポート番号が「52000」を超える場合に、制御プログラム30は、エラー情報をライブラリ40に出力し、そのエラー情報を出力した後に、再度、ポート情報の要求を受け付けた場合に、クローズされたデバイスポートのポート番号を、デバイスポート用のポート番号として特定する。これにより、好適にポート番号を特定することができる。 Further, in the above embodiment, when the port number specified for the device port exceeds "52000", the control program 30 outputs the error information to the library 40, and after outputting the error information, If the request for information is received, the port number of the closed device port is identified as the port number for the device port. Thereby, the port number can be preferably specified.

また、上記実施形態では、制御プログラム30がサブスレッドを作成し、サブスレッドにおいてリセットフラグが監視されることで、デバイスポートがクローズされる。これにより、適切にデバイスポートをクローズすることができる。さらに、サブスレッドでは、デバイスポートがデバイスリクエストを受け付けていない場合および、デバイスポートがデバイスリクエストを受け付けていても、そのデバイスリクエストに対する返信を出力した場合に、デバイスポートがクローズされる。これにより、処理の途中でデバイスポートをクローズすることが無くなり、安全にデバイスポートをクローズすることが可能となる。 Further, in the above embodiment, the control program 30 creates a subthread, and the subthread monitors the reset flag, thereby closing the device port. This allows the device port to be properly closed. Furthermore, in the subthread, the device port is closed when the device port does not accept the device request, or when the device port accepts the device request but outputs a reply to the device request. As a result, the device port is not closed in the middle of processing, and the device port can be safely closed.

また、上記実施形態では、ライブラリ40が、制御プログラム30からポート情報を受け付けると、そのポート情報とデバイス指定情報とを関連づけてデータ記憶領域46に記憶する。そして、ライブラリ40は、アプリケーション32からデバイス指定情報を含むポート情報の要求を受け付けると、そのデバイス指定情報がデータ記憶領域46に記憶されているか否かを判断する。この際、デバイス指定情報がデータ記憶領域46に記憶されていない場合に、ライブラリ40は、ポート情報の要求を制御プログラム30に出力する。一方、デバイス指定情報がデータ記憶領域46に記憶されている場合に、ライブラリ40は、ポート情報の要求を制御プログラム30に出力することなく、デバイス指定情報と関連付けて記憶されているポート情報をブラウザ36に出力する。これにより、制御プログラム30へのポート情報の要求を抑制することが可能となり、デバイスポートのポート番号の使用量を抑制することが可能となる。 Further, in the above-described embodiment, when the library 40 receives port information from the control program 30, it associates the port information with the device designation information and stores them in the data storage area 46. FIG. When the library 40 receives a request for port information including device designation information from the application 32 , the library 40 determines whether or not the device designation information is stored in the data storage area 46 . At this time, if the device designation information is not stored in the data storage area 46 , the library 40 outputs a request for port information to the control program 30 . On the other hand, when the device designation information is stored in the data storage area 46, the library 40 retrieves the port information stored in association with the device designation information without outputting the port information request to the control program 30. 36. As a result, it is possible to suppress requests for port information to the control program 30, and it is possible to suppress the usage of port numbers of device ports.

また、本発明は、上記実施形態に限定されるものではなく、当業者の知識に基づいて種々の変更、改良を施した種々の態様で実施することが可能である。具体的には、例えば、上記実施形態では、デバイスポートのポート番号が51000~52000の範囲で設定可能とされており、特定ポート番号が「52000」を超えた場合にデバイスポートがクローズされているが、51000~52000のうちの所定の値、例えば、「51900」を、特定ポート番号が超えた場合にデバイスポートがクローズされてもよい。 Moreover, the present invention is not limited to the above embodiments, and can be implemented in various aspects with various modifications and improvements based on the knowledge of those skilled in the art. Specifically, for example, in the above embodiment, the port number of the device port can be set in the range of 51000 to 52000, and the device port is closed when the specific port number exceeds "52000". However, the device port may be closed when the specific port number exceeds a predetermined value from 51000 to 52000, for example, "51900".

また、上記実施形態では、制御プログラム30が再起動される際に、ライブラリ40の処理により制御プログラム30が停止した後に、ライブラリ40の処理により制御プログラム30が再起動しているが、制御プログラム30の処理により制御プログラム30が停止し、制御プログラム30の処理により制御プログラム30が再起動してもよい。 Further, in the above embodiment, when the control program 30 is restarted, the control program 30 is restarted by the processing of the library 40 after the control program 30 is stopped by the processing of the library 40. The control program 30 may be stopped by the processing of , and the control program 30 may be restarted by the processing of the control program 30 .

また、上記実施形態では、HTTPでのデバイスリクエストをUSBI/F20を介してデバイスに送信し、そのデバイスからデバイスリクエストの返信をUSBI/F20を介して受信する技術に、本発明が適用されているが、第1の通信プロトコルでのデバイスリクエストを、その第1のプロトコルに応じた第1の通信インタフェースと異なる第2の通信インタフェースを介してデバイスに送信し、そのデバイスからデバイスリクエストの返信を第2の通信インタフェースを介して受信する技術に、本発明が適用されてもよい。つまり、第1の通信プロトコル及び第2の通信プロトコルが、HTTP及びUSBプロトコルに限定される必要はない。 Further, in the above embodiment, the present invention is applied to the technique of transmitting a device request in HTTP to a device via the USB I/F 20 and receiving a reply to the device request from the device via the USB I/F 20. transmits a device request in a first communication protocol to a device via a second communication interface different from the first communication interface according to the first protocol, and sends a reply of the device request from the device to the first The present invention may be applied to a technique of receiving data via two communication interfaces. That is, the first communication protocol and the second communication protocol need not be limited to HTTP and USB protocols.

また、上記実施形態では、CPU12によって図2~図6に示す処理が実行される例を説明したが、これら処理は、CPU12に限らず、ASICや他の論理集積回路により実行されてもよいし、これら処理が、CPU等やASIC、他の論理集積回路が協働することにより実行されてもよい。 2 to 6 are executed by the CPU 12 in the above embodiment, these processes may be executed not only by the CPU 12 but also by an ASIC or other logic integrated circuit. , these processes may be executed by cooperation of a CPU or the like, an ASIC, or another logic integrated circuit.

10:PC、12:CPU、20:USBI/F、30:制御プログラム、32:アプリケーション、36:ブラウザ、40:ライブラリ、50:MFP 10: PC, 12: CPU, 20: USB I/F, 30: Control program, 32: Application, 36: Browser, 40: Library, 50: MFP

Claims (14)

第1通信インタフェースおよび第2通信インタフェースを備える情報処理装置のコンピュータが読み取り可能なプログラムであって、
前記コンピュータを、
デバイスを指定するデバイス指定情報を取得する取得手段と、
前記取得手段により前記デバイス指定情報が取得される毎に、当該デバイス指定情報により指定されるデバイスに対応させるポート情報を特定する特定手段として機能させ、前記ポート情報は、対応する前記デバイスへのデバイスリクエストを受け付けるために用いられる情報であって、前記特定手段は、複数の前記デバイス指定情報によりそれぞれ指定された複数の前記デバイスに対応させるポート情報として、それぞれ異なる複数のポート情報を特定し、
前記特定手段により特定されたポート情報に応じたデバイスポートを作成する第1作成手段として機能させ、前記ポート情報は前記情報処理装置において有限な情報であり、前記デバイスリクエストは第1プロトコルによるリクエストであり、前記第1プロトコルは前記第1通信インタフェースで用いられるプロトコルであり、前記デバイスポートは、前記プログラムがインストールされているコンピュータにインストールされたプログラムであって前記プログラムとは異なるプログラムから、前記第1プロトコルによって、前記第1通信インタフェースを介さずリクエストを受け付けるためのポートであり、
前記コンピュータを、
前記第1作成手段により作成されたデバイスポートへの前記デバイスリクエストを受け付けた場合に、当該デバイスリクエストを前記第2通信インタフェースに接続されたデバイスに、第2プロトコルによって送信する送信手段と、
前記送信手段により送信された前記デバイスリクエストに対する返信を前記デバイスから前記第2通信インタフェースを介して受信する受信手段として機能させ、前記第2プロトコルは前記第2通信インタフェースで用いられるプロトコルであり、
前記コンピュータを、
前記受信手段により受信した返信を、前記デバイスポートへの前記デバイスリクエストのリクエスト元のプログラムに、前記第1プロトコルで出力する第1出力手段と、
前記特定手段によって特定されたポート情報の量が、前記有限な情報の量のうちの所定の範囲を超えたか否かを判断する第1判断手段と、
前記第1判断手段により前記ポート情報の量が前記所定の範囲を超えたと判断された場合に、前記第1作成手段により作成されたデバイスポートを閉じる閉鎖手段と、
して機能させ、
前記特定手段は、
前記閉鎖手段によりデバイスポートが閉じられた後に、前記デバイスポートを示すポート情報として、当該閉鎖手段により閉じられたデバイスポートを示すポート情報を特定することを特徴とするプログラム。
A computer-readable program for an information processing device comprising a first communication interface and a second communication interface,
said computer,
Acquisition means for acquiring device specification information specifying a device;
Each time the device designation information is acquired by the acquisition means, it functions as a specification means for specifying port information corresponding to the device specified by the device specification information, and the port information is a device for the corresponding device. information used for accepting a request, wherein the identifying means identifies a plurality of different port information as port information corresponding to the plurality of devices respectively designated by the plurality of device designation information;
The port information is limited information in the information processing apparatus, and the device request is a request according to a first protocol. wherein the first protocol is a protocol used in the first communication interface, and the device port is a program installed in a computer in which the program is installed, and is different from the program; 1 protocol for accepting requests without going through the first communication interface;
said computer,
transmission means for, when receiving the device request to the device port created by the first creation means, sending the device request to the device connected to the second communication interface using a second protocol;
functioning as receiving means for receiving a reply to the device request transmitted by the transmitting means from the device via the second communication interface, wherein the second protocol is a protocol used in the second communication interface;
said computer,
a first output means for outputting the reply received by the receiving means to a request source program of the device request to the device port in accordance with the first protocol;
a first determination means for determining whether the amount of port information specified by the specifying means exceeds a predetermined range of the finite amount of information;
closing means for closing the device port created by the first creation means when the first determination means determines that the amount of the port information exceeds the predetermined range;
to make it work,
The specifying means is
A program for specifying, as port information indicating the device port, port information indicating the device port closed by the closing means after the device port is closed by the closing means.
前記コンピュータを、
前記プログラムと異なる別プログラムからリクエストを受け付ける受付手段として機能させ、
前記特定手段は、
前記受付手段がリクエストを受け付けたことに応じて前記ポート情報を特定し、
前記第1判断手段は、
当該特定手段によって特定されたポート情報の量が、前記有限な情報の量のうちの所定の範囲を超えたか否かを判断し、
前記第1作成手段は、
前記第1判断手段により前記ポート情報の量が前記所定の範囲を超えていないと判断された場合に、前記特定手段により特定されたポート情報に応じたデバイスポートを作成し、
前記閉鎖手段は、
前記第1判断手段により前記ポート情報の量が前記所定の範囲を超えたと判断された場合に、前記第1作成手段により作成されたデバイスポートを閉じることを特徴とする請求項1に記載のプログラム。
said computer,
Functioning as a receiving means for receiving requests from another program different from the program,
The specifying means is
specifying the port information in response to the acceptance of the request by the acceptance means;
The first determination means is
determining whether the amount of port information specified by the specifying means exceeds a predetermined range of the finite amount of information;
The first creation means is
creating a device port corresponding to the port information specified by the specifying means when the first determining means determines that the amount of the port information does not exceed the predetermined range;
The closing means are
2. The program according to claim 1, wherein the device port created by said first creation means is closed when said first determination means determines that the amount of said port information exceeds said predetermined range. .
複数の前記別プログラムが、前記情報処理装置にインストールされており、
前記受付手段は、
前記複数の別プログラムの各々からリクエストを受け付け、
前記特定手段は、
前記受付手段が前記複数の別プログラムの各々からリクエストを受け付けたことに応じて前記ポート情報を特定し、
前記第1判断手段は、
当該特定手段によって特定されたポート情報の量が、前記有限な情報の量のうちの所定の範囲を超えたか否かを判断することを特徴とする請求項2に記載のプログラム。
A plurality of the separate programs are installed in the information processing device,
The receiving means is
receiving a request from each of the plurality of separate programs;
The specifying means is
specifying the port information in response to the reception means receiving a request from each of the plurality of separate programs;
The first determination means is
3. The program according to claim 2, wherein it is determined whether the amount of port information specified by said specifying means exceeds a predetermined range of said finite amount of information.
前記別プログラムは、ユーザ操作により起動及び終了し、
前記プログラムは、前記別プログラムの終了に伴って終了しないことを特徴とする請求項2又は3に記載のプログラム。
The separate program is started and terminated by a user operation,
4. The program according to claim 2, wherein said program does not end when said another program ends.
前記コンピュータを、
前記受付手段がリクエストを受け付けたことに応じて前記特定手段により前記ポート情報が特定されたことで、前記第1判断手段により前記ポート情報の量が前記所定の範囲を超えたと判断された場合に、前記ポート情報を特定することができないことを示す特定不能情報を出力する第2出力手段として機能させ、
前記特定手段は、
前記第2出力手段が特定不能情報を出力した後に、前記受付手段が、再度、リクエストを受け付けたことに応じて、前記デバイスポートを示すポート情報として、前記閉鎖手段により閉じられたデバイスポートを示すポート情報を特定することを特徴とする請求項2乃至4の何れか1項に記載のプログラム。
said computer,
when it is determined by the first determination means that the amount of the port information exceeds the predetermined range because the port information is specified by the specifying means in response to the acceptance of the request by the receiving means; , functioning as second output means for outputting unidentifiable information indicating that the port information cannot be specified;
The specifying means is
After the second output means outputs the unidentifiable information, the receiving means indicates the device port closed by the closing means as the port information indicating the device port in response to receiving the request again. 5. The program according to any one of claims 2 to 4, which specifies port information.
前記閉鎖手段は、
前記第2出力手段が特定不能情報を出力した後に、前記プログラムを一旦終了させた後に再度、起動することで、前記第1作成手段により作成されたデバイスポートを閉じることを特徴とする請求項5に記載のプログラム。
The closing means are
5. After said second output means outputs the unidentifiable information, said program is once terminated and then restarted, thereby closing the device port created by said first creation means. program described in .
前記コンピュータを、
前記第1作成手段により作成されたデバイスポートに対する処理を実行するためのサブスレッドを作成する第2作成手段として機能させ、
前記第1判断手段は、
メインスレッドにおいて、前記特定手段によって特定されたポート情報の量が、前記有限な情報の量のうちの所定の範囲を超えたか否かを判断し、
前記閉鎖手段は、
前記サブスレッドにおいて、前記第1作成手段により作成されたデバイスポートを閉じることを特徴とする請求項1乃至5の何れか1項に記載のプログラム。
said computer,
functioning as a second creating means for creating a sub-thread for executing processing for the device port created by the first creating means;
The first determination means is
determining in the main thread whether the amount of port information specified by the specifying means exceeds a predetermined range of the finite amount of information;
The closing means are
6. The program according to any one of claims 1 to 5, wherein the subthread closes the device port created by the first creating means.
前記閉鎖手段は、
前記デバイスポートが前記デバイスリクエストを受け付けていない場合及び、前記デバイスポートが前記デバイスリクエストを受け付けていても、当該デバイスリクエストの返信が当該デバイスリクエストのリクエスト元のプログラムに出力されている場合に、前記サブスレッドにおいて、前記第1作成手段により作成されたデバイスポートを閉じることを特徴とする請求項7に記載のプログラム。
The closing means are
If the device port does not accept the device request, or even if the device port accepts the device request, if a response to the device request is output to the requesting program of the device request, 8. The program according to claim 7, wherein, in a subthread, the device port created by said first creating means is closed.
第1通信インタフェースおよび第2通信インタフェースを備える情報処理装置のコンピュータが読み取り可能な第1プログラムと第2プログラムとを含むプログラム群であって、
前記コンピュータを、
デバイスを指定するデバイス指定情報を出力する第3出力手段として前記第2プログラムにより機能させ、
前記コンピュータを、
前記第3出力手段により出力されたデバイス指定情報を取得する取得手段と、
前記取得手段により前記デバイス指定情報が取得される毎に、当該デバイス指定情報により指定されるデバイスに対応させるポート情報を特定する特定手段として機能させ、前記ポート情報は、対応する前記デバイスへのデバイスリクエストを受け付けるために用いられる情報であって、前記特定手段は、複数の前記デバイス指定情報によりそれぞれ指定された複数の前記デバイスに対応させるポート情報として、それぞれ異なる複数のポート情報を特定し、
前記特定手段により特定されたポート情報に応じたデバイスポートを作成する第1作成手段として前記第1プログラムにより機能させ、前記ポート情報は前記情報処理装置において有限な情報であり、前記デバイスリクエストは第1プロトコルによるリクエストであり、前記第1プロトコルは前記第1通信インタフェースで用いられるプロトコルであり、前記デバイスポートは、前記コンピュータにインストールされたプログラムであって前記第1プログラムとは異なるプログラムから、前記第1プロトコルによって、前記第1通信インタフェースを介さずリクエストを受け付けるためのポートであり、
前記コンピュータを、
前記第1作成手段により作成されたデバイスポートへの前記デバイスリクエストを受け付けた場合に、当該デバイスリクエストを前記第2通信インタフェースに接続されたデバイスに、第2プロトコルによって送信する送信手段と、
前記送信手段により送信された前記デバイスリクエストに対する返信を前記デバイスから前記第2通信インタフェースを介して受信する受信手段として前記第1プログラムにより機能させ、前記第2プロトコルは前記第2通信インタフェースで用いられるプロトコルであり、
前記コンピュータを、
前記受信手段により受信した返信を、前記デバイスポートへの前記デバイスリクエストのリクエスト元のプログラムに、前記第1プロトコルで出力する第1出力手段と、
前記特定手段によって特定されたポート情報の量が、前記有限な情報の量のうちの所定の範囲を超えたか否かを判断する第1判断手段と、
前記第1判断手段により前記ポート情報の量が前記所定の範囲を超えたと判断された場合に、前記第1作成手段により作成されたデバイスポートを閉じる閉鎖手段と、
して前記第1プログラムにより機能させ、
前記特定手段は、
前記閉鎖手段によりデバイスポートが閉じられた後に、当該デバイスポートを示すポート情報として、前記閉鎖手段により閉じられたデバイスポートを示すポート情報を特定することを特徴とするプログラム群。
A program group including a computer-readable first program and a second program of an information processing apparatus having a first communication interface and a second communication interface,
said computer,
functioning by the second program as third output means for outputting device designation information for designating a device;
said computer,
acquisition means for acquiring the device designation information output by the third output means;
Each time the device designation information is acquired by the acquisition means, it functions as a specification means for specifying port information corresponding to the device specified by the device specification information, and the port information is a device for the corresponding device. information used for accepting a request, wherein the identifying means identifies a plurality of different port information as port information corresponding to the plurality of devices respectively designated by the plurality of device designation information;
The first program functions as first creating means for creating a device port corresponding to the port information specified by the specifying means, the port information is finite information in the information processing apparatus, and the device request is the first 1 protocol, wherein the first protocol is a protocol used in the first communication interface, and the device port is a program installed in the computer and different from the first program, the A port for accepting requests by a first protocol without going through the first communication interface;
said computer,
transmission means for, when receiving the device request to the device port created by the first creation means, sending the device request to the device connected to the second communication interface using a second protocol;
The first program functions as receiving means for receiving a reply to the device request transmitted by the transmitting means from the device via the second communication interface, and the second protocol is used in the second communication interface. is a protocol,
said computer,
a first output means for outputting the reply received by the receiving means to a request source program of the device request to the device port in accordance with the first protocol;
a first determination means for determining whether the amount of port information specified by the specifying means exceeds a predetermined range of the finite amount of information;
closing means for closing the device port created by the first creation means when the first determination means determines that the amount of the port information exceeds the predetermined range;
to function with the first program,
The specifying means is
A group of programs, characterized in that, after the device port is closed by the closing means, port information indicating the device port closed by the closing means is specified as port information indicating the device port.
前記コンピュータを、
前記第1作成手段により作成されたデバイスポートを示すポート情報を前記第2プログラムに出力する第4出力手段として前記第1プログラムにより機能させ、
前記コンピュータを、
前記第4出力手段により出力されたポート情報と、前記第3出力手段により出力されたデバイス指定情報とを関連づけて、前記情報処理装置のメモリに記憶させる記憶制御手段と、
前記メモリに記憶されたデバイス指定情報により指定されるデバイスに対するユーザ操作を受け付けた場合に、当該デバイスを指定するデバイス指定情報を前記第3出力手段により出力することなく、当該デバイス指定情報と関連付けて前記メモリに記憶されているポート情報を公開する公開手段と、
して前記第2プログラムにより機能させ、
前記送信手段は、
前記公開手段により公開されたポート情報が示すデバイスポートへの前記デバイスリクエストを受け付けた場合に、当該デバイスリクエストを前記第2通信インタフェースに接続されたデバイスに、第2プロトコルによって送信することを特徴とする請求項9に記載のプログラム群。
said computer,
causing the first program to function as fourth output means for outputting port information indicating the device port created by the first creating means to the second program;
said computer,
storage control means for associating the port information output by the fourth output means with the device designation information output by the third output means and storing them in the memory of the information processing apparatus;
When a user operation to a device specified by the device specifying information stored in the memory is received, the device specifying information specifying the device is associated with the device specifying information without outputting the device specifying information by the third output means. publishing means for publishing the port information stored in the memory;
to function with the second program,
The transmission means is
When receiving the device request to the device port indicated by the port information disclosed by the disclosure means, the device request is transmitted to the device connected to the second communication interface by the second protocol. 10. The program group according to claim 9.
第1通信インタフェースおよび第2通信インタフェースを備える情報処理装置のコンピュータが読み取り可能な第1プログラムと第2プログラムとを含むプログラム群であって、
前記コンピュータを、
デバイスを指定するデバイス指定情報を前記第1プログラムに出力する第3出力手段として前記第2プログラムにより機能させ、
前記コンピュータを、
前記第3出力手段により出力されたデバイス指定情報を取得する取得手段と、
前記取得手段により前記デバイス指定情報が取得される毎に、当該デバイス指定情報により指定されるデバイスに対応させるポート情報を特定する特定手段として機能させ、前記ポート情報は、対応する前記デバイスへのデバイスリクエストを受け付けるために用いられる情報であって、前記特定手段は、複数の前記デバイス指定情報によりそれぞれ指定された複数の前記デバイスに対応させるポート情報として、それぞれ異なる複数のポート情報を特定し、
前記特定手段により特定されたポート情報に応じたデバイスポートを作成する第1作成手段として前記第1プログラムにより機能させ、前記ポート情報は前記情報処理装置において有限な情報であり、前記デバイスリクエストは第1プロトコルによるリクエストであり、前記第1プロトコルは前記第1通信インタフェースで用いられるプロトコルであり、前記デバイスポートは、前記コンピュータにインストールされたプログラムであって前記第1プログラムとは異なるプログラムから、前記第1プロトコルによって、前記第1通信インタフェースを介さずリクエストを受け付けるためのポートであり、
前記コンピュータを、
前記第1作成手段により作成されたデバイスポートを示すポート情報を前記第2プログラムに出力する第4出力手段として前記第1プログラムにより機能させ、
前記コンピュータを、
前記第4出力手段により出力されたポート情報と、前記第3出力手段により出力されたデバイス指定情報とを関連づけて、前記情報処理装置のメモリに記憶させる記憶制御手段と、
前記メモリに記憶されたデバイス指定情報により指定されるデバイスに対するユーザ操作を受け付けた場合に、当該デバイスを指定するデバイス指定情報を前記第3出力手段により出力することなく、当該デバイス指定情報と関連付けて前記メモリに記憶されているポート情報を公開する公開手段と、
して前記第2プログラムにより機能させ、
前記コンピュータを、
前記公開手段により公開されたポート情報が示すデバイスポートへの前記デバイスリクエストを受け付けた場合に、当該デバイスリクエストを前記第2通信インタフェースに接続されたデバイスに、第2プロトコルによって送信する送信手段と、
前記送信手段により送信された前記デバイスリクエストに対する返信を前記デバイスから前記第2通信インタフェースを介して受信する受信手段として前記第1プログラムにより機能させ、前記第2プロトコルは前記第2通信インタフェースで用いられるプロトコルであり、
前記コンピュータを、
前記受信手段により受信した返信を、前記デバイスポートへの前記デバイスリクエストのリクエスト元のプログラムに、前記第1プロトコルで出力する第1出力手段として前記第1プログラムにより機能させることを特徴とするプログラム群。
A program group including a computer-readable first program and a second program of an information processing apparatus having a first communication interface and a second communication interface,
said computer,
causing the second program to function as third output means for outputting device designation information designating a device to the first program;
said computer,
acquisition means for acquiring the device designation information output by the third output means;
Each time the device designation information is acquired by the acquisition means, it functions as a specification means for specifying port information corresponding to the device specified by the device specification information, and the port information is a device for the corresponding device. information used for accepting a request, wherein the identifying means identifies a plurality of different port information as port information corresponding to the plurality of devices respectively designated by the plurality of device designation information;
The first program functions as first creating means for creating a device port corresponding to the port information specified by the specifying means, the port information is finite information in the information processing apparatus, and the device request is the first 1 protocol, wherein the first protocol is a protocol used in the first communication interface, and the device port is a program installed in the computer and different from the first program, the A port for accepting requests by a first protocol without going through the first communication interface;
said computer,
causing the first program to function as fourth output means for outputting port information indicating the device port created by the first creating means to the second program;
said computer,
storage control means for associating the port information output by the fourth output means with the device designation information output by the third output means and storing them in the memory of the information processing apparatus;
When a user operation to a device specified by the device specifying information stored in the memory is received, the device specifying information specifying the device is associated with the device specifying information without outputting the device specifying information by the third output means. publishing means for publishing the port information stored in the memory;
to function with the second program,
said computer,
transmission means for, when receiving the device request to the device port indicated by the port information disclosed by the disclosure means, transmitting the device request to the device connected to the second communication interface according to a second protocol;
The first program functions as receiving means for receiving a reply to the device request transmitted by the transmitting means from the device via the second communication interface, and the second protocol is used in the second communication interface. is a protocol,
said computer,
A group of programs characterized by causing the first program to function as first output means for outputting the reply received by the receiving means to the request source program of the device request to the device port according to the first protocol. .
前記コンピュータを、
デバイスを指定するユーザ操作を受け付ける操作受付手段として前記第2プログラムにより機能させ、
前記第3出力手段は、
前記操作受付手段が受け付けたユーザ操作により指定されるデバイスのデバイス指定情報が前記メモリに記憶されていない場合に、当該デバイス指定情報を前記第1プログラムに出力し、前記操作受付手段が受け付けたユーザ操作により指定されるデバイスのデバイス指定情報が前記メモリに記憶されている場合に、当該デバイス指定情報を前記第1プログラムに出力しないことを特徴とする請求項11に記載のプログラム群。
said computer,
causing the second program to function as an operation receiving means for receiving a user operation for designating a device;
The third output means is
When the device designation information of the device designated by the user operation accepted by the operation accepting means is not stored in the memory, the device specifying information is output to the first program, and the user accepted by the operation accepting means 12. The program group according to claim 11, wherein when device designation information of a device designated by an operation is stored in said memory, said device designation information is not output to said first program.
第1通信インタフェースと第2通信インタフェースとコンピュータとを備える情報処理装置であって、
前記コンピュータに、第1プログラムと第2プログラムとがインストールされており、
前記コンピュータを、
デバイスを指定するデバイス指定情報を出力する第3出力手段として前記第2プログラムにより機能させ、
前記コンピュータを、
前記第3出力手段により出力されたデバイス指定情報を取得する取得手段と、
前記取得手段により前記デバイス指定情報が取得される毎に、当該デバイス指定情報により指定されるデバイスに対応させるポート情報を特定する特定手段として機能させ、前記ポート情報は、対応する前記デバイスへのデバイスリクエストを受け付けるために用いられる情報であって、前記特定手段は、複数の前記デバイス指定情報によりそれぞれ指定された複数の前記デバイスに対応させるポート情報として、それぞれ異なる複数のポート情報を特定し、
前記特定手段により特定されたポート情報に応じたデバイスポートを作成する第1作成手段として前記第1プログラムにより機能させ、前記ポート情報は前記情報処理装置において有限な情報であり、前記デバイスリクエストは第1プロトコルによるリクエストであり、前記第1プロトコルは前記第1通信インタフェースで用いられるプロトコルであり、前記デバイスポートは、前記コンピュータにインストールされたプログラムであって前記第1プログラムとは異なるプログラムから、前記第1プロトコルによって、前記第1通信インタフェースを介さずリクエストを受け付けるためのポートであり、
前記コンピュータを、
前記第1作成手段により作成されたデバイスポートへの前記デバイスリクエストを受け付けた場合に、当該デバイスリクエストを前記第2通信インタフェースに接続されたデバイスに、第2プロトコルによって送信する送信手段と、
前記送信手段により送信された前記デバイスリクエストに対する返信を前記デバイスから前記第2通信インタフェースを介して受信する受信手段として前記第1プログラムにより機能させ、前記第2プロトコルは前記第2通信インタフェースで用いられるプロトコルであり、
前記コンピュータを、
前記受信手段により受信した返信を、前記デバイスポートへの前記デバイスリクエストのリクエスト元のプログラムに、前記第1プロトコルで出力する第1出力手段と、
前記特定手段によって特定されたポート情報の量が、前記有限な情報の量のうちの所定の範囲を超えたか否かを判断する第1判断手段と、
前記第1判断手段により前記ポート情報の量が前記所定の範囲を超えたと判断された場合に、前記第1作成手段により作成されたデバイスポートを閉じる閉鎖手段と、
して前記第1プログラムにより機能させ、
前記特定手段は、
前記閉鎖手段によりデバイスポートが閉じられた後に、当該デバイスポートを示すポート情報として、前記閉鎖手段により閉じられたデバイスポートを示すポート情報を特定することを特徴とする情報処理装置。
An information processing device comprising a first communication interface, a second communication interface, and a computer,
A first program and a second program are installed on the computer,
said computer,
functioning by the second program as third output means for outputting device designation information for designating a device;
said computer,
acquisition means for acquiring the device designation information output by the third output means;
Each time the device designation information is acquired by the acquisition means, it functions as a specification means for specifying port information corresponding to the device specified by the device specification information, and the port information is a device for the corresponding device. information used for accepting a request, wherein the identifying means identifies a plurality of different port information as port information corresponding to the plurality of devices respectively designated by the plurality of device designation information;
The first program functions as first creating means for creating a device port corresponding to the port information specified by the specifying means, the port information is finite information in the information processing apparatus, and the device request is the first 1 protocol, wherein the first protocol is a protocol used in the first communication interface, and the device port is a program installed in the computer and different from the first program, the A port for accepting requests by a first protocol without going through the first communication interface;
said computer,
transmission means for, when receiving the device request to the device port created by the first creation means, sending the device request to the device connected to the second communication interface using a second protocol;
The first program functions as receiving means for receiving a reply to the device request transmitted by the transmitting means from the device via the second communication interface, and the second protocol is used in the second communication interface. is a protocol,
said computer,
a first output means for outputting the reply received by the receiving means to a request source program of the device request to the device port in accordance with the first protocol;
a first determination means for determining whether the amount of port information specified by the specifying means exceeds a predetermined range of the finite amount of information;
closing means for closing the device port created by the first creation means when the first determination means determines that the amount of the port information exceeds the predetermined range;
to function with the first program,
The specifying means is
An information processing apparatus, wherein after the device port is closed by the closing means, port information indicating the device port closed by the closing means is specified as port information indicating the device port.
第1通信インタフェースと第2通信インタフェースとコンピュータとを備える情報処理装置であって、
前記コンピュータに、第1プログラムと第2プログラムとがインストールされており、
前記コンピュータを、
デバイスを指定するデバイス指定情報を前記第1プログラムに出力する第3出力手段として前記第2プログラムにより機能させ、
前記コンピュータを、
前記第3出力手段により出力されたデバイス指定情報を取得する取得手段と、
前記取得手段により前記デバイス指定情報が取得される毎に、当該デバイス指定情報により指定されるデバイスに対応させるポート情報を特定する特定手段として機能させ、前記ポート情報は、対応する前記デバイスへのデバイスリクエストを受け付けるために用いられる情報であって、前記特定手段は、複数の前記デバイス指定情報によりそれぞれ指定された複数の前記デバイスに対応させるポート情報として、それぞれ異なる複数のポート情報を特定し、
前記特定手段により特定されたポート情報に応じたデバイスポートを作成する第1作成手段として前記第1プログラムにより機能させ、前記ポート情報は前記情報処理装置において有限な情報であり、前記デバイスリクエストは第1プロトコルによるリクエストであり、前記第1プロトコルは前記第1通信インタフェースで用いられるプロトコルであり、前記デバイスポートは、前記コンピュータにインストールされたプログラムであって前記第1プログラムとは異なるプログラムから、前記第1プロトコルによって、前記第1通信インタフェースを介さずリクエストを受け付けるためのポートであり、
前記コンピュータを、
前記第1作成手段により作成されたデバイスポートを示すポート情報を前記第2プログラムに出力する第4出力手段として前記第1プログラムにより機能させ、
前記コンピュータを、
前記第4出力手段により出力されたポート情報と、前記第3出力手段により出力されたデバイス指定情報とを関連づけて、前記情報処理装置のメモリに記憶させる記憶制御手段と、
前記メモリに記憶されたデバイス指定情報により指定されるデバイスに対するユーザ操作を受け付けた場合に、当該デバイスを指定するデバイス指定情報を前記第3出力手段により出力することなく、当該デバイス指定情報と関連付けて前記メモリに記憶されているポート情報を公開する公開手段と、
して前記第2プログラムにより機能させ、
前記コンピュータを、
前記公開手段により公開されたポート情報が示すデバイスポートへの前記デバイスリクエストを受け付けた場合に、当該デバイスリクエストを前記第2通信インタフェースに接続されたデバイスに、第2プロトコルによって送信する送信手段と、
前記送信手段により送信された前記デバイスリクエストに対する返信を前記デバイスから前記第2通信インタフェースを介して受信する受信手段として前記第1プログラムにより機能させ、前記第2プロトコルは前記第2通信インタフェースで用いられるプロトコルであり、
前記コンピュータを、
前記受信手段により受信した返信を、前記デバイスポートへの前記デバイスリクエストのリクエスト元のプログラムに、前記第1プロトコルで出力する第1出力手段として前記第1プログラムにより機能させることを特徴とする情報処理装置。
An information processing device comprising a first communication interface, a second communication interface, and a computer,
A first program and a second program are installed on the computer,
said computer,
causing the second program to function as third output means for outputting device designation information designating a device to the first program;
said computer,
acquisition means for acquiring the device designation information output by the third output means;
Each time the device designation information is acquired by the acquisition means, it functions as a specification means for specifying port information corresponding to the device specified by the device specification information, and the port information is a device for the corresponding device. information used for accepting a request, wherein the identifying means identifies a plurality of different port information as port information corresponding to the plurality of devices respectively designated by the plurality of device designation information;
The first program functions as first creating means for creating a device port corresponding to the port information specified by the specifying means, the port information is finite information in the information processing apparatus, and the device request is the first 1 protocol, wherein the first protocol is a protocol used in the first communication interface, and the device port is a program installed in the computer and different from the first program, the A port for accepting requests by a first protocol without going through the first communication interface;
said computer,
causing the first program to function as fourth output means for outputting port information indicating the device port created by the first creating means to the second program;
said computer,
storage control means for associating the port information output by the fourth output means with the device designation information output by the third output means and storing them in the memory of the information processing apparatus;
When a user operation to a device specified by the device specifying information stored in the memory is received, the device specifying information specifying the device is associated with the device specifying information without outputting the device specifying information by the third output means. publishing means for publishing the port information stored in the memory;
to function with the second program,
said computer,
transmission means for, when receiving the device request to the device port indicated by the port information disclosed by the disclosure means, transmitting the device request to the device connected to the second communication interface according to a second protocol;
The first program functions as receiving means for receiving a reply to the device request transmitted by the transmitting means from the device via the second communication interface, and the second protocol is used in the second communication interface. is a protocol,
said computer,
The information processing characterized in that the reply received by the receiving means is caused to function by the first program as first output means for outputting the reply received by the receiving means to the request source program of the device request to the device port according to the first protocol. Device.
JP2019236253A 2019-12-26 2019-12-26 Program, program group, and information processing device Active JP7338461B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019236253A JP7338461B2 (en) 2019-12-26 2019-12-26 Program, program group, and information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019236253A JP7338461B2 (en) 2019-12-26 2019-12-26 Program, program group, and information processing device

Publications (2)

Publication Number Publication Date
JP2021105800A JP2021105800A (en) 2021-07-26
JP7338461B2 true JP7338461B2 (en) 2023-09-05

Family

ID=76918906

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019236253A Active JP7338461B2 (en) 2019-12-26 2019-12-26 Program, program group, and information processing device

Country Status (1)

Country Link
JP (1) JP7338461B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023144220A (en) * 2022-03-28 2023-10-11 ブラザー工業株式会社 support program
CN115622861B (en) * 2022-12-19 2023-03-14 江西格如灵科技有限公司 Internet equipment management method, system, computer and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007172196A (en) 2005-12-21 2007-07-05 Seiko Epson Corp Management for data in network device
JP2014089675A (en) 2012-10-31 2014-05-15 Brother Ind Ltd Communication relay program and image processing apparatus
JP2014102620A (en) 2012-11-19 2014-06-05 Brother Ind Ltd Program and device for relaying communication
JP2014103504A (en) 2012-11-19 2014-06-05 Brother Ind Ltd Communication relay program, communication relay method, information processing device and image processing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007172196A (en) 2005-12-21 2007-07-05 Seiko Epson Corp Management for data in network device
JP2014089675A (en) 2012-10-31 2014-05-15 Brother Ind Ltd Communication relay program and image processing apparatus
JP2014102620A (en) 2012-11-19 2014-06-05 Brother Ind Ltd Program and device for relaying communication
JP2014103504A (en) 2012-11-19 2014-06-05 Brother Ind Ltd Communication relay program, communication relay method, information processing device and image processing device

Also Published As

Publication number Publication date
JP2021105800A (en) 2021-07-26

Similar Documents

Publication Publication Date Title
US9942443B2 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
JP2007259127A (en) Image forming apparatus, image processor, image forming method, image processing method, program and storage medium
JP7338461B2 (en) Program, program group, and information processing device
US20190089848A1 (en) Image processing apparatus, image processing method, and storage medium
JP2020064472A5 (en)
US10795619B2 (en) Non-transitory computer-readable recording medium storing computer-executable instructions for information processing device, and method of controlling information processing device
JP2012008860A (en) Image forming apparatus, print control method, and program
JP4844105B2 (en) Menu data generation in the control device to which the local device is connected
JP2009205529A (en) Driver installation method and driver installation program
JP6642205B2 (en) Control program and terminal device
US9531905B2 (en) Scanner that is capable of uploading scan data in a target area within a data storage server
JP2007060126A (en) Image forming apparatus and image forming method
US10116640B2 (en) Image processing system, image processing device, and authentication method
JP7413750B2 (en) Programs, program groups, and information processing devices
JP6355395B2 (en) Information processing apparatus, information processing apparatus control method, and program
US9465949B2 (en) Information processing apparatus executing print preview according to different modes, and recording medium
JP7427951B2 (en) Programs, program groups, and information processing devices
JP2022086152A (en) Information processor and program
JP6278063B2 (en) Device cooperation system, information processing apparatus, and device cooperation program
US20180084143A1 (en) Information processing apparatus, information processing method, and system for controlling communication
JP2009276919A (en) Image information processor, image formation processor and program
JP7056445B2 (en) Workflow sharing system, application program, server and workflow sharing method
JP7322373B2 (en) Information processing apparatus, information processing method, information processing program, and image forming system
WO2023075830A1 (en) Extended display using mobile device
JP5876126B2 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230719

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230807

R150 Certificate of patent or registration of utility model

Ref document number: 7338461

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150