JP2019216451A - Processing device, processing method, and program - Google Patents

Processing device, processing method, and program Download PDF

Info

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
Application number
JP2019143710A
Other languages
Japanese (ja)
Inventor
渡辺 明
Akira Watanabe
明 渡辺
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2019143710A priority Critical patent/JP2019216451A/en
Publication of JP2019216451A publication Critical patent/JP2019216451A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Computer And Data Communications (AREA)
  • Facsimiles In General (AREA)

Abstract

To provide a processing device, a processing method, and a program for preventing a terminal device from waiting in a state where there is no response when a request is received from a terminal device.SOLUTION: In the processing device, when receiving means receives a request for a predetermined process via communication means (S301), transmission means transmits a part of an HTTP response before execution means executes a predetermined process (S302, S303). Then, a predetermined process is executed in response to the received HTTP request and whether the execution means has started execution normally is determined (S304). If it is determined that the execution has started normally, an HTTP response including data on the basis of the execution of processing by the execution means is transmitted (S305). If it is determined that the execution cannot be started normally, an HTTP response including no data on the basis of the execution of processing by the execution means is transmitted (S306).SELECTED DRAWING: Figure 6

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 Patent Literature 1, before transmitting scan data, the image processing apparatus responds with capability information on divided transmission of scan data, divides the scan data, and transmits the divided scan data to the terminal device.

特開2009−44232JP 2009-44232A

しかしながら、特許文献1では、原稿の読み取りがすぐに開始できない場合や、読み取りを開始できたとしてもスキャンデータの最初の分割送信さえ行うことができない場合がある。このような場合、TCP/IPネットワーク通信およびUSB通信において、HTTP要求のデータを全て転送した後、要求元である端末装置は、要求先の画像形成装置の応答を待機する。しかしながら、画像処理装置が一時的にHTTP要求を処理できずに長い時間経過しても応答ができない場合端末装置によっては、画像処理装置がエラー状態になったと判断されてしまい、要求を廃棄してしまう。また、端末装置によっては、電源がオフされるまで永続的に待機し、端末装置の処理を占有してしまうことがある。   However, in Patent Literature 1, there is a case where the reading of the document cannot be started immediately, or even if the reading can be started, even the first divided transmission of the scan data cannot be performed. In such a case, after transferring all the data of the HTTP request in the TCP / IP network communication and the USB communication, the requesting terminal device waits for a response from the requested image forming device. However, when the image processing apparatus cannot temporarily process the HTTP request and cannot respond even after a long time elapses, depending on the terminal device, the image processing apparatus is determined to be in an error state, and the request is discarded. I will. Further, depending on the terminal device, the terminal device may wait forever until the power is turned off and occupy the processing of the terminal device.

本発明は上述した課題を解決するためになされたものであり、端末装置から要求を受信した際に端末装置を応答がない状態で待機させるのを抑制する処理装置、処理方法、及びプログラムを提供するものである。   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.

実施形態1に係るプリンタのハードウェア構成を示すブロック図である。FIG. 2 is a block diagram illustrating a hardware configuration of the printer according to the first embodiment. 実施形態1に係るプリンタのソフトウェア構成を示すブロック図である。FIG. 2 is a block diagram illustrating a software configuration of the printer according to the first embodiment. HTTP通信について説明する図である。FIG. 3 is a diagram illustrating HTTP communication. 実施形態1に係るプリンタの操作表示部に表示する画面図である。FIG. 4 is a screen view displayed on the operation display unit of the printer according to the first embodiment. 実施形態1に係るプリンタのスキャン実行要求を受信した際のフローチャートである。5 is a flowchart when a scan execution request of the printer according to the first embodiment is received. 実施形態1に係るプリンタのスキャンデータ取得要求を受信した際のフローチャートである。6 is a flowchart when a scan data acquisition request of the printer according to the first embodiment is received. 実施形態2に係るプリンタのスキャンデータ取得要求を受信した際のフローチャートである。9 is a flowchart when a scan data acquisition request of the printer according to the second embodiment is received. 実施形態3に係るプリンタのスキャン実行要求を受信した際のフローチャートである。13 is a flowchart when a scan execution request of the printer according to the third embodiment is received. 実施形態3に係るプリンタのスキャンデータ取得要求を受信した際のフローチャートである。13 is a flowchart when a scan data acquisition request of the printer according to the third embodiment is received.

以下、添付図面を参照して、本発明の実施形態を説明する。なお、以下の実施形態で用いる装置の各構成要素の相対配置や装置形状等は、例示であり、これらに限定されるものではない。   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 terminal device 100 and a printer 200 as a processing device. In the present embodiment, a printer having an image reading function and a printing function will be described as an example of a processing device, but the processing device is not limited to this. The processing device may be a printer having only a printing function, a printer having a function such as a facsimile function, or a copier or a plotter. Further, the processing device may be a scanner device having only an image reading function. The processing device is not limited to an image processing device as long as it has a plurality of communication interfaces including a USB interface and receives a predetermined request from a terminal device.

図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 printer 200 includes a CPU 201, a ROM 202, a RAM 203, a reading unit 204, a printing unit 205, an operation display unit 206, a network controller 207, and a USB device controller 208. These are connected via a CPU bus 209, respectively.

CPU201は、ROM202に記憶されている制御のプログラム等に従って、装置全体(MFP全体)の制御を行う。   The CPU 201 controls the entire apparatus (the entire MFP) according to a control program or the like stored in the ROM 202.

RAM203は、CPU201等を動作させるために必要となるメモリ領域であり、ROM202から読み出されたプログラムを実行する時のワークエリア、データ送受信時のバッファとして用いられる。また、ROM202は、プリンタを動作させるためのプログラムを内蔵しているとともに、HTTPに従って読取部204にスキャンを実行させるためのプログラムを格納する。   The RAM 203 is a memory area necessary for operating the CPU 201 and the like, and is used as a work area when executing a program read from the ROM 202 and a buffer when transmitting and receiving data. The ROM 202 stores a program for operating the printer and stores a program for causing the reading unit 204 to perform scanning according to HTTP.

読取部204は、読取センサを有し、原稿台に置かれた紙やフィルム等の原稿を読み取って画像データを生成する。具体的には、読取部204は、読取センサがライン状に並べられた、所定の読み取り幅を持つスキャナヘッドを備えており、このスキャナヘッドを走査することにより、画像データ(スキャンデータ)を生成する。   The reading unit 204 has a reading sensor, and reads a document such as paper or film placed on a document table to generate image data. Specifically, the reading unit 204 includes a scanner head having a predetermined reading width in which reading sensors are arranged in a line, and generates image data (scan data) by scanning the scanner head. I do.

印刷部205は、印刷ヘッドと各色のインクタンクを有し、印刷ヘッドを介してインクタンク内のインクを吐出することにより、印刷用紙などのシートに画像を印刷する。   The printing unit 205 has a print head and ink tanks of each color, and prints an image on a sheet such as printing paper by discharging ink in the ink tank through the print head.

操作表示部206は、ユーザが直接プリンタに各種指示を入力するための操作部であり、操作表示部206によりユーザはMFPの各種機能の起動や各種設定を行うことができる。操作表示部206は、例えば、LED(発光ダイオード)やLCD(液晶ディスプレイ)などの表示部と、文字入力キー、カーソルキー、決定キー、取り消しキー等の操作キーとを有する。また、操作表示部206は、少なくとも一部が、表示部と操作機構が一体となったタッチパネルで構成されてもよい。   The operation display unit 206 is an operation unit for the user to directly input various instructions to the printer. The user can start various functions of the MFP and perform various settings using the operation display unit 206. The operation display unit 206 includes, for example, a display unit such as an LED (light emitting diode) or an LCD (liquid crystal display), and operation keys such as a character input key, a cursor key, an enter key, and a cancel key. In addition, at least a part of the operation display unit 206 may be configured by a touch panel in which the display unit and the operation mechanism are integrated.

ネットワークコントローラ207は、有線LANや無線LAN等のネットワークとの通信制御を行う通信手段である。ネットワークコントローラ207は、有線LANコネクタと、無線LANモジュールと、を有する。ネットワークコントローラ207は、Ethernet(登録商標)等の有線LAN又は無線LANを介して他の機器と接続し、通信可能とする。   The network controller 207 is a communication unit that controls communication with a network such as a wired LAN or a wireless LAN. The network controller 207 has a wired LAN connector and a wireless LAN module. The network controller 207 is connected to another device via a wired LAN such as Ethernet (registered trademark) or a wireless LAN to enable communication.

また、USBデバイスコントローラ208は、USBインターフェースの通信制御を行う通信手段であり、USB通信規格に従って、USB機器との接続および通信制御を行う。USBデバイスコントローラ208は、USBコネクタを有する。USBデバイスコントローラ208は、USBを介して他の機器と接続し、通信可能となる。   The USB device controller 208 is a communication unit that performs communication control of a USB interface, and performs connection and communication control with a USB device according to the USB communication standard. The USB device controller 208 has a USB connector. The USB device controller 208 is connected to another device via the USB and becomes communicable.

上述したように、本実施形態では、端末装置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 terminal device 100. The printer 200 can be connected to an external device via these interfaces, and can receive various requests such as a scan execution request and a scan data acquisition request from the terminal device. The printer 200 can execute scanning by the reading unit 204 in response to a scan request from the terminal device 100.

さらに、本実施形態では、プリンタ200は、図示しないが、NFCインターフェースをさらに有し、NFC通信を行うことができる。また、プリンタ200は、Bluetooth(登録商標)インターフェースを有し、Bluetooth(登録商標)通信を行うことができるようにしてもよい。また、プリンタ200は、Bluetooth(登録商標) Low Energy(BLE)インターフェースを有し、BLE通信を行うことができるようにしてもよい。   Further, in the present embodiment, although not shown, the printer 200 further has an NFC interface, and can perform NFC communication. In addition, the printer 200 may have a Bluetooth (registered trademark) interface so that Bluetooth (registered trademark) communication can be performed. Further, the printer 200 may have a Bluetooth (registered trademark) Low Energy (BLE) interface so that BLE communication can be performed.

端末装置100としては、例えば、PCやタブレット等の情報処理装置が挙げられる。端末装置100は、プリンタ200に対して、プリンタ200が有する各種機能の実行を要求することにより、プリンタ200にスキャンを実行させることができる。例えば、端末装置100は、スキャン要求を送信する際には、まず、スキャンの実行要求を送信し、プリンタ200からのスキャン実行要求に対する応答に応じて、スキャンデータの実行要求を送信する。   Examples of the terminal device 100 include an information processing device such as a PC and a tablet. The terminal device 100 can cause the printer 200 to perform a scan by requesting the printer 200 to execute various functions of the printer 200. For example, when transmitting a scan request, the terminal device 100 first transmits a scan execution request, and transmits a scan data execution request in response to a response to the scan execution request from the printer 200.

図2は、プリンタ200のROM202に記憶されたプログラムのモジュール構成を示す図である。プログラムは、プリンタ200のオペレーションシステム(OS)401、ミドルウェア層402、アプリケーション層403に分類される。   FIG. 2 is a diagram showing a module configuration of a program stored in the ROM 202 of the printer 200. The programs are classified into an operation system (OS) 401, a middleware layer 402, and an application layer 403 of the printer 200.

ミドルウェア層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 middleware layer 402 controls communication between the OS 401 and the module group of the application layer 403. The middleware layer 402 includes a USB driver 404, a USB module 405, a LAN driver 406, and a TCP / IP module 407. The LAN driver 406 and the TCP / IP module 407 control the network controller 207 to perform TCP / IP communication. The USB driver 404 and the USB module 405 control the USB device controller 208 to perform USB communication.

アプリケーション層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 application layer 403 includes an HTTP module 408, an IPP module 409, a WSD module 410, and a scan module 411. Network settings including the IP address of the printer 200 and the like can be executed not only from the operation display unit 206 but also from the terminal device 100. When the processing is executed from the terminal device 100, the Web browser of the terminal device 100 is started and the printer 200 is accessed via the network. The HTTP module 408 is used for management as a setting Web server, and for HTTP communication defined by WSD (Web Service for Devices), IPP, and other protocols using HTTP. The scan module 411 analyzes data received by USB communication or network communication with the HTTP module 408, the IPP module 409, or the WSD module 410. Then, as a result of the analysis, when the received data is determined to be a scan request, scan execution is controlled. Further, the scan module 411 enables the HTTP module 408 to access the scan data generated by performing the scan. Accordingly, control is performed so that the HTTP module 408 can transmit scan data in response to a scan data acquisition request received from the terminal device 100.

ここで、図3を用いて、プリンタ200に搭載されているHTTP通信の概略について説明する。   Here, the outline of the HTTP communication mounted on the printer 200 will be described with reference to FIG.

図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 printer 200 to the external device. As shown in FIG. 3B, the HTTP response includes a status line, a header part, a blank line, and a body part. The status line includes an HTTP version ("HTTP / 1.1" in the figure) and a status code ("200 OK" in the figure) indicating a result of request reception. The header portion is the same as the HTTP request, and is an area including information on the body portion and the like. The body part is an area for storing data that responds as a processing result of accepting an HTTP request, if any.

例えば、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 terminal device 100 using HTTP, the following procedure is performed. The terminal device 100 transmits to the printer 200 an HTTP request including a scan execution request command for instructing to scan a document in the body (see FIG. 3A). When receiving the HTTP request for requesting the execution of the scan, the printer 200 transmits to the terminal device 100 that the scan request has been accepted in the HTTP response (see FIG. 3B). Then, when receiving the HTTP response from the printer 200, the terminal device 100 transmits an HTTP request (GET request) for acquiring the scan data generated by the printer 200. Upon receiving the GET request, the printer 200 transmits an HTTP response including the data generated by performing the scan to the terminal device 100. The terminal device 100 acquires the data generated by the printer 200 in response to the HTTP response. In the present embodiment, when the printer 200 receives the HTTP request including the scan execution request command, the printer 200 transmits (responds) a header portion of the HTTP response to the HTTP request destination before starting the scan reading operation. Then, after executing the scan reading operation, the HTTP data portion is transmitted (responds) to the HTTP request destination. Accordingly, when physical USB communication is disconnected while the printer 200 and the terminal device 100 are performing USB communication, the terminal device 100 can suppress determination of the application of the printer 200 being in an error state, The processing can be appropriately terminated. For example, when the printer 200 makes an HTTP response after executing the scan reading operation, it cannot make a response until a predetermined time (for example, several tens of seconds) elapses. Further, for example, when the printer 200 makes an HTTP response after the end of the recovery processing, it cannot make a response until a predetermined time (for example, several minutes) elapses. At this time, before the terminal device 100 receives the HTTP response, the USB communication is physically performed such that the USB is disconnected from the printer 200 during that time or at least one of the printer 200 and the terminal device 100 is hard-off. It may be cut off. As described above, if the USB communication is disconnected before receiving the HTTP response to the HTTP request, the terminal device 100 may determine that the application of the printer 200 is in an error state and may not be able to cancel the job. . On the other hand, in the present embodiment, by responding to the HTTP request including the HTTP header portion, even if the USB communication is disconnected, the printer is not determined to be in an error state, and the job can be normally canceled. it can.

また、スキャン読取動作よりも前に、プリントヘッドの回復動作が実行される場合は、回復動作が実行されるよりも前に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 printer 200 has been described. However, the present embodiment may be any communication that conforms to HTTP, may be communication using IPP, and may be WSD. The same applies to communication using a protocol.

図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 operation display unit 206 of the MFP according to the embodiment shown in FIG. FIG. 4A is a home screen showing a state in which the power of the printer 200 is turned on and an operation such as printing or scanning is not performed (idle state). On the home screen, menu display, various settings, and execution of functions of a copy function, a scan function, and a cloud function using the Internet communication can be performed by key operation or touch panel operation. FIG. 4B is a screen displayed when the printer 200 cannot execute various functions. As a case where various functions cannot be executed, there is a case where a reading process cannot be immediately executed when a scan execution request is issued from a terminal device connected via USB or a network. The case where the reading process cannot be temporarily executed includes a case where a specific process is being executed. Specifically, there is a case where a scan process is being prepared, such as a process of correcting a reading sensor. Further, there may be a case where a recovery process such as a capping process or an ink suction process for preventing the print head from drying, or a process where vibration occurs in the printer 200 such as during a print process. FIG. 4C is a display screen displayed while the printer 200 is executing a scan. After the scanning is completed, the screen returns to the screen of FIG.

図5は、本発明の実施形態に係るプリンタ200のスキャンの実行要求を受信した際の処理の流れを示したフローチャートである。このフローチャートは、CPU201が、ROM202に格納されている制御プログラムをRAM203にロードし、それを実行することにより行われる。   FIG. 5 is a flowchart illustrating a flow of processing when the printer 200 according to the embodiment of the present invention receives a scan execution request. This flowchart is performed by the CPU 201 loading a control program stored in the ROM 202 into the RAM 203 and executing the control program.

まず、ネットワーク通信又は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 printer 200 via network communication or USB communication (S501). The scan execution request includes information such as the document reading size and the resolution. The printer scans a sheet or a photo placed on a platen or the like in accordance with the content of the scan execution request (S502). When the scan execution is started, a status code is transmitted by an HTTP response (S503), a header is transmitted by an HTTP response (S504), and a body (S505) is transmitted by an HTTP response. As described above, the status part, the header part, and the body part are sequentially transmitted in the HTTP response.

プリンタ200がスキャン要求を受け付けることができる場合、HTTP応答のステータスコードとして、例えば、「200 OK」を送信する。なお、スキャン要求を受け付けることができる場合に送信するステータスコードは、これに限定されるものではなく、「201 Created」でもよく、正常に要求を受け付けたことを示す200番台の応答のいずれであってもよい。一方、プリンタ200がスキャン要求を受け付けることができない場合は、ステータスコードで「500 Internal Server Error」を応答する。なお、スキャン要求を受け付けることができない場合に送信するステータスコードはこれに限定されるものではない。   When the printer 200 can accept the scan request, for example, “200 OK” is transmitted as the status code of the HTTP response. The status code transmitted when the scan request can be accepted is not limited to this, and may be “201 Created” or any of the 200s response indicating that the request has been accepted normally. May be. On the other hand, if the printer 200 cannot accept the scan request, the printer 200 responds with a status code of “500 Internal Server Error”. The status code transmitted when the scan request cannot be accepted is not limited to this.

また、ボディ部としては、スキャン実行を開始したことを示す情報を含んでいればよく、例えば、ジョブ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 operation display unit 206 before the scan is performed, the screen of FIG. 4B is displayed when a scan request is received, and the screen of FIG. ) Is displayed.

図6は、本発明の実施形態に係るプリンタ200のスキャンデータの取得要求を受信した際の処理の流れを示したフローチャートである。また、図6に示すフローは前述の図5で示したフローを実施した後のフローであり、端末装置は、本フローの直前にプリンタからスキャン実行を開始した旨を受信している状態である。このフローチャートは、CPU201が、ROM202に格納されている制御プログラムをRAM203にロードし、それを実行することにより行われる。   FIG. 6 is a flowchart illustrating a process flow when the printer 200 according to the embodiment of the present invention receives a scan data acquisition request. The flow illustrated in FIG. 6 is a flow after performing the flow illustrated in FIG. 5 described above, and is a state in which the terminal device has received a notification from the printer immediately before this flow that scanning has been started. . This flowchart is performed by the CPU 201 loading a control program stored in the ROM 202 into the RAM 203 and executing the control program.

まず、端末装置から処理の実行結果の取得要求を受信する(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 terminal device 100 displays a message such as “Receiving scan data” and a progress bar indicating the progress of data reception based on the status code of the HTTP response and the reception of the header portion.

その後、正常にスキャンが開始できたか判定し(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 terminal device 100, the progress of the progress bar advances based on the reception of the body part of the HTTP response. If it is determined that the scan has not been started normally, an HTTP body part that does not include the scan data is transmitted (S306), and the process ends. At this time, based on the reception of the body part of the HTTP response, the terminal device 100 ends the display of the message such as “Receiving scan data” and the progress bar without progress of the progress bar. If it is determined that the scan has not been started normally, the HTTP body part may include information indicating that there is no scan data.

プリンタにおいてスキャンを実行する場合、電源オン直後や印刷直後に、例えば、読み取りセンサの補正処理のようにスキャンの準備処理動作や、印刷ヘッドに必要なインク吸引処理等の回復動作が行われることにより、スキャンを実行できない期間が存在する。プリンタ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 printer 200 is waiting for the start of scanning, the terminal device 100 does not respond even though the terminal device 100 has transmitted the scan data acquisition request. It may be determined that a printer error has occurred. At this time, in the case of USB communication, the terminal device 100 may discard the scan request or the scan data acquisition request without transmitting the request to the printer. In some cases, the processing of the terminal device 100 continues to be occupied until the response is returned (the terminal device 100 continues to wait). Therefore, in this embodiment, the HTTP response is transmitted to the header before determining whether the scan data can be started normally. This allows the terminal device to recognize that the printer has accepted the scan data acquisition request, and suppresses the occupation of the terminal device process due to the abandonment of the scan data acquisition request and the waiting for a response to the scan data acquisition request. Can be. Also, even if the scan cannot be started normally, the terminal device 100 determines that the scan has been canceled due to the printer 200 by transmitting information indicating that there is no scan data in the body of the HTTP response. Can be. Therefore, even when it takes time until the scan data can be started or when the scan data cannot be started normally, the terminal device does not determine that an error has occurred in the application. Further, when the communication is disconnected, it is possible to normally terminate the processing such as a job error without terminating the application and determining that the error has occurred.

(実施形態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 printer 200 according to the embodiment of the present invention receives a scan data acquisition request. The flow illustrated in FIG. 6 is a flow after performing the flow illustrated in FIG. 5 described above, and is a state in which the terminal device has received a notification from the printer immediately before this flow that scanning has been started. . This flowchart is performed by the CPU 201 loading a control program stored in the ROM 202 into the RAM 203 and executing the control program.

まず、端末装置からスキャンデータ取得要求を受信する(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 terminal device 100 displays a message such as “Receiving scan data” and a progress bar indicating the progress of data reception based on the status code of the HTTP response and the reception of the header portion. Then, the progress of the progress bar advances according to the progress of the scan data reception.

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 terminal device 100 notifies the user that scanning cannot be started, based on the reception of the status code and the header portion of the HTTP response. In the present embodiment, a message “scanning could not be started” is displayed on the display unit. The present invention is not limited to this, and the user may be notified by voice, printing, or the like. Then, since the scan could not be started normally, information indicating that there is no data is transmitted as the body part of the HTTP response (S609).

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 terminal device 100 displays a message such as “Receiving scan data” and a progress bar indicating the progress of data reception based on the status code of the HTTP response and the reception of the header portion.
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 terminal device 100, the progress of the progress bar advances based on the reception of the body part of the HTTP response. If it is determined that the scanning has not been started normally, information indicating that there is no data is transmitted as the HTTP body part (S614). At this time, based on the reception of the body part of the HTTP response, the terminal device 100 ends the display of the message such as “Receiving scan data” and the progress bar without progress of the progress bar. In the present embodiment, as in the first embodiment, an HTTP response is transmitted to the header before determining whether the scan data can be transmitted normally. This makes it possible for the terminal device to recognize that the printer has received the scan data acquisition request, and suppresses the occupation of the terminal device process due to discarding the scan data acquisition request or waiting for a response to the scan data acquisition request. Further, even if the scan cannot be started normally, by transmitting information indicating that there is no scan data in the body portion of the HTTP response, the terminal device can determine that the scan has been canceled due to the printer. Therefore, even when it takes time until the scan data can be started, and even when the scan data cannot be started normally, the process can be ended while maintaining a normal state.

一方、ネットワーク通信では、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 printer 200 according to the present embodiment receives a scan execution request. This flowchart is performed by the CPU 201 loading a control program stored in the ROM 202 into the RAM 203 and executing the control program.

まず、ネットワーク通信又はUSB通信を介して、プリンタ200に接続されている端末装置からスキャンの実行要求を受信する(S701)。スキャンの実行要求には読み取りサイズや解像度等の情報が含まれている。   First, a scan execution request is received from a terminal device connected to the printer 200 via network communication or USB communication (S701). The scan execution request includes information such as the read size and the resolution.

プリンタは、スキャンの実行要求を受け付ける(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 CPU 201 loading a control program stored in the ROM 202 into the RAM 203 and executing the control program.

まず、端末装置からスキャンデータの取得要求(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 RAM 203 is small and all the scan data generated by one scan execution cannot be stored. Is mentioned. Such a printer transmits the scan data fragments stored from the RAM 203 to the terminal device in response to a scan data acquisition request from the terminal device simultaneously with the process of storing the scan data fragments generated one after another in the scan execution in the RAM 203. I do. However, if the scan data acquisition request from the terminal device is delayed, the RAM 203 may temporarily run out of space, and reading by the scanner head may be interrupted. After the interruption, the reception of the scan data acquisition request gradually starts to make room in the RAM 203, and the reading can be started again. However, when the reading is temporarily stopped, the generated scan data is compared with the scan data obtained when the reading is performed at a constant speed, and the image based on the scan data may have an image shift. The image quality obtained in this case is reduced. On the other hand, in the present embodiment, as described above, it is possible to prevent the scanning by the scanner head from stopping.

上述したように、本実施形態では、スキャンデータの取得要求を受信した際の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 Printer 201 CPU
202 ROM
203 RAM
204 reading unit 205 printing unit 206 operation display unit 207 network controller 208 USB device controller 209 CPU bus 401 OS
402 Middleware 403 Application 404 USB driver 405 USB module 406 LAN driver 407 TCP / IP module 408 HTTP module 409 IPP module 410 WSD module 411 Scan module

本発明に係る処理装置は、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応答を送信し、前記判定手段が正常に実行を開始できないと判定した場合、前記送信手段は前記実行手段の処理の実行に基づくデータを含まない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応答の一部を送信することを特徴とする請求項1に記載の処理装置。   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 starts executing the predetermined process. The processing device according to claim 1. 前記通信手段は、HTTPに従った通信をする第一の通信手段と、HTTPに従った通信をする第二の通信手段と、を有し、
前記受信手段は、前記第一の通信手段又は前記第二の通信手段を介して、所定の処理の要求を受信し、
前記受信手段が前記第一の通信手段を介して所定の処理の要求を受信した場合、前記送信手段は、前記判定手段が正常に実行を開始したと判定した場合に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:
前記第一の通信手段はネットワーク通信手段であり、前記第二の通信手段はUSB通信手段であることを特徴とする請求項1〜4のいずれか1項に記載の処理装置。   The processing device according to any one of claims 1 to 4, wherein the first communication unit is a network communication unit, and the second communication unit is a USB communication unit. 原稿を読み取る読取部をさらに有し、
前記所定の処理の要求は、スキャン要求を含み、
前記所定の処理の要求がスキャン要求である場合、前記実行手段の処理の実行に基づくデータは、スキャンデータを含むことを特徴とする請求項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に従った通信は、WSDプロトコルを用いた通信であることを特徴とする請求項1〜6のいずれか1項に記載の処理装置。   The processing device according to claim 1, wherein the communication according to the HTTP is communication using a WSD protocol. 前記HTTPに従った通信は、IPPを用いた通信であることを特徴とする請求項1〜7のいずれか1項に記載の処理装置。   The processing apparatus according to claim 1, wherein the communication based on the HTTP is communication using IPP. 通信手段を介して、外部装置から所定の処理の実行を要求するHTTP要求を受信する受信工程と、
前記受信工程において前記通信手段を介して所定の処理の要求を受信した場合、前記所定の処理の実行を完了する前に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.
請求項1〜8に記載の処理装置の各手段としてコンピュータを機能させるプログラム。   A program that causes a computer to function as each unit of the processing device according to claim 1.
JP2019143710A 2019-08-05 2019-08-05 Processing device, processing method, and program Pending JP2019216451A (en)

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)

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