JP2019216451A - Processing device, processing method, and program - Google Patents
Processing device, processing method, and program Download PDFInfo
- Publication number
- JP2019216451A JP2019216451A JP2019143710A JP2019143710A JP2019216451A JP 2019216451 A JP2019216451 A JP 2019216451A JP 2019143710 A JP2019143710 A JP 2019143710A JP 2019143710 A JP2019143710 A JP 2019143710A JP 2019216451 A JP2019216451 A JP 2019216451A
- Authority
- JP
- Japan
- Prior art keywords
- execution
- request
- http
- communication
- unit
- 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.)
- Pending
Links
Images
Landscapes
- Accessory Devices And Overall Control Thereof (AREA)
- Computer And Data Communications (AREA)
- Facsimiles In General (AREA)
Abstract
Description
本発明は、複数の通信インターフェースを有する処理装置、処理方法、及びプログラムに関するものである。 The present invention relates to a processing device having a plurality of communication interfaces, a processing method, and a program.
近年、従来TCP/IPネットワークで利用されていた通信プロトコルをUSB(Universal Serial Bus)通信で利用するための規格が策定されている。USB Print Interface Class IPP Protocol Specification(以下、IPP USB Specificationとする)という規格である。IPP USB Specificationにより、HTMLなどのコンテンツの送受信に用いられるHTTP(Hypertext TransferProtocol)をUSB通信で利用することができる。また、プリンタとコンピュータの間で印刷データなどのやり取りを行うIPP(Internet Printing Protocol)もUSB通信で利用することができる。 In recent years, a standard for using a communication protocol conventionally used in a TCP / IP network in USB (Universal Serial Bus) communication has been formulated. It is a standard called USB Print Interface Class IPP Protocol Specification (hereinafter, referred to as IPP USB Specification). By IPP USB Specification, HTTP (Hypertext Transfer Protocol) used for transmitting and receiving contents such as HTML can be used for USB communication. Further, an Internet Printing Protocol (IPP) for exchanging print data and the like between the printer and the computer can also be used for USB communication.
具体的には、IPP USB Specificationには、USB PrintClassインターフェースのBulk Out転送用EndPointでIPPコマンド要求を転送し、Bulk In転送用EndPointでIPPコマンド応答を転送することが規定されている。また、本規格に規定されているのはIPPだけでなく、HTTPにおいても同様の方法でコマンド要求の受信とコマンド応答の送信をすることが規定されている。 Specifically, the IPP USB Specification stipulates that an IPP command request be transferred at a Bulk Out transfer EndPoint of a USB PrintClass interface, and that an IPP command response be transferred at a Bulk In transfer EndPoint. In addition, not only the IPP but also the HTTP specifies that the command request is received and the command response is transmitted by the same method in this standard.
IPP USB Specificationにより、基本的なHTTPによるデータ送受信は、TCP/IPネットワークやUSBといった通信インターフェースの違いを意識しなくても同じような通信制御が可能となる。PCやタブレット等の端末装置からのHTTP要求を受信したWebサーバーや通信装置は、その要求に応じた処理を実行後、その処理結果であるHTTP応答を端末装置に対して送信する。このときの端末装置と、Webサーバーや通信装置との間の通信は、TCP/IPネットワークでもUSBでも同じ制御とすることが可能である。 With IPP USB Specification, basic data transmission / reception by HTTP can perform the same communication control without being aware of differences in communication interfaces such as a TCP / IP network and USB. A Web server or a communication device that has received an HTTP request from a terminal device such as a PC or a tablet executes a process corresponding to the request, and then transmits an HTTP response as a processing result to the terminal device. At this time, the communication between the terminal device and the Web server or the communication device can be controlled in the same manner in both the TCP / IP network and the USB.
特許文献1では、スキャンデータを送信する前に、画像処理装置のスキャンデータの分割送信に関する能力情報を応答し、スキャンデータを分割して端末装置に送信する。
In
しかしながら、特許文献1では、原稿の読み取りがすぐに開始できない場合や、読み取りを開始できたとしてもスキャンデータの最初の分割送信さえ行うことができない場合がある。このような場合、TCP/IPネットワーク通信およびUSB通信において、HTTP要求のデータを全て転送した後、要求元である端末装置は、要求先の画像形成装置の応答を待機する。しかしながら、画像処理装置が一時的にHTTP要求を処理できずに長い時間経過しても応答ができない場合端末装置によっては、画像処理装置がエラー状態になったと判断されてしまい、要求を廃棄してしまう。また、端末装置によっては、電源がオフされるまで永続的に待機し、端末装置の処理を占有してしまうことがある。
However, in
本発明は上述した課題を解決するためになされたものであり、端末装置から要求を受信した際に端末装置を応答がない状態で待機させるのを抑制する処理装置、処理方法、及びプログラムを提供するものである。 SUMMARY An advantage of some aspects of the invention is to provide a processing device, a processing method, and a program that prevent a terminal device from waiting without a response when a request is received from the terminal device. To do.
本発明に係る処理装置は、外部装置とHTTPに従った通信をする通信手段と、前記通信手段を介して、所定の処理の実行を要求するHTTP要求を受信する受信手段と、前記受信手段が受信したHTTP要求に応じて所定の処理を実行する実行手段と、前記実行手段が正常に実行を開始したか判定する判定手段と、前記受信手段が受信した前記HTTP要求に応じて、前記実行手段の処理結果を応答するHTTP応答を前記外部装置に送信する送信手段と、を有し、前記受信手段が前記通信手段を介して所定の処理の要求を受信した場合、前記送信手段は、前記実行手段が所定の処理の実行を完了する前にHTTP応答の一部を送信し、前記判定手段が正常に実行を開始したと判定した場合、前記送信手段は前記実行手段の処理の実行に基づくデータを含むHTTP応答を送信し、前記判定手段が正常に実行を開始できないと判定した場合、前記送信手段は前記実行手段の処理の実行に基づくデータを含まないHTTP応答を送信する。 The processing device according to the present invention includes: a communication unit that performs communication with an external device according to HTTP; a reception unit that receives an HTTP request for requesting execution of a predetermined process via the communication unit; Executing means for executing a predetermined process in response to the received HTTP request; determining means for determining whether the executing means has normally started execution; and executing means in response to the HTTP request received by the receiving means. And transmitting means for transmitting an HTTP response to the external device in response to the result of the processing. If the receiving means receives a request for predetermined processing via the communication means, the transmitting means If the means transmits a part of the HTTP response before the execution of the predetermined processing is completed, and the determining means determines that the execution has been started normally, the transmitting means determines whether the execution of the processing by the executing means has been completed. It sends an HTTP response including the Ku data, when said determination means determines that the can not be started successfully executed, the transmitting means transmits an HTTP response containing no data based on execution of the processing of the execution unit.
本発明によれば、端末装置から要求を受信した際に端末装置を応答がない状態で待機させるのを抑制することができる。これにより、例えば、所定の要求を一時的に処理できない場合や処理に失敗する場合、端末装置の負荷を軽減することができ、また、端末装置が処理装置はエラー状態である判定して正常終了しないことを抑制することができる。 ADVANTAGE OF THE INVENTION According to this invention, when receiving a request from a terminal device, it can suppress that a terminal device waits without a response. Thereby, for example, when a predetermined request cannot be temporarily processed or processing fails, the load on the terminal device can be reduced, and the terminal device determines that the processing device is in an error state and terminates normally. Can be suppressed.
以下、添付図面を参照して、本発明の実施形態を説明する。なお、以下の実施形態で用いる装置の各構成要素の相対配置や装置形状等は、例示であり、これらに限定されるものではない。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the relative arrangement of each component of the device used in the following embodiment, the device shape, and the like are merely examples, and the present invention is not limited thereto.
(実施形態1)
図1は、通信システムを示す図である。図1に示すように、本実施形態に係る通信システムは、端末装置100と、処理装置としてプリンタ200と、を含む。本実施形態では、処理装置の一例として、画像読取機能及び印刷機能を備えるプリンタを例に挙げて説明を行うが、処理装置はこれに限定されるものではない。処理装置は、印刷機能のみを有するプリンタであってもよいし、さらにファクシミリ機能などの機能を備えているプリンタであってもよいし、複写機、プロッタであってもよい。また、処理装置は、画像読取機能のみを有するスキャナ装置であってもよい。処理装置は、USBインターフェースを含む複数の通信インターフェースを有し、端末装置から所定の要求を受信するものであればよく、画像処理装置に限定されるものではない。
(Embodiment 1)
FIG. 1 is a diagram illustrating a communication system. As shown in FIG. 1, the communication system according to the present embodiment includes a
図1に示すプリンタは、ネットワーク通信及びUSB通信に対応したMFP(Multi Function Printer)である。 The printer illustrated in FIG. 1 is an MFP (Multi Function Printer) that supports network communication and USB communication.
プリンタ200は、CPU201と、ROM202と、RAM203と、読取部204と、印刷部205と、操作表示部206と、ネットワークコントローラ207と、USBデバイスコントローラ208と、を有する。これらは、CPUバス209を介してそれぞれ接続されている。
The
CPU201は、ROM202に記憶されている制御のプログラム等に従って、装置全体(MFP全体)の制御を行う。
The
RAM203は、CPU201等を動作させるために必要となるメモリ領域であり、ROM202から読み出されたプログラムを実行する時のワークエリア、データ送受信時のバッファとして用いられる。また、ROM202は、プリンタを動作させるためのプログラムを内蔵しているとともに、HTTPに従って読取部204にスキャンを実行させるためのプログラムを格納する。
The
読取部204は、読取センサを有し、原稿台に置かれた紙やフィルム等の原稿を読み取って画像データを生成する。具体的には、読取部204は、読取センサがライン状に並べられた、所定の読み取り幅を持つスキャナヘッドを備えており、このスキャナヘッドを走査することにより、画像データ(スキャンデータ)を生成する。
The
印刷部205は、印刷ヘッドと各色のインクタンクを有し、印刷ヘッドを介してインクタンク内のインクを吐出することにより、印刷用紙などのシートに画像を印刷する。
The
操作表示部206は、ユーザが直接プリンタに各種指示を入力するための操作部であり、操作表示部206によりユーザはMFPの各種機能の起動や各種設定を行うことができる。操作表示部206は、例えば、LED(発光ダイオード)やLCD(液晶ディスプレイ)などの表示部と、文字入力キー、カーソルキー、決定キー、取り消しキー等の操作キーとを有する。また、操作表示部206は、少なくとも一部が、表示部と操作機構が一体となったタッチパネルで構成されてもよい。
The
ネットワークコントローラ207は、有線LANや無線LAN等のネットワークとの通信制御を行う通信手段である。ネットワークコントローラ207は、有線LANコネクタと、無線LANモジュールと、を有する。ネットワークコントローラ207は、Ethernet(登録商標)等の有線LAN又は無線LANを介して他の機器と接続し、通信可能とする。
The
また、USBデバイスコントローラ208は、USBインターフェースの通信制御を行う通信手段であり、USB通信規格に従って、USB機器との接続および通信制御を行う。USBデバイスコントローラ208は、USBコネクタを有する。USBデバイスコントローラ208は、USBを介して他の機器と接続し、通信可能となる。
The
上述したように、本実施形態では、端末装置100からのデータを受信するために複数のインターフェース(有線LANコネクタと、無線LANモジュールと、USBコネクタ)を搭載する。プリンタ200は、これらのインターフェースを介して、外部装置と接続可能であり、例えば、スキャンの実行要求やスキャンデータ取得要求等の各種要求を端末装置から受信することができる。プリンタ200は、端末装置100からのスキャン要求に応じて、読取部204によりスキャンを実行することができる。
As described above, in the present embodiment, a plurality of interfaces (wired LAN connector, wireless LAN module, and USB connector) are mounted to receive data from the
さらに、本実施形態では、プリンタ200は、図示しないが、NFCインターフェースをさらに有し、NFC通信を行うことができる。また、プリンタ200は、Bluetooth(登録商標)インターフェースを有し、Bluetooth(登録商標)通信を行うことができるようにしてもよい。また、プリンタ200は、Bluetooth(登録商標) Low Energy(BLE)インターフェースを有し、BLE通信を行うことができるようにしてもよい。
Further, in the present embodiment, although not shown, the
端末装置100としては、例えば、PCやタブレット等の情報処理装置が挙げられる。端末装置100は、プリンタ200に対して、プリンタ200が有する各種機能の実行を要求することにより、プリンタ200にスキャンを実行させることができる。例えば、端末装置100は、スキャン要求を送信する際には、まず、スキャンの実行要求を送信し、プリンタ200からのスキャン実行要求に対する応答に応じて、スキャンデータの実行要求を送信する。
Examples of the
図2は、プリンタ200のROM202に記憶されたプログラムのモジュール構成を示す図である。プログラムは、プリンタ200のオペレーションシステム(OS)401、ミドルウェア層402、アプリケーション層403に分類される。
FIG. 2 is a diagram showing a module configuration of a program stored in the
ミドルウェア層402は、OS401とアプリケーション層403のモジュール群の間に介在して、通信制御を行う。ミドルウェア層402には、USBドライバ404、USBモジュール405、LANドライバ406、TCP/IPモジュール407が含まれる。LANドライバ406とTCP/IPモジュール407は、ネットワークコントローラ207を制御してTCP/IPの通信を行う。USBドライバ404とUSBモジュール405は、USBデバイスコントローラ208を制御してUSBの通信を行う。
The
アプリケーション層403には、HTTPモジュール408、IPPモジュール409、WSDモジュール410、スキャンモジュール411が含まれる。プリンタ200のIPアドレス等を含むネットワークの設定は、操作表示部206からだけではなく、端末装置100からも実行することができる。端末装置100から実行する場合は、端末装置100のWebブラウザを起動してネットワーク経由でプリンタ200へアクセスすることで実行する。HTTPモジュール408は、設定用のWebサーバーとしての管理と、WSD(Web Service for Devices)、IPP、その他のHTTPを利用するプロトコルで規定されたHTTP通信の目的で使用する。スキャンモジュール411は、USB通信又はネットワーク通信により受信したデータをHTTPモジュール408、IPPモジュール409、又はWSDモジュール410で解析する。そして、解析した結果、受信したデータがスキャン要求と判定するとスキャン実行を制御する。さらに、スキャンモジュール411は、スキャンの実行により生成されたスキャンデータを、HTTPモジュール408がアクセスできるようにする。これにより、端末装置100から受信したスキャンデータの取得要求に対してHTTPモジュール408がスキャンデータを送信できるように制御する。
The
ここで、図3を用いて、プリンタ200に搭載されているHTTP通信の概略について説明する。
Here, the outline of the HTTP communication mounted on the
図3(a)は、外部装置から送信されるHTTP要求の構成を示す図である。図3(a)に示すように、HTTP要求は、リクエスト行、ヘッダー部、空白行、ボディ部を含む。リクエスト行は、HTTP要求の処理方法を示すメソッド領域(図中「POST」)と、処理を行うURLを示すリクエストパス領域(図中「/request/url」)と、HTTPバージョン(図中の「HTTP/1.1」)とを含む。ヘッダー部は、送信元を示す情報(図中「Host」)、通信経路を維持するか否かを示す情報(図中「Connection」)を有する。また、ヘッダー部は、ボディ部のデータ長を示す情報(図中「Content−Length」)、ボディ部のデータ形式を示す情報(図中「Content−type」)などのボディ部に関する情報を記載する領域を有する。空白行は、ヘッダー部とボディ部の境界を示す。ボディ部は、HTTP要求の処理内容を指定するために使用され、HTTP要求によってはボディ部が必要なケースと不要なケースがある。 FIG. 3A is a diagram illustrating a configuration of an HTTP request transmitted from an external device. As shown in FIG. 3A, the HTTP request includes a request line, a header part, a blank line, and a body part. The request line includes a method area ("POST" in the figure) indicating a method of processing an HTTP request, a request path area ("/ request / url" in the figure) indicating a URL to be processed, and an HTTP version ("" in the figure). HTTP / 1.1 "). The header section has information indicating the transmission source (“Host” in the figure) and information indicating whether to maintain the communication path (“Connection” in the figure). The header section describes information about the body section, such as information indicating the data length of the body section (“Content-Length” in the figure) and information indicating the data format of the body section (“Content-type” in the figure). With regions. Blank lines indicate the boundaries between the header and body parts. The body part is used to specify the processing content of the HTTP request, and there are cases where the body part is required and cases where the body part is unnecessary depending on the HTTP request.
図3(b)は、プリンタ200から外部装置へ送信されるHTTP応答の構成を示す図である。図3(b)に示すように、HTTP応答は、ステータス行、ヘッダー部、空白行、ボディ部を含む。ステータス行は、HTTPバージョン(図中の「HTTP/1.1」)、要求受け付け結果を示すステータスコード(図中「200 OK」)を含む。ヘッダー部は、HTTP要求と同様であり、ボディ部に関する情報等を含む領域である。ボディ部は、HTTP要求を受け付けた処理結果として応答するデータがある場合にそのデータを格納する領域である。
FIG. 3B is a diagram illustrating a configuration of an HTTP response transmitted from the
例えば、HTTPを利用して、端末装置100からスキャンの実行を指示する場合は、次のような手順で行われる。端末装置100は、原稿のスキャン実行を指示するスキャン実行要求コマンドをボディ部に含めたHTTP要求をプリンタ200に送信する(図3(a)参照)。プリンタ200は、スキャン実行を要求するためのHTTP要求を受信すると、そのHTTP応答でスキャン要求を受け付けた旨を端末装置100に送信する(図3(b)参照)。そして、端末装置100は、プリンタ200からのHTTP応答を受信すると、プリンタ200が生成したスキャンデータを取得するためのHTTP要求(GET要求)を送信する。プリンタ200は、GET要求を受信すると、スキャンの実行により生成したデータを含むHTTP応答を端末装置100に送信する。端末装置100は、そのHTTP応答でプリンタ200が生成したデータを取得する。本実施形態では、プリンタ200がスキャン実行要求コマンドを含むHTTP要求を受信すると、スキャンの読取動作を開始する前に、HTTP応答のヘッダー部を、HTTP要求先に送信する(応答する)。そして、スキャンの読取動作の実行後にHTTPのデータ部を、HTTP要求先に送信する(応答する)。これにより、プリンタ200と端末装置100がUSB通信している際に物理的なUSB通信の切断があった場合、端末装置100はプリンタ200のアプリケーションがエラー状態であると判定することを抑制でき、適切に処理を終了することができる。例えば、プリンタ200がスキャン読取動作を実行してからHTTP応答をする場合、所定時間(例えば、数十秒)経過するまで応答ができない。また、例えば、プリンタ200が回復処理終了後にHTTP応答をする場合、所定時間(例えば、数分)経過するまで応答ができない。このとき、端末装置100がHTTP応答を受け取る前に、その間にUSBがプリンタ200から抜かれる、プリンタ200及び端末装置100のうち少なくともいずれか一方がハードオフする等のように物理的にUSB通信が切断されてしまうことがある。このように、HTTP要求に対してHTTP応答を受け取る前にUSB通信が切断されると、端末装置100において、プリンタ200のアプリケーションがエラー状態であると判断されてしまい、ジョブがキャンセルできないことがある。これに対し、本実施形態では、HTTPヘッダー部を含むHTTP要求を応答することにより、USB通信の切断があっても、プリンタがエラー状態であると判断されず、ジョブを正常にキャンセルすることができる。
For example, when instructing execution of scan from the
また、スキャン読取動作よりも前に、プリントヘッドの回復動作が実行される場合は、回復動作が実行されるよりも前にHTTPのヘッダー部を含むHTTP要求を応答するようにしてもよい。 Further, when the print head recovery operation is performed before the scan reading operation, an HTTP request including an HTTP header portion may be responded before the recovery operation is performed.
本実施形態では、USB通信を介してスキャン実行要求コマンドを含むHTTP要求を受信した場合、上述した通り、スキャンの読取動作を開始する前に、HTTP応答のヘッダー部を、HTTP要求先に送信する(応答する)。一方、ネットワークを介してスキャン実行要求コマンドを含むHTTP要求を受信した場合、スキャンの読取動作を実行した後に、ヘッダー部及びボディ部を含むHTTP応答を、HTTP要求先に送信する(応答する)。 In the present embodiment, when the HTTP request including the scan execution request command is received via the USB communication, the header part of the HTTP response is transmitted to the HTTP request destination before the scan reading operation is started, as described above. (respond). On the other hand, when an HTTP request including a scan execution request command is received via a network, an HTTP response including a header portion and a body portion is transmitted (responds) to the HTTP request destination after performing a scan reading operation.
なお、図3では、プリンタ200に搭載されているHTTP通信の概略について説明したが、本実施形態は、HTTPに従った通信であればよく、IPPを用いた通信であってもよいし、WSDプロトコルを用いた通信であっても同様である。
In FIG. 3, the outline of the HTTP communication mounted on the
図4は、図1で示した本実施形態に係るMFPの操作表示部206にスキャン実行時に表示される表示画面を模式的に示した図である。図4(a)は、プリンタ200が電源オンし、印刷やスキャン等の動作をしていない状態(アイドル状態)を示すホーム画面である。ホーム画面では、キー操作やタッチパネル操作により、コピー機能、スキャン機能、インターネット通信を利用したクラウド機能の各機能のメニュー表示、各種設定、機能の実行が可能である。図4(b)は、プリンタ200が各種機能を実行できない場合に表示する画面である。各種機能が実行できない場合としては、USBやネットワーク接続された端末装置からスキャンの実行要求があった場合に読取処理をすぐに実行できない場合が挙げられる。読取処理を一時的に実行できない場合としては、特定の処理の実行中である場合が挙げられる。具体的には、読み取りセンサの補正処理中のようにスキャン処理の準備中である場合が挙げられる。また、印刷ヘッドの乾燥を防ぐためのキャッピング処理、インク吸引処理等の回復処理中や、印刷処理中のようにプリンタ200において振動が発生する処理中である場合が挙げられる。図4(c)は、プリンタ200がスキャン実行中に表示する表示画面である。スキャン終了後は再び図4(a)の画面に戻る。
FIG. 4 is a diagram schematically showing a display screen displayed at the time of executing a scan on
図5は、本発明の実施形態に係るプリンタ200のスキャンの実行要求を受信した際の処理の流れを示したフローチャートである。このフローチャートは、CPU201が、ROM202に格納されている制御プログラムをRAM203にロードし、それを実行することにより行われる。
FIG. 5 is a flowchart illustrating a flow of processing when the
まず、ネットワーク通信又はUSB通信を介して、プリンタ200に接続されている端末装置からスキャンの実行要求を受信する(S501)。スキャンの実行要求には、原稿の読み取りサイズや解像度等の情報が含まれている。プリンタは、スキャンの実行要求の内容に従って原稿台等に置かれた用紙や写真のスキャンを実行する(S502)。スキャン実行を開始したらHTTP応答でステータスコードを送信し(S503)、HTTP応答でヘッダー部を送信し(S504)、HTTP応答でボディ部(S505)を送信する。このように、HTTP応答で、ステータス部、ヘッダー部、ボディ部を順次送信する。
First, a scan execution request is received from a terminal device connected to the
プリンタ200がスキャン要求を受け付けることができる場合、HTTP応答のステータスコードとして、例えば、「200 OK」を送信する。なお、スキャン要求を受け付けることができる場合に送信するステータスコードは、これに限定されるものではなく、「201 Created」でもよく、正常に要求を受け付けたことを示す200番台の応答のいずれであってもよい。一方、プリンタ200がスキャン要求を受け付けることができない場合は、ステータスコードで「500 Internal Server Error」を応答する。なお、スキャン要求を受け付けることができない場合に送信するステータスコードはこれに限定されるものではない。
When the
また、ボディ部としては、スキャン実行を開始したことを示す情報を含んでいればよく、例えば、ジョブIDの情報、スキャン実行で生成するスキャンデータのURLなどで示す所在等を含めるようにしてもよい。 The body portion may include information indicating that scan execution has been started, and may include, for example, job ID information, a location indicated by a URL of scan data generated by scan execution, and the like. Good.
操作表示部206にはスキャン実行する前には図4(a)の画面が表示され、スキャン要求を受け付けた場合は、図4(b)の画面が表示され、スキャン実行中は図4(c)の画面が表示される。
The screen of FIG. 4A is displayed on the
図6は、本発明の実施形態に係るプリンタ200のスキャンデータの取得要求を受信した際の処理の流れを示したフローチャートである。また、図6に示すフローは前述の図5で示したフローを実施した後のフローであり、端末装置は、本フローの直前にプリンタからスキャン実行を開始した旨を受信している状態である。このフローチャートは、CPU201が、ROM202に格納されている制御プログラムをRAM203にロードし、それを実行することにより行われる。
FIG. 6 is a flowchart illustrating a process flow when the
まず、端末装置から処理の実行結果の取得要求を受信する(S301)。ここでは、端末装置からスキャンデータ取得要求を受信する。スキャンデータの取得要求には、端末装置が取得したいスキャンデータを示す情報が含まれており、HTTP要求のリクエスト行には、取得要求を示すGET及び取得するスキャンデータのURLが含まれている。このURLは前述のスキャン要求の応答から得た情報となる。 First, a request to obtain a processing execution result is received from the terminal device (S301). Here, a scan data acquisition request is received from the terminal device. The scan data acquisition request includes information indicating the scan data that the terminal device wants to acquire, and the HTTP request line includes a GET indicating the acquisition request and the URL of the scan data to be acquired. This URL is information obtained from the response to the above-described scan request.
次に、HTTP応答のステータスコードとして「200 OK」を送信し(S302)、HTTP応答のヘッダー部を送信する(S303)。すなわち、正常にスキャンが開始できたか判定する前に、HTTP応答のステータスコード及びHTTP応答のヘッダー部を送信する。端末装置100は、HTTP応答のステータスコード及びヘッダー部の受信に基づいて、「スキャンデータの受信中」等のメッセージの表示と共に、データの受信の進捗状況を示すプログレスバーを表示する。
Next, "200 OK" is transmitted as the status code of the HTTP response (S302), and the header of the HTTP response is transmitted (S303). That is, the status code of the HTTP response and the header portion of the HTTP response are transmitted before determining whether the scanning has been started normally. The
その後、正常にスキャンが開始できたか判定し(S304)、正常にスキャンが開始できたと判定された場合、HTTPボディ部としてスキャンデータを送信して(S305)、処理を終了する。端末装置100は、HTTP応答のボディ部の受信に基づいて、プログレスバーの進捗状況が進む。正常にスキャンが開始できなったと判定された場合、スキャンデータを含まないHTTPボディ部を送信して(S306)処理を終了する。このとき、端末装置100は、HTTP応答のボディ部の受信に基づいて、プログレスバーの進捗が進むことなく、「スキャンデータの受信中」等のメッセージ及びプログレスバーの表示を終了する。正常にスキャンが開始できなったと判定された場合、HTTPボディ部は、スキャンデータがないことを示す情報を含むものとしてもよい。
Thereafter, it is determined whether the scan has been started normally (S304). If it is determined that the scan has been started normally, the scan data is transmitted as the HTTP body part (S305), and the process ends. In the
プリンタにおいてスキャンを実行する場合、電源オン直後や印刷直後に、例えば、読み取りセンサの補正処理のようにスキャンの準備処理動作や、印刷ヘッドに必要なインク吸引処理等の回復動作が行われることにより、スキャンを実行できない期間が存在する。プリンタ200がスキャンの開始を待機している間に、端末装置に対して何も応答をしないと、端末装置100はスキャンデータの取得要求を送信したにも関わらずプリンタが反応を示さないため、プリンタのエラーと判断されることがある。その際、端末装置100は、USB通信の場合、該スキャン要求やスキャンデータ取得要求を、プリンタに送信しないまま破棄してしまう場合がある。また、応答が返ってくるまで端末装置100の処理を占有し続ける(端末装置100が待機し続ける)場合もある。従って、本実施形態では、スキャンデータが正常に開始できるか判定する前に、HTTP応答をヘッダー部まで送信する。これにより、プリンタがスキャンデータの取得要求を受け付けたことを端末装置に認識させることができ、スキャンデータの取得要求の破棄やスキャンデータ取得要求の応答待機による端末装置の処理の占有を抑制することができる。また、スキャンが正常に開始できなかったとしても、HTTP応答のボディ部でスキャンデータが何もないという情報を送信することにより、端末装置100はプリンタ200が要因でスキャンがキャンセルされたと判断することができる。したがって、スキャンデータが開始できるまで時間がかかる場合や、スキャンデータが正常に開始できない場合でも、端末装置がアプリケーションにエラーが発生したと判定することがない。また、通信が切断された場合、アプリケーションがエラーしたと判定して終了せずに、ジョブのエラー等のように正常に処理を終了させることができる。
When scanning is performed in the printer, immediately after power-on or immediately after printing, for example, a scan preparation process operation such as a correction process of a reading sensor or a recovery operation such as an ink suction process required for a print head is performed. There is a period during which scanning cannot be performed. If no response is made to the terminal device while the
(実施形態2)
実施形態1においては、スキャンデータ取得要求を受信した際にUSB通信及びネットワーク通信のいずれの場合も、スキャンを実行する前に、HTTP応答のステータスコード及びHTTP応答のヘッダー部を送信した。これに対し、本実施形態では、スキャンデータ取得要求を受信した際のHTTP応答の送信制御を通信インターフェースに応じて切り替える。また、実施形態1と同一のものには同一の符号を付す。具体的には、プリンタのハードウェア構成、プリンタのソフトウェア構成、操作表示部の表示画面、プリンタがスキャン要求を受信した際の処理の流れは同一であるため、説明を省略する。
(Embodiment 2)
In the first embodiment, the status code of the HTTP response and the header portion of the HTTP response are transmitted before the scan in both the USB communication and the network communication when the scan data acquisition request is received. On the other hand, in the present embodiment, transmission control of an HTTP response when a scan data acquisition request is received is switched according to the communication interface. The same components as those in the first embodiment are denoted by the same reference numerals. More specifically, the hardware configuration of the printer, the software configuration of the printer, the display screen of the operation display unit, and the flow of processing when the printer receives a scan request are the same, and thus description thereof is omitted.
図7は、本発明の実施形態に係るプリンタ200のスキャンデータの取得要求を受信した際の処理の流れを示したフローチャートである。また、図6に示すフローは前述の図5で示したフローを実施した後のフローであり、端末装置は、本フローの直前にプリンタからスキャン実行を開始した旨を受信している状態である。このフローチャートは、CPU201が、ROM202に格納されている制御プログラムをRAM203にロードし、それを実行することにより行われる。
FIG. 7 is a flowchart illustrating a processing flow when the
まず、端末装置からスキャンデータ取得要求を受信する(S601)。スキャンデータの取得要求には、端末装置が取得したいスキャンデータを示す情報が含まれており、HTTP要求のリクエスト行には、取得要求を示すGET及び取得するスキャンデータのURLが含まれている。このURLは前述のスキャン要求の応答から得た情報となる。 First, a scan data acquisition request is received from the terminal device (S601). The scan data acquisition request includes information indicating the scan data that the terminal device wants to acquire, and the request line of the HTTP request includes a GET indicating the acquisition request and the URL of the scan data to be acquired. This URL is information obtained from the response to the above-described scan request.
次に、プリンタは、スキャンデータ取得要求がUSB通信で受信したのかを判定する(S602)。 Next, the printer determines whether the scan data acquisition request has been received via USB communication (S602).
S602でUSB通信ではない、すなわち、ネットワーク通信で受信したと判定された場合、正常にスキャンを開始できたかを判定する(S603)。 If it is determined in S602 that the scan is not the USB communication, that is, it has been received by the network communication, it is determined whether the scan can be started normally (S603).
正常にスキャンが開始できたと判定された場合、HTTP応答のステータスコードとして「200 OK」を送信し(S604)、続いてHTTP応答のヘッダー部を送信し(S605)、HTTP応答のボディ部としてスキャンデータを送信する(S606)。端末装置100は、HTTP応答のステータスコード及びヘッダー部の受信に基づいて、「スキャンデータの受信中」等のメッセージの表示と共に、データの受信の進捗状況を示すプログレスバーを表示する。そして、スキャンデータの受信の進捗状況に応じてプログレスバーの進捗状況が進む。
If it is determined that the scan has started normally, "200 OK" is transmitted as the status code of the HTTP response (S604), and then the header of the HTTP response is transmitted (S605), and the scan is performed as the body of the HTTP response. The data is transmitted (S606). The
S603において、正常にスキャンが開始できなかったと判定された場合はスキャンデータが存在しないのでHTTP応答のステータスコードとして「404 Not Found」を送信し(S607)、HTTP応答のヘッダー部を送信する(S608)。このとき、端末装置100は、HTTP応答のステータスコード及びヘッダー部の受信に基づいて、スキャンが開始できないことをユーザに通知する。本実施形態では、「スキャンが開始できませんでした」の表示を表示部に行う。なお、これに限定されず、音声や印刷等によりユーザに通知するようにしてもよい。そして、スキャンが正常に開始できなかったので、HTTP応答のボディ部としてデータなしであることを示す情報を送信する(S609)。
If it is determined in S603 that the scan has not been started normally, there is no scan data, so "404 Not Found" is transmitted as the status code of the HTTP response (S607), and the header portion of the HTTP response is transmitted (S608). ). At this time, the
S602でUSB通信で受信したと判定された場合、正常にスキャンが開始できたか判定する前に、HTTP応答のステータスコードとして「200 OK」を送信し(S610)、HTTP応答のヘッダー部を送信する(S611)。端末装置100は、HTTP応答のステータスコード及びヘッダー部の受信に基づいて、「スキャンデータの受信中」等のメッセージの表示と共に、データの受信の進捗状況を示すプログレスバーを表示する。
その後、正常にスキャンが開始できたか判定し(S612)、正常にスキャンが開始できたと判定された場合、HTTPボディ部としてスキャンデータを送信する(S613)。端末装置100は、HTTP応答のボディ部の受信に基づいて、プログレスバーの進捗状況が進む。正常にスキャンが開始できなったと判定された場合、HTTPボディ部としてデータなしであることを示す情報を送信する(S614)。このとき、端末装置100は、HTTP応答のボディ部の受信に基づいて、プログレスバーの進捗が進むことなく、「スキャンデータの受信中」等のメッセージ及びプログレスバーの表示を終了する。 本実施形態では、実施形態1と同様に、スキャンデータが正常に送信できる状況であるか判定する前に、HTTP応答をヘッダー部まで送信する。これにより、プリンタがスキャンデータ取得要求を受け付けたと端末装置に認識させることができ、スキャンデータ取得要求の破棄やスキャンデータ取得要求の応答待機による端末装置の処理の占有を抑制することができる。また、スキャンが正常に開始できなかったとしても、HTTP応答のボディ部でスキャンデータが何もないという情報を送信することにより、端末装置はプリンタが要因でスキャンがキャンセルされたと判断可能となる。したがって、スキャンデータが開始できるまで時間がかかる場合も、スキャンデータが正常に開始できない場合でも正常な状態を保ったまま処理を終了させることができる。
If it is determined in step S602 that the scan has been received by USB communication, "200 OK" is transmitted as the status code of the HTTP response before determining whether the scan has started normally (S610), and the header of the HTTP response is transmitted. (S611). The
Thereafter, it is determined whether the scan has been started normally (S612). If it is determined that the scan has been started normally, the scan data is transmitted as an HTTP body part (S613). In the
一方、ネットワーク通信では、HTTP層において、プリンタからの応答がなかったとしても、端末装置はTCP/IP層のFINパケットを送信することでプリンタに要求を破棄したことを伝えることが可能である。そのため、端末装置とプリンタ間で通信経路と処理を占有させないことが可能である。 On the other hand, in the network communication, even if there is no response from the printer in the HTTP layer, the terminal device can notify the printer that the request has been discarded by transmitting the FIN packet in the TCP / IP layer. Therefore, it is possible to prevent the communication path and processing from being occupied between the terminal device and the printer.
上述したように、本実施形態では、スキャンデータの取得要求を受信した際のHTTP応答の送信制御を通信インターフェースに応じて切り替える。具体的には、本ネットワーク通信においては正常にスキャンが実行できたと判定してからHTTP応答を送信する。これにより、例えば、ネットワーク通信の場合は、プリンタに回復動作やキャッピング動作等のエラーが発生した場合に、エラー発生を適切に端末装置に送信することができる。 As described above, in the present embodiment, the transmission control of the HTTP response when the scan data acquisition request is received is switched according to the communication interface. Specifically, in this network communication, an HTTP response is transmitted after it is determined that the scan has been normally performed. Thus, for example, in the case of network communication, when an error such as a recovery operation or a capping operation occurs in the printer, the occurrence of the error can be appropriately transmitted to the terminal device.
(実施形態3)
実施形態2においては、スキャンデータ取得要求受信時のHTTP応答の送信制御を通信インターフェースに応じて切り替えるようにした。これに対し、本実施形態では、スキャン実行要求を受信したタイミングではなく、スキャンデータ取得要求を受信したタイミングで、プリンタにスキャンを実行させる。なお、実施形態1と重複する説明は省略する。また、実施形態1と同一のものには同一の符号を付す。具体的には、プリンタのハードウェア構成、プリンタのソフトウェア構成、操作表示部の表示画面は同一であるため、説明を省略する。
(Embodiment 3)
In the second embodiment, the transmission control of the HTTP response at the time of receiving the scan data acquisition request is switched according to the communication interface. On the other hand, in this embodiment, the printer is caused to execute the scan at the timing of receiving the scan data acquisition request, not at the timing of receiving the scan execution request. Note that the description overlapping with the first embodiment will be omitted. The same components as those in the first embodiment are denoted by the same reference numerals. More specifically, since the hardware configuration of the printer, the software configuration of the printer, and the display screen of the operation display unit are the same, the description is omitted.
図8は、本実施形形態に係るプリンタ200のスキャンの実行要求を受信した際の処理の流れを示したフローチャートである。このフローチャートは、CPU201が、ROM202に格納されている制御プログラムをRAM203にロードし、それを実行することにより行われる。
FIG. 8 is a flowchart illustrating a flow of processing when the
まず、ネットワーク通信又はUSB通信を介して、プリンタ200に接続されている端末装置からスキャンの実行要求を受信する(S701)。スキャンの実行要求には読み取りサイズや解像度等の情報が含まれている。
First, a scan execution request is received from a terminal device connected to the
プリンタは、スキャンの実行要求を受け付ける(S702)。ただし、このとき、スキャンの実行を開始しない。次に、HTTP応答であるステータスコードを送信し(S703)、HTTP応答のヘッダー部を送信し(S704)、HTTP応答のボディ部を送信する(S705)。このように、HTTP応答で、ステータス部、ヘッダー部、ボディ部を順次送信する。HTTP応答のステータスコードには、実施形態1と同様、正常に要求を受け付けたことを示す200番台の応答のいずれであってもよい。HTTP応答のボディ部としては、スキャン実行を開始したことを示す情報ではなく、スキャン受け付けを示すジョブ情報や後のスキャン実行で生成するスキャンデータのURLなどの所在等を予め含めるものとする。 The printer receives a scan execution request (S702). However, at this time, the execution of the scan is not started. Next, a status code which is an HTTP response is transmitted (S703), a header part of the HTTP response is transmitted (S704), and a body part of the HTTP response is transmitted (S705). As described above, the status part, the header part, and the body part are sequentially transmitted in the HTTP response. As in the first embodiment, the status code of the HTTP response may be any of responses in the 200's indicating that the request has been normally received. It is assumed that the body part of the HTTP response does not include information indicating that the scan execution has been started, but rather includes, for example, job information indicating that the scan has been accepted, the location of a URL of scan data generated in a subsequent scan execution, and the like.
図9は、本発明の実施形態に係るプリンタのスキャンデータ取得要求を受信した際の処理の流れを示したフローチャートである。また、図9に示すフローは、図8で示したフローを実施した後のフローであり、端末装置は、本フローの直前にプリンタからスキャン要求を受け付けた旨を受信している状態である。このフローチャートは、CPU201が、ROM202に格納されている制御プログラムをRAM203にロードし、それを実行することにより行われる。
FIG. 9 is a flowchart showing the flow of processing when the printer according to the embodiment of the present invention receives a scan data acquisition request. Further, the flow illustrated in FIG. 9 is a flow after the execution of the flow illustrated in FIG. 8, and is a state in which the terminal device has received a notification that a scan request has been received from the printer immediately before this flow. This flowchart is performed by the
まず、端末装置からスキャンデータの取得要求(HTTP要求)を受信する(S801)。次に、プリンタは、スキャンデータの取得要求がUSB通信で受信したかを判定する(S802)。USB通信で受信してない、すなわち、ネットワーク通信で受信したと判定した場合は、すぐにスキャンを実行できるか判定をする(S803)。すぐにスキャン実行できると判定した場合はスキャンを実行する(S804)。一方、すぐにスキャンを実行できないと判定した場合は、スキャンの実行ができない要因が解消されるまで、スキャン実行を待ち(S805)、スキャンの実行ができない要因が解消されたと判定してからスキャンを実行する(S804)。 First, a scan data acquisition request (HTTP request) is received from the terminal device (S801). Next, the printer determines whether a scan data acquisition request has been received via USB communication (S802). If it is not received by USB communication, that is, if it is determined that it is received by network communication, it is determined whether the scan can be executed immediately (S803). If it is determined that the scan can be executed immediately, the scan is executed (S804). On the other hand, if it is determined that the scan cannot be executed immediately, the scan execution is waited until the cause of the scan inability is eliminated (S805). Execute (S804).
次に、S804のスキャンを実行した結果、正常にスキャンが開始できたか判定する(S806)。S806で正常にスキャンが開始できたと判定された場合はHTTP応答のステータスコードとして「200 OK」を送信し(S807)、HTTP応答のヘッダー部を送信する(S808)。そして、HTTP応答のボディ部としてスキャンデータを送信する(S809)。S806で正常にスキャンが開始できなかったと判定された場合はステータスコードとして「404 Not Found」を送信し(S810)、HTTP応答のヘッダー部を送信する(S811)。そして、HTTP応答のボディ部としてデータなしであることを示す情報を送信する(S812)。 Next, as a result of executing the scan in S804, it is determined whether the scan can be started normally (S806). If it is determined in step S806 that the scan has started normally, “200 OK” is transmitted as the status code of the HTTP response (S807), and the header of the HTTP response is transmitted (S808). Then, the scan data is transmitted as the body part of the HTTP response (S809). If it is determined in step S806 that the scan has not been started normally, “404 Not Found” is transmitted as the status code (S810), and the header of the HTTP response is transmitted (S811). Then, information indicating that there is no data is transmitted as the body part of the HTTP response (S812).
S802でUSB通信で受信したと判定された場合、スキャンを実行する前にHTTP応答のステータスコードとして「200 OK」を送信し(S813)、HTTP応答のヘッダー部を送信する(S814)。その後、すぐにスキャンを実行できるか判定する(S815)。すぐにスキャンを実行できると判定した場合はスキャンを実行する(S816)。スキャンが一時的に実行できない場合は、スキャンの実行ができない要因が解消されるまでスキャン実行を待ち(S817)、スキャンの実行ができない要因が解消されたと判定してからスキャンを実行する(S816)。 If it is determined in step S802 that the received data is received via USB communication, “200 OK” is transmitted as the status code of the HTTP response before scanning is performed (S813), and the header of the HTTP response is transmitted (S814). Then, it is determined whether the scan can be executed immediately (S815). If it is determined that the scan can be executed immediately, the scan is executed (S816). If the scan cannot be temporarily executed, the scan execution is waited until the cause of the inability to execute the scan is eliminated (S817), and the scan is executed after it is determined that the cause of the inability to execute the scan has been eliminated (S816). .
次に、S816のスキャンを実行した結果、正常にスキャンが開始できたか判定する(S818)、正常にスキャンが開始できたと判定された場合、HTTP応答のボディ部としてスキャンデータを送信する(S819)。正常にスキャンが開始できなったと判定された場合、HTTP応答のボディ部としてデータなしであることを示す情報を送信する(S820)。本実施形態では、スキャン実行要求を受信した時点では、スキャンを受け付けたのみで実際にはスキャンは実行されない。ただし、プリンタの内部ではスキャン実行は予約された状態になっており、スキャン実行要求を受け付けた時点で他の端末装置からの印刷やスキャンは受け付けない状態とする。このような状態にすることにより、スキャンデータの取得要求を受信した際に、スキャンデータが送信されることを保障することができる。 Next, as a result of executing the scan in S816, it is determined whether the scan can be started normally (S818). If it is determined that the scan can be started normally, the scan data is transmitted as a body part of the HTTP response (S819). . If it is determined that the scanning has not been started normally, information indicating that there is no data is transmitted as the body part of the HTTP response (S820). In the present embodiment, when the scan execution request is received, the scan is only accepted and the scan is not actually executed. However, inside the printer, scan execution is reserved, and when a scan execution request is accepted, printing or scanning from another terminal device is not accepted. With such a state, it is possible to guarantee that the scan data is transmitted when the request to acquire the scan data is received.
さらに、本実施形態では、スキャンの実行のタイミングを遅らせることにより、端末装置からのスキャンデータの取得要求の送信が遅れた場合に、スキャナヘッドによるスキャンが止まってしまうのを抑制することができる。端末装置からのスキャンデータの取得要求の送信が遅れてスキャナヘッドによるスキャンが止まってしまう例としては、RAM203のサイズが小さく、一回のスキャン実行で生成されるスキャンデータ全てを格納できないようなプリンタが挙げられる。このようなプリンタは、スキャン実行で次々に生成されるスキャンデータの断片をRAM203に格納する処理と同時に端末装置からのスキャンデータ取得要求でRAM203から格納されたスキャンデータの断片を順次端末装置に送信する。しかしながら、端末装置からのスキャンデータ取得要求が遅れると一時的にRAM203に空きが無くなってしまい、スキャナヘッドによる読み取りが中断されてしまうことがある。中断した後は、スキャンデータ取得要求の受信で徐々にRAM203に空きができ始めて、再び読み取りが開始できる。しかしながら、読み取りが一時的に停止してしまうと、生成されたスキャンデータは、一定の速度で読み取りを行った場合のスキャンデータと比較して、スキャンデータに基づく画像に画像ずれが生じる等のように得られる画質が低下してしまう。これに対し、本実施形態では、上述した通り、スキャナヘッドによるスキャンが止まってしまうのを抑制することができる。
Further, in the present embodiment, by delaying the timing of the execution of the scan, it is possible to prevent the scanning by the scanner head from stopping when the transmission of the scan data acquisition request from the terminal device is delayed. An example in which the transmission of the scan data acquisition request from the terminal device is delayed and the scanning by the scanner head is stopped is a printer in which the size of the
上述したように、本実施形態では、スキャンデータの取得要求を受信した際のHTTP応答の送信制御を通信インターフェースに応じて切り替える。具体的には、上述したように、USB通信でスキャン取得要求を受信した場合、スキャンを実行する前に、HTTP応答のヘッダー部まで送信する。これにより、端末装置とプリンタとの間でアプリケーションのエラーとして終了するのを抑制することができる。 As described above, in the present embodiment, the transmission control of the HTTP response when the scan data acquisition request is received is switched according to the communication interface. Specifically, as described above, when a scan acquisition request is received via USB communication, the scan request is transmitted to the header of the HTTP response before scanning is performed. As a result, it is possible to suppress the termination between the terminal device and the printer as an application error.
(他の実施形態)
本発明は上述した実施形態に限定されるものではない。例えば、上述した実施形態では、スキャンの実行を開始する前にHTTP応答の一部としてヘッダー部を送信するものとしたが、これに限定されず、スキャンの実行の開始の有無に関わらず、HTTP応答のヘッダー部を送信するものであればよい。すなわち、正常にスキャン等の処理を開始後にHTTP応答のヘッダー部を送信してもよく、スキャンの実行の完了前に送信するものであればよい。
(Other embodiments)
The present invention is not limited to the embodiments described above. For example, in the above-described embodiment, the header portion is transmitted as a part of the HTTP response before the execution of the scan is started. However, the present invention is not limited thereto. What is necessary is just to transmit the header part of the response. That is, the header part of the HTTP response may be transmitted after the processing such as scanning is started normally, or may be transmitted before the completion of the scanning.
また、例えば、プリンタは、HTTPを用いるBluetooth(登録商標)通信を介してスキャンの実行が指示される場合も同様に、スキャンの実行を開始する前に、HTTP応答のヘッダー部を返すようにすればよい。 Also, for example, even when the execution of a scan is instructed via Bluetooth (registered trademark) communication using HTTP, the printer may return a header part of the HTTP response before starting the execution of the scan. Just fine.
また、上述した実施形態では、処理の実行要求として、スキャンの実行要求を例に挙げて説明したが、これに限定されるものではない。端末装置から受信する他の処理の実行要求としては、例えば、印刷処理の実行要求が挙げられる。 In the above-described embodiment, a scan execution request has been described as an example of a process execution request. However, the present invention is not limited to this. An execution request for another process received from the terminal device includes, for example, an execution request for a printing process.
上述した実施形態は、以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(CPUやMPU等)がプログラムを読み出して実行する処理である。また、プログラムは、1つのコンピュータで実行させても、複数のコンピュータを連動させて実行させるようにしてもよい。また、上記した処理の全てをソフトウェアで実現する必要はなく、処理の一部または全部をASIC等のハードウェアで実現するようにしてもよい。また、CPUも1つのCPUで全ての処理を行うものに限らず、複数のCPUが適宜連携をしながら処理を行うものとしてもよい。 The above-described embodiment can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (CPU, MPU, etc.) of the system or apparatus reads and executes the program. It is processing to do. Further, the program may be executed by one computer or may be executed in conjunction with a plurality of computers. Further, it is not necessary to realize all of the above-described processing by software, and a part or all of the processing may be realized by hardware such as an ASIC. Further, the CPU is not limited to one that performs all the processing, and a plurality of CPUs may perform the processing while cooperating as appropriate.
200 プリンタ
201 CPU
202 ROM
203 RAM
204 読取部
205 印刷部
206 操作表示部
207 ネットワークコントローラ
208 USBデバイスコントローラ
209 CPUバス
401 OS
402 ミドルウェア
403 アプリケーション
404 USBドライバ
405 USBモジュール
406 LANドライバ
407 TCP/IPモジュール
408 HTTPモジュール
409 IPPモジュール
410 WSDモジュール
411 スキャンモジュール
200
202 ROM
203 RAM
204
402
本発明に係る処理装置は、Universal Serial Bus(USB)インターフェースを含む複数の通信インターフェースを備える処理装置であって、外部装置と、Hypertext Transfer Protocol(HTTP)を利用した通信を前記USBインターフェースを介して実行する通信手段と、前記通信手段を介して、前記外部装置から、HTTP要求を受信する受信手段と、前記受信手段が受信したHTTP要求に基づいて、読取部に原稿の読み取り処理を実行させる実行手段と、前記受信手段が受信した前記HTTP要求に応じて、前記通信手段を介して、HTTP応答を前記外部装置に送信する送信手段と、を有し、前記受信手段が前記通信手段を介して、データの取得を要求するHTTP要求を前記外部装置から受信した場合、前記送信手段は、前記データの取得を要求するHTTP要求に応答して、ヘッダー部を含み且つボディ部を含まない第1HTTP応答を、前記外部装置に前記通信手段を介して送信し、前記読み取り処理によりデータが取得された場合、前記送信手段は、前記読み取り処理により取得された前記データが含まれるボディ部を含む第2HTTP応答を、前記外部装置に前記通信手段を介して送信する。 A processing device according to the present invention is a processing device including a plurality of communication interfaces including a Universal Serial Bus (USB) interface, and communicates with an external device using Hypertext Transfer Protocol (HTTP) via the USB interface. a communication means for performing, via the communication means, from said external device, receiving means for receiving an HTTP request based on the HTTP request received by the receiving unit, Ru to execute the reading processing of a document reading unit execution means, before SL in response to the HTTP request received by the receiving means, via said communication means comprises transmission means for transmitting a HTTP response to the external device, and the receiving means the communication means through, the outer an HTTP request for requesting acquisition of data When receiving from the external device , the transmitting unit responds to the HTTP request for obtaining the data by transmitting the first HTTP response including the header portion and not including the body portion to the external device by transmitting the communication unit to the external device. When the data is acquired by the reading process , the transmitting unit transmits a second HTTP response including a body part including the data acquired by the reading process to the external device to the communication unit. To send over.
Claims (10)
前記通信手段を介して、所定の処理の実行を要求するHTTP要求を受信する受信手段と、
前記受信手段が受信したHTTP要求に応じて所定の処理を実行する実行手段と、
前記実行手段が正常に実行を開始したか判定する判定手段と、
前記受信手段が受信した前記HTTP要求に応じて、前記実行手段の処理結果を応答するHTTP応答を前記外部装置に送信する送信手段と、
を有し、
前記受信手段が前記通信手段を介して所定の処理の要求を受信した場合、前記送信手段は、前記実行手段が所定の処理の実行を完了する前にHTTP応答の一部を送信し、
前記判定手段が正常に実行を開始したと判定した場合、前記送信手段は前記実行手段の処理の実行に基づくデータを含むHTTP応答を送信し、前記判定手段が正常に実行を開始できないと判定した場合、前記送信手段は前記実行手段の処理の実行に基づくデータを含まないHTTP応答を送信することを特徴とする処理装置。 Communication means for communicating with an external device according to HTTP;
Receiving means for receiving, via the communication means, an HTTP request requesting execution of a predetermined process;
Executing means for executing predetermined processing in response to the HTTP request received by the receiving means;
Determining means for determining whether the execution means has started execution normally,
Transmitting means for transmitting, to the external device, an HTTP response for responding to a result of the processing by the execution means in response to the HTTP request received by the receiving means;
Have
When the receiving unit receives a request for a predetermined process via the communication unit, the transmitting unit transmits a part of an HTTP response before the execution unit completes execution of the predetermined process,
When the determining unit determines that the execution has started normally, the transmitting unit transmits an HTTP response including data based on the execution of the process of the executing unit, and determines that the determining unit cannot start the execution normally. In this case, the transmission unit transmits an HTTP response that does not include data based on the execution of the process by the execution unit.
前記受信手段は、前記第一の通信手段又は前記第二の通信手段を介して、所定の処理の要求を受信し、
前記受信手段が前記第一の通信手段を介して所定の処理の要求を受信した場合、前記送信手段は、前記判定手段が正常に実行を開始したと判定した場合にHTTP応答を送信し、
前記受信手段が前記第二の通信手段を介して所定の処理の要求を受信した場合、前記送信手段は、前記実行手段による所定の処理を実行する前にHTTP応答の一部を送信することを特徴とする請求項2に記載の処理装置。 The communication means has first communication means for performing communication according to HTTP, and second communication means for performing communication according to HTTP,
The receiving means receives a request for a predetermined process through the first communication means or the second communication means,
When the receiving unit receives a request for a predetermined process via the first communication unit, the transmitting unit transmits an HTTP response when the determining unit determines that the execution has started normally,
When the receiving unit receives a request for a predetermined process via the second communication unit, the transmitting unit transmits a part of an HTTP response before executing the predetermined process by the execution unit. The processing device according to claim 2, wherein:
前記送信手段は、前記所定の処理の実行要求に応じて第一のHTTP応答を送信し、前記所定の処理の実行結果の取得要求に応じて第二のHTTP応答を送信し、前記受信手段が前記第二の通信手段を介して前記所定の処理の実行結果の取得要求を受信した場合、前記実行手段が所定の処理を実行する前に前記第二のHTTP応答の一部を送信することを特徴とする請求項3に記載の処理装置。 The receiving means receives a request for executing the predetermined process and a request for acquiring an execution result of the predetermined process, as the request for the predetermined process,
The transmitting unit transmits a first HTTP response in response to the execution request of the predetermined process, transmits a second HTTP response in response to a request to obtain an execution result of the predetermined process, and When receiving a request to acquire an execution result of the predetermined process via the second communication unit, transmitting a part of the second HTTP response before the execution unit executes the predetermined process. The processing device according to claim 3, wherein:
前記所定の処理の要求は、スキャン要求を含み、
前記所定の処理の要求がスキャン要求である場合、前記実行手段の処理の実行に基づくデータは、スキャンデータを含むことを特徴とする請求項1〜5のいずれか1項に記載の処理装置。 Further comprising a reading unit for reading the original,
The request for the predetermined processing includes a scan request,
The processing apparatus according to claim 1, wherein when the request for the predetermined process is a scan request, data based on the execution of the process by the execution unit includes scan data.
前記受信工程において前記通信手段を介して所定の処理の要求を受信した場合、前記所定の処理の実行を完了する前にHTTP応答の一部を前記外部装置に送信する送信工程と、
前記受信工程において受信したHTTP要求に応じて所定の処理を実行する実行工程と、
前記実行工程が正常に実行を開始したか判定する判定工程と、
を有し、
前記判定工程において正常に実行を開始したと判定した場合、前記所定の処理の実行に基づくデータを含むHTTP応答を送信し、前記判定手段が正常に実行を開始できないと判定した場合、前記所定の処理の実行に基づくデータを含まないHTTP応答を送信することを特徴とする処理方法。 A receiving step of receiving an HTTP request requesting execution of a predetermined process from an external device via a communication unit;
A transmitting step of transmitting a part of an HTTP response to the external device before completing the execution of the predetermined processing, when receiving a request for the predetermined processing via the communication unit in the receiving step;
An execution step of executing a predetermined process in response to the HTTP request received in the reception step;
A determination step of determining whether the execution step has started execution normally,
Have
If it is determined in the determination step that execution has started normally, an HTTP response including data based on the execution of the predetermined process is transmitted, and if the determination unit determines that execution cannot be started normally, A processing method, comprising transmitting an HTTP response that does not include data based on execution of the processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019143710A JP2019216451A (en) | 2019-08-05 | 2019-08-05 | Processing device, processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019143710A JP2019216451A (en) | 2019-08-05 | 2019-08-05 | Processing device, processing method, and program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015093503A Division JP6570303B2 (en) | 2015-04-30 | 2015-04-30 | Processing apparatus, processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019216451A true JP2019216451A (en) | 2019-12-19 |
Family
ID=68919576
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019143710A Pending JP2019216451A (en) | 2019-08-05 | 2019-08-05 | Processing device, processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019216451A (en) |
-
2019
- 2019-08-05 JP JP2019143710A patent/JP2019216451A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5954142B2 (en) | Image processing system, image processing apparatus, and information processing apparatus | |
JP6065542B2 (en) | Image processing apparatus and communication program | |
JP6700894B2 (en) | Image processing device, control method, and program | |
US9300824B2 (en) | Method and image forming apparatus to generate user interface screen to be displayed to user accessing the image forming apparatus | |
JP6341785B2 (en) | Printing apparatus, printing apparatus control method, and program | |
JP2019175313A (en) | Application program | |
US20200084260A1 (en) | Processing apparatus, processing method and program | |
JP2002342050A (en) | Image formation device, printing method, program and recording medium | |
US20170034391A1 (en) | Image forming apparatus, method of controlling the same, and storage medium | |
US20180309850A1 (en) | Communication system, communication device and program | |
US20060282531A1 (en) | Network interface apparatus for controlling image data forwarding according to performance function of each address and method thereof | |
JP2019216451A (en) | Processing device, processing method, and program | |
JP6460905B2 (en) | Communication device, control method, program | |
JP6504958B2 (en) | Communication apparatus, image processing system, control method, and program | |
US11467787B2 (en) | Communication system, first server, second server, non-transitory computer-readable recording medium storing computer-readable instructions for first server and non-transitory computer-readable recording medium storing computer-readable instructions for second server | |
JP7243474B2 (en) | Image forming apparatus and its program | |
JP6528437B2 (en) | MFP, network system, communication method and program | |
US20220201128A1 (en) | Non-transitory storage medium storing program set readable by computer of information processing apparatus, method for obtaining read result, and information processing apparatus | |
US20150237162A1 (en) | Image Forming Apparatus and Event Notification System That Reduces Load of Server for Helping Event Notification | |
JP2023165196A (en) | Information processing system, information processing apparatus, information processing method, and program | |
CN116166206A (en) | Printing apparatus, control method thereof, and storage medium | |
JP6263996B2 (en) | Data transfer system, facsimile machine, and program | |
JP5058023B2 (en) | Image processing apparatus, image processing system, and image processing method | |
JP5412468B2 (en) | Image forming system | |
JP2019186652A (en) | Compound machine and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190903 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190903 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201015 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20201110 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20210511 |