Sign In to Follow Application
View All Documents & Correspondence

Device Control System Printer And Method For Controlling Device Control System

Abstract: The present invention enables a device to be controlled by a terminal connected to a network. A device control system is provided with a terminal (3) equipped with a web browser (31) and a printer (5) for controlling a connected device. The terminal (3) calls an object that a device API (33) for controlling the device by a web application (32) has in accordance with the device and transmits a request to the printer (5). The printer (5) executes a device control script (502) for controlling the device and controls the device upon receiving the request transmitted via the device API (33).

Get Free WhatsApp Updates!
Notices, Deadlines & Correspondence

Patent Information

Application #
Filing Date
12 August 2014
Publication Number
21/2015
Publication Type
INA
Invention Field
COMPUTER SCIENCE
Status
Email
Parent Application

Applicants

SEIKO EPSON CORPORATION
4 1 Nishi shinjuku 2 chome Shinjuku ku Tokyo 1630811

Inventors

1. TAKASU Kazuhiro
c/o SEIKO EPSON CORPORATION 3 5 Owa 3 chome Suwa shi Nagano 3928502
2. TSUTSUMI Koichiro
c/o SEIKO EPSON CORPORATION 3 5 Owa 3 chome Suwa shi Nagano 3928502
3. IKEDA Shigeo
c/o SEIKO EPSON CORPORATION 3 5 Owa 3 chome Suwa shi Nagano 3928502

Specification

[DESCRIPTION]
[Title of Invention]
A device control system, a printer, and a control method of the
device control system
[~echnical Field]
[0001]
The present invention relates to a device control system that
controls a device, a printer, and a control method of the device
. control system.
[Background]
[00021
A device (such as a computer) used as a controller for
controlling devices is conventionally part of a system that controls
devices such as a keyboard and barcode scanner by means of a terminal
connected to a network.
[Citation List]
[Patent Literature]
[PTL 11 JP-A-2004-152256
[Summary of Invention]
[Technical Problem]
[0003]
However, there is also a need to use devices such as above by
means of a simple configuration.
The present invention is directed to the foregoing problem, and
an object of the invention is to provide a device control system,
a printer, and a control method of a device control system that can ,
control devices by a terminal connected to a network.
[Solution to Problem]
[00041
I
To achieve the foregoing object, a device control system 1
I
I
1
according to the invention has a device; a device control device
including a connection unit configured to connect to the device, and
a device control unit configured to control the device connected to
the connection unit; and a terminal that runs a web browser executing
a device application programming interface that connects to the
device control device, displays a web application, and controls the
device.
The inventionenables controllingadevice connectedtoadevice
control device through the web browser of a terminal.
[00051
In the invention, the device application programming interface
has an object that supports the device; and the web application calls
the object and sends a request to the device control device.
[0006]
In another aspect of the invention, the device control device
executes a device control script that controls the device; and the
device control script connects to the object, receives the request
sent by the terminal, and controls the device connected to the
connection unit.
[00071
In another aspect of the invention, the device control script
has a device connection object that sends and receives data with the
device, and a client connection object that sends data to the device
API .
In another aspect of the invention, the request is a start
control request specifying the device connected to the device control
device and instructing starting control of the device; the command
is a start control command instructing starting control of the
device; and when the terminal sends the start control request to the
device control device, the device control device sends the start
control command tothe device specifiedbythe start control request,
and enables control of the device by the terminal.
[00091
Another aspect of the invention also has a second terminal
running a web browser that executes a second device application
programming interface that connects to the device control device,
displays a second web application, and controls the device; the
second the device application programming interface having a second
object that supports the device.
[00101
In another aspect of the invention, when the device can be
controlled by the terminal, the device control device exclusively
locks the device, and if the second web application calls the second
object and sends a second request to the device control device, does
not allow control of the device in the second request.
I Inanother aspect ofthe invention, if the second terminal sends
the second request to the device control device when the device can
be controlled by the terminal, the device control device sends a
report indicating the device is busy to the second terminal.
[00121
In another aspect of the invention, the device is a printer
configured to print; and if the second terminal sends the second
request to the device control device when the printer can be
controlled by the terminal, the device control device enables,the
I second terminal to control the printer by the device control script
I based on the second request.
i In another aspect of the invention, the web application of the
* terminal calls the object andsends a stop control request specifying
the device and instructing ending control of the device to the device
control device; and when the terminal sends the stop control request
tothe device control device, the device control device sends a second
command instructing stopping control by the device control script
tothe device specifiedbythe stop control request, andstops control
of the device by the terminal.
[0014]
In another aspect of the invention, when the second terminal
sendsthe secondrequest tothe device control device after the device
control device stops control ofthedeviceby the terminal, thedevice
control device enables control by the second terminal of the device
by the device control script based on the second request.
[00151
In another aspect of the invention, the device application
programminginterface detects connectionof the object and the device
control script of the device control device.
In another aspect of the invention, the object calls an event
contained in the device control script.
[0016]
' In another aspect of the invention, the device is a display
configured to display content; the request is a display request that
specifies the display andrequests displayingcontentonthe display;
and when the terminal sends the display request to the device control
device, the device control device sends a display command requesting
display by the device control script to the display specified by the
display request.
[00171
Inanother aspect ofthe invention, the displayrequest requests
displaying time on the display.
In another aspect of the invention, the request is a
registration request that specifies the device and requests
registering image data in the device; and when the terminal sends
the registration request to the device contro'l device, the device
control device sends a registration command instructing registering
the.image by the device control script to the device specified by
the registration request.
The terminal also sends the image data to the device control
device; and the device control script converts the image data to the
raster image data.
The request is also an encryption request that specifies the
device, andinstructs whetherornot toencrypt datasent andreceived
between the device and the terminal.
[00191
Another aspect of the invention is a printer including: a
connection unit configured to connect to a device; a device control
unit configured to execute a device control script that controls a
i
device, and to control the device connected to the connection unit;
and a print unit configured to print.
[ 0 0 2 0 ]
Another aspect of the invention is a control method of a device
control system, including: a terminal that runs a web browser, a
device, and a device control device configured to connect to the
device; calling an object supporting the device by a web application
that runs on the web browser; sending a request to the device control
device; executing a device control script that controls the device
by the device control device; sending to the device a command that
controls the device by the device control script based on the request
received by the device control device; and establishing control of
the device by the terminal.
The request is a start control request specifying the device
connected to the device control device and instructing starting
control of the device; and when the terminal sends the start control
request to the device control device, the device control device sends
the control command to the device, and starts control of the device
by the terminal.
[Brief Description of Drawings]
[0021]
F I G . 1 illustrates a device control system according to a first
embodiment of the invention.
F I G . 2 illustrates a device control system according to a second
embodiment of the invention.
F I G . 3 illustrates a device control system according to a third
embodiment of the invention.
F I G . 4 shows an example cf device connections to an intelligent
printer.
F I G . 5 shows an example of a device connection to an intelligent
printer.
F I G . 6 shows a connector panel.
F I G . 7 illustrates connection of a wireless LAN unit.
F I G . 8 shows the functional configuration of the device control
system.
F I G . 9 shows examples of key codes that can be acquired from
a keyboard.
F I G . 10 shows the work flow of building a system.
F I G . 11 shows a method of registering web content.
F I G . 12 shows a method of registering web content.
, .
F I G . 13 shows a method of registering a device control script.
F I G . 14 shows a method of registering a device.
- 8 -
F I G . 15 shows types of devices selected in device registration.
F I G . 16 shows input items when registering a network printer.
I F I G . 17 shows input items when registering a customer display.
I F I G . 18 shows input items when registering a key input device.
I F I G . 19 shows input items when registering a serial
I communication device.
F I G . 20 shows input iterns when registering another device.
F I G . 21 shows the programming flow.
F I G . 22 shows a device object.
F I G . 23 shows an object of a Common to Device Object.
I F I G . 24 shows a display object.
I F I G . 25 shows a keyboard object.
F I G . 26A shows a printer object.
F I G . 26B shows a printer object.
I F I G . 26C shows a printer object.
F I G . 27 shows a scanner ob~ect.
F I G . 28 shows a Simpleserial object.
F I G . 29 shows a specific example of a connect method.
F I G . 30 shows an isconnect method.
.. ..
F I G . 31 shows a createDevice method.
I F I G . 32 shows a createDevice method.
I F I G . 33 shows a deleteDevice method.
F I G . 34 shows a createwindow method.
F I G . 35 shows a moveCursor~osition method.
F I G . 36 shows a setCursorType method.
1 F I G . 37 shows a addText method.
F I G . 38 shows a addReverseText method.
F I G . 39 shows a addMarquee method.
F I G . 40 shows a addMarquee method.
F I G . 41 shows a setBrightness method.
FIG. 42A describes an onreceive event.
FIG. 42B describes an onreceive event.
FIG. 42C describes an onreceive event.
FIG. 43 describes an onkeypress event.
FIG. 44 describes an onstring event.
FIG. 45A describes an addTextAlign method.
FIG. 45B describes an addTextAlign method.
FIG. 45C describes an addTextAlign method.
FIG. 46A describes an addTextLineSpace method.
FIG. 46B describes an addTextLineSpace method.
FIG. 47A describes an addTextRotate method.
FIG. 47B describes an addTextRotate method.
FIG. 47C describes an addTextRotate method.
FIG. 48A describes an addText method.
FIG. 48B describes an addText method.
FIG. 48C describes an addText method.
FIG. 49A describes an addTextLang method.
FIG. 49B describes an addTextLang method.
FIG. 49C describes an addTextLang method.
FIG. 50A describes an addTextFont method.
FIG. 50B describes an addTextFont method.
FIG. 50C describes an addTextFont method.
FIG. 51A describes an addTextSmooth method.
FIG. 51B describes an addTextSmooth method.
FIG. 51C describes an addTextSmooth method.
FIG. 52A describes an addTextDouble method.
FIG. 52B describes an addTextDouble method.
FIG. 52C describes an addTextDouble method.
FIG. 52D describes an addTextDouble method.
FIG. 53A describes an addTextSize method.
FIG. 53B describes an addTextSize method.
FIG. 53C describes an addTextSize method.
FIG. 53D describes an addTextSize method.
FIG. 54A describes an add~ext~t~mleteh od.
FIG. 54B describes an addTextStyle method.
FIG. 54C describes an addTextStyle method.
FIG. 54D describes an addTextStyle method.
FIG. 54E describes an addTextStyle method.
FIG. 54F describe's an addTextStyle method.
FIG. 55A describes an addTextPosition method.
FIG. 55B describes an addTextPosition method.
FIG. 56A describes an addFeedUnit method.
FIG. 56B describes an addFeedUnit. method.
FIG. 57A describes an addFeedLine method.
FIG. 57B describes an addFeedLine method.
FIG. 58A describes an addImage method.
FIG. 58B describes an addImage method.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
FIG.
58C describes an addImage method.
58D describes an addImage method.
59A describes an addLogo method.
59B describes an addLogo method.
60A describes an addBarcode method.
60B describes an addBarcode method.
60C describes an addBarcode method.
60D describes an addBarcode method.
60E describes an addBarcode method.
60F describes an addBarcode method.
60G describes an addBarcode method.
60H describes an addBarcode method.
601 describes an addBarcode method.
F I G . 61A describes an addsymbol method.
F I G . 61B describes an addsymbol method.
F I G . 61C describes an addsymbol method.
F I G . 61D describes an addsymbol method.
F I G . 61E describes an addsymbol method.
F I G . 61F describes an addsymbol method.
F I G . 61G describes an addsymbol method.
F I G . 62A describes an addHLine method.
F I G . 62B describes an addHLine method.
F I G . 62C describes an addHLine method.
F I G . 63A describes an addVLineBegin method.
F I G . 63B describes an addVLineBegin method.
F I G . 63C describes an addVLineBegin method.
F I G . 64A describes an addVLineEnd method.
F I G . 64B describes an addVLineEnd method.
F I G . 64C describes an addVLineEnd method.
F I G . 65 describes an addPageBegin method.
F I G . 66 describes an addPageEnd method.
F I G . 67A describes an addPageArea method.
F I G . 67B describes an addPageArea method.
F I G . 68A describes an addPageDirection method.
F I G . 68B describes an addPageDirection method.
F I G . 68C describes an addPageDirection method.
F I G . 69A describes an addpageposition method.
F I G . 69B describes an addPagePosition method.
F I G . 70A describes an addPageLine method.
F I G . 70B describes an addPageLine method.
F I G . 70C describes an addPageLine method.
F I G . 71A describes an addPageRectangle method.
F I G . 71B describes an addPageRectangle method.
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
71C describes an addPageRectangle method.
72A describes an addcut method.
72B describes an addcut method.
72C describes an addcut method.
73A describes an addpulse method.
73B describes an addpulse method.
73C describes an addpulse method.
73D describes an addpulse method.
74A describes an addsound method.
74B describes an addsound method.
74C describes an addsound method.
F I G . 74D describes an addsound method.
F I G . 75A describes an addcommand method.
F I G . 75B describes an addcommand method.
F I G . 76A describes a print method.
F I G . 76B describes a print method.
F I G . 76C describes a print method.
F I G . 77 describes a halftone property.
F I G . 78A describes an onreceive event.
F I G . 78B describes an onreceive event.
F I G . 78C describes an onreceive event.
F I G . 78D describes an onreceive event.
F I G . 79 describes an onerror event.
F I G . 80 describes an ondata event.
F I G . 81 describes using a device control script.
F I G . 82 describes an object of a device control script.
F I G . 83 shows a list of device control script properties.
F I G . 84 shows a list of device control script properties.
F I G . 85 shows a specific example of device control script 502
F I G . 86 shows an API list of the Clientconnection.
F I G . 87 shows an API list of the . Deviceconnection object.
F I G . 88 shows an API list of the device control script name
object.
F I G . 89 describes an API of the Clientconnection object.
F I G . 90 describes an onDeviceData event.
F I G . 91 shows an example of a POS terminal.
F I G . 92 shows a sample program for a printer.
F I G . 93 shows the flow of setting the sample program
environment.
F I G . 94 shows an example of a screen for registering the sample
program.
F I G . 95 shows a window for setting the customer display.
F I G . 96 shows a window for setting the POS keyboard/barcode
scanner.
F I G . 97 shows an example of device settings.
F I G . 98 shows a display sample of the sample program.
F I G . 99A shows a example of a Customer Display Sample screen.
F I G . 99B shows a example of a Customer Display Sample screen.
F I G . 99C shows a example of a Customer Display Sample screen.0
F I G . 100A shows an example of Keyboard Sample screen.
F I G . 100B shows an example of input and the result to the
Keyboard Sample screen.
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
F I G .
lOOC shows an example of a Keyboard Sample screen.
101A shows an example of a Printer Sample screen.
lOlB shows an example of a Printer Sample screen.
lOlC shows an example of a Printer Sample screen.
102A shows an example of a Barcode Scanner Sample screen.
102B shows an example of a Barcode Scanner Sample screen.
103A shows an example of a POS Terminal Sample screen.
103B shows an example of a Settings screen.
FIG. 104A shows an example of a POS Terminal Sample screen.
FIG. 104B shows an example of a POS Terminal Sample screen.
FIG. 104C shows an example of a POS Terminal Sample screen.
[Description of Embodiments]
[0022]
A preferred embodiment of the invention is described below with
reference to the accompanying figures.
FIG. 1 shows the configuration of a device control system 100
including an application server 2 according to a first embodiment
applying the invention.
The device control system 100 includes the application server
2, aterminal 3, and aprinter 5 (intelligent printer). In this device
control system100, the application server 2, terminal3, andprinter
5 are connected over a communication network. In the example shown
in FIG. 1, the device control system 100 has a wireless LAN access
point 11, and the application server 2, printer 5, and wireless LAN
access point 11 are connected by a wired LAN. The wireless LAN access
point 11 connects the terminal 3 to the wired LAN. The terminal 3
can therefore be used anywhere within communication range of the
wireless LAN access point 11.
[00231
A network printer 7, customer display 8, and barcode scanner
9 are connected to the printer 5 as controlled devices. The network
printer 7 is connected to the printer 5 through a network. The
customer display 8 and barcode scanner 9 are connected through a USB
interface described below. These devices are generally called
peripheral devices (peripherals), and are referred to below as
devices.
Devices that connect to the printer 5 are not limited to the
devices shown in FIG. 1. For example, displays, and key input devices
- 15 -
such as keyboards are also included. Also included are devices that
can be controlled by a HID (human interface device) driver standard
to the OS, serial communication devices that can be operated using
l a serial communication driver standard to the OS, and USB devices
that can be controlled in t,he same way as serial communication
devices.
[0024]
I The terminal 3 has a network-connectable web browser, and
I devices connected to the printer 5 can be controlled through this
web browser.
The terminal 3 can be any terminal with a network-connectable
1 web browser, and a tablet computer known from the literature such
I
as shown in F I G . 1 can be used. A separate device (such as a computer)
used as a controller for controlling the devices does not to be
included in the device control system 100.
[00251
Operation of the device control system 100 is described next.
(1) Place a web application on the application server 2.
(2) Display the web application with the web browser of the
terminal 3.
(3) The web browser of the terminal 3 sends a request message
to the printer 5.
(4) The printer 5 receives the request message. Based on the
received request message, the printer 5 sends data to a device that
can be controlled by the printer 5.
(5) The network printer 7, customer display 8, and barcode
scanner 9 connected to the printer 5 are controlled.
(6) The printer 5 returns a response to the web application.
lo0261
F I G . 2 shows the configuration of a device control system 200
with an application server 2 according to a second embodiment of the
invention. This device control system 200 has a terminal 3 and a
printer 5. In this device control system 200, the application server
2 is connected to the terminal 3 through a telecommunication network
such as the Internet. In the example in FIG. 2, a customer display
8 is connected to the printer 5.
[00271
Operation of this device control system 200 is described next.
(1) Place a web application on the application server 2.
(2) Display the web application with the web browser of the
terminal 3.
(3) The web browser of the terminal 3 sends a request message
to the printer 5.
(4) The printer 5 receives the request message. Based on the
received request message, the printer 5 sends data to a device that
can be controlled by the printer 5.
(5) The network printer 7, customer display 8, and barcode
scanner 9 connected to the printer 5 are controlled.
(6) The printer 5 returns a response to the web application.
[0028]
FIG. 3 shows the configuration of a device control system 300
according to a third embodiment of the invention. This example uses
the device control system300 as anapplication server. In this device
control system 300, the terminal 3 is connected to the printer 5.
Operation of the device control system 300 is described next.
(1) Place a web application on the printer 5.
(2) Display the web application with the web browser of the
terminal 3.
(3) The web browser of the terminal 3 sends a request message
to the printer 5.
(4) The printer 5 receives the request message. Based on the
received request message, the printer 5 sends data to a device that
can be controlled by the printer 5.
(5) The network printer 7, customer display 8, and barcode
scanner 9 connected to the printer 5 are controlled.
(6) The printer 5 returns a response to the web application.
In a system applying the invention, a terminal 3 with an
installed web browser can thus display a web application and control
a device connected to the printer 5.
The configuration of the printer 5 is described next.
The printer 5 has a CPU, RAM, flash ROM, nonvolatile memory,
a video controller, an auxiliary storage device (SSD: solid. state
drive), interface, and a loc~lp rinter (print unit) . The printer 5
could also have a speaker. The local printer is a thermal printer
that can print on 80 mm wide or 58 mm wide roll paper.
The printer 5 can be installed in a POS (point of sale) system.
The operating system (0s) of the printer 5 is Windows (R) based, for
example, and is stored in the auxiliary storage device.
[00311
A device control program, which is software for the terminal
3 to control devices connected to the printer 5, is installed to the
printer 5. As a result, installing a driver program to the terminal
3 is not necessary.
The printer 5 also has a Windows (R) standard device driver
program (APD), UPOS driver, OPOS driver, or other software for
controlling devices and the local printer of the printer 5.
Aweb application canbe installed tothe printer 5. This enables
using the printer 5 as an application server as shown in FIG. 3. The
web application could, for example, be a PHP and Per1 server-side
script or SQLite database access script (server-side script).
[00321
FIG. 4 shows an example of device connections to the printer
5 .
. The foregoingnetwork printer 7, customer display 8, andbarcode
scanner 9 canbe connected tothe printer 5. Adisplay12, cashdrawer
13, and keyboard 14 can also be connected to the printer 5. FIG. 5
shows the external appearance of the printer 5.
A roll paper cover 51 is disposed to the top of the printer 5.
The roll paper cover opens when the cover open button 52 is pressed,
and roll paper can be loaded. A manual cutter 53 for manually cutting
the roll paper, and a cutter cover 54, are disposed to the paper exit
from which the roll paper is discharged after printing. The cutter
cover 54 is opened when a paper jam occurs in the local printer of
the printer 5, and when the roll paper cover 51 does not open. The
blade of the manual cutter 53 returns to the home position when the
cutter cover 54 opens. The printer 5 also has a power switch 56B,
reset button 56A, LED display unit 57, and control panel 58. The LED
display unit 57 includes a disc access LED indicating accessing the
auxiliary storage device, and status LEDs. The status LEDs report
the operating state of the OS, the standby mode of the OS, that the
power is off, the OS start-up sequence, and a high CPU temperature
warning.
The control panel 58 includes a power LED, error LED, roll paper
LED, and paper feed button. The power LED lights when power is
supplied. The ersor LED is off during normal operation, and lights
when the printer resets and when the end of the roll paper is detected
and printing stops. The paper LED is off when sufficient roll paper
remains, lights steady when little paper is left, and blinks when
the self-diagnostic test is running. Pressing the feed button
advances the roll paper one line at a time or continuously.
[00331
A connector cover 59 is disposed to the back of the printer 5.
I Removing the connector cover 59 exposes the connector panel
I (connection panel) on the back of the printer 5.
I F I G . 6 shows the connection panel 60. The connection panel 60
I includes a drawer kick-out connector 61, Ethernet connector 62, USB
I connector 63, VGA connector 64, COM connector 65, line output 66,
I and DC input connector 67. The connection panel 60 is the connection
I unit of the accompanying claims. However, the local printer 55
I incorporated in the printer 5 is also one of the devices connected
I to the printer 5. The connection unit therefore includes the
I connection panel 60 and an internal interface of' the printer 5.
The cash drawer 13 or an optional buzzer is connected to the
drawer kick-out connector 61. The Ethernet connector 62 is connected
to the network. The USB connector 63 has six USB ports. The customer
I display 8, barcode scanner 9, keyboard 14, and other devices are
connected to the USB connector 63. The display 12 is connected to
the VGA connector 64. A serial interface for serial communication
I devices connects to the COM connector 65. The line output 66 connects
I to an external speaker.
I F I G . 7 illustrates connection of a wireless LAN unit 17. The
wireless LAN unit 17 plugs into a USB extension cable 15, and the
USB extension cable 15 plugs into -the USB connector 63. The printer
5 can thus be connected to a wireless LAN.
[00341
An embodiment of the invention is described in detail below
using the device control system 100 as an example.
F I G . 8 illustrates the functional configuration of the device
control system 100.
The web browser 31 of the terminal 3 displays a web application
32 provided by the application server 2. The web application 32 calls
a device application programming interface (API) 33 of the web
browser 31. The device API 33 is, for example, a Java (R) script,
and as described below instantiates an object that controls a device
connected to the printer 5. The web application 32 calls (APICall)
an object of the device API 33. The device API 33 sends a request
(Request) to the printer 5 by a function of the called object.
[0035]
The device service interface 501 of the printer 5 receives the
request, and controls a device control script 502. The device control
script 502 controls a key ini~ut device 18 and serial communiqation
device 19. The device control script 502 acquires data input by the
key input device 18, and outputs data to the device service interface
501'. The device control script 502 handles data communication with
the serial communication device 19, and outputs data received from
the serial communication device 19 to the device service interface
501. The key input device 18 in this example includes the keyboard
14, and the serial communication devices 19 include the barcode
scanner 9 and cash drawer 13.
The device service interface 501 exchanges data with the local
printer55. The local printer55 is the localprint unit ofthe printer
5. The device service interface 501 also exchanges data with the
network printer 7 and customer display 8. The device service
interface 501 outputs device events (Event) and device responses
(Response) to the device API 33. The device API 33 outputs a response
(Callback) to the web application 32.
[0037]
A terminal 3 controls a device connected to a printer 5 in the
device control system 100 by the operation described above.
The invention is thus used to control devices (peripherals)
connected to a printer 5 in a multi-platform environment. By using
this system, devices can be controlled using a personal computer,
smartphone, or tablet computer in which a web browser is installed.
LOO381
The device API 33.has the following features.
* Can encrypt the content of device communications.
* Devices that operate according to a driver standard to the
OS of the printer 5 can be used through the device control script
502 without installing a specific driver on the printer 5. Because
thedevicecontrol script502 is writteninJavascript ( R ) , thedevice
control script 502 can be developed in the same language as the web
application 32.
* When a device is accessed using the device API 33, the device
is automatically exclusively locked. Multiple terminals therefore
cannot access and control a device at the same time. When the terminal
3 controlling a device releases the device, the device can then be
controlled from another terminal 3.
[0039]
The device API 33 also has the following features.
* Commands that print lines can be used when the network printer
7 or the local printer 55 of the printer 5 supports a line command.
* Buzzer functions can be used when the printer 5 or network
printer 7 is connected to a buzzer.
*Key codes that canbe acquired fromthe keyboard14 are limited.
Key codes that can be acquired from the keyboard 14 are shown in FIG.
9.
[0040]
Building a device service interface 501 environment is
described next.
FIG. 10 shows the flow of work when building an environment.
1. Network settings
Configure the system and printer 5 network. These settings can
be made using the same procedure used for conf iguring a windows (R)
network.
[004 11
2. Register web content
Register the web content in the printer 5 from the web browser.
The printer 5 can function as a web server to register web
content. The registeredweb content canbeviewed fromthewebbrowser
31 of the terminal 3.
The registered web content is compressed to a single file in
ZIP format containing all content files. The name of the ZIP file
can be specified as desired. The ZIP file name and subfolder names
are written using ASCII characters.
Web content cannot be appended, and all files are registered
by overwriting the old files. When accessing web content registered
in the printer 5 from the terminal 3, for example, the URL that is
accessed differs according tu the folder structure of the ZIP file.
Specific examples are shown in FIG. 11 (1) and (2).
100421
3. Connect a device to the printer 5
Connect a device to the printer 5 . As described above,
connectable devices include the customer display 8, barcode scanner
9, display 12, cash drawer 13, and keyboard 14. Also included are
devices that can be controlled by a HID driver standard to the OS,
serial communication devices that can be operated using ,a serial
communication driver standard to the OS, and USE devices that can
be controlled in the same way as serial communication devices. The
connection panel 60 in FIG. 6 shows only one COM connector 65, but
plural serial communication devices can be connected if a serial-USB
conversion cable is used and the driver program is compatible with
serial-USB conversions.
4. Register device control script
- A device control script prepared by the user is registered in
order for the printer 5 to control devices other than products with
which the printer 5 is compatible. Registration is done from the web
browser.
5. Register device
Register the device connected to the printer 5 in the printer
5 software. Registration is done from the web browser.
The web browser used for steps 1 to 5 includes the web browser
31.
[00431
The method of registering web content in step 2 is described
in detail.
The web content registration file is registered by the web
browser displaying the TMNetWebConfig utility as shown in FIG. 12.
The registration steps are as follow.
(1) Combine the web content to register in a single ZIP file.
(2) Turn the printer 5 power on.
(3) start the web browser, and input the URL (http: //IP address
of printer 5/~~~et~eb~onfigj).
(4) The TMNetWebConfig utility starts. Click on [Web service
settings] - [Update settings] in the window shown in FIG. 11.
(5) The Web Content Update Settings screen is displayed. Click
on [Browse] in the web content file field, and select the ZIP file
containing the web content that was prepared in step (1).
(6) Click [Upload] .
[0044]
Registering a device control script in step 4 is described in
detail.
The device control script prepared by the user is registered
by the web browser displaying the TMNetWebConfig tool as shown in
FIG,. 13. This method enables the user to connect a prepared device
to the printer 5 and control the device, and enables the user to
developand registera device control script to customize device data
processing.
The registration steps are as follow.
(1) Prepare a customized device control script.
(2) Turn the printer 5 power on.
(3) Start the web browser, and input the URL (http: //IP address-.
of printer 5/~M~et~eb~onfig/).
(4) Start the TMNetWebConfig utility. Click on [Web service
settings] -[~egister/delete] in the window shown in FIG. 12.
(5) The Control Script screen is displayed. Click on [Browse]
in the Control script to be registered field, and select the device
control script to register.
(6) Click [Register] . The device control script is registered
and listed in the Registered control scripts field in the bottom of
the window.
[00451
Registering a device in step 5 is described in detail.
A device is registered by the web browser displaying the
TMNetWebConfig tool as shown in FIG. 14.
The registration steps are as follow.
(1) Start the web browser, and input the URL (http: //IP address
of printer 5/~M~etwebConigf/ ) .
(2) Start the TMNetWebConfig utility. From [Web service
settings] - [Device registration] in the window shown in FIG. 14,
clickonthe type of device toregister. Adevicelist301is displayed
under Device registration in the screen shown in FIG. 14. Click on
the type of device to register from the device list 301. The type
of device in this embodiment canbe selected from five types, printer,
display, key input device, serial communication device, and other
as shown in FIG. 15. Details about the types of devices are as shown
in FIG. 15.
[0046]
(3) A configuration screen is displayed for each device. The
connected device is registered in the printer 5.
(3-1) To register a printer
Registration of the local printer incorporated in the printer
5 can be confirmed as follows.
(3-1-1) Check that "printer 5" is registered for the device ID
Ifloca-lp rinterf1i n the Registered Printer field in the screen shown
in FIG. 14.
(3-1-2) Click on [Test printing] . Check that TEST - PRINT is
printed by the local printer,.
(3-1-3) Register the connected network printer 7.
Register the network printer 7 by the following steps.
(3-1-3-1)S et the items shown in FIG. 16 (device ID, type, model
number, IP address, retry interval), and click [~egister.]
(3-1-3-2) After confirming the printer is added to the
Registered Printer list, click [Test printing] . Confirm that
TEST - PRINT is printed by the registered network printer 7.
(3-2) To register a display (customer display 8)
The device ID of the customer display is a constant.,
"local- d isplayff.R egister the connected customer display 8 by the
following steps.
,
(3-2-1) Select Use in the screen shown in FIG. 14. 1
(3-2-2) Set the items (communication settings, brightness I
settings) in FIG. 17, and click [Register].
I
I
(3-2-3) Click [Test display]. Confirm that text is displayed 1
on the customer display 8. ~
I
(3-3) To register a key input device 18
I
Register the connected key input device 18 by the following 1
steps. 1
I
(3-3-1) Set the items (device ID, device name, control script)
in FIG. 18, and click [Register] . ~
(3 -3 -2) After confirming the registered device was added to the
I
Registered Key Input Device field, click [Operating test].
(3-3-3) A screen will be displayed by the web browser. Operate
the key input device 18, and confirm that the result is displayed
I
as operated. I
(3-4) To register a serial communication device 19 ~
Register the connected serial communication device 19 by the
following steps.
(3-4-1) Set the items (device ID, device name, control script,
communication speed, data bit, parity, stop bit, flow control) shown I
inFIG. 19 forthe connectedserialcommunicationdevice19, andclick
[Register] .
(3-4-2) Confirm that the device is added to the Registered
Serial Communication Device field.
(3-5) To register another device
Register another connected device by the following steps.
(3-5-1) Set the items (device ID, control script) shown in FIG.
20 for the connected device, and click [Register].
(3-5-2) Confirm that the device is addedto the Registeredother
Devices field.
[O 04 71
The programming method for developing an application using the
device API 33 is described next.
The device API 33 is embedded as follows.
The device API 33 is providedto enable usingthe device control
function of this system from a client-side JavaScript. The device
API 33 is written in JavaScript. An example of a filename is
device-*. js.
[00481
First, embed the device-*. js file in the application for use.
In preparation, place the device-*.js file on the web server
to use the device API 33.
Next, embed the script in the web page. Embed the script in the
web page using the HTML tag.
(Sample tag)
The programming flow is shown in FIG. 21.
Applications in FIG. 21 corresponds to a web application 32,
Device Control corresponds to a device control function (device API
33 and device service interface 501), and Device denotes the
controlled device.
[00501
1 : Web application 32 sends the llnewEpsonDevice ( ) command,
and a device object is instantiated.
2 : Web application 32 sends the 'IConnect ( ) l1 command, and
establishes a communication path to the device control function.
2.1: The device control function returns llCallback(OK)ll.
3: Web application 32 sends the
I1CreateDevice( DEVICE- T YPE- P RINTER) command.
3.1: Device service interface 501 sends the I1Cmd()l1 command to
the device. I
4 : Device returns l1DeviceopenU.
4.1: Device control function returns llcallback(Object1,0 K')'l.
Web application 32 gets a device object by steps 3 to 4.1.
5: Web application 32 registers a callback according to the
device.
6 : Web application 32 calls a method according to the device.
6.1 : I1Cmd ( ) command is sent to the device.
6.1.1: Device executes the command.
5.1: Device returns the result of command execution.
5.2: Device control function returns llcallback(lsuccess')".
7 : Web application 32 sends I1deleteDevice( Object)" , and
releases the device obj ect .
7.1: I1Cmd()l1 command is sent to the device.
8: Device returns device closed.
8.1: Device control function returns ncallback(lOK1)~.
9: Web application 32 sends command, closes
communication link to device service interface 501.
[0051]
The device API 33 is described in detail next.
The device API 33 provides the following objects.
* Device object (FIG. 22)
* Common to Device Object (FIG. 23)
* Display object (FIG. 24)
* Keyboard object (FIG. 25)
* Printer object (FIG. 26A, FIG. 26B. FIG. 26C)
* Scanner object (FIG. 27)
* Simpleserial object (FIG. 28)
[00521
The Device object is described in detail.
Constructor
Constructor of a Device object. Instantiates and initializes
a Device object.
[Syntax]
Device ( ) ;
[Return value]
Device object
[00531
connect method
Establishes communication link to device service interface 501.
[Syntax]
connect (ipAddress, port, callback) ;
[Parameters]
ipAddress: object type: (String)
Specifies the IP address of0 printer 5.
port : object type : (Number)
Specifies 8008 (port number of device service interface 501).
callback: object type: (Function)
Specifies the callback that receives the process result. A
string shown in FIG. 28 is returned in the first parameter of the
callback.
[00541
disconnect method
Closes the communication path established by the connect
method.
[Syntax]
disconnect ( ) ;
[00551
isconnect method
Obtains the status of the communication path established by the
connect method.
[Syntax]
isconnect ( ) ;
[Return value]
The returnvalue is the status of the communicationpathas shown
in FIG. 30.
[00561
The deviceAP object is described in detail.
createDevice method
Gets a device object to act as the interface to the device.
When this method executes successfully, the specified device
is exclusively locked, and DEVICE - IN - USE is returned when
createDevice is called from another browser. Because the printer is
not exclusively locked, a device object can be obtained by
createDevice from plural browsers.
If createDeviceis executedimmediatelyduring a returnprocess
after anondisconnect event, DEVICE - IN - USE is returned. Inthis event,
the createDevice method retries until a value other than
DEVICE - IN - USE is obtained.
[Syntax]
createDevice (deviceId, deviceType, crypto, callback) ;
[Parameters]
deviceId: object type: (String)
Specifies the device ID.
Declare "local displayf1w hen DEVICE- T YPE- D ISPLAY is specified
in the second parameter (deviceType) ..
deviceType: object type: (String)
Specifies any device type shown in FIG. 31.
crypto: object type: (Boolean)
Specifies whether or not to encrypt communications data.
callback: object type: (Function)
Specifies the callback that receives the process result. If the
second parameter of the callback is OK, the device object is returned
in the first parameter. The second parameter is a string shown in
FIG. 32.
[0057]
I deleteDevice method
I Releases a device for use by another client.
[Syntax]
deleteDevice (deviceObject, callback);
[Parameters]
deviceobject: object type: (object)
I Specifies the device object. ~ callback: object type: (Function)
Specifies the callback that receives the process result. The
parameter of the callback is a string shown in FIG. 33.
[0058]
getAdmin method
Obtains the administrator set in the printer 5. (The
administrator can be set using the TMNetWebConfig utility.
[Syntax]
ge tAdmin ( ) ;
[Return value]
String of administrator's name (String)
[00591
getLocation method
Gets the installation location value set in the printer 5. The
reset method
Adds the initialization settings of the customer display 8 to
the command buffer. Initialization results in the following.
* All displayed characters are deleted, and all registered
windows are cleared.
* Cursor returns to default state and moves to the home position
on the display.
* Display blinking and display brightness return to the default
settings.
[Syntax]
reset ( ) ;
[Return value]
Display object
[00631
' *
createwindow method
Adds window settings to the command buffer, Windows are defined
to not overlap previously defined windows. A window size that fits
in the size of the display (20 columns x 20 rows) is specified.
[Syntax]
createwindow (number, x, y, width, height, scrollMode) ;
[Parameters]
number: object type: (Number)
Specifies a window number in the range 1 to 4.
x: object type: (Number)
Specifies the x-coordinate of the window origin on the display.
Specify a value from 1 to 20.
y: object type: (Number)
Specifies the y-coordinate of the window origin on the display.
Specify 1 or 2.
width: object type: (Number)
Specifies the width of the window.
height : object type : (Number)
Specifies the height of the window.
scrollMode: object type: (String)
Specifies the scrolling mode of the window. Select from the
parameters shown in FIG. 34.
[Return value]
Display object
[0064]
destroywindow method
Adds the destroy setting of a defined window to the command
buffer.
[Syntax]
des troywindow (number) ;
[Parameters]
number : object type : (Number)
Specifies the number of the window to destroy. Specify a number
from 1 to 4.
[Return value]
Display object
[0065]
setcurrentwindow method
Adds a setting to change the current window tothe commandbuffer.
Makes the specified window the current window, and then moves the
cursor to the origin of the current window.
[Syntax]
setcurrentwindow (number) ;
[Parameters]
number : ob j ec t type : (Number)
Specifiesthenumberofthewindowto switchto. Specify anumber
from 1 to 4.
[Return value]
Display object
[006 61
clearwindow method
Adds acommandtoclearthe current windowtothe commandbuffer.
[Syntax]
clearwindow ( ) ;
[Return value]
Display obj ect
100671
setCursorPosition method
Adds a cursor position setting to the command buffer.
[Syntax] I
setCursorPosition (x, y) ;
[Parameters]
x: object type: (Number)
Specifies the x-coordinate of the destination. Specify a value
from 1 to 20.
y: object type: (Number)
Specifies t'he y-coordinate of the destination. Specify 1 or 2.
[Return value]
Display object
[0068]
moveCursorPosition method
Adds the cursor position settings in the current window to the
command buffer.
[Syntax]
moveCursorPosition (position) ;
[Parameters]
Adds the screen blinking settings to the command buffer.
[Syntax]
setBlink (interval) ;
[Parameters]
interval: object type: (Number)
Specifies the blinking interval (ms) . Specify a number from 0
1 to 12700. The specified setting is rounded in 50 ms . increments. The
display lights steady when 0 is specified.
[Return value]
' Display object
[0074]
setBrightness method
I Adds the display brightness setting to the command buffer.
[Syntax]
set~rightness (brightness) ;
I [Parameters]
brightness: obj ect type : (Number)
Specifies the display brightness setting. Select from'the
parameters shown in FIG. 41.
[Return value]
Display object
[0075]
showclock method
Adds a clock display to the command buffer.
When the clock is displayed, all displayed strings are cleared.
! Clock display ends if another command is sent while the clock is
I displayed.
[Syntax]
showClock ( ) ;
[Return value]
Display object
[0076]
addcommand method
Adds a command to the command buffer.
[Syntax]
addcommand (data) ;
[Parameters]
data: object type: (String)
Specifies an ESC/POS command as a string. The command string
is separated by "\xu. Example: "\xlB\x40"
[Return value]
Display object
LO0771
send method
Sends the command in the command buffer.
[Syntax]
[0078]
onreceive event
Receives the command execution results.
[Syntax]
Function (response) ;
[Parameters of the callback function]
response: object type: (Object)
Receives the result of command execution. The properties shown
in FIG. 42A are included. Success values are shown in FIG. 42B; code
values are shown in FIG. 42C.
[00791
The ~e~boarodbj ect is described next.
setprefix method
Specifies the key code used to detect the beginning of a string
when keyboard input is received as a batch of strings.
[Syntax]
setPref ix (data) ;
[Parameters]
data: object type: (Array)
Specifies the key code array. The key codes are as shown in the
key code list in FIG. 9, for example.
[0080]
onkeypress event
Receives a key press event.
[Syntax]
Function (data) ;
[Parameters of the callback functionl
data: object type: (Object)
Receives the properties shown in FIG. 43.
[0081]
onstring event
Receives a string of characterinputstartingwithanycharacter
combination specified by setprefix and ending when the Enter key is
detected.
[Syntax]
Function (data) ;
[Parameters of the callback function]
data: object type: (Object)
Receives the properties shown in FIG. 44.
[00821
The Printer object is described next.
addTextAlign method
, Adds the text alignment setting to the command buffer.
~his'AP1s etting also applies to barcodes and 2D symbols.
To set text rotation when the print mode is set to the,page mode,
use the addPageDirectionmethod describedbelowinstead of this API.
[Syntax]
addTextAlign (align) ;
[Parametersl
align (Required parameter, obj ect type : String)
Specifies the text alignment.
Constants are shown in FIG. 45A, return values in FIG. 45B, and
exceptions. in FIG. 45C.
[0083]
addTextLineSpace method
Adds the line feed distance setting to the command buffer.
[Syntax]
addTextLineSpace (linespc);
[Parametersl
linespc : (Required parameter, object type: Number) :
Specifies the line feed distance (in dots) . Specify an integer
from 0 to 255.
The return value is shown in FIG. 46A, exceptions in FIG. 46B.
[0084]
addTextRotate method
Adds the text rotation setting to the command buffer.
This API setting also applies to barcodes and 2D symbols.
To set text rotation when the print mode is set to the page mode,
use the addPageDirection method described below instead of this API.
[Syntax]
addTextRotate (rotate) ;
[Parameters]
rotate (Required parameter, object type: Boolean)
Specifies whether or not to rotate text.
Settings are shown in FIG. 47A, return values in FIG. 47B,
exceptions in FIG. 47C.
[008 51
addText method
Adds printing text to the command buffer.
To print content other than text after printing text, execute
a line feed or paper feed.
In the page mode, characters are printed from the current
character position referenced to the baseline dot of the character
(see appendix on page 141) .
[Syntax]
addText (data) ;
[Parameters]
data (Required parameter, object type: String)
Specifies a character string to be printed.
Forthe horizontal tab/line feed, use the escape sequence,s shown
in FIG. 48A.
Return values are shown in FIG. 48B, and exceptions in FIG.
48C.
[0086]
addTextLang method
Adds the language setting to the command buffer.
[Syntax]
addTextLang (lang) ;
[Parameters]
lang: (Required parameter, object type: String)
Specifies the target language as shown in FIG. 49A. The
r
printable character codes depend upon the printer specifications.
Return values are shown'in FIG. 49B, exceptions in FIG. 49C.
[0087]
addTextFont method
Adds the character font setting to the command buffer.
[Syntax]
addTextFont (font) ;
[Parameters]
font: (Required parameter, object type: String)
Specifies the font as shown in FIG. 50A.
The return values are shown in FIG. 50B, exceptions in FIG. 50C.
[0088]
addTextSmooth method
Adds a text smoothing setting to the command buffer.
[Syntax]
addTextSmooth (smooth) ;
[Parameters]
smooth: (Required parameter, object type: Boolean)
Specifies whether to apply text smoothing.
The return values are shown in FIG. 51B, exceptions in FIG. 51C.
[0089]
addTextDouble method
Adds a double-size text setting to the command buffer.
[Syntax]
addTextDouble (dw, dh) ;
[Parameters]
dw: (Optional parameter, obj ect type: Boolean)
Specifiesthedouble-sizewidth. Settings are showninFIG. 52A.
dh (Optional parameter, object type : Boolean)
Specifies the double-size height.
When both dw and dh parameters are set to ture/l, double width
and double height characters are printed. Settings are shown in FIG.
52B.
The returnvalues are shown inFIG. 52C, exceptions inFIG. 52D.
[00901
addTextSize method
Adds the text scaling setting to the command buffer.
[Syntax]
addTextSize (width, height) ;
[Parameters]
width: (Optional parameter, object type: Number)
Specifies the horizontal scaling. Settings are shown in F I G .
53A.
height (Optional parameter, object type: Number)
Specifies the vertical scaling. Settings are shown in F I G . 5 3 B .
The return values are shown in F I G . 53C, exceptions in F I G . 53D.
[0091]
addTextStyle method
Adds a text styling setting to the command buffer.
[Syntax]
addTextStyle (reverse, ul, em, color);
[Parameters]
reverse: (Optional parameter, object type: Boolean)
Specifies black/white inversion for text. Settings are shown
in F I G . 54A.
ul (Optional parameter, object type: Boolean)
Specifies underlining. Settings are shown in F I G . 54B.
em (Optional parameter, object type: Boolean)
Specifies bold text. Settings are shown in F I G . 54C.
' color (Optional parameter, object type: String)
Specifies the text color. Settings are shown in F I G . 53D. ~ The return values are shown in F I G . 54E, exceptions in F I G . 5 4 F .
[0092]
, addTextPosition method
I Adds the horizontal print start position to the command buffer.
[Syntax]
addTextPosition (x) ;
[Parametersl
x: (Required parameter, object type : Number)
Specifies the horizontal print start position (in dots).
Specify an integer from 0 to 65535.
The return values are shown in FIG. 55A, exceptions in FIG. 55B.
[00931
addFeedUnit method
Adds paper feeding in dot units to the command buffer.
[Syntax]
addFeedUnit (unit) ;
[Parametersl
unit: (Required parameter, object type: Number)
Specifies the paper feed distance (in dots) . Specify an integer
from 0 to 255.
The return values are shown in FIG. 56A, exceptions in FIG. 56B.
[00941
addFeedLine method
Adds paper feeding in line units to the command buffer.
[Syntax]
addFeedLine (line) ;
[Parametersl
line : (Required parameter, object type : Number)
Specifiesthepaperfeeddistance (inlines). Specifyaninteger
from 0 to 255.
The return values are shown in FIG. 57A, exceptions in FIG. 57B.
[00951
. addImage method
Adds raster image printing to the command buffer.
Prints graphics rendered in HTML5Canvas.
Converts the specified range in a RGBA full-color HTML5 Canvas
image to raster image data according to the halftone property and
I brightness property settings. One pixel in an image equals one
I printer dot. When an image includes a transparent color, the
I background of the image is assumed to be white.
I To print a raster image at high speed, specify ALIGN - LEFT for
the addTextAlignmethod described above, and set the width parameter
of this API to a multiple of 8 not exceeding the paper width of the
printer.
In page mode, a raster image is printed at the current print
position referenced to the bottom left dot of the raster image. The
I print position does not move.
HTML5 Canvas images containing images downloaded from a
I different domain cannot be printed. A security error is returned in
I accordance with JavaScriptls same-origin policy.
[Syntax]
addImage (context, x, y, width, height, color, mode) ;
[Parameters]
context: (Required parameter, object type: Context)
Specifies the HTML5Canvas 2D context.
I x: (Required parameter, object type: Number)
I Specifies the horizontal starting position of the print area.
Specify an integer from 0 to 65535.
y: (Required parameter, object type: Number)
I Specifies the vertical starting position of the print area.
1 Specify an integer from 0 to 65535.
width: (Required parameter, object type : Number)
Specifies the width of the print area. Specify an integer from
I height: (Required parameter, object type: Number)
I Specifies the height of the print area. Specify an integer from
color: (Optional parameter, object type: String)
Specifies the color. Settings are shown in FIG. 58A.
I mode (Optional parameter, obj ect type : String)
I Specifies the color mode. Settings are shown in FIG. 58B.
I The return values are shown in FIG. 58C, exceptions in FIG. 58D.
[0096]
addLogo method
Adds printing a logo storedinnonvolatile memoryto the command
buffer . 1
I Prints a logo stored in nonvolatile memory in the printer.
I The logo is previously registered in the printer using a
I model-specific utility or a logo registration utility (TMFLoigo) .
In page mode, a logo is printed from the current printing
position referenced to the bottom left dot of the logo.
[Syntax]
addLogo ( keyl , key2 ) ;
[Parameters]
I keyl (Required parameter, object type: Number)
Specifies key code 1 of a logo in nonvolatile memory. Specify
an integer from 0 to 255.
key2 (Required parameter, obj ect type : Number)
Specifies key code 2 of a logo in nonvolatile memory. Specify
an integer from 0 to 255.
The return values are shown in FIG. 59A, exceptions in FIG. 59B.
[00971
addBarcode method
I Adds barcode printing to the command buffer.
In page mode, the barcode is printed from the current print
position referenced to the bottom left dot (except for HRI) of the
barcode.
[Syntax]
addBarcode (data, type, hri, font , width, height) ;
[Parametersl
data (Required parameter, object type: String)
Specifies the barcode data as a string. Barcode types are shown
in FIG. 60A, FIG. 60B, and FIG. 60C.
To specify binary data that cannot be expressed by a character
string, use the escape sequences in FIG. 60D.
type (Required parameter, object type: String)
Specifies the barcode type. Constants are shown in FIG. 60E.
hri (Optional parameter, object type: String)
Specifies the HRI position. Constants are shown in FIG. 60F.
font (Optional parameter, object type: String)
Specifies the HRI font. Constants are shown in FIG. 60G.
width (Optional parameter, object type : Number)
Specifies the width of one module in dots. Specify an integer
from 2 to 6.
height (Optional parameter, object type: Number)
Specifies the the barcode height in dots. Specify an integer
from 1 to 255.
The return values are shown in FIG. 60H, exceptions in FIG. 601.
[0098]
addsymbol method
Adds 2D symbol ping to the command buffer.
In page mode, the barcode is printed from the current printing
position referenced to the bottom left dot of the 2D symbol.
[Syntax]
addsymbol (data, type, level, width, height, size) ;
[Parametersl
data (Required parameter, object type: String)
Specifies the the 2D symbol data as a character string. 2D code
types are shown in FIG. 61A and FIG. 61B.
Specifies an escape sequence shown in FIG. 61C to pass binary
data that cannot be expressed by a character string.
type (Required parameter, object type : String) .
Specifies the type of the two-dimensional symbol. Constants are
shown in FIG. 61D.
level (Optional parameter, object type : String)
Specifies the error correction level. Constants are shown in
FIG. 61E.
The error correction level is selected according to the type
of two-dimensional symbol. LEVEL - DEFAULT is selected for MaxiCode
and two-dimensional GSlDataBar symbols.
width (Optional parameter, object type: Number)
Specifies the module width. Specify an integer from 0 to 255.
This parameter is ignored for MaxiCode symbols.
>.
height (Optional parameter, object type: Number)
Specifies the module height. Specify an integer from 0 to 255.
This parameter is ignored for QRCode and MaxiCode symbols.
size (Optional parameter, object type: Number)
Specifies the maximum size of the two-dimensional symbol
Specify an integer from 0 to 65535. This parameter is ignored for
QRCode and MaxiCode symbols.
The return values are shown in FIG. 61F, exceptions in FIG. 61G.
[00991
addHLine method
Adds horizontal line printing to the command buffer. Draws
horizontal lines. Cannot be used in page mode.
[Syntax]
addH.Line (xl, x2, style) ;
[Parameters]
xl: (Required parameter, object type: Number)
Specifies the start position of the horizontal line (in dots) .
Specify an integer from 0 to 65535.
x2 : (Required parameter, object type: Number)
Specifies the end position of the horizontal line (in dots).
Specify an integer from 0 to 65535.
style: (Optional parameter, object type: String)
Specifies the type of line. Constants are shown in FIG. 62A.
The return values are shown in FIG. 62B, exceptions in FIG. 62C.
[01001
addVLineBegin method
Adds the beginning vertical line to the command buffer.
Starts drawing vertical lines. Cannot be used in page mode. Vextical
lines are drawn until the end is specified by addVLineEnd. This API
function is used together with the addVLineEnd method.
[Syntax]
addVLineBegin (x, style) ;
[Parameters]
x (Required parameter, object type : Number)
Specifies the start position of the vertical line (in dots).
Specify an integer from 0 to 65535.
style (Optional parameter, object type: String)
Specifies the type of line. Constants are shown in FIG. 63A.
The return values are shown in FIG. 63B, exceptions in FIG. 63C.
[01011
addVLineEnd method
Adds the end of a vertical line to the command buffer. Finishes
drawing vertical lines. Cannot be used in page mode. This API is used
together with the' method described above.
[Syntax]
addVLineEnd (x, style) ;
[Parameters]
x (Required parameter, obj ect type : Number)
Specifies the end position of the vertical line (in dots).
Specify an integer from 0 to 65535.
style (Optional parameter, object type: String)
Specifies the type of line to stop drawing. Constants are shown
in FIG. 64A.
The return values are shown in FIG. 64B, exceptions in FIG. 64C.
[01021
addPageBegin method
Adds starting the page mode to the command buffer. Page mode
processing starts.
Vertical lines are processed in page mode until the page mode
is ended by the PageEnd method described below. This API is used
together with the PageEnd method.
[Syntax]
addPageBegin ( ) ;
The return values are shown in FIG. 65.
[01031
addPageEnd method
Adds the end of the page mode to the command buffer. Processing
in page mode ends. This API is used together with the addPageBegin
method described above.
[Syntax]
addPageEnd ( ) ;
The return values are shown in FIG. 66.
[01041
addPageArea method
Adds the page mode print area to the command buffer. Specifies
the page mode print area (coordinates). After this API function,
specify a print data API function such as the addText method.
The print area is specified according to the content to be
printed. If the print data extends beyond the print area, the print
data will not be completely printed in the printout. This API is used
between the above addPageBegin method and the above PageEnd method.
[Syntax]
[Parameters]
x (Required parameter, object type: Number)
Specifies the origin of the horizontal axis (in dots) . Specify
an integer from 0 to 65535. 0 is at the left edge of the printable
area of the printer.
y (Required parameter, object type : Number)
Specifies the origin of the vertical axis (in dots). Specify
an integer from 0 to 65535. 0 is the position without feeding the
paper.
width (Required parameter, obj ect type : Number)
Specifies the the width of the print area (in dots). Specify
an integer from 0 to 65535.
height (Required parameter, object type: Number)
Specifies the the height of the print area (in dots). Specify
an integer from 0 to 65535.
The width and height of the print area are determined according
to the print direction setting. The print data may otherwise not be
completely printed.
The return values are shown in FIG. 67A, exceptions in FIG. 67B.
[01051
addPageDirection method
Adds the pagemode print direction setting tothe comm3ndbuffer.
Specifies the end position on the vertical axis (in dots).
Specify an integer from 0 to 65535.
style (Optional parameter, object type: String)
Specifies the line type. Constants are shown in FIG. 70A.
The return values are shown in FIG. 70B, exceptions in FIG. 70C.
[0108]
addPageRectangle method
Adds drawing a rectangle in the page mode. Draws a rectangle
in the page mode. This API is used between the above addPageBegin
method and the PageEnd method.
[Syntax]
addPageRectangle (xl, yl, x2, y2, style) ;
[Parameters]
xl (Required parameter;. object type: Number)
Specifies the start position on the horizontal axis (in dots) .
Specify an integer from 0 to 65535.
yl (Required parameter, obj ect type : Number)
Specifies the start position on the vertical axis (in dots).
Specify an integer from 0 to 65535.
x2 (Required parameter, object type : Number)
Specifies the end position on the horizontal axis (in dots).
Specify an integer from 0 to 65535.
y2 (Required parameter, object type : Number)
Specifies the end position on the vertical axis (in dots).
Specify an integer from 0 to 65535.
style (Optional parameter, object type: String)
Specifies the line type. Constants are shown in FIG. 71A.
The return values are shown in FIG. 71B, exceptions in FIG. 71C.
[01091
addcut method
Adds a paper cut to the command buffer. Sets the paper cut.
Cannot be used in page mode.
[Syntax]
addcut (type) ;
[Parameters]
type (Optional parameter, object type : String)
Specifies the paper cutting method. Settings are shown in F I G .
The return values are shown in F I G . 72B, exceptions in F I G . 72C.
[OllO]
addpulse method
Adds a drawer kick to the command buffer. Sets the drawer kick.
Cannot be use dinpagemode. The drawercannotbeusedwiththebuzzer.
[Syntax]
addpulse (drawer, time) ;
[Parameters]
drawer (Optional parameter, object type: String)
Specifies the drawer kick connector. Settings are shown in F I G .
73A.
time (Optional parameter, object type: String)
Specifies the ON time of the drawer kick signal. Settings are
shown in F I G . 73B.
The return values are shown in F I G , 73C, exceptions in F I G . 73D.
[Olll]
addsound method
Adds sounding thebuzzer tothe commandbuffer. Sets thebuzzer.
Cannot be used in page mode.
The buzzer function cannot be used with the drawer.
This API cannot be used if the printer does not have a buzzer.
[Syntax]
addsound (pattern, repeat) ;
[Parametersl
pattern: (Optional parameter, object type: String)
Specifies the buzzer pattern. Settings are shown in FIG. 74A.
repeat'(Optiona1 parameter, object type: String)
Specifies the number of times the buzzer sounds. Settings are
shown in FIG. 74B.
To stop the buzzer after setting the repeat parameter to 0,
execute this API againandset the patternparameter to PATTERN - NONE.
The return values are shown in FIG. 74C, exceptions in FIG. 74D.
[01121
addcommand method
Adds commands to the command buffer. Sends ESC/POS commands.
When sendinga command tothe commandbuffer with the addcommand
method, declare the command data strings using \x as a separator.
Example: \xl~\x40
[ Syntax]
addcommand (data) ;
[Parametersl
data (Optional parameter, object type: String)
Specifies an ESC/POS command as a character string.
The return values are shown in FIG. 75A, exceptions in FIG. 75B.
[0113]
send method
Sends a command to the command buffer.
[Syntax]
send (') ;
[01141
print method
Prints an image rendered in HTML5 Canvas.
Converts the specified range in a RGBA full-color HTML5 Canvas
image to raster image data according to the halftone property and
brightness propertysettings. One imagepixel equals oneprinter dot.
When an image contains a transparent color, the background color of
the image is assumed to be white.
HTML5 Canvas images containing images downloaded from a
different domain cannot be printed. A security error is returned in
accordance with JavaScriptls same-origin policy.
[Syntax]
print (canvas, cut, mode) ;
[Parameters]
canvas (Required parameter, obj ect type : canvas)
Specifies the HTML5 Carmas object to print.
cut (Optional parameter, object type: Boolean)
Specifies whether or not to cut the paper. Settings are shown
in FIG. 76A.
mode (Optional parameter, object type: String)
Specifies the color mode. Settings are shown in FIG. 76B.
Exceptions are shown in FIG. 76C.
[0115]
startMonitor method
Enables a status event. Reports the printer status as an event.
Updates the status at the interval specified in the interval
property.
[Syntax]
[0116]
stopMonitor method
Disables a status event.
[Syntax]
halftone property
Specifies the ha1ftonep.rocessingmethodto apply to monochrome
(two tone) printing. The default is HALFTONE - DITHER.
object type: String
Settings are shown in FIG. 77.
[0118]
brightness property
Specifies brightness correction as a gamma value in the range
0.1 to 10.0. The default is 1.0.
object type: Number
[01191
timeout property
Specifies the timeout time (ms) of the message sent with the
send method described above. The default value is 10,000.
object type: Number
[O 12 01
nterval property
Specifies the interval for updating the status.
object type: Number
[Description]
Specifies the interval for updatingthe status inmilliseconds.
Default value: 3000 (3 second)
Minimum value: 1000 (1 second or more)
If an invalid value is specified, 3000 is used.
[0121]
onreceive event
Registers a callback function and gets a response message
receipt event.
[Syntax]
Function (response)
- 61 -
[Parameters of the callback function]
Parameters: response (see the response object property
described below)
. Name: response message
Object type: object
[Response object properties]
See the list of properties in F I G . 78A.
[Success value]
See the list of success values in F I G . 78B.
[Code value]
1 See the list of code values in F I G . 78C. I
I
[Status values] !
See the list of status values in F I G . 78D.
[01221
onerror event
I Registers a callback function and gets a communication error 1
i I event. i
[Syntax]
Function (error)
[Parameters of the callback function]
Parameters: error (see the error object properties described
I below) I
I Name: communication error data
Object type: object
[Error obj ect properties]
See the list of error object properties in F I G . 79.
[01231
onstatuschange event
I Registers a callback function and gets a status change event. I
[Syntax]
Function (status)
[Parameters of the callback function]
Parameter: status
Name: status
Object type: Number
[01241
ononline event
Registers a callback function and gets an online event.
object type: Function()
[01251
onoffline event
Registers a callback function and gets an offline event.
object type: Function()
[0126]
onpoweroff event
Registers a callback function and gets a no-response event.
object type: Function()
[01271
oncoverok event
Registers a callback function and gets a cover-closed event.
object type: Function()
[0128]
oncoveropen event
Registers a callback function and gets a cover-open event.
object type: Function()
[0129]
onpaperok event
Registers a callback function andgets apaper-remaining event.
object type: Function()
[013 01
onpapernearend event
Registers a callback function and gets a paper near-end event.
object type: Function()
[01311
onpaperend event
9
Registers a callback function and gets a paper end event.
object type: Function0
[01321
ondrawerclosed event
I Registers a callback function and gets a drawer-closed event.
object type: Function0
[01331
ondraweropen event
Registers a callback function and gets a drawer-open event.
I object type: Function()
LO1341
The Scanner object is described next.
I ondata event
Receives a barcode information scanning event.
[Syntax]
Function (data) ;
[Parameters of the callback function]
I data
I Object type: (Object)
I Receives the property shown in FIG. 80.
[01351
The iSimpleSeria1 object is described next.
The specifications of this API can be customized by creating
l a device control script.
sendcommand
Sends a desired command.
[Syntax]
sendcommand (data) ;
[Parameters]
data
.Object type : (String)
Specifies the command with a hexadecimal string.
Declare command strings using \x as a separator.
<Example>
To send 0x020x1F0x03, declare the string \x02\xl~\x03.
[01361
oncommandreply event
Receives a response event from the device.
[Syntax]
Function (data) ;
[Parameters of the callback function]
data
Object type: (String)
Receives a hexadecimal string of response data.
The received hexadecimal string is separated with \x.
Example: \xlB\x40
101371
The device control script 502 is described next.
Programming is described first.
FIG. 81 describes using a device control script.
By using a device control script 502 provided by the device
control function of the invention, data processing by a device can
be customized and new devices can be used from a web application.
As shown in FIG. 81, a device control script 502 has a
DeviceConnection object 503 and a Clientconnection object 504. In
FIG. 81, devices of the printer 5 are collectively referred to as
device 20.
When the createDevice method of the Device object described
above is executed, an object is instantiated so that the device
service interface 501 of the printer 5 can use the device control
script corresponding to the requested device. The device can then
be controlled through the instantiated object.
[01391
The objects shown in FIG. 82 are then passed to the device
control script 502 from the device service interface 501. By using
the Deviceconnection object 503 and Clientconnection object 504, the
device control script 502 can communicate with the web application
32 and device 20 as shown in FIG. 81. The DeviceConnection object
503 is an object that sends/receives data with the device 20. The
Clientconnection object 504 is an object that sends data to a device
object on the web browser 31 side, and accesses the device service
interface 501.
[01401
Functions using objects of the device control script are
described next.
The following functions can be used using device control script
APIs .
* Desired events of browser-side device objects can be called.
* Data can be sent to a device.
* Generated data can be received from the device.
[0141]
The configuration of a device control script is described next.
A device control script is coded to meet the following
conditions.
* The code required for device control must be contained in a
single file.
(Onlyone file canbe registeredwhenconfiguring adevice using
the TMNetWebConfig utility.)
* The part of the file name up to the first dot 'I. must be the
same as the constructor name.
(Example) file name: Keyboard-Generic.verl.0.j~-> constructor
name: Keyboard - Generic
* Declare exports to externally reference a constructor.
(Example) exports.Keyboard - Generic=Keyboard - Generic;
* The device control script must have the properties shown in
FIG. 83 and FIG. 84. Set an appropriate name with constructor.
DEVICE - TYPE property (object type: String)
A list of settings is shown in FIG. 83.
DEVICE - GROUP property (object type: String
A list of settings is shown in FIG. 84.
* Create an llonDeviceDatamlelt hod to receive data generated by
the device. For details, see the device control script Name, object
described below.
* Create a method corresponding to the device object method that
runs on the browser. For details, refer to the Any event described
below.
The configuration of a sample device control script 502 is shown
in FIG. 85.
[01421
The device control script API is described next.
The following objects are provided in the device control script
API .
* Client connection (Clientconnection) object (The API is shown
in FIG. 86.)
* Device connection (Deviceconnection) object (The API is shown
in FIG. 87.)
* Device control script Name object (The API is shown in FIG.
88.)
[O 14 3 I
The Clientconnection object is described next.
This object is passed to the first parameter of the constructor
of the device control script 502.
The API I1sendl1c ommand sends data to a device object that runs
on a browser.
[Syntax]
send (event, data) ;
[Parameters]
* event: object type: (String)
Sets the event name of the device object.
* data: object type: (Object)
Specifies the data passed to the device object event.
An example is shown in FIG. 89. In this example, the onkeypress
event of the device object is called, and 49 is received from
data.keycode and 1 is received from data.ascii using the data
parameter of the onkeypress event.
[01441
The Deviceconnection object is described next.
This objezt is passed to the second parameter of the constructor
of the device control script 502.
The API "sendl1 command sends data to a serial communication
device.
Note that data is not sent to an input device that can be
controlled by an HID driver.
[Syntax]
send (data) ;
[Parameters]
data : object type: (Buffer)
Specifies the data to send to the device.
[01451
The device control script Name object is described next.
onDeviceData event (input device that can operate with an HID
driver)
This event receives data detected from a key input device.
Events are described in this format in a device control script
502 for a key input device.
[Syntax]
onDeviceData (event, keycode, ascii) ;
[Parametersl
event : object type: (Number)
Receives the direction of key operation. For a list of values,
see FIG. 90.
keycode: object type: (Number)
Receives the key code. For a list of key codes, see FIG. 9.
ascii: object type: (String)
Receives the character corresponding to the operated key.
If no character corresponds to the key code (such as with the
F1 key) , undefined is returned.
[014 61
onDeviceData event " ( serial communication device ) .
This event receives data detected from a serial communication
device.
Events are described in this format in a device control script
502 for serial communication.
[ Syntax]
onDeviceData (data) ;
[Parametersl
data: object type: (Buffer)
Receives data received from a serial communication device.
[01471
Any event
This event is used to receive the results of API execution by
a device object that runs on a browser.
[Syntax]
Name specified by callEvent (data);
[Parameters]
data: object type: (Object)
Receives the object specified by the callEvent parameter of the
device object.
[0148]
A sample program is described next.
The sample program described below enables use as a POS system.
Sample code for a device API 33 can be created for each device.
FIG. 91shows anexampleof aPOStermina1. FIG. 92 shows asample
program for a printer.
The environment required to run the sample program is described
below.
(1) Required devices (The sample program can be used without
having all of the devices.)
* Printer 5
* Customer display 8
* POS keyboard
* Barcode scanner
(2)U Required to operate the printer 5
* Display
* Keyboard
* Mouse
(3) Other
* LAN cable
* Sample program
[01491
The work flow for configuring the sample program environment
is shown in FIG. 93.
If the Windows Security screen appears while using the TMNet
TMNetWebConfig utility, enter your username and password.
1. Connect LAN cable
Connect LAN cable to0 printer 5.
2. Register sample program
Register the sample program (device- A PI- J - S ample.zip) in
the0 printer 5.
3. Connect devices
Connect the devices to be used to the printer 5.
4. Configure devices
Configure the devices using the TMNet TMNetWebConfig
utility.
[01501
Registering the sample program is described next.
FIG. 94 shows a screen for registering the sample program.
Register the sample program (device- A PI-UM -J - S ample.zip) in the
printer 5 using the TMNet TMNetWebConfig utility.
Register the program using the following procedure.
1. Turn the printer 5 on.
2. Start the TMNet TMNetWebConf ig using the shortcut on the
desktop.
Select [Web service settings] , [Web content] , and then
[Update settings] indicated by [2] in FIG. 94.
3. The "Web content update settings" screen is displayed as
shown in the frame on the right side of FIG. 94. Click on [Browse]
indicated by [3] in F I G . 94, and select the sample program.
4. Next, click the [Upload] button indicated by [4] in F I G .
94 to register the sample program in the printer 5.
[01511
Configuring devices is described next.
Devices are configured using the TMNet TMNetWebConfig utility
in this example.
* Customer display
* POS keyboard
* Barcode scanner
[01521
Configuring the customer display is described next.
F I G . 95 shows a customer display configuration screen.,
Register the display using the following procedure.
1. Start the TMNet TMNetWebConf ig using the shortcut on the
desktop.
Select [Web service settings], [Device Admin] , and then
[Display] as indicated by [I] in F I G . 95.
2. The customer display settings screen shown in F I G . 95 is
displayed. Select [Use] indicated by [21 in F I G . 95 and click the
[Apply] button. There is no need to change the settings in this
example.
[01531
Configuring a POS keyboard/barcode scanner is described next.
F I G . 96 shows a POS keyboard/barcode scanner configuration
screen.
Register the devices using the following procedure.
1. Check that a POS keyboard/~S~/barcodsec anner is connected
to the printer 5.
2. Start the TMNet TMNetWebConfig using the shortcut on the
desktop.
Select [Web service settings], [Device Admi.n], and then
[Key input device] as indicated by [2] in FIG. 96.
3 . The Key Input device screen shown in FIG. 96 is displayed.
Set the Device ID, Device name, and Control script for each device
in the appropriate places indicated by [3] in FIG. 96, and click the
[Registration] button. Sample settings are showninFIG. 97. Register
one device at a time.
4. The registered device will be displayed in the [Registered
key input device] field at i41 in FIG. 96.
[01541
Starting the sample program is described next.
Start the sample program (device - API-UM - J - Sample.zip) as
follows .
1. Start the web browser, and enter the IP address of the
printer 5 to the address bar. The default IP address of the printer
5 is u192.168.192.168".
2. The sample program is displayed. An example of the display
is shown in FIG. 98. If the sample program is not displayed, check
if the LAN cable is connected.
[0155]
Using the sample program
The sample program includes the following items. Selecting an
item goes to the corresponding screen. Details of each sample are
described below.
x POS Terminal Sample
* Customer Display Sample
x Keyboard Sample
* Printer Sample
x Barcode Scanner Sample ,
[0156]
The Customer Display Sample is described in detail next.
This sample program enables operating the customer display and
generating sample code for the customer display.
This sample is used as follows.
1. Start the sample program. Select [Customer Display Sample]
in FIG. 98.
2. The Customer Display Sample screen shown in FIG. 99A is
displayed. Click the [Connect] button in this screen. If connection
is successful, the following message will be displayedinthe Console
frame. The display on the customer display will also change.
There is no need to change the settings in the Device Setting
frame . However, if the IP address, for example, has changed, change
the setting in the Device Setting frame accordingly.
3 . Select the functiol~t o use in the screen shown in F1.G. 99B,
and click the [Add] button.
4. The source code ofthe functionaddedin step 3 is displayed
in the [Display Object Sample Code] frame in FIG. 99C. This code can
be copied and reused.
5. Whenthe [Send] buttoninthe screeninFIG. 99Cis clicked,
the screen display will change according to the function added in
step 3.
[01571
The Keyboard Sample is described in detail next.
This sampleprogramenables acquiringinput fromaPOSkeyboard.
This sample is used as follows.
1. Start the sample program. Select [Keyboard Sample] inFIG.
98.
2 . The Keyboardsample screenshowninFIG. 10OAis displayed.
Click the [Connect] button. If connection is successful, the
- 74 -
following message will be displayed in the Console frame.
There is no need to change the settings in the Device Setting
frame. However, if the IP address, for example, has changed, change
the setting in the Device Setting frame accordingly.
3 . Select the keyusedto determine the beginning of a string,
and click the [Set] button.
This setting must first be made on the POS keyboard side.
Example: F1 + specified string + Enter
4. When there is input from the POS keyboard, the input result
is displayed in the ePOS Device API Keyboard Object shown in FIG.
100C. An example of input and the result is shown in FIG. 100B.
[01581
The Printer Sample is described in detail next.
This sample program enables operating the printer and
generating sample code for the printer.
The Printer Sample is used as follows.
1. Start the sample program. Select [Printer Sample] in FIG.
98.
2. The Printer Sample screen in FIG. 101A is displayed. Click
the [Connect] button. If connection is successful, the following
message will be displayed in the Console frame.
There is no need to change the settings in the Device Setting
frame . However, if the IP address, for example, has changed, change
the setting in the Device Setting frame accordingly.
3. Select the functiontouse in the screenshowninFIG. 101B,
and click the [Add] button.
4. The source code ofthe functionaddedin step 3 is displayed
in the [printer-Print API Sample Code] frame in FIG. 101C. This code
can be copied and reused.
5. When the [Send] button in the screen is clicked, a test
print will be printed according to the function added in step 3.
[01591
The Barcode Scanner Sample is described in detail next.
This sample program enables acquiring input from a barcode
scanner.
The Barcode Scanner Sample is used as follows.
1. Start the sample program. Select [Barcode Scanner Sample]
in FIG. 98.
2. TheBarcodeScanner Sample screeninFIG. 102Ais displayed.
Click the [Connect] button. If connection is successful, the
following message will be displayed in the Console frame.
There is no need to change the settings in the Device Setting
frame. However, if the IP address, for example, has changed, change
the setting in the Device Setting frame accordingly.
3. When there is input from the barcode scanner, the read
information is displayed in the ePOS Device API Scanner Object shown
in FIG. 102B.
[0160]
The POS Terminal Sample is described in detail next.
This sample program enables operating like a POS system.
The POS Terminal Sample is used as follows.
Preparation is required first. In this preparation, start the
sample program and configure each device.
1. Start the sample program. Select [POS Terminal Sample] in
FIG. 98.
2. The POS Terminal Sample screen in FIG. 103A is displayed.
Click the [Settings] button.
3. The Settings screen in FIG. 103B is displayed. The IP
address, port, and device ID can be set in this screen. If aj setting
is changed, click the [Connect] button and confirm that the status
is OK. After confirmation, close the window. Note that there is
usually no need to change a setting.
[0161]
Operation is described next.
The procedure from reading a product to issuing a receipt is
described below.
1. Input a product frdm the barcode scanner or POS keyboard.
After inputting the products, click the [subtotal] button
in the screen shown in FIG. 104A.
* If the [Delete Item] button is clicRed, the selected item
will be deleted. Clicking the [Delete All] button deletes all items.
* To change a quantity, click the [Qty] button after
inputting the product, and input the number. Click the [Ent] button
to confirm the quantity.
2. Enter the amount receive dinthe screen shownin FIG. 104B.
Click the [Ent] button after entering the amount.
3. The amount of change due is displayedas showninFIG. 104C,
and a receipt is printed from the printer.
[0162]
As described above, a device control system 100 according to
this embodiment of the invention has an application server 2 that
serves a web application 32; a terminal 3 that is connected to the
application server 2 through a network and has a web browser 31 that
displays thewebapplication32; andaprinter 5 that has a connection
panel60 towhichadevice conr~ects,a ndcontrolsthe device,connected
to the connection panel 60. By means of the web application 32, the
terminal 3 calls an object that controls a device and is instantiated
by the device API 33 to support the device, and sends a request to
the printer 5 by the web application 32; and the printer 5 executes
a device control script 502 that controls the device, receives
requests sent through the device API 33, and controls the device
connected to the connection panel 60.
The invention is not limited to device control system 100, and
device control systems 200, 300 can be similarly configured. In
I
device control system 300, the printer 5 has the functions of the
I
I
application server 2 (FIG. 1) .
LO1631
In device control system 100, the device control script 502 has
I a Deviceconnection object that sends/receives data with a device, 1
1
and a Clientconnection object that sends data to the device control
API .
101641
In device control system 100, the terminal 3 specifies a device
I connected to the printer 5 and sends a request to start control of I
I
the device to the printer 5, and the printer 5 sends a command by
I
I
the device control script 502 to the device specified by the request
and enables controlling the device.
101651
When the device control system 100 has a first terminal 3 and
a secondterminal3, the first terminal3 specifies a device connected
to the printer 5, sends a request to start control of the device to
the printer 5, and the printer 5 enables controlling the device 1
specifiedinthe request, the device is exclusivelylockeda,ndcannot I
I
be controlled by a request sent by the second terminal 3. I
I
I In this configuration, the printer 5 reports to the second. I
I
terminal 3 that the device is busy when the second terminal 3 calls
an object corresponding to the device of the device API 33.
In the device control system 100, the device connected to the i
printer 5 is a local printer or a.network printer 7, and when the i
printer 5 enables control of the device specified by the request,
the local printer or the network printer 7 can be controlled by the
device control script 502 according tothe request sent by the second
terminal 3.
LO1661
In the device control system 100, the terminal 3 specifies a
device connected to the printer 5 and sends a request instructing
ending device control to the printer 5, and the printer 5 sends a
command by the device control script 502 to the device specified by
the request and terminates the state enabling control of the device.
[0167]
In the device control system 100, the terminal 3 specifies a
device connected to the printer 5 and sends a request instructing
ending device control to the printer 5; the printer 5 sends a command
by the device control script 502 to the device specified by the
request and terminates the state enabling control of the device; and
the device can be controlled by the printer 5 in response to a request
sent by the second terminal 3.
[0168]
In the device control system 100, the terminal 3 detects the
connection status of an object instantiated by the device API 33 and
the device control script 502 of the printer 5 by means of the device
API 33.
[0169]
In the device control system 100, the terminal 3 controls an
object of the device API 33 by the web application 32, and calls an
event of the device control script 502.
In the device control system 100, a customer display is I
connected tothe printer 5 as a device, the terminal3 sends a request
to display on the customer display, and the printer 5 controls
displaying on the customer display by the device control script 502
in response to the request.
[01711
In the device control system 100, a customer display is
connected to the printer 5 as a device, the terminal 3 sends a request
to display on the customer display, and the printer 5 displays the
time on the customer display by the device control script 502 in
response to the request, and stops displaying the time when a second
request is sent while the time is displayed.
[0172]
In the device control system 100, a printer is connected to
printer 5 as a device, the terminal 3 sends a request to register
image data in the printer by an object of the device control API,
the printer 5 registers the image data in the printer specified by
the request, and the printer prints the registered image data.
[01731
In the device control system 100, color image data rendered by
HTML5 Canvas is converted to raster image data and registered in the
printer according to a request sent by the terminal 3.
[01741
In the device control system 100, the terminal 3 specifies a
device and sends a request instructing whether or not to encrypt data
sent and received between the device and the terminal 3 by an object
of the device control API.
[01751
The terminal 3 has an application server 2 that serves a web
application 32, and a connection panel 60 to which devices connect,
is connected through a network to a printer 5 that controls a device
connected to the connection panel 60, has a web browser 31 that
displays a web application 32, and through the web application 32
- 80 -
calls an object that controls a device and is instantiated by the
device API 33 to support the device, sends a request to the printer
5, and causes the printer 5 to execute a device control script 502
that controls the device.
LO1761
The foregoing embodiment obviously describes one example of the
invention, andcanbemodifiedandadaptedas desiredwithinthe scope
of the accompanying claims.
[Industrial Applicability]
[0177]
As described above, the present invention is useful in a device
control system that controls a device, and can be applied to
controlling devices and printers used in a POS system.
[Reference Signs List]
[01771
2 application server
terminal
Oprinter
network printer
customer display
barcode scanner
wireless LAN access point
display
cash drawer
keyboard
USB extension cable
wireless LAN unit
key input device
19 serial communication device
20 device
web browser
web application
device API
roll paper 'cover
cover open button
manual cutter
cutter cover
local printer
reset button
power switch
LED display unit
control panel
connector cover
connection panel
drawer kick-out connector
Ethernet connector
USB connector
VGA connector
COM connector
device control system
device control system
device control system
device list
device service interface
device control script
DeviceConnection object
Clientconnection object

[CLAIMS]
[Claim 11
A device control system comprising:
a device;
a device control device including a connection unit configured
to connect to the device, and a device control unit configured to
control the device connected to the connection unit; and
a terminal that runs a web browser executing a device
application programming interface configured to connect to the
device control device, displays a web application, and controls the
device.
[Claim 21
The device control system described in claim 1, wherein
the device applicationprogramminginterface has anobject that
supports the device; and
the web application calls the object and sends a request to the
device control device.
[Claim 31
The device control system described in claim 2, wherein
the device control device executes a device control script that
controls the device; and
the device control script connects to the object, receives the
request sent by the terminal, and controls the device connected to
the connection unit.
[Claim 41
The device control system described in claim 3, wherein
the device control script has a device connection object that
sends and receives data with the device, and a client connection ,
object that sends data to the device API.
1
I
[Claim 51
The device control system described in claim 3, wherein
the request is a start control request specifying the device
connected to the device control device and instructing starting
I
I control of the device;
the command is a start control command instructing starting
control of the device; and
when the terminal sends the start control request to the device
control device, the device control device sends the start control
command to the device specified by the start control requesk, and
enables control of the device by the terminal.
[Claim 61
The device control system described in claim 5, further
comprising: '
a second terminal that runs a web browser executing a second
device application programming interface that connects tothe device I
I
control device, displays a second web application, and controls the
device,
the second the device application programming interface having
a second object that supports the device.
[Claim 71
The device control system described in claim 6, wherein
when the device can be controlled by the terminal, the device
control device exclusively locks the device, and if the second web
application calls the second object and sends a second request to
the device control device, does not allow control of the device in
;he second request.
[Claim 81
. The device control system described in claim 6, wherein
if the second terminal sends the second request to the device
control device when the device can be controlled by the terminal,
the device control device sends a report indicating the device is
busy to the second terminal.
[Claim 91
The device control system described in claim 6, wherein
the device is a printer configured to print; and
if the second terminal sends the second request to the device
control device when the printer can be controlled by the terminal,
the device control device enables the second terminal to control the
printer by the device control script based on the second request.
[Claim 101
The device control system described in claim 6, wherein
the web application of the terminal calls the object and sends
a stop control request specifying the device and instructing ending
control of the device to the device control device; and
when the terminal sends the stop control request to the device
control device, the device controi device sends a second command
instructing stopping control by the device control script to the
device specified by the stop control request, and stops control of
the device by the terminal.
[Claim 111
- 85 -
The device control system described in claim 10, wherein
when the second terminal sends the second request to the device
control device after the device control device stops control of the
device by the terminal, the device control device enables control
by the second terminal, of the device by the device control script
based on the second request.
[Claim 121
The device control system described in claim 3, wherein
the device application programming interface detects
connection of the object and the device control script of the device
control device.
[Claim 131
The device control system described in claim 3, wherein
the object calls an event include dinthe device control script.
[Claim 141
The device control system described in claim 3, wherein
the device is a display configured to display content;
the request is a display request that specifies the display and
requests displaying content on the display; and
when the terminal sends the display request to the device
control device, the device control device sends a display command
requesting display by the device control script to the display
specified by the display request.
[Claim 151
The device control system described in claim 14, wherein
the display request requests displaying time on the display.
[Claim 161
The device control system described in claim 3, wherein
the request is a registration request that specifies the device
and requests registering image data in the device; and
when the terminal sends the registration request to the device
control device, the device control device sends a registration
command instructing registering the image by the device control
script to the device specified by the registration request.
[Claim 171
The device control system described in claim 16, wherein
the terminal sends the image data to the device control device;
and
the device control script converts the image data to the raster
image data.
[Claim 181
The device control system described in claim 3, wherein
the request is an encryption request that specifies the device,
and instructs whether or not to encrypt data sent andreceivedbetween
the device and the terminal.
[Claim 191
A printer comprising:
a connection unit configured to connect to a device;
a device control unit configured to execute a device control
script that controls a device, and to control the device connected
to the connection unit; and
a print unit configured to print.
[Claim 201
A control method of, a device control system, comprising:
a terminal that runs a web browser, a device, and a device
control device configured to connect to the device;
calling an object supporting the device by a web application
that runs on the web browser;
sending a request to the device control device;
executing a device control script that controls the device by
the device control device;
sending to the device a command that controls the device by the
device control script based on the request received by the device
control device; and
establishing control of the device by the terminal.
[Claim 211
The control method of a device control system described in claim
2 0, wherein
the request is a start control request specifying the device
connected to the device control device and instructing starting
control of the device; and
when the terminal sends the start control request to the device
control device, the device control device sends the control command
to the device, and starts control of the device by the terminal.

Documents

Application Documents

# Name Date
1 SPECIFICATION.pdf 2014-08-14
2 FORM 5.pdf 2014-08-14
3 FORM 3.pdf 2014-08-14
4 DRAWINGS.pdf 2014-08-14
5 6745-DELNP-2014.pdf 2014-08-24
6 6745-delnp-2014-Correspondence-Others-(26-09-2014).pdf 2014-09-26
7 6745-delnp-2014-GPA-(17-10-2014).pdf 2014-10-17
8 6745-delnp-2014-Correspondence-others-(17-10-2014).pdf 2014-10-17
9 6745-DELNP-2014-Form 3-191214.pdf 2015-01-03
10 6745-DELNP-2014-Correspondence-191214.pdf 2015-01-03
11 6745-DELNP-2014-FER.pdf 2019-01-24
12 6745-DELNP-2014-AbandonedLetter.pdf 2019-09-25

Search Strategy

1 searchstrategy_31-12-2018.pdf