JP6639614B1 - Device control method, device control program, relay device, and device control device - Google Patents
Device control method, device control program, relay device, and device control device Download PDFInfo
- Publication number
- JP6639614B1 JP6639614B1 JP2018206914A JP2018206914A JP6639614B1 JP 6639614 B1 JP6639614 B1 JP 6639614B1 JP 2018206914 A JP2018206914 A JP 2018206914A JP 2018206914 A JP2018206914 A JP 2018206914A JP 6639614 B1 JP6639614 B1 JP 6639614B1
- Authority
- JP
- Japan
- Prior art keywords
- data
- time interval
- reception
- relay
- relay device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
【課題】他の機器を介して接続された機器からの入力を、アプリケーションプログラムから容易に利用可能とする。【解決手段】入力に応じてデータを出力する入力機器が接続される中継機器とネットワークを介して接続された機器制御装置が、入力機器が中継機器から利用可能であるか否かを示す接続情報を、中継機器に対して所定の接続時間間隔で周期的に要求し、入力機器が中継機器から利用可能であることを示す接続情報を取得した場合、データの受信のための中継機器との接続を確立するとともに、データの受信を、中継機器に対して所定の受信時間間隔で周期的に要求し、受信したデータを、キーボードから入力されたテキスト情報として機器制御装置の動作を制御するオペレーティングシステムに出力するよう制御する。【選択図】図1An application program allows input from a device connected via another device to be easily used from an application program. A device control device connected via a network to a relay device to which an input device that outputs data in response to an input is connected, the connection information indicating whether the input device is available from the relay device Is periodically requested to the relay device at a predetermined connection time interval, and when connection information indicating that the input device is available from the relay device is obtained, connection with the relay device for data reception is performed. Operating system that periodically requests the relay device to receive data at predetermined reception time intervals, and controls the operation of the device control device as text information input from the keyboard. Is controlled to output to [Selection diagram] Fig. 1
Description
本発明は、機器制御方法、機器制御プログラム、中継機器および機器制御装置に関する。 The present invention relates to a device control method, a device control program, a relay device, and a device control device.
近年、店舗での会計用端末として、汎用的な機器制御装置であるタブレット端末等を用いるPOS(Point of Sale)システムが使用されている。このようなPOSシステムでは、会計用端末としての処理機能は、タブレット端末等で実行されるプログラムにより実現される。そのため、汎用的な機器制御装置を用いたPOSシステムでは、専用機器を用いたPOSシステムと比較して低廉なコストで導入可能な場合がある。 2. Description of the Related Art In recent years, a POS (Point of Sale) system using a tablet terminal or the like, which is a general-purpose device control device, has been used as an accounting terminal in a store. In such a POS system, the processing function as the accounting terminal is realized by a program executed on a tablet terminal or the like. Therefore, a POS system using a general-purpose device control device may be able to be introduced at a lower cost than a POS system using a dedicated device.
店舗での会計には顧客に渡すレシートの発行が必要であるが、汎用的な機器制御装置は通常印刷機能を有していないので、POSシステムはレシートを発行可能なプリンタを有して構成される。プリンタと汎用端末とは、有線LAN(Local Area Network)、USB(Universal Serial Bus)といった接続インタフェースを介して接続される。 It is necessary to issue receipts to customers for in-store accounting, but POS systems are configured with printers that can issue receipts, because general-purpose equipment control devices usually do not have a printing function. You. The printer and the general-purpose terminal are connected via a connection interface such as a wired LAN (Local Area Network) and a USB (Universal Serial Bus).
特許文献1には、タブレット端末に設けられたICタグを印刷装置が読み取ることにより、タブレット端末と印刷装置との通信経路を簡易に確立するPOSシステムが記載されている。 Patent Literature 1 describes a POS system in which a printing device reads an IC tag provided in a tablet terminal to easily establish a communication path between the tablet terminal and the printing device.
例えば小売店で使用されるPOSレジでは、商品に付されたバーコードを読み取るためのバーコードスキャナが接続される場合がある。また、POSレジには、クレジットカード決済のためのクレジットカードリーダおよび非接触型ICカードを読み取るためのICカードリーダといったさまざまな機器が接続され得る。 For example, in a POS register used in a retail store, a barcode scanner for reading a barcode attached to a product may be connected. Various devices such as a credit card reader for credit card settlement and an IC card reader for reading a non-contact type IC card can be connected to the POS register.
機器が取得するデータは、情報処理装置に入力され、会計処理に使用される。情報処理装置の接続インタフェースは限られているため、こうした機器は、プリンタに設けられた接続インタフェースを介して情報処理装置に接続されるのが好ましい。 Data acquired by the device is input to the information processing device and used for accounting processing. Since the connection interface of the information processing device is limited, it is preferable that such a device is connected to the information processing device via a connection interface provided in the printer.
本発明は、他の機器を介して接続された機器からの入力を、アプリケーションプログラムから容易に利用可能とする、機器制御方法、機器制御プログラム、中継機器および機器制御装置を提供することを目的とする。 An object of the present invention is to provide a device control method, a device control program, a relay device, and a device control device that can easily use an input from a device connected via another device from an application program. I do.
本発明にかかる機器制御方法は、入力に応じてデータを出力する入力機器が接続される中継機器とネットワークを介して接続された機器制御装置が、入力機器が中継機器から利用可能であるか否かを示す接続情報を、中継機器に対して所定の接続時間間隔で周期的に要求し、入力機器が中継機器から利用可能であることを示す接続情報を取得した場合、データの受信のための中継機器との接続を確立するとともに、データの受信を、中継機器に対して所定の受信時間間隔で周期的に要求し、受信したデータを、キーボードから入力されたテキスト情報として、機器制御装置の動作を制御するオペレーティングシステムに出力する、ことを含むことを特徴とする。 The device control method according to the present invention provides a device control device connected via a network to a relay device to which an input device that outputs data in accordance with an input is connected, and determines whether the input device is usable from the relay device. Requesting the relay device periodically at a predetermined connection time interval from the relay device, and obtaining the connection information indicating that the input device is available from the relay device. Establish a connection with the relay device, periodically request the relay device to receive data at a predetermined reception time interval, and receive the received data as text information input from the keyboard. Outputting to an operating system that controls the operation.
また、本発明にかかる機器制御方法において、データの受信の要求に応じてデータを受信しなかった後の受信時間間隔は、データの受信の要求に応じてデータを受信した後の受信時間間隔よりも大きいことが好ましい。 Further, in the device control method according to the present invention, the reception time interval after not receiving data in response to the data reception request is longer than the reception time interval after receiving data in response to the data reception request. Is also preferably large.
また、本発明にかかる機器制御方法において、データの受信の要求に応じて連続してデータを受信しなかった回数が所定の閾値を超えた後にデータの受信の要求に応じてデータを受信しなかった後の受信時間間隔は、データの受信の要求に応じて連続してデータを受信しなかった回数が所定の閾値を超える前にデータの受信の要求に応じてデータを受信しなかった後の受信時間間隔よりも大きいことが好ましい。 Further, in the device control method according to the present invention, after the number of times data has not been continuously received in response to the data reception request exceeds the predetermined threshold, the data is not received in response to the data reception request. After the reception time interval, after the number of times data was not received continuously in response to the request for data reception after the data was not received in response to the request for data reception before exceeding a predetermined threshold value Preferably, it is larger than the reception time interval.
また、本発明にかかる機器制御方法において、接続時間間隔は、受信時間間隔よりも大きいことが好ましい。 In the device control method according to the present invention, the connection time interval is preferably longer than the reception time interval.
また、本発明にかかる機器制御方法では、接続情報の要求において、SNMP(Simple Network Management Protocol)を用いて接続情報を要求することが好ましい。 In the device control method according to the present invention, it is preferable that the connection information is requested using SNMP (Simple Network Management Protocol).
本発明にかかる機器制御プログラムは、入力に応じてデータを出力する入力機器が接続される中継機器とネットワークを介して接続された機器制御装置に、入力機器が中継機器から利用可能であるか否かを示す接続情報を、中継機器に対して所定の接続時間間隔で周期的に要求し、入力機器が中継機器から利用可能であることを示す接続情報を取得した場合、データの受信のための中継機器との接続を確立するとともに、データの受信を、中継機器に対して所定の受信時間間隔で周期的に要求し、受信したデータを、キーボードから入力されたテキスト情報として、機器制御装置の動作を制御するオペレーティングシステムに出力する、ことを実行させることを特徴とする。 The device control program according to the present invention provides a device control device connected via a network to a relay device to which an input device that outputs data in accordance with an input is connected, and determines whether the input device is available from the relay device. Requesting the relay device periodically at a predetermined connection time interval from the relay device, and obtaining the connection information indicating that the input device is available from the relay device. Establish a connection with the relay device, periodically request the relay device to receive data at a predetermined reception time interval, and receive the received data as text information input from the keyboard. Outputting to an operating system for controlling the operation.
本発明にかかる中継機器は、機器制御装置とネットワークを介して接続された中継機器であって、入力に応じてデータを出力する入力機器が利用可能であるか否かに応じて接続情報を更新する接続情報更新部と、機器制御装置から接続情報の要求を受信した場合、更新された接続情報に基づいて機器制御装置に応答する接続情報応答部と、接続された入力機器から出力されたデータを取得するデータ取得部と、機器制御装置からデータの要求を受信した場合、データ取得部が取得したデータを機器制御装置に送信するデータ送信部と、を備えることを特徴とする。 A relay device according to the present invention is a relay device connected to a device control device via a network, and updates connection information according to whether or not an input device that outputs data according to input is available. A connection information updating unit, a connection information response unit that responds to the device control device based on the updated connection information when a connection information request is received from the device control device, and data output from the connected input device. And a data transmission unit for transmitting the data acquired by the data acquisition unit to the device control device when a data request is received from the device control device.
本発明にかかる機器制御装置は、入力に応じてデータを出力する入力機器が接続される中継機器とネットワークを介して接続された機器制御装置であって、入力機器が中継機器から利用可能であるか否かを示す接続情報を、中継機器に対して所定の接続時間間隔で周期的に要求する接続情報要求部と、入力機器が中継機器から利用可能であることを示す接続情報を取得した場合、データの受信のための中継機器との接続を確立するとともに、データの受信を、中継機器に対して所定の受信時間間隔で周期的に要求するデータ要求部と、受信したデータを、キーボードから入力されたテキスト情報として機器制御装置の動作を制御するオペレーティングシステムに出力する内部出力部と、を備えることを特徴とする。 The device control device according to the present invention is a device control device connected via a network to a relay device to which an input device that outputs data according to an input is connected, and the input device can be used from the relay device. A connection information requesting unit that periodically requests connection information indicating whether or not the relay device is at a predetermined connection time interval, and connection information indicating that the input device is available from the relay device. Establish a connection with the relay device for data reception, and periodically request data reception from the relay device at a predetermined reception time interval. An internal output unit that outputs the input text information to an operating system that controls the operation of the device control device.
本発明の機器制御方法、機器制御プログラム、中継機器および機器制御装置によれば、他の機器を介して接続された機器からの入力を、アプリケーションプログラムから容易に利用可能とすることができる。 According to the device control method, the device control program, the relay device, and the device control device of the present invention, an input from a device connected via another device can be easily used from an application program.
以下、図面を参照して機器制御方法、機器制御プログラム、中継機器および機器制御装置について詳細に説明する。ただし、本発明は図面または以下に記載される実施形態に限定されないことを理解されたい。 Hereinafter, a device control method, a device control program, a relay device, and a device control device will be described in detail with reference to the drawings. However, it should be understood that the invention is not limited to the drawings or the embodiments described below.
本発明の機器制御装置は、中継機器とネットワークを介して接続されている。中継機器は、入力に応じてデータを出力する入力機器と接続される。機器制御装置は、中継機器に入力機器が接続されていない場合、入力機器が中継機器に接続されたか否かを示す接続情報を、中継機器に対して所定の接続時間間隔で要求する。機器制御装置は、中継機器に入力機器が接続されたことを示す接続情報を取得した場合、データのための第1装置との接続を確立する。また、機器制御装置は、データの受信を、中継機器に対して所定の受信時間間隔で周期的に要求する。機器制御装置は、受信したデータを、キーボードから入力されたテキスト情報としてオペレーティングシステムに出力する。 The device control device of the present invention is connected to a relay device via a network. The relay device is connected to an input device that outputs data according to an input. When the input device is not connected to the relay device, the device control device requests connection information indicating whether the input device is connected to the relay device to the relay device at a predetermined connection time interval. When acquiring the connection information indicating that the input device is connected to the relay device, the device control device establishes a connection with the first device for data. Also, the device control device periodically requests the relay device to receive data at a predetermined reception time interval. The device control device outputs the received data to the operating system as text information input from the keyboard.
本発明の機器制御装置において、データの受信に失敗した後の受信時間間隔は、データの受信に成功した後の受信時間間隔よりも大きい。 In the device control device of the present invention, the reception time interval after the data reception has failed is greater than the reception time interval after the data reception has succeeded.
これにより、本発明の機器制御装置は、他の機器を介して接続された機器からの入力を情報処理装置のアプリケーションプログラムから容易に利用可能となる。 Thus, the device control device of the present invention can easily use an input from a device connected via another device from an application program of the information processing device.
図1は、機器制御装置の動作概要を説明する図である。 FIG. 1 is a diagram illustrating an operation outline of the device control device.
機器制御装置1は、有線ネットワークを介して中継機器であるプリンタ2と接続される。プリンタ2は、USBインタフェースを介して入力機器であるバーコードスキャナ3と接続される。
The device control device 1 is connected to a
機器制御装置1は、機器制御装置1のハードウェア資源を抽象化して共通的な手続によるアクセスを可能にするインタフェース(API:Application Programming Interface)をアプリケーションプログラムに提供する、オペレーティングシステムを有する。 The device control device 1 has an operating system that provides an application program with an interface (API: Application Programming Interface) that abstracts hardware resources of the device control device 1 and enables access by a common procedure.
機器制御装置1は、バーコードの読み取りに応じてバーコードスキャナ3が出力するデータ「987654321098」を、プリンタ2を介して受信する。機器制御装置1は、受信したデータを、キーボードから入力されたテキスト情報としてオペレーティングシステムに出力する。
The device control device 1 receives the data “987654321098” output from the barcode scanner 3 in response to the reading of the barcode via the
すなわち、機器制御装置1で動作するアプリケーションプログラムは、プリンタ2を介して接続されたバーコードスキャナ3の入力情報を、キーボードからの入力情報としてオペレーティングシステムから受け取り、利用することができる。
That is, the application program running on the device control device 1 can receive and use the input information of the barcode scanner 3 connected via the
これにより、本発明の機器制御装置1は、プリンタ2を介して接続されたバーコードスキャナ3からの入力を、アプリケーションプログラムから容易に利用可能とする。
Thereby, the device control device 1 of the present invention makes it possible to easily use the input from the barcode scanner 3 connected via the
また、機器制御装置1は、バーコードスキャナ3がプリンタ2に接続されていない場合、バーコードスキャナ3がプリンタ2に接続されたか否かを示す接続情報を、プリンタ2に対して所定の接続時間間隔で周期的に要求する。プリンタ2は、機器制御装置1からの要求に応じて、接続情報を送信する。
When the barcode scanner 3 is not connected to the
バーコードスキャナ3がプリンタ2に接続されたことを示す接続情報をプリンタ2から取得した場合、機器制御装置1は、まず、データの受信のためのプリンタ2との接続を確立する。そして、機器制御装置1は、データの受信をプリンタ2に対して所定の受信時間間隔で周期的に要求する。
When the connection information indicating that the barcode scanner 3 has been connected to the
図1の例では、機器制御装置1は、時刻t11にデータ要求を行い、データの受信に成功する。その後、機器制御装置1は、時刻t12にデータ要求を行う。このときの受信時間間隔RI1は、t12-t11で表される。 In the example of FIG. 1, the device control apparatus 1 performs a data request to the time t 11, successfully receives the data. Then, the device control apparatus 1 performs a data request to the time t 12. Reception time interval RI 1 at this time is expressed by t 12 -t 11.
また、機器制御装置1は、時刻t21にデータ要求を行い、データの受信に失敗する。その後、機器制御装置1は、時刻t22にデータ要求を行う。このときの受信時間間隔RI2は、t22-t21で表される。 Further, the device control apparatus 1 performs a data request to the time t 21, it fails to receive the data. Then, the device control apparatus 1 performs a data request to the time t 22. Receive time interval RI 2 at this time is expressed by t 22 -t 21.
データの受信に失敗した後の受信時間間隔RI2は、データの受信に成功した後の受信時間間隔RI1よりも大きい。 Receive time interval RI 2 after a failed reception of the data is greater than the reception time interval RI 1 after successful reception of the data.
通常、バーコードスキャナ3を用いたバーコードの読み取りは、断続的に行われる。すなわち、バーコードスキャナ3がバーコードの読み取り行わない時間が継続的に存在する。このような時間に小さい時間間隔でバーコードスキャナ3のデータ要求を行っても、有効なデータを取得することができない。 Usually, reading of a barcode using the barcode scanner 3 is performed intermittently. That is, there is a continuous time period during which the barcode scanner 3 does not read the barcode. Even if the barcode scanner 3 requests data at such a small time interval, valid data cannot be obtained.
したがって、上述のように動作することにより、機器制御装置1は、効率よくデータの読み取りを実行し、消費電力とネットワークのトラフィックを削減することができる。 Therefore, by operating as described above, the device control device 1 can efficiently read data, and reduce power consumption and network traffic.
図2は、機器制御装置の概略構成を示す模式図である。 FIG. 2 is a schematic diagram illustrating a schematic configuration of the device control device.
機器制御装置1は、入力に応じてデータを出力するバーコードスキャナ3が接続されるプリンタ2とネットワークを介して接続し、バーコードスキャナ3が出力するデータをプリンタ2から受信する。そのために、機器制御装置1は、制御通信部11と、制御記憶部12と、制御操作部13と、制御表示部14と、制御処理部15とを備える。
The device control device 1 is connected via a network to a
本実施形態では、機器制御装置1としてタブレット端末を想定するが、本発明の実施形態はこれに限定されない。機器制御装置1は、例えば、パーソナルコンピュータ(Personal Computer, PC)、多機能携帯電話(いわゆる「スマートフォン」)などの情報処理装置であってよい。 In the present embodiment, a tablet terminal is assumed as the device control device 1, but the embodiment of the present invention is not limited to this. The device control device 1 may be, for example, an information processing device such as a personal computer (Personal Computer, PC) and a multifunctional mobile phone (so-called “smartphone”).
制御通信部11は、通信インタフェース回路を備え、機器制御装置1をネットワークに接続する。制御通信部11は、制御処理部15から供給されたデータを、ネットワークを介してプリンタ2等に送信する。また、制御通信部11は、ネットワークを介してプリンタ2等から受信したデータを制御処理部15に供給する。
The
制御通信部11が機器制御装置1を接続するネットワークは、例えばTCP/IP(Transport Control Protocol / Internet Protocol)による通信が行われるインターネットである。ネットワーク5より通信する機器は、有線または無線によって接続される。
The network to which the
制御記憶部12は、例えば、半導体メモリ装置を備える。制御記憶部12は、制御処理部15での処理に用いられるオペレーティングシステムプログラム、ドライバプログラム、アプリケーションプログラム、データ等を記憶する。例えば、制御記憶部12は、ドライバプログラムとして、制御操作部13を制御する入力デバイスドライバプログラムや、制御表示部14を制御する出力デバイスドライバプログラム等を記憶する。また、制御記憶部12は、所定の処理にかかる一時的なデータを一時的に記憶してもよい。
The
制御操作部13は、機器制御装置1の操作が可能であればどのようなデバイスでもよく、例えば、タッチパネルやキーボタン等である。ユーザは、制御操作部13を用いて、文字や数字、記号等を入力することができる。制御操作部13は、ユーザにより操作されると、その操作に対応する信号を発生する。そして、発生した信号は、ユーザの指示として制御処理部15に供給される。
The
制御表示部14は、映像や画像等の表示が可能であればどのようなデバイスでもよく、例えば、液晶ディスプレイや有機EL(Electro-Luminescence)ディスプレイ等である。制御表示部14は、制御処理部15から供給された映像データに応じた映像や、画像データに応じた画像等を表示する。
The
制御処理部15は、1以上のプロセッサおよびその周辺回路を備える。制御処理部15は、機器制御装置1の全体的な動作を統括的に制御するものであり、例えば、CPU(Central Processing Unit)である。制御処理部15は、機器制御装置1の各種処理が制御記憶部12に記憶されているプログラムや制御操作部13への操作等に基づいて適切な手段で実行されるように、制御通信部11や制御表示部14等の動作を制御する。制御処理部15は、制御記憶部12に記憶されているプログラム(オペレーティングシステムプログラム、ドライバプログラム、アプリケーションプログラム等)に基づいて処理を実行する。また、制御処理部15は、複数のプログラム(アプリケーションプログラム等)を並列に実行することができる。
The
制御処理部15は、少なくともオペレーティングシステム部151、接続情報要求部152、データ要求部153、内部出力部154等を備える。これらの各部は、制御処理部15が備えるプロセッサで実行されるプログラムにより実現される機能モジュールである。あるいは、これらの各部は、ファームウェアとして機器制御装置1に実装されてもよい。
The
図3は、プリンタの概略構成を示す模式図である。 FIG. 3 is a schematic diagram showing a schematic configuration of the printer.
プリンタ2は、ネットワークを介して機器制御装置1に接続されている。プリンタ2は、さらにバーコードスキャナ3に接続され、バーコードスキャナ3の出力するデータを機器制御装置1に中継する。そのために、プリンタ2は、中継通信部21と、中継接続部22と、中継記憶部23と、プリンタ部24と、中継処理部25とを備える。
The
中継通信部21は、通信インタフェース回路を備え、プリンタ2をネットワークに接続する。中継通信部21は、中継処理部25から供給されたデータを、ネットワークを介して機器制御装置1に送信する。
The
中継接続部22は、USBインタフェースを備え、バーコードスキャナ3を接続して制御する。中継接続部22は、バーコードスキャナ3から受信したデータを中継処理部25に供給する。
The
中継記憶部23は、例えば半導体メモリ装置を備える。中継記憶部23は、中継処理部25での処理に用いられるオペレーティングシステムプログラム、ドライバプログラム、アプリケーションプログラム、データ等を記憶する。例えば、中継記憶部23は、ドライバプログラムとして、中継通信部21を制御する通信デバイスドライバプログラム等を記憶する。また、中継記憶部23は、所定の処理にかかる一時的なデータを一時的に記憶してもよい。
The
プリンタ部24は、所定の用紙への印刷を実行する。プリンタ部24は、感熱紙である用紙の所定の領域を加熱することにより印刷を行うサーマルプリンタ装置である。また、プリンタ部24は、用紙の所定の領域にインク滴を射出して印刷を行うインクジェットプリンタ装置等であってもよい。 The printer unit 24 performs printing on a predetermined sheet. The printer unit 24 is a thermal printer device that performs printing by heating a predetermined area of a thermal paper. Further, the printer unit 24 may be an ink jet printer or the like that performs printing by ejecting ink droplets to a predetermined area of a sheet.
中継処理部25は、1以上のプロセッサおよびその周辺回路を備える。中継処理部25は、プリンタ2の全体的な動作を統括的に制御するものであり、例えば、CPUである。中継処理部25は、プリンタ2の各種処理が中継記憶部23に記憶されているプログラム等に基づいて適切な手段で実行されるように、中継通信部21等の動作を制御する。中継処理部25は、中継記憶部23に記憶されているプログラム(オペレーティングシステムプログラム、ドライバプログラム、アプリケーションプログラム等)に基づいて処理を実行する。
The
中継処理部25は、少なくとも接続情報更新部251、接続情報応答部252、データ取得部253、データ送信部254等を備える。これらの各部は、中継処理部25が備えるプロセッサで実行されるプログラムにより実現される機能モジュールである。あるいは、これらの各部は、ファームウェアとして機器制御装置1に実装されてもよい。
The
接続情報更新部251は、バーコードスキャナ3が中継接続部22に接続されているか否かに応じて、中継記憶部23に記憶される接続情報を更新する。
The connection
接続情報応答部252は、機器制御装置1から接続情報の要求を受信した場合、中継記憶部23に記憶され接続情報更新部251に更新された接続情報に基づいて、機器制御装置1に応答する。
When receiving the connection information request from the device control device 1, the connection
データ取得部253は、中継接続部22に接続されたバーコードスキャナ3から出力されたデータを取得し、中継記憶部23に記憶させる。
The
データ送信部254は、機器制御装置1からデータの要求を受信した場合、データ取得部253が取得し中継記憶部23に記憶されたデータを、機器制御装置1に送信する。
When receiving the data request from the device control device 1, the
図4は、機器制御装置の処理フローチャートである。 FIG. 4 is a processing flowchart of the device control device.
処理フローチャートに示す各処理は、制御記憶部12に記憶されたプログラムに従って、制御処理部15が、制御通信部11、制御記憶部12といった機器制御装置1の構成要素と協働しながら実行する。
Each process shown in the process flowchart is executed by the
まず、接続情報要求部152は、バーコードスキャナ3がプリンタ2から利用可能であるか否かを示す接続情報を、プリンタ2に対して要求する(ステップS10)。
First, the connection
バーコードスキャナ3がプリンタ2に有線または無線により電気的に接続されていない場合、接続情報は、バーコードスキャナ3がプリンタ2から利用可能でないことを示す。また、バーコードスキャナ3がプリンタ2に有線または無線により電気的に接続されていても、例えばバーコードスキャナ3が他の端末から使用されている場合、プリンタ2からは利用可能ではない。このような場合も接続情報はバーコードスキャナ3がプリンタ2から利用可能でないことを示す。
When the barcode scanner 3 is not electrically connected to the
次に、接続情報要求部152は、バーコードスキャナ3がプリンタ2から利用可能であることを示す接続情報を取得したか否かを判定する(ステップS11)。
Next, the connection
利用可能であることを示す接続情報を取得したと判定された場合(ステップS11:Y)、データ要求部153は、データの受信のためのプリンタ2との接続を確立する(ステップS12)。具体的には、データ要求部153は、特定の目的でアプリケーションプログラムが通信を行うときのプログラムインタフェースであるソケットの作成を、オペレーティングシステム部151に要求する。
When it is determined that the connection information indicating that it is available has been acquired (step S11: Y), the
オペレーティングシステム部151は、機器制御装置1のハードウェア資源を利用するための共通的なインタフェースを、機器制御装置1で動作するアプリケーションプログラムに提供する。データ要求部153の要求に基づいてオペレーティングシステム部151がソケットを作成することにより、機器制御装置1とプリンタ2との間の接続が確立され、データ要求部153はプリンタ2からのデータを取得可能となる。
The
利用可能であることを示す接続情報を取得したと判定されない場合(ステップS11:N)、接続情報要求部152は、接続時間間隔が経過したか否かを判定する(ステップS13)。接続時間間隔は予め設定された時間間隔であり、例えばl000ミリ秒である。接続時間間隔は、機器制御装置1のユーザが、所定の範囲(例えば1000ミリ秒〜60000ミリ秒)で設定可能である。
When it is not determined that the connection information indicating that the connection is available has been acquired (step S11: N), the connection
接続情報要求部152は、接続時間間隔が経過していないと判定した場合(ステップS13:N)、ステップS13を繰り返して待機する。接続情報要求部152は、接続時間間隔が経過したと判定した場合(ステップS13:Y)、ステップS10に戻り、プリンタ2に接続情報の要求を行う。
When determining that the connection time interval has not elapsed (step S13: N), the connection
なお、図示していないが、ステップS12に続いてプリンタ2との接続の確立に失敗したか否かの判定を実行し、失敗したと判定された場合に、ステップS13に遷移して接続時間経過後にプリンタ2に接続情報の要求を行うなどのリトライ処理を実行してもよい。
Although not shown, after step S12, it is determined whether or not the connection with the
データ接続を確立した後、データ要求部153は、プリンタ2に対してデータの受信を要求する(ステップS14)。そして、データ要求部153は、データの受信の要求に応じてデータを受信したか否かを判定する(ステップS15)。
After establishing the data connection, the
データを受信したと判定された場合(ステップS15:Y)、内部出力部154は、受信したデータを、キーボードから入力されたテキスト情報としてオペレーティングシステム部151に出力する(ステップS16)。これにより、機器制御装置1で動作するアプリケーションプログラムは、プリンタ2を介して接続されたバーコードスキャナ3から入力されたデータを、キーボードから入力されたテキスト情報としてオペレーティングシステム部151から受け取ることができる。
When it is determined that the data has been received (step S15: Y), the
次に、データ要求部153は、受信時間間隔t1が経過したか否かを判定する(ステップS17)。受信時間間隔t1は予め設定された時間間隔であり、例えばl00ミリ秒である。受信時間間隔t1は、機器制御装置1のユーザが、所定の範囲(例えば100ミリ秒〜1000ミリ秒)で設定可能である。
Next, the
データ要求部153は、受信時間間隔t1が経過していないと判定した場合(ステップS17:N)、ステップS17を繰り返して待機する。データ要求部153は、受信時間間隔t1が経過したと判定した場合(ステップS17:Y)、ステップS14に戻り、プリンタ2にデータの受信を要求する。
ステップS15においてデータを受信したと判定されない場合(ステップS15:N)、データ要求部153は、受信時間間隔t2が経過したか否かを判定する(ステップS18)。受信時間間隔t2は、受信時間間隔t1よりも大きい予め設定された時間間隔であり、例えば200ミリ秒である。受信時間間隔t2は、機器制御装置1のユーザが、所定の範囲(例えばt1〜1000ミリ秒)で設定可能である。また、受信時間間隔t2は、設定されたt1との関係式(例えばt2=t1×2)に基づいて設定されてもよい。
If in step S15 it is not determined that it has received the data (step S15: N), the
データ要求部153は、受信時間間隔t2が経過していないと判定した場合(ステップS18:N)、ステップS18を繰り返して待機する。データ要求部153は、受信時間間隔t2が経過したと判定した場合(ステップS18:Y)、ステップS14に戻り、プリンタ2にデータの受信を要求する。
ステップS10からステップS18までの一連の処理が、機器制御装置1の起動中に繰り返し実行される。 A series of processes from step S10 to step S18 is repeatedly executed while the device control device 1 is running.
このような処理を実行することにより、機器制御装置1は、プリンタ2を介して接続されたバーコードスキャナ3からの入力を、アプリケーションプログラムから容易に利用可能とする。
By executing such processing, the device control device 1 can easily use the input from the barcode scanner 3 connected via the
なお、ステップS10における、接続情報要求部152による接続情報の要求は、IPネットワーク上の機器を監視するための通信方法としてRFC 3411等に定義されるSNMP(Simple Network Management Protocol)に基づいて行なわれてよい。
Note that the request for connection information by the connection
すなわち、機器制御装置1はSNMPにおけるマネージャとなり、SNMPにおけるエージェントであるプリンタ2に対してリクエストを送信する。プリンタ2は、リクエストに応じてレスポンスを機器制御装置1に送信する。
That is, the device control device 1 becomes a manager in SNMP and transmits a request to the
プリンタ2は、中継記憶部23に、管理情報ベース(MIB、Management Information Base)を記憶する。管理情報ベースには、プリンタ2へのバーコードスキャナ3の接続の有無を含むさまざまな管理情報がツリー構造で記憶される。
The
機器制御装置1は、プリンタ2へのバーコードスキャナ3の接続の有無を示す管理情報の管理情報ベースにおける位置を示すオブジェクトIDを指定したリクエストを送信する。そして、このリクエストに対するプリンタ2のレスポンスを受信することで、接続情報を取得することができる。
The device control device 1 transmits a request specifying an object ID indicating a position in the management information base of management information indicating whether or not the barcode scanner 3 is connected to the
図5は、機器制御装置の他の処理フローチャートである。 FIG. 5 is another processing flowchart of the device control device.
機器制御装置1は、図4に示す処理フローチャートの他に、図5に示す処理フローチャートに従って一連の処理を実行してもよい。 The device control device 1 may execute a series of processes according to the process flowchart shown in FIG. 5 in addition to the process flowchart shown in FIG.
図5に示す処理フローチャートのうち、ステップS20〜S25、S27〜S29は、図4に示す処理フローチャートにおけるステップS10〜S15、S16〜S18と同様である。図4に示す処理フローチャートと同様の処理ステップの説明は省略する。 In the processing flowchart shown in FIG. 5, steps S20 to S25 and S27 to S29 are the same as steps S10 to S15 and S16 to S18 in the processing flowchart shown in FIG. A description of the same processing steps as those in the processing flowchart shown in FIG. 4 will be omitted.
ステップS25において、データを受信したと判定された場合(ステップS25:Y)、データ要求部153は受信したデータがあるか否かを判定する(ステップS26)。受信したデータがあると判定された場合(ステップS26:Y)、ステップS27に遷移し、内部出力部154が受信したデータを内部出力する。一方、ステップS26において、受信したデータがあると判定されない場合(ステップS26:N)、ステップS29に遷移し、データ要求部153は受信時間間隔t2の経過後にステップS24に遷移する。
If it is determined in step S25 that data has been received (step S25: Y), the
図5に示す処理フローチャートを実行することにより、機器制御装置1は、受信したデータ量がない、すなわちバーコードの読み取りが行われていない状況でのデータ受信間隔を長くする。このため、機器制御装置1は、プリンタ2およびバーコードスキャナ3の消費電力とネットワークのトラフィックを削減することができる。
By executing the processing flowchart illustrated in FIG. 5, the device control apparatus 1 lengthens the data reception interval when there is no received data amount, that is, when the barcode is not read. Therefore, the device control device 1 can reduce the power consumption of the
図6は、機器制御装置の他の処理フローチャートである。 FIG. 6 is another processing flowchart of the device control device.
機器制御装置1は、図4および図5に示す処理フローチャートの他に、図6に示す処理フローチャートに従って一連の処理を実行してもよい。 The device control apparatus 1 may execute a series of processing according to the processing flowchart illustrated in FIG. 6 in addition to the processing flowchart illustrated in FIGS. 4 and 5.
図6に示す処理フローチャートのうち、ステップS30〜S36、S38は、図5に示す処理フローチャートにおけるステップS20〜S26、S28と同様である。図5に示す処理フローチャートと同様の処理ステップの説明は省略する。 In the processing flowchart shown in FIG. 6, steps S30 to S36 and S38 are the same as steps S20 to S26 and S28 in the processing flowchart shown in FIG. A description of the same processing steps as those in the processing flowchart illustrated in FIG. 5 will be omitted.
ステップS36において受信したデータ量があると判定された場合(ステップS36:Y)、内部出力部154は、受信したデータを内部出力するとともに、受信したデータ量がなかった回数の値を初期化する(ステップS37)。受信したデータ量がなかった回数の値については、後述する。
When it is determined in step S36 that the received data amount is present (step S36: Y), the
受信したデータ量があると判定されない場合(ステップS36:N)、データ要求部153は、後述する受信遅延処理を実行し(ステップS39)する。そして、データ要求部153は、ステップS34に遷移し、プリンタ2にデータの受信を要求する。
When it is not determined that there is the received data amount (step S36: N), the
図7は、機器制御装置の受信遅延処理のフローチャートである。 FIG. 7 is a flowchart of the reception delay process of the device control device.
機器制御装置1のデータ要求部153は、受信時間間隔t2が経過したか否かを判定する(ステップS391)。データ要求部153は、受信時間間隔t2が経過していないと判定した場合(ステップS391:N)、ステップS391を繰り返して待機する。
受信時間間隔t2が経過したと判定した場合(ステップS391:Y)、データ要求部153は、連続して受信したデータ量がなかった回数が所定の閾値nよりも小さいか否かを判定する(ステップS392)。連続して受信したデータ量がなかった回数は、機器制御装置1の処理開始時に、初期値として0が設定されている。
If it is determined that the reception time interval t 2 has elapsed (step S391: Y),
連続して受信したデータ量がなかった回数がnよりも小さいと判定された場合(ステップS392:Y)、データ要求部153は、連続して受信したデータ量がなかった回数に1加算し(ステップS393)、受信遅延処理を終了する。
When it is determined that the number of times that there is no continuously received data amount is smaller than n (step S392: Y), the
ステップS391において連続して受信したデータ量がなかった回数がnよりも小さいと判定されない場合(ステップS391:N)、データ要求部153は、受信時間間隔t3が経過したか否かを判定する(ステップS394)。受信時間間隔t3は、予め設定された時間間隔であり、例えば200ミリ秒である。受信時間間隔t3は、機器制御装置1のユーザが、所定の範囲(例えば0〜1000ミリ秒)で設定可能である。受信時間間隔t3は、受信時間間隔t2と同じ時間間隔であってもよく、異なる時間間隔であってもよい。
If the number was not the amount of data consecutively received in step S391 is not determined to be smaller than n (step S391: N), the
データ要求部153は、受信時間間隔t3が経過していないと判定した場合(ステップS394:N)、ステップS394を繰り返して待機する。データ要求部153は、受信時間間隔t3が経過したと判定した場合(ステップS394:Y)、受信遅延処理を終了する。
図6および図7に示す処理フローチャートを実行することにより、機器制御装置1は、受信したデータ量がない、すなわちバーコードの読み取りが行われていない状況が連続している場合のデータ受信間隔を長くする。このため、機器制御装置1は、プリンタ2およびバーコードスキャナ3の消費電力とネットワークのトラフィックを削減することができる。
By executing the processing flowcharts illustrated in FIGS. 6 and 7, the device control apparatus 1 determines the data reception interval when there is no received data amount, that is, when the bar code is not read continuously. Lengthen. Therefore, the device control device 1 can reduce the power consumption of the
当業者は、本発明の精神および範囲から外れることなく、種々の変更、置換および修正をこれに加えることが可能であることを理解されたい。 It should be understood that those skilled in the art can make various changes, substitutions and modifications without departing from the spirit and scope of the invention.
1 機器制御装置
152 接続情報要求部
153 データ要求部
154 内部出力部
2 プリンタ
3 バーコードスキャナ
DESCRIPTION OF SYMBOLS 1
Claims (4)
前記入力機器が前記中継機器から利用可能であるか否かを示す接続情報を、前記中継機器に対して所定の接続時間間隔で周期的に要求し、
前記入力機器が前記中継機器から利用可能であることを示す接続情報を取得した場合、前記データの受信のための前記中継機器との接続を確立するとともに、前記データの受信を、前記中継機器に対して所定の受信時間間隔で周期的に要求し、
受信した前記データを、前記機器制御装置の動作を制御するオペレーティングシステムに出力する、ことを含み、
前記データの受信の要求に応じてデータを受信しなかった後の前記受信時間間隔は、前記データの受信の要求に応じてデータを受信した後の前記受信時間間隔よりも大きい、
機器制御方法。 A device control device connected via a network to a relay device to which an input device that outputs data according to input is connected,
Connection information indicating whether the input device is available from the relay device, periodically requests the relay device at a predetermined connection time interval,
When the input device obtains connection information indicating that it is available from the relay device, establishes a connection with the relay device for reception of the data, and receives the data to the relay device. Request periodically at a predetermined reception time interval,
Outputting the received data to an operating system that controls the operation of the device control device ,
The reception time interval after not receiving data in response to the data reception request is greater than the reception time interval after receiving data in response to the data reception request,
Equipment control method.
前記入力機器が前記中継機器から利用可能であるか否かを示す接続情報を、前記中継機器に対して所定の接続時間間隔で周期的に要求し、
前記入力機器が前記中継機器から利用可能であることを示す接続情報を取得した場合、前記データの受信のための前記中継機器との接続を確立するとともに、前記データの受信を、中継機器に対して所定の受信時間間隔で周期的に要求し、
受信した前記データを、前記機器制御装置の動作を制御するオペレーティングシステムに出力し、
前記データの受信の要求に応じてデータを受信しなかった後の前記受信時間間隔は、前記データの受信の要求に応じてデータを受信した後の前記受信時間間隔よりも大きい、
ことを実行させる、機器制御プログラム。 A device control device connected via a network to a relay device to which an input device that outputs data according to an input is connected,
Connection information indicating whether the input device is available from the relay device, periodically requests the relay device at a predetermined connection time interval,
If the input device has obtained connection information indicating that it is available from the relay device, establishes a connection with the relay device for receiving the data, and receives the data to the relay device. Request periodically at predetermined reception time intervals,
The received data is output to an operating system that controls the operation of the device control device ,
The reception time interval after not receiving data in response to the data reception request is greater than the reception time interval after receiving data in response to the data reception request,
An equipment control program that lets you do things.
前記入力機器が前記中継機器から利用可能である否かを示す接続情報を、前記中継機器に対して所定の接続時間間隔で周期的に要求する接続情報要求部と、
前記入力機器が前記中継機器から利用可能であることを示す接続情報を取得した場合、前記データの受信のための前記中継機器との接続を確立するとともに、前記データの受信を、前記中継機器に対して所定の受信時間間隔で周期的に要求するデータ要求部と、
受信した前記データを、前記機器制御装置の動作を制御するオペレーティングシステムに出力する内部出力部と、を備え、
前記データの受信の要求に応じてデータを受信しなかった後の前記受信時間間隔は、前記データの受信の要求に応じてデータを受信した後の前記受信時間間隔よりも大きい、
機器制御装置。 An apparatus control device connected via a network to a relay device to which an input device that outputs data according to an input is connected,
A connection information requesting unit that periodically requests connection information indicating whether the input device is available from the relay device at a predetermined connection time interval to the relay device,
When the input device obtains connection information indicating that it is available from the relay device, establishes a connection with the relay device for reception of the data, and receives the data to the relay device. A data request unit that periodically requests the data at a predetermined reception time interval,
An internal output unit that outputs the received data to an operating system that controls the operation of the device control device ,
The reception time interval after not receiving data in response to the data reception request is greater than the reception time interval after receiving data in response to the data reception request,
Equipment control device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018206914A JP6639614B1 (en) | 2018-11-01 | 2018-11-01 | Device control method, device control program, relay device, and device control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018206914A JP6639614B1 (en) | 2018-11-01 | 2018-11-01 | Device control method, device control program, relay device, and device control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP6639614B1 true JP6639614B1 (en) | 2020-02-05 |
JP2020071785A JP2020071785A (en) | 2020-05-07 |
Family
ID=69320878
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018206914A Expired - Fee Related JP6639614B1 (en) | 2018-11-01 | 2018-11-01 | Device control method, device control program, relay device, and device control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6639614B1 (en) |
-
2018
- 2018-11-01 JP JP2018206914A patent/JP6639614B1/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2020071785A (en) | 2020-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2021185488A5 (en) | ||
US9554000B2 (en) | Server and communication system including the same | |
RU2568096C1 (en) | Device of printing control, printing system and method of controlling printing | |
US10594485B2 (en) | System, method, program, and recording medium storing program for authentication | |
US20170094104A1 (en) | Non-Transitory Computer-Readable Recording Medium Storing Computer-Readable Instructions for Causing Information Processing Device to Execute Communication Processing with Push Notification Server and Printer | |
US10095856B2 (en) | Communication device capable of performing a wireless communication according to NFC (abbreviation of near field communication) standard | |
US9990166B2 (en) | Information processing system in which connection for job transmission is established, processing apparatus, and server | |
US20140250311A1 (en) | Information processing apparatus and method | |
US11570830B2 (en) | Communication system, non-transitory computer-readable recording medium storing connection application for terminal, and communication device for establishing wireless connection between pair of devices | |
JP2014100887A (en) | Printer, printer system and printer configuration method | |
CN105610961B (en) | Control the method and its intelligent terminal of service equipment | |
JP6639614B1 (en) | Device control method, device control program, relay device, and device control device | |
JP6732092B1 (en) | Device control method, device control program, and device control device | |
EP1380931B1 (en) | Network system, information processor and electronic apparatus | |
JP2006021359A (en) | Print control unit, print management device, print control method, print management method, print control program and print management program | |
JP6375732B2 (en) | COMMUNICATION TERMINAL DEVICE, COMMUNICATION SYSTEM, PROGRAM, AND COMMUNICATION TERMINAL DEVICE CONTROL METHOD | |
JP2015207096A (en) | Product sales data processing system, product sales data processing terminal device, and product sales data processing method | |
JP2008542913A (en) | Method and apparatus for positioning a device | |
EP3514731B1 (en) | System for producing information code and method of processing information | |
US20140201393A1 (en) | Image processing apparatus and method | |
JP6958684B2 (en) | Sales data processing device, display method and program | |
US11677888B2 (en) | Terminal device control method, terminal device, and recording medium having program stored thereon for receiving information from an external device | |
JP7368140B2 (en) | Data update system, printer and control program | |
US11789671B2 (en) | Specific communication device, and non-transitory computer-readable recording medium storing computer readable instructions for specific communication device | |
JP5261149B2 (en) | Reader / writer for information storage media |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190902 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20190902 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20190909 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190917 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191115 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20191126 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191224 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6639614 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |