[go: up one dir, main page]

CN100552734C - POS terminal device - Google Patents

POS terminal device Download PDF

Info

Publication number
CN100552734C
CN100552734C CNB2005100791973A CN200510079197A CN100552734C CN 100552734 C CN100552734 C CN 100552734C CN B2005100791973 A CNB2005100791973 A CN B2005100791973A CN 200510079197 A CN200510079197 A CN 200510079197A CN 100552734 C CN100552734 C CN 100552734C
Authority
CN
China
Prior art keywords
value
numerical value
application program
counter
external 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.)
Expired - Fee Related
Application number
CNB2005100791973A
Other languages
Chinese (zh)
Other versions
CN1755738A (en
Inventor
林裕明
土屋雄一
小玉知广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Publication of CN1755738A publication Critical patent/CN1755738A/en
Application granted granted Critical
Publication of CN100552734C publication Critical patent/CN100552734C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种适于连接到外部设备的POS终端装置。应用程序运行在POS终端装置中。设备管理器确定外部设备是否能够对表示外部设备使用量的第一数值进行计数,如果能够,设备管理器根据来自应用程序的第一命令,从外部设备获得第一数值。计数器保留表示外部设备使用量的第二数值,并且根据来自应用程序的第二命令,将第二数值通知给应用程序。如果确定外部设备无法对第一数值进行计数,则计数器根据从应用程序发送给外部设备的第三命令,对第二数值虚拟地进行计数。更新器参考由设备管理器所获得的第一数值,利用通过来自应用程序的第四命令所得到的第三数值,来更新第二数值。当利用第三数值更新第二数值时,保留第一数值。

Figure 200510079197

A POS terminal device adapted to be connected to an external device. The application program runs in the POS terminal device. The device manager determines whether the external device can count the first numerical value representing the usage amount of the external device, and if yes, the device manager obtains the first numerical value from the external device according to a first command from the application program. The counter holds a second value representing the usage amount of the external device, and notifies the application of the second value according to a second command from the application. If it is determined that the external device cannot count the first numerical value, the counter virtually counts the second numerical value according to a third command sent from the application program to the external device. The updater updates the second numerical value with the third numerical value obtained by the fourth command from the application with reference to the first numerical value obtained by the device manager. When updating the second value with the third value, the first value is retained.

Figure 200510079197

Description

POS终端装置 POS terminal device

技术领域 technical field

本发明涉及一种POS系统,包括POS(电子收款机系统)终端装置以及连接到其的设备,并且更具体地,涉及用于确定设备使用(usage)的技术。The present invention relates to a POS system including a POS (Pashboard System) terminal device and devices connected thereto, and more particularly, to a technique for determining device usage.

背景技术 Background technique

JAVA POS是用于使用JAVA(注册商标)构建电子收款机系统(POS)系统的应用程序编程接口。JAVA POS还具有用于设备统计的功能,即,关于连接到POS终端的设备使用信息。JAVA POS标准使得在POS终端上运行的应用程序能够获得和使用这些设备统计,例如,设备使用信息。该使用信息是表示具体设备功能的使用信息,例如,对于打印机的情况,是关于所打印的行数的信息,或者所打印的字符的数目。JAVA POS is an application programming interface for constructing a cash register system (POS) system using JAVA (registered trademark). JAVA POS also has a function for device statistics, that is, information about the use of devices connected to the POS terminal. The JAVA POS standard enables applications running on POS terminals to obtain and use these device statistics, such as device usage information. The usage information is usage information indicating specific device functions, for example, in the case of a printer, information on the number of lines printed, or the number of characters printed.

取决于设备的型号或者类型,一些设备具有内部维护计数器,所述计数器用于对具体功能使用进行计数。具有这种内部计数器的设备能够通过读取这些计数器而获得关于设备操作的设备统计。还存在不具有这种内部计数器的设备。Depending on the model or type of device, some devices have internal maintenance counters that are used to count specific function usage. A device having such internal counters can obtain device statistics about the operation of the device by reading these counters. There are also devices that do not have such an internal counter.

与所连接的设备是否具有维护计数器无关,优选地,一些在POS终端上运行的应用程序能够使用这种设备统计。Irrespective of whether the connected device has maintenance counters or not, preferably some application program running on the POS terminal is able to use such device statistics.

此外,在这种设备中所安装的维护计数器通常用于维护该设备。因此,优选地,连接到设备的POS终端不会重写维护计数器。Furthermore, maintenance counters installed in such equipment are generally used to maintain the equipment. Therefore, preferably, a POS terminal connected to the device does not overwrite the maintenance counter.

发明内容 Contents of the invention

因此,本发明的目的在于使得能够在POS系统中使用这些设备统计。It is therefore an object of the present invention to enable the use of these device statistics in POS systems.

本发明的目的还在于,使用从单个设备中的维护计数器中所读取的内容作为设备统计,而无需改变由具体计数器所存储的值。It is also an object of the invention to use, as device statistics, what is read from a maintenance counter in a single device, without changing the value stored by the specific counter.

为了达到上述目的,根据本发明,提供了要连接到外部设备的POS(电子收款机系统)终端装置,包括:In order to achieve the above object, according to the present invention, there is provided a POS (Electronic Cash Register System) terminal device to be connected to an external device, comprising:

在POS终端装置中运行的应用程序;applications running on POS terminal devices;

设备管理器,能够与外部设备通信,所述设备管理器确定外部设备是否能够对表示外部设备的使用量(usage amount)的第一数值进行计数,并且当确定外部设备能够对第一数值进行计数时,响应来自应用程序的第一命令,从外部设备获得第一数值;a device manager capable of communicating with the external device, the device manager determining whether the external device can count a first value representing a usage amount of the external device, and when determining that the external device is capable of counting the first value When , responding to the first command from the application program, obtaining the first value from the external device;

计数器,其保留了表示外部设备的使用量的第二数值,并且响应来自应用程序的第二命令,将第二数值通知给应用程序,当确定外部设备无法对第一数值进行计数时,计数器根据从应用程序发送给外部设备的第三命令,对第二数值虚拟地进行计数;以及a counter, which retains a second value indicating the amount of use of the external device, and notifies the application program of the second value in response to a second command from the application program, and when it is determined that the external device cannot count the first value, the counter according to A third command sent from the application to the external device virtually counts the second value; and

更新器,其参考由设备管理器所获得的第一数值,利用通过来自应用程序的第四命令所得到的第三数值,来更新第二数值,an updater which updates the second numerical value with a third numerical value obtained by a fourth command from the application program with reference to the first numerical value obtained by the device manager,

其中,当利用第三数值更新第二数值时,保留第一数值。Wherein, when the second value is updated with the third value, the first value is retained.

优选地,更新器从第二数值中减去第四数值,并且通过从第三数值中减去第一数值来得到第四数值。Preferably, the updater subtracts the fourth value from the second value, and obtains the fourth value by subtracting the first value from the third value.

优选地,POS终端装置还包括存储部件,其中,当发生预定事件时,设备管理器获得第一数值,并且将所获得的第一数值存储在存储部件中。Preferably, the POS terminal device further includes storage means, wherein, when a predetermined event occurs, the device manager obtains the first numerical value, and stores the obtained first numerical value in the storage means.

优选地,POS终端装置还包括存储部件,其中,当发生预定事件时,设备管理器将所获得的第二数值存储在存储部件中。Preferably, the POS terminal device further includes storage means, wherein the device manager stores the obtained second numerical value in the storage means when a predetermined event occurs.

POS终端装置还包括预测器,其基于来自应用程序的命令而预测外部设备的功能计数值(count)。设备另外还包括累积计数器,用于累加并存储所预测的功能计数值。The POS terminal device also includes a predictor that predicts a function count value (count) of the external device based on a command from the application program. The device additionally includes an accumulation counter for accumulating and storing the predicted function count value.

根据本发明,还提供了一种连接到POS(电子收款机系统)终端装置的外部设备使用量的管理方法,包括:According to the present invention, there is also provided a method for managing the amount of usage of external equipment connected to a POS (electronic cash register system) terminal device, including:

在POS终端装置中运行应用程序;Run the application program in the POS terminal device;

确定外部设备是否能够对表示外部设备使用量的第一数值进行计数;determining whether the external device is capable of counting a first value representing usage of the external device;

当确定外部设备能够计算第一数值时,响应来自应用程序的第一命令,从外部设备获得第一数值;Obtaining the first numerical value from the external device in response to a first command from the application program when it is determined that the external device can calculate the first numerical value;

保留表示外部设备的使用量的第二数值;retaining a second value representing usage of the external device;

响应来自应用程序的第二命令,将第二数值通知给应用程序;Notifying the application of the second value in response to a second command from the application;

当确定外部设备无法对第一数值进行计数时,根据从应用程序发送给外部设备的第三命令,对第二数值进行计数;以及When it is determined that the external device cannot count the first value, counting the second value according to a third command sent from the application program to the external device; and

参考所获得的第一数值,利用通过第四命令从应用程序中所得到的第三数值,来更新第二数值,updating the second value with the third value obtained from the application through the fourth command with reference to the obtained first value,

其中,当利用第三数值更新第二数值时,保留第一数值。Wherein, when the second value is updated with the third value, the first value is retained.

优选地,通过从第二数值中减去第四数值而更新第二数值,并且通过从第三数值中减去第一数值而得到第四数值。Preferably, the second value is updated by subtracting the fourth value from the second value, and the fourth value is obtained by subtracting the first value from the third value.

优选地,当发生预定事件时,获得第一数值,并且将所获得的第一数值存储在存储部件中。Preferably, when a predetermined event occurs, the first value is obtained, and the obtained first value is stored in the storage means.

优选地,当发生预定事件时,将第二数值存储在存储部件中。Preferably, the second value is stored in the storage means when a predetermined event occurs.

根据本发明,还提供了一种适于连接到外部设备的POS(电子收款机系统)终端装置,包括:According to the present invention, there is also provided a POS (electronic cash register system) terminal device adapted to be connected to an external device, comprising:

通用计算机,包括处理器和存储器,所述通用计算机运行应用程序;a general-purpose computer, including a processor and memory, the general-purpose computer running an application program;

设备管理器,其能够与外部设备进行通信,所述设备管理器确定外部设备是否能够对表示外部设备使用量的第一数值进行计数,并且当确定外部设备能够对第一数值进行计数时,响应来自应用程序的第一命令,从外部设备中获得第一数值;a device manager capable of communicating with the external device, the device manager determining whether the external device is capable of counting a first numerical value representing usage of the external device, and responding when it is determined that the external device is capable of counting the first numerical value A first command from the application to obtain a first value from an external device;

计数器,其保留了表示外部设备使用量的第二数值,并且响应来自应用程序的第二命令,将第二数值通知给应用程序,其中当确定外部设备无法对第一数值进行计数时,计数器根据从应用程序发送给外部设备的第三命令,对第二数值虚拟地进行计数;以及a counter, which retains a second numerical value representing the usage amount of the external device, and notifies the application program of the second numerical value in response to a second command from the application program, wherein when it is determined that the external device cannot count the first numerical value, the counter according to A third command sent from the application to the external device virtually counts the second value; and

更新器,参考由设备管理器所获得的第一数值,利用通过来自应用程序的第四命令所得到的第三数值,来更新第二数值,The updater updates the second numerical value with the third numerical value obtained by the fourth command from the application program with reference to the first numerical value obtained by the device manager,

其中,当利用第三数值更新第二数值时,保留第一数值。Wherein, when the second value is updated with the third value, the first value is retained.

附图说明 Description of drawings

参考附图,通过详细描述优选的典型实施例,本发明的上述目的和优点将更加显而易见,其中:The above objects and advantages of the present invention will be more apparent by describing in detail preferred exemplary embodiments with reference to the accompanying drawings, wherein:

图1是根据本发明一个实施例的POS系统的方框图;Figure 1 is a block diagram of a POS system according to one embodiment of the present invention;

图2是在图1的POS系统中所执行的POS终端初始化处理的流程图;Fig. 2 is a flowchart of the POS terminal initialization process performed in the POS system of Fig. 1;

图3是由图1的POS系统中的虚拟计数器所运行的处理的流程图;Figure 3 is a flowchart of the process run by the virtual counter in the POS system of Figure 1;

图4是用于更新或复位图1的POS系统中的计数器的处理的流程图;以及FIG. 4 is a flowchart of a process for updating or resetting counters in the POS system of FIG. 1; and

图5是在图1的POS系统中所执行的计数器读取处理的流程图。FIG. 5 is a flowchart of counter reading processing executed in the POS system of FIG. 1 .

具体实施方式 Detailed ways

参考附图,下面将详细描述本发明的实施例。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

如图1所示,根据本发明一个实施例的POS系统包括POS终端1和打印机2,所述打印机2作为连接到POS终端1并与POS终端1一起使用的设备的示例。As shown in FIG. 1 , a POS system according to one embodiment of the present invention includes a POS terminal 1 and a printer 2 as an example of a device connected to and used with the POS terminal 1 .

以下使用打印机2作为设备的示例来描述本发明,但是本发明并不仅局限于此。更具体地,本发明能够与可连接到POS终端1的多个外围设备一起使用,包括磁墨水字符阅读机(MICR)、扫描仪以及光学字符阅读机(OCR)。另外,可以将一个或多个打印机2或其它设备连接到图1所示的POS终端1。The present invention is described below using the printer 2 as an example of a device, but the present invention is not limited thereto. More specifically, the present invention can be used with a number of peripheral devices connectable to the POS terminal 1, including Magnetic Ink Character Readers (MICR), scanners and Optical Character Readers (OCR). Additionally, one or more printers 2 or other devices may be connected to the POS terminal 1 shown in FIG. 1 .

对于所连接设备的一个或多个功能中的每一个,在该实施例中,由POS终端1所使用的设备统计表示使用了多少具体功能。因此,通过确定由打印机2所打印的行数作为设备统计的示例,描述该实施例中的POS终端1。For each of one or more functions of the connected device, in this embodiment, the device statistics used by the POS terminal 1 indicate how much of the particular function is used. Therefore, the POS terminal 1 in this embodiment is described by determining the number of lines printed by the printer 2 as an example of device statistics.

多个不同的打印机2可以连接到POS终端1。根据打印机类型,一些打印机具有内部维护计数器而一些没有维护计数器。不论何时打印机2使用具体功能,这里所使用的维护计数器21是对一些表示具体功能使用多少的情况进行计数、累加和存储的计数器。一些打印机功能的使用通过以下进行表示:例如,所打印的字符数目、所打印的行数、所消耗的墨水数量、当进行打印时相对于卷纸所传输的纸的长度以及裁纸机的操作次数以及当相对于裁纸进行打印时所打印的张数。A number of different printers 2 can be connected to the POS terminal 1 . Depending on the printer type, some printers have internal maintenance counters and some do not. The maintenance counter 21 used here is a counter that counts, accumulates, and stores instances indicating how much a specific function is used whenever the printer 2 uses the specific function. Use of some printer functions is indicated by, for example, the number of characters printed, the number of lines printed, the amount of ink consumed, the length of paper transported relative to the roll when printing, and the operation of the trimmer number of times and the number of sheets printed when printing relative to trimming.

例如,如果具有维护计数器的打印机2相对于卷纸进行打印,放出所打印的卷纸,并且响应来自POS终端1的打印命令,驱动裁纸机进行裁纸,维护计数器21对实际打印的行数或者所打印的实际字符数目进行计数,将这些计数值添加到以前累积的所打印的行计数值以及累积的所打印的字符计数值,并且使累积裁纸计数值加1。For example, if the printer 2 with the maintenance counter prints relative to the roll paper, releases the printed roll paper, and responds to the print command from the POS terminal 1, drives the paper cutter to cut the paper, the maintenance counter 21 will count the number of lines actually printed Or the actual number of characters printed is counted, these counts are added to the previously accumulated printed line count and the accumulated printed character count, and the accumulated cut count is incremented by one.

POS终端1是具有处理器和存储器的通用计算机,并且以下所描述的POS终端1通过引起POS终端1执行计算机程序中的步骤而获得各个部件和功能。The POS terminal 1 is a general-purpose computer having a processor and a memory, and the POS terminal 1 described below obtains various components and functions by causing the POS terminal 1 to execute steps in a computer program.

POS终端1具有:用于执行具体处理的一个或多个应用程序11,用于管理连接到POS终端1的设备的设备管理器13,用于虚拟地计数使用了多少具体设备功能的虚拟计数器15,以及非易失性存储器17。The POS terminal 1 has: one or more application programs 11 for performing specific processing, a device manager 13 for managing devices connected to the POS terminal 1, a virtual counter 15 for virtually counting how many specific device functions are used , and non-volatile memory 17.

应用程序11向设备管理器13发送请求不同处理的命令。可以请求在打印机2上打印发送给设备管理器13的命令,参考用于打印机2使用参数之一的计数器,或者更新或复位具体计数器。The application 11 sends a command to the device manager 13 requesting different processing. A command sent to the device manager 13 may request printing on the printer 2, refer to a counter for one of the parameters used by the printer 2, or update or reset a specific counter.

设备管理器13执行各种包含所连接的设备的处理。当设备管理器13接收到来自应用程序11的命令时,例如,设备管理器13运行由命令所请求的处理。例如,如果命令请求打印机2处理,设备管理器13相应地产生控制打印机2的命令,并且将这些命令发送给打印机2,因此,引起打印机2执行具体处理。如果接收到用于读取表示打印机使用的计数器之一的命令,设备管理器13运行命令类型所表示的处理。以下更详细地描述该处理。The device manager 13 executes various processes involving connected devices. When the device manager 13 receives a command from the application program 11, for example, the device manager 13 executes processing requested by the command. For example, if a command requests the printer 2 to process, the device manager 13 generates commands to control the printer 2 accordingly, and sends these commands to the printer 2, thereby causing the printer 2 to perform specific processing. If a command for reading one of the counters indicating printer usage is received, the device manager 13 executes the processing indicated by the command type. This processing is described in more detail below.

设备管理器13还从打印机2获得信息,例如表示打印机2类型的型号ID。另外,如果发生具体的换码事件(escape event),设备管理器13针对由虚拟计数器15所监控的每一个功能保存累积计数值,功能计数器的累积计数值由维护计数器21保留,并且以下将进一步描述从差别文件173到计数器文件175的差别信息。相反,设备管理器13还通过从计数器文件175读取计数器信息来恢复虚拟计数器15。The device manager 13 also obtains information from the printer 2 such as a model ID indicating the type of the printer 2 . In addition, if a specific escape event (escape event) occurs, the device manager 13 stores the cumulative count value for each function monitored by the virtual counter 15, the cumulative count value of the function counter is retained by the maintenance counter 21, and will be further described below Difference information from the difference file 173 to the counter file 175 is described. Instead, the device manager 13 also restores the virtual counter 15 by reading the counter information from the counter file 175 .

虚拟计数器15对于打印机2的具体功能的使用虚拟地进行计数。虚拟计数器15具有:预测器151,用于预测具体功能的计数值;以及累积计数器152,用于累加并存储针对每一个功能的累积的预测计数值。例如,如果设备管理器13向打印机2发送请求打印机2执行具体功能的命令,预测器151解译该命令,并且预测针对打印机2所使用的一个或多个具体功能的使用量值。与维护计数器21类似,预测器151对于所打印的行计数值、裁纸操作以及其它功能进行预测和计数。然后,将结果的预测计数值添加到累积计数器152中。The virtual counter 15 virtually counts the use of specific functions of the printer 2 . The virtual counter 15 has: a predictor 151 for predicting a count value for a specific function; and an accumulation counter 152 for accumulating and storing the accumulated predicted count value for each function. For example, if the device manager 13 sends a command to the printer 2 requesting the printer 2 to perform a specific function, the predictor 151 interprets the command and predicts usage values for the one or more specific functions used by the printer 2 . Similar to the maintenance counter 21, the predictor 151 predicts and counts printed line count values, paper cutting operations, and other functions. The resulting predicted count value is then added to the accumulation counter 152 .

虚拟计数器15还具有:复位功能,用于将累积计数器152清除为0;以及更新功能,用于响应来自应用程序11的命令,将累积计数器152设置为具体数值。The virtual counter 15 also has: a reset function for clearing the accumulation counter 152 to 0; and an update function for setting the accumulation counter 152 to a specific value in response to a command from the application program 11 .

仅当所连接的打印机2不具有内部维护计数器时,虚拟计数器15才处于操作中。The virtual counter 15 is in operation only when the connected printer 2 does not have an internal maintenance counter.

如下所述,根据发送给打印机2的命令类型,预测器151可以预测每一个功能的使用。According to the type of command sent to the printer 2, the predictor 151 can predict the use of each function, as described below.

(1)如果命令是文本打印命令,预测器151通过对由打印命令的参数指定的字符和换行的数目进行计数,从而预测所打印的字符和行的数目。(1) If the command is a text print command, the predictor 151 predicts the number of characters and lines to be printed by counting the number of characters and line feeds specified by the parameters of the print command.

(2)如果打印命令是针对打印例如条形码的图像的命令,预测器151对于打印机2所打印的点的数目进行计数,从而打印包含在打印命令中的图像数据。例如,用于该转换的每个字符的点数可以是打印机21A最频繁使用的字体大小的点数(例如,12点宽×24点高),或者一个字符中的平均点数。(2) If the print command is a command for printing an image such as a barcode, the predictor 151 counts the number of dots printed by the printer 2, thereby printing the image data contained in the print command. For example, the number of dots per character used for this conversion may be that of the font size most frequently used by the printer 21A (for example, 12 dots wide by 24 dots high), or the average number of dots in one character.

图像数据打印命令还包含图像尺寸和尺度信息。预测器151可以使用该信息,从而当通过打印机2进行打印时,确定图像的高度,并且基于所计算的图像高度和所预测的一行的高度(换行距离),预测所打印的行数。The image data print command also includes image size and scale information. The predictor 151 can use this information to determine the height of an image when printing is performed by the printer 2, and predict the number of printed lines based on the calculated image height and the predicted height of one line (line feed distance).

(3)预测器151还检测换码序列控制命令,从而预测打印机使用。例如,预测器151可以基于所发送的裁纸命令的次数,对于裁纸的次数进行计数,并且对于包含在打印命令中的裁纸换码序列的数目进行计数。(3) The predictor 151 also detects escape sequence control commands, thereby predicting printer use. For example, the predictor 151 may count the number of paper cuts based on the number of paper cut commands sent, and count the number of paper cut escape sequences included in the print command.

例如,预测器151还通过对于由打印机2正常执行的相应命令数目进行检测和计数,对打印条形码、插入纸片(slip)以及改变纸的打印面的次数进行计数。还可以通过机械错误计数值来表示原始(home)位置错误的数目。For example, the predictor 151 also counts the number of times of printing a barcode, inserting a slip, and changing the printing surface of paper by detecting and counting the number of corresponding commands normally executed by the printer 2 . The number of home position errors can also be represented by a mechanical error count value.

非易失性存储器17存储:属性文件171,用于存储针对可连接到POS终端1的多个设备的属性数据;差别文件173,用于存储关于预测的计数值和由打印机2的维护计数器21所保存的实际计数值之间的差别的信息;以及计数器文件175,用于存储计数器信息。存储在属性文件171中的属性数据包括针对每一个打印机或其它设备ID的信息,所述信息表示由设备ID所识别的设备是否具有维护计数器。例如,计数器文件175存储从虚拟计数器15或者维护计数器21中的累积计数器152所获得的计数器值。The nonvolatile memory 17 stores: an attribute file 171 for storing attribute data for a plurality of devices connectable to the POS terminal 1; information on the difference between the saved actual count values; and a counter file 175 for storing the counter information. The property data stored in the property file 171 includes, for each printer or other device ID, information indicating whether the device identified by the device ID has a maintenance counter. For example, the counter file 175 stores counter values obtained from the virtual counter 15 or the accumulation counter 152 in the maintenance counter 21 .

将参考图2至图5中的流程图,描述由此包含的POS系统的操作。The operation of the POS system thus incorporated will be described with reference to the flowcharts in FIGS. 2 to 5 .

当POS终端1加电时,运行POS终端1的初始化处理。如图2所示,该初始化处理与设备管理器13一起进行开始,所述设备管理器13获得来自打印机2的打印机2的设备ID(S11)。然后,设备管理器13基于所获得的设备ID来参考属性文件171(S12),所述属性文件存储针对打印机2型号的属性数据。则,设备管理器13根据该属性数据确定打印机2是否是具有维护计数器21的型号(S13)When the POS terminal 1 is powered on, initialization processing of the POS terminal 1 is executed. As shown in FIG. 2 , this initialization process starts with the device manager 13 obtaining the device ID of the printer 2 from the printer 2 (S11). Then, the device manager 13 refers to the property file 171 which stores property data for the model of the printer 2 based on the obtained device ID (S12). Then, the device manager 13 determines whether the printer 2 is a model having a maintenance counter 21 based on the attribute data (S13)

如果已知连接到POS终端1的打印机的类型,则可以越过步骤S13。If the type of printer connected to the POS terminal 1 is known, step S13 can be skipped.

如果在步骤S13中设备管理器13确定打印机2是不具有维护计数器21的型号(S13,否),则设备管理器13从计数器文件175中读取计数器信息(S14)。如以下进一步描述,当POS终端1关闭时,将累积计数器152所保存的数值存储到计数器文件175中。因此,将从计数器文件175中所读取的计数器信息设置到虚拟计数器15中的累积计数器152,从而将计数器恢复为与当POS终端电源关闭时相同的状态。If the device manager 13 determines in step S13 that the printer 2 is a model that does not have the maintenance counter 21 (S13, NO), the device manager 13 reads the counter information from the counter file 175 (S14). As described further below, the value held by the cumulative counter 152 is stored in the counter file 175 when the POS terminal 1 is turned off. Therefore, the counter information read from the counter file 175 is set to the accumulation counter 152 in the virtual counter 15, thereby restoring the counter to the same state as when the power of the POS terminal was turned off.

如果在步骤S13中确定打印机2是具有维护计数器21的型号(S13,是),则可以越过步骤S14和S15。If it is determined in step S13 that the printer 2 is a model having a maintenance counter 21 (S13, YES), steps S14 and S15 may be skipped.

接下来,将描述当连接不具有维护计数器21的打印机2时,由POS终端1所运行的处理。Next, the processing executed by the POS terminal 1 when the printer 2 not having the maintenance counter 21 is connected will be described.

当打印机2根据来自应用程序11的命令进行操作时,虚拟计数器15对于表示使用了多少打印机2的具体功能的参数虚拟地进行计数。参考图3的流程图描述该处理。The virtual counter 15 virtually counts a parameter indicating how much a specific function of the printer 2 is used while the printer 2 is operating according to a command from the application program 11 . This processing is described with reference to the flowchart of FIG. 3 .

当向打印机2发送具体处理请求时,应用程序11向设备管理器13发送具体命令(S21)。然后,设备管理器13向打印机2发送基于该应用程序命令所产生的控制命令,因此引起打印机2根据命令进行操作(S22)。虚拟计数器15还从设备管理器13获得该命令。然后,预测器151解译命令,并且预测由打印机2所使用的用于执行命令的功能,以及表示这些功能预测使用的计数器值(S23)。然后,将这些所预测的数值添加到累积计数器152中相应的计数值上,从而更新累积计数值(S24)。When sending a specific processing request to the printer 2, the application program 11 sends a specific command to the device manager 13 (S21). Then, the device manager 13 sends to the printer 2 a control command generated based on the application command, thus causing the printer 2 to operate according to the command (S22). The virtual counter 15 also obtains this command from the device manager 13 . Then, the predictor 151 interprets the command, and predicts the functions used by the printer 2 to execute the command, and a counter value representing the predicted use of these functions (S23). Then, these predicted values are added to corresponding count values in the accumulation counter 152, thereby updating the accumulation count value (S24).

当发生具体的换码事件时,设备管理器13检测到事件,并且将虚拟计数器15中的累积计数器152的读数(reading)保存到计数器文件175中。这些换码事件是具体的预定事件,例如,POS终端1关闭电源、从应用程序11接收命令以及打开/关闭打印机2。通过将计数器读数如此保存到非易失性存储器17中,例如,如果POS终端1突然关闭,将不会丢失由虚拟计数器15所预测的计数值。When a specific escape event occurs, the device manager 13 detects the event and saves the reading of the cumulative counter 152 in the virtual counter 15 into the counter file 175 . These escape events are specific predetermined events such as power off of the POS terminal 1 , receipt of a command from the application program 11 , and turning on/off of the printer 2 . By thus saving the counter reading in the non-volatile memory 17, the count value predicted by the virtual counter 15 will not be lost if, for example, the POS terminal 1 is suddenly switched off.

为了使用累积计数器的读数,应用程序11可以读取计数器或在计数器上执行具体操作,例如,复位或者将计数器设置为具体值。例如,以下描述当从应用程序11接收读取计数器命令时,由设备管理器13所运行的处理。To use the reading of the cumulative counter, the application 11 may read the counter or perform specific operations on the counter, eg reset or set the counter to a specific value. For example, the following describes processing executed by the device manager 13 when a read counter command is received from the application program 11 .

当设备管理器13从应用程序11接收到读取计数器命令时,例如,设备管理器13从累积计数器152读取所请求的计数值。该命令可以请求累积计数器152中的所有累积计数器读数,或者仅针对具体功能计数器的读数。然后,设备管理器13得到并返回针对所有所请求的计数器的数值,或者针对具体地向应用程序11所请求计数器的数值,作为来自应用程序11的指令。When the device manager 13 receives a read counter command from the application program 11 , for example, the device manager 13 reads the requested count value from the accumulation counter 152 . This command may request all cumulative counter readings in cumulative counter 152, or only readings for specific function counters. Then, the device manager 13 obtains and returns the values for all the requested counters, or the value of the counter specifically requested to the application 11 , as an instruction from the application 11 .

因此,应用程序11可以获得表示打印机2的具体功能使用多少的信息,即使所连接的打印机2不具有内部维护计数器21。Therefore, the application program 11 can obtain information indicating how much a specific function of the printer 2 is used even if the connected printer 2 does not have the internal maintenance counter 21 .

当设备管理器13从应用程序11接收更新计数器的命令时,设备管理器13命令虚拟计数器15将累积计数器更新为具体值。然后,虚拟计数器15将累积计数器152中的指定计数器更新为指定的数值。When the device manager 13 receives a command to update the counter from the application program 11, the device manager 13 instructs the virtual counter 15 to update the accumulation counter to a specific value. Then, the virtual counter 15 updates the specified counter in the accumulation counter 152 to the specified value.

当从应用程序11接收计数器复位命令时,设备管理器13可以类似地引起虚拟计数器15复位。因此,虚拟计数器15将累积计数器152清除为0。When receiving a counter reset command from the application 11, the device manager 13 may similarly cause the virtual counter 15 to reset. Therefore, the virtual counter 15 clears the accumulation counter 152 to zero.

可以使用批处理更新或复位计数器,在所述处理中,更新或复位所有计数器,或者针对指定的个别功能单独更新或复位计数器。结果,应用程序11可以根据所希望的自由地设置累积计数器152。Counters can be updated or reset using a batch process in which all counters are updated or reset, or individually for specified individual functions. As a result, the application program 11 can freely set the accumulation counter 152 as desired.

将描述当所连接的打印机2具有维护计数器21时,由POS终端1所执行的处理。当打印机具有维护计数器21时,可以与当打印机不具有维护计数器21时运行相同的处理,并且因此以下处理与使用维护计数器21相关。Processing performed by the POS terminal 1 when the connected printer 2 has the maintenance counter 21 will be described. When the printer has the maintenance counter 21 , the same processing can be executed as when the printer does not have the maintenance counter 21 , and thus the following processing is related to using the maintenance counter 21 .

当打印机2具有维护计数器21时,还可以将维护计数器21的读数保存在计数器文件175中。更具体地,当检测到具体换码事件时,设备管理器13获得由维护计数器21所存储的累积计数器,并且将读数存储到计数器文件175中。设备管理器13还可以将存储在差别文件173中的差别信息保存到计数器文件175中。When the printer 2 has the maintenance counter 21, the reading of the maintenance counter 21 can also be saved in the counter file 175. More specifically, when a particular escape event is detected, device manager 13 obtains the cumulative counters stored by maintenance counters 21 and stores the readings into counter file 175 . The device manager 13 may also save the difference information stored in the difference file 173 into the counter file 175 .

在该情况下,可应用的换码事件包括:从应用程序11接收命令、打开/关闭打印机2以及打印机2联机。注意,POS终端1关闭电源也可以作为换码事件处理。In this case, applicable escape events include: receiving a command from the application 11, turning on/off the printer 2, and going online of the printer 2. Note that power off of the POS terminal 1 can also be handled as an escape event.

图4示出了用于对具有维护计数器21的打印机中的计数器进行更新或复位的处理,并且图5示出了用于读取计数器的处理。FIG. 4 shows processing for updating or resetting the counter in the printer having the maintenance counter 21, and FIG. 5 shows processing for reading the counter.

当从应用程序11接收到例如计数器更新命令或者复位命令的操作请求时,根据图4所示的流程图设置差别信息。When an operation request such as a counter update command or a reset command is received from the application program 11, difference information is set according to the flowchart shown in FIG. 4 .

更具体地,当设备管理器13从应用程序11接收复位命令或者更新命令时,读取由打印机2的维护计数器21所存储的数值(S31,S32)。More specifically, when the device manager 13 receives a reset command or an update command from the application program 11, it reads the value stored by the maintenance counter 21 of the printer 2 (S31, S32).

如果接收了复位命令,设备管理器13将所获得的计数值写入差别文件173。如果接收了更新命令,则将指定(更新)设置与当前计数器读数之间的差别确定为差别信息,并且将其存储到差别文件173中。因此,如果接收了更新命令,则计算维护计数器21的当前读数与计数器要更新的读数之间的差别,并且还相应地更新差别文件173中的差别信息(S33,S34)。If a reset command is received, the device manager 13 writes the obtained count value into the difference file 173 . If an update command is received, the difference between the specified (update) setting and the current counter reading is determined as difference information and stored in the difference file 173 . Therefore, if an update command is received, the difference between the current reading of the maintenance counter 21 and the reading to be updated of the counter is calculated, and the difference information in the difference file 173 is also updated accordingly (S33, S34).

例如,如果从维护计数器21所获得的当前读数是A,则A是针对复位命令的差别信息。如果计数器读取A,并且由更新命令指定的数值是B,则针对更新命令的差别信息是差别(A-B)。For example, if the current reading obtained from the maintenance counter 21 is A, then A is differential information for the reset command. If the counter reads A, and the value specified by the update command is B, the difference information for the update command is difference (A-B).

结果,代替根据从应用程序11所接收的复位命令或者更新命令直接更新维护计数器21,计算用于操作由维护计数器21所存储值的差别值。如以下进一步地描述,通过在使用该差别信息时计算明显的计数器值,应答后续的读取计数器请求。因此,可以获得与当直接更新维护计数器21时相同的效果,而不必直接更新维护计数器21。As a result, instead of directly updating the maintenance counter 21 according to a reset command or an update command received from the application program 11, a difference value for manipulating the value stored by the maintenance counter 21 is calculated. Subsequent read counter requests are answered by computing the distinct counter value when using this differential information, as described further below. Therefore, the same effect as when the maintenance counter 21 is directly updated can be obtained without directly updating the maintenance counter 21 .

当读取计数器时,设备管理器13首先从应用程序11接收读取计数器命令(S41),如图5所示。这些读取计数器命令可以作为批处理命令进行执行而得到所有计数器读数,或者作为个别命令而得到如上所述的具体计数器读数,并且设备管理器13基于来自应用程序11的命令,得到所有或具体累积计数值。设备管理器13则确定打印机2是否联机(S42)。When reading the counter, the device manager 13 first receives a read counter command from the application program 11 (S41), as shown in FIG. 5 . These read counter commands can be executed as a batch command to get all counter readings, or as individual commands to get specific counter readings as described above, and the device manager 13 gets all or specific cumulative count value. The device manager 13 then determines whether the printer 2 is online (S42).

如果打印机2联机(S42,是),则设备管理器13读取打印机2中的维护计数器21(S43)。如果打印机2是脱机的(S42,否),则设备管理器13无法访问维护计数器21,并且因此获得存储在计数器文件175中的计数器值(S44)。注意,存储在计数器文件175中的数值相对较新。If the printer 2 is online (S42, YES), the device manager 13 reads the maintenance counter 21 in the printer 2 (S43). If the printer 2 is offline (S42, No), the device manager 13 cannot access the maintenance counter 21, and thus obtains the counter value stored in the counter file 175 (S44). Note that the values stored in counter file 175 are relatively recent.

设备管理器13则从差别文件173获得差别信息,并且使用该差别信息更新如上所述所获得累积计数值(S45)。则所更新的计数值返回给应用程序11(S46)。The device manager 13 then obtains the difference information from the difference file 173, and uses the difference information to update the cumulative count value obtained as described above (S45). Then the updated count value is returned to the application program 11 (S46).

代替从维护计数器21向应用程序简单地返回数值,因此,本发明返回反映了应用程序11所希望的操作的计数值。Instead of simply returning a value from the maintenance counter 21 to the application, the present invention therefore returns a count value that reflects the desired operation of the application 11 .

尽管本发明已经示出并且参考具体的优选实施例进行了描述,根据这里的示教,对于本领域的技术人员而言,各种变化和修改是显而易见的。这种变化和修改是明显的,并且认为其处于所附的权利要求中所限定的本发明的实质、范围和设想之内。Although the invention has been shown and described with reference to specific preferred embodiments, various changes and modifications will be apparent to those skilled in the art from the teachings herein. Such changes and modifications are obvious and are considered to be within the spirit, scope and spirit of the invention as defined in the appended claims.

Claims (9)

1. one kind is suitable for the point of sells POS end device that communicates with external unit, comprising:
Be configured to the application program on the POS end device, carried out;
Operation is used for the equipment manager that communicates with external unit, described equipment manager is configured to (i) and determines that whether external unit can count first numerical value of the use amount of first function of expression external unit, and (ii) determining under the situation that external unit can be counted first numerical value, first order that response is sent by application program obtains first numerical value from external unit;
Counter, operation is used to respond second order of being sent by application program and determines second value, described second value is represented the use amount of second function of external unit virtually, and the 3rd order that response is sent by application program, under situation to first numeric counter, first numerical value, second value or the combination of the two are notified to application program, when not having under the situation that first numerical value is counted, to the application notification second value; And
Renovator, operation is used to respond the 4th order of being sent by application program, the third value that reference response the 4th order obtains under the situation that first numerical value is counted not and under the situation that first numerical value is counted with reference to first numerical value and third value, upgrade second value
Wherein, when under the situation that first numerical value is counted, upgrading second value, keep first numerical value.
2. POS end device according to claim 1 is characterized in that also comprising memory unit, and when the escape incident took place, the equipment manager operation was used for first value storage at memory unit.
3. POS end device according to claim 1 is characterized in that also comprising memory unit, and when the escape incident took place, the equipment manager operation was used for second value is stored in memory unit.
4. POS end device according to claim 1 is characterized in that also comprising fallout predictor, and operation is used to respond second order and predicts second value.
5. POS end device according to claim 4 is characterized in that also comprising the stored counts device, the accumulated counts value that operation is used to store described second value.
6. the management method of the use amount of an external unit that communicates with point of sells POS end device comprises:
Executive utility on the POS end device;
Determine that whether external unit can count first numerical value of the use amount of first function of expression external unit;
Determining under the situation that external unit can be counted first numerical value that first order that response is sent by application program obtains first numerical value from external unit;
Second order that response is sent by application program determines that second value, described second value represent the use amount of second function of external unit virtually;
Response is sent the 3rd order by application program, under situation about counting for first numerical value, first numerical value, second value or the combination of the two are notified to application program, are not having under the situation that first numerical value is counted, to the application notification second value; And
The 4th order that response is sent by application program, ordering the third value of acquisition and reference first numerical value and third value under the situation that first numerical value is counted less than reference response under the situation that first numerical value is counted the 4th, upgrade second value
Wherein, when under the situation that first numerical value is counted, upgrading second value, keep first numerical value.
7. management method according to claim 6 is characterized in that, when the escape incident takes place, stores first numerical value.
8. management method according to claim 6 is characterized in that, when the escape incident takes place when, and the storage second value.
9. one kind is suitable for the point of sells POS end device that communicates with external unit, comprising:
Multi-purpose computer comprises processor and storer, and described multi-purpose computer is configured to executive utility;
Operation is used for the equipment manager that communicates with external unit, the operation of described equipment manager is used for (i) and determines that whether external unit can count first numerical value of the use amount of first function of expression external unit, and (ii) when definite external unit can be counted first numerical value, first order that response is sent by application program obtains first numerical value from external unit;
Counter, operation is used to respond second order of being sent by application program and determines second value, described second value is represented the use amount of second function of external unit virtually, and the 3rd order that response is sent by application program, under situation to first numeric counter, first numerical value, second value or the combination of the two are notified to application program, in the absence that first numerical value is counted, to the application notification second value; And
Renovator, operation is used to respond the 4th order of being sent by application program, the third value that reference response the 4th order obtains under the situation that first numerical value is counted not and under the situation that first numerical value is counted with reference to first numerical value and third value, upgrade second value
Wherein, when under the situation that first numerical value is counted, upgrading second value, keep first numerical value.
CNB2005100791973A 2004-09-28 2005-06-30 POS terminal device Expired - Fee Related CN100552734C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2004281543 2004-09-28
JP2004281543 2004-09-28
JP2005133882 2005-05-02

Publications (2)

Publication Number Publication Date
CN1755738A CN1755738A (en) 2006-04-05
CN100552734C true CN100552734C (en) 2009-10-21

Family

ID=36688935

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100791973A Expired - Fee Related CN100552734C (en) 2004-09-28 2005-06-30 POS terminal device

Country Status (1)

Country Link
CN (1) CN100552734C (en)

Also Published As

Publication number Publication date
CN1755738A (en) 2006-04-05

Similar Documents

Publication Publication Date Title
US6246485B1 (en) Printer communication system and method
US6734985B1 (en) Printing apparatus, printing system and method of controlling same
US20160380852A1 (en) Control Device, Network System, and Server
JP5479177B2 (en) Information processing apparatus, consumable management method, and program
US10606534B2 (en) Server system, terminal device, operating information collection system, program, server system operating method, and terminal device operating method
JP6504117B2 (en) Management system and method
CN100552734C (en) POS terminal device
US7398922B2 (en) POS terminal apparatus
JP2002092745A (en) Management system for consumable parts of printing device in POS terminal, management method thereof, computer program product, and information recording medium
CN116974494A (en) Method and device for determining mileage of printing paper, electronic equipment and storage medium
US9174456B1 (en) Printing device, notification method, and ink ribbon cassette
EP1640870B1 (en) Device management apparatus and method for monitoring usage of a group of devices
JP2020013262A (en) Management system, management method, management server, and printer
JP6417593B2 (en) Information processing method, print control method
JP2010149392A (en) Image formation device and program
JP4513405B2 (en) Status monitoring device, status monitoring method, and status monitoring program
RU59857U1 (en) DOCUMENT OPERATION OPTIMIZATION SYSTEM
JP6369089B2 (en) Information communication system, information processing apparatus, and information collection method
CN100412855C (en) Equipment management device and equipment management method
US20090327103A1 (en) Methods and systems of maintaining an inventory level in a production environment
JP7545321B2 (en) Image processing device, method and program
JP2017040978A (en) Image forming apparatus and image forming system
JP7078413B2 (en) Information processing equipment, information processing system, and information processing method
JP2008068543A (en) Controller for printing, printing device, printing system, and program for printing
JP2021094696A (en) Information processing device, method and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091021

Termination date: 20190630

CF01 Termination of patent right due to non-payment of annual fee