ePOS-Device XML

    XML Reference

    ePOS-Device XML has the following hierarchical structure.

    Graphic Message1 Communication box Message Printer Message CustomerDisplay Message PrinterControl XML CustomerDisplayControl XML DeviceHubTerminal Message BarcodeScanner Message Printer Message HybridPrinter Message  CustomerDisplay Message Keyboard Message MSR Message AutomaticChangeMachine Message SerialDevice Message Message2

    List of ePOS-Device XMLs

    The ePOS-Device XMLs provide the following.

    Message


    These XMLs are messages requested from applications to the TM intelligent printer and returned from the TM intelligent printer to applications.

    Message

    Description

    Message data for communication path

    <connect>

    Establishes the communication path.

    <reconnect>

    Reestablishes the communication path.

    <disconnect>

    Disconnects the communication path.

    Message data for management information

    <admin_info>

    Acquires the administrator and installation location information.

    CommunicationBox Message *

    <open_commbox>

    Opens the communication box.

    <close_commbox>

    Closes the communication box.

    <commbox_data>

    Communicates between applications.

    Message data for device communication

    <open_device>

    Opens communication with a device.

    <close_device>

    Closes communication with a device.

    Device Message

    <device_data>

    Requests for device control.

    Responds to device control.

    Message data
    for OFSC-Print Service

    <service_data>

    Requests for OFSC-Print Service.

    Responds to OFSC-Print Service.

    Message data
    for error notification

    <error>

    Reports the error contents upon error occurrence.

    * Supported by ePOS-Device Service Ver.2.5 or later.

    CommunicationBox Message


    These XMLs are used to communicate data between applications.

    This type of XML is a child element of the <data> element of the <commbox_data> message and specifies data for data communication between applications. Specify the type of message data with the <type> element, and then specify data for the child element. Available <type> elements are as listed below.

    <type> element

    Description

    Transmission history

    <type>getcommhistory</type>

    <Request>/<Response>
    Acquires the transmission history of the communication box.

    Transmission

    <type>send</type>

    <Request>
    Transmits data to the communication box.

    Reception

    <type>onreceive</type>

    <Response>
    Notifies data from the communication box.

    Device Message


    These XMLs store request and response data for each device controlled. This type of XML is a child element of the <data> element of the <device_data> message and specifies data to control a device. Components of the message data differs depending on the device type. Specify the type of message data with the <type> element, and then specify data for the child element.

    Printers and customer displays can use the control XMLs to control print data and display.

    Device types and control XMLs available for each TM intelligent printer are as listed below.

    Device type

    Control XML

    TM-DT
    series

    TM-i
    series

    DeviceHubTerminal *1

    -

    -

    BarcodeScanner

    -

    Printer

    PrinterControl XML

    HybridPrinter

    PrinterControl XML

    *2

    -

    CustomerDisplay

    CustomerDisplayControl XML

    Keyboard

    -

    MSR

    -

    *3

    AutomaticChangeMachine

    -

    *3

    SerialDevice

    -

    *3*4

    *1 Supported by ePOS-Device Service Ver.2.5 or later.

    *2 Only available with the TM-DT series hybrid printers.

    *3 TM-T88VI-iHUB only.

    *4 Cannot be used with a TM-i series device with no serial port.

    DeviceHubTerminal


    Controls TM-DT.

    <type> element

    Description

    Controls TM-DT.

    <type>shutdown</type>

    <Request>
    Shuts down TM-DT.

    <type>onshutdown</type>

    <Response>
    Shut-down result of TM-DT.

    <type>restart</type> *

    <Request>
    Restarts TM-DT.

    <type>onrestart</type> *

    <Response>
    Restart result of TM-DT.

    * Supported by ePOS-Device Service Ver.3.0 or later.

    BarcodeScanner


    Controls the scanner to read a barcode.

    <type> element

    Description

    Controls a scanner.

    <type>ondata</type>

    <Response>
    Scan data from the barcode scanner.

    Printer


    Controls printing operation of the printer.

    Note:

    Refer to PrinterControl XML for details of print data.

    <type> element

    Description

    Controls a printer.

    <type>print</type>

    <Request>
    Print data and configuration data to the printer.

    <type>onxmlresult</type>

    <Response>
    Data from the printer.

    HybridPrinter


    Controls printing operation of the hybrid printer.

    Note:
    • Only available with the TM-DT series hybrid printers.
    • Cannot be used with ePOS-Device XML (Japanese version).
    • Refer to PrinterControl XML for details of print data.
    • Supported by ePOS-Device Service Ver.2.5 or later.

    <type> element

    Description

    Controls a hybrid printer.

    <type>lock</type>

    <Request>
    Locks the device port.

    <type>unlock</type>

    <Request>
    Unlocks the device port.

    <type>print</type>

    <Request>
    Print data and configuration data to the printer.

    <type>onxmlresult</type>

    <Response>
    Data from the printer.

    <type>slipprint</type>

    <Request>
    Print data and configuration data for front-side slip printing.

    <type>slipcancel</type>

    <Request>
    Cancels check sheet insertion wait status for front-side slip printing.

    <type>endorseprint</type>

    <Request>
    Print data and configuration data for back-side slip printing.

    <type>endorsecancel</type>

    <Request>
    Cancels check sheet insertion wait status for back-side slip printing.

    <type>micrread</type>

    <Request>
    Reads MICR.

    <type>micrcleaning</type>

    <Request>
    Cleans the MICR mechanism.

    <type>micrcancel</type>

    <Request>
    Cancels cleaning sheet insertion wait status for cleaning MICR.

    <type>eject</type>

    <Request>
    Ejects the check sheet.

    <type>onreceive</type>

    <Response>
    Acquires the execution result of the request to the hybrid printer.

    CustomerDisplay


    Controls text display on the customer display.

    Note:

    Refer to CustomerDisplayControl XML for details of display data.

    <type> element

    Description

    Controls a customer display.

    <type>display</type>

    <Request>
    Display data and configuration data for the customer display.

    <type>onxmlresult</type>

    <Response>
    Data from the customer display.

    Keyboard


    Controls character entry from the keyboard.

    <type> element

    Description

    Controls the keyboard.

    <type>onkeypress</type>

    <Response>
    A string input from the keyboard.

    <type>setprefix</type>

    <Request>
    Specifies a key code used to determine the beginning of a string to detect input from the keyboard.

    <type>onstring</type>

    <Response>
    A string input from the keyboard.

    <type>setMSRPrefix</type>

    <Request>
    Specifies a key code to used to determine the beginning of reception of card information from a programmable keyboard with MSR.

    <type>ondata</type>

    <Response>
    Card information from a programmable keyboard with MSR.

    MSR


    Controls card reading by MSR.

    <type> element

    Description

    Controls MSR.

    <data>ondata</data>

    <Response>
    Data from MSR.

    AutomaticChangeMachine


    Controls dispense and deposit processes using an automatic change machine.

    Note:
    • Cannot be used with ePOS-Device XML (English version).
    • AutomaticChangeMachine Message supports control of the following products:
      • RT-200 (GLORY LTD.)
      • RAD-200 (GLORY LTD.)

    <type> element

    Description

    Controls an automatic cash machine.

    <type>readcashcounts</type>

    <Request>
    Requests the automatic cash machine for the money type and count.

    <type>oncashcounts</type>

    <Response>
    Money type and count data from the automatic cash machine.

    <type>begindeposit</type>

    <Request>
    Starts a deposit process.

    <type>pausedeposit</type>

    <Request>
    Suspends a deposit process.

    <type>restartdeposit</type>

    <Request>
    Resumes a deposit process.

    <type>enddeposit</type>

    <Request>
    Terminates a deposit process.

    <type>ondeposit</type>

    <Response>
    Deposit information.

    <type>dispensecash</type>

    <Request>
    Amount to pay.

    <type>dispensechange</type>

    <Request>
    Money type to pay.

    <type>ondispense</type>

    <Response>
    Payment information.

    <type>opendrawer</type>

    <Request>
    Opens the drawer.

    <type>collectcash</type>

    <Request>
    Collect cash.

    <type>oncollect</type>

    <Response>
    Cash collection result.

    <type>setconfig</type>

    <Request>
    Configures the automatic cash machine.

    <type>onconfigchange</type>

    <Response>
    Configuration result.

    <type>sendcommand</type>

    <Request>
    Transmits a command.

    <type>oncommandreply</type>

    <Response>
    Command transmission result.

    <type>onstatuschange</type>

    <Response>
    Changes in status of the automatic cash machine.

    SerialDevice


    Controls serial communication between the TM intelligent printer and device.

    <type> element

    Description

    Controls a serial device.

    <type>sendcommand</type>

    <Request>
    Transmits a command to a serial device.

    <type>oncommandreply</type>

    <Response>
    Data from the serial device.

    PrinterControl XML


    These XMLs are used to control print operations of a printer. <epos-print> is included in the child element printdata of the <type> element print, while <response> is included in the child element resultdata of the <type> element onxmlresult.

    <epos-print> and <response> can be used with the following <type> elements.

    These XMLs request the printer to execute a print function specified with <epos-print> and acquires the execution result with <response>.

    Two print modes are available; standard and page modes.

    • Standard mode
    • This mode prints data line by line. This mode adjusts the line feed amount depending on the character size, image size, and/or barcode height, and is suitable for printing a sales slip which changes in length depending on data quantity to print.

    • Page mode
    • This mode defines the print area and adjust print data (text, image, and/or barcode) to the size of the area for batch printing.
      To print in the page mode, switch to the page mode using <page>.

    XML document

    Child element

    Function

    Standard mode

    Page mode

    Print method

    Sales slip

    Slip

    Front side

    Backside

    Backside 40cpl

    <epos-print>

    <text>

    Prints text.

    <feed>

    Feeds paper.

    <image>

    Prints a raster image.

    -

    -

    -

    <logo>

    Prints the NV logo.

    -

    -

    <barcode>

    Prints a barcode.

    -

    -

    <symbol>

    Prints a 2D symbol.

    -

    -

    -

    <hline>

    Prints a horizontal ruled line.

    -

    -

    -

    -

    <vline-begin>

    Starts printing a vertical ruled line.

    -

    -

    -

    -

    <vline-end>

    Ends printing a vertical ruled line.

    -

    -

    -

    -

    <page>

    Switches to the page mode

    -

    -

    -

    <area>

    Defines the print area in the page mode.

    -

    -

    -

    -

    <direction>

    Specifies the print direction in the page mode.

    -

    -

    -

    <position>

    Specifies the print position in the page mode.

    -

    -

    -

    <line>

    Draws a line in the page mode.

    -

    -

    -

    -

    <rectangle>

    Draws a shape in the page mode.

    -

    -

    -

    -

    <cut>

    Cuts the sheet.

    -

    -

    -

    -

    <pulse>

    Kicks the drawer.

    -

    <sound>

    Sounds the buzzer.

    -

    -

    -

    -

    <command>

    Inserts a command.

    <layout> *

    Sets the page layout.

    -

    -

    -

    -

    <recovery> *

    Recovers from a recoverable error.

    -

    <reset> *

    Resets the printer.

    -

    <response>

    Acquires the execution result.

    * Supported by ePOS-Device Service Ver.2.2 or later.

    The default values of the child elements are listed below.

    These values are effective before executing a child element defined on the printer device.

    Child element

    Attribute

    Default value

    <text>

    lang

    "en"

    font

    "font_a"

    smooth

    "false" / "0"

    dw

    "false" / "0"

    dh

    "false" / "0"

    width

    "1"

    height

    "1"

    reverse

    "false" / "0"

    ul

    "false" / "0"

    em

    "false" / "0"

    color

    "color_1"

    x

    "0"

    y

    "21"

    align

    "left"

    rotate

    "false" / "0"

    linespc

    Depends on the printer type.

    For details, refer to ePOS-Device XML User's Manual.

    <feed>

    linespc

    <image>

    color

    "color_1"

    align

    "left"

    mode

    "mono"

    <logo>

    align

    "left"

    <barcode>

    hri

    "none"

    font

    "font_a"

    width

    "3"

    height

    "162"

    align

    "left"

    rotate

    "false" / "0"

    <symbol>

    level

    Depends on the 2D symbol type.

    Refer to <symbol> for details.

    width

    hight

    size

    align

    "left"

    rotate

    "false" / "0"

    <area>

    x

    "0"

    y

    "0"

    width

    Depends on the printer type.

    For details, refer to ePOS-Device XML User's Manual.

    height

    <direction>

    dir

    "left_to_right"

    <position>

    x

    "0"

    y

    "21"

    CustomerDisplayControl XML


    These XMLs control text display on the customer display. <epos-display> and <response> are XMLs included in the child element displaydata of <type>display</type> and the child element resultdata of <type>onxmlresult</type>, respectively. These XMLs request the customer display to execute a function specified with <epos-display> and acquires the execution result with <response>.

    XML document

    Child element

    Function

    <epos-display>

    <window>

    Configures the window.

    <text>

    Displays text.

    <cursor>

    Displays cursor.

    <blink>

    Blinks the display.

    <brightness>

    Changes brightness of the display.

    <marquee>

    Displays a marquee.

    <clock>

    Displays the clock.

    <clear>

    Clears the current display area.

    <reset>

    Resets the display.

    <command>

    Runs a command.

    <response>

    Acquires the execution result of <epos-display>.

    The default values of the child elements are listed below.

    These values are effective before executing a child element defined on the device.

    Child element

    Attribute

    Default value

    <window>

    scrollmode

    "overwrite"

    destroy

    "false" / "0"

    <text>

    reverse

    "false" / "0"

    lang

    "en"

    <marquee>

    format

    "walk"

    repeat

    "0"

    lang

    "en"


    ePOS-Device XML includes patented or patent pending functions. The contents must not be disclosed to third parties.

    Jump to the top