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 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 Messages

    <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 Messages

    <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.

    CommunicationBox Messages


    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 Messages


    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

    -

    -

    BarcodeScanner

    -

    Printer

    PrinterControl XML

    HybridPrinter

    PrinterControl XML

    *1

    -

    CustomerDisplay

    CustomerDisplayControl XML

    Keyboard

    -

    MSR

    -

    *2

    SerialDevice

    -

    *2*3

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

    *2 TM-T88VI-iHUB only.

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

    DeviceHubTerminal


    Controls the TM-DT series.

    <type> element

    Description

    Shutdown

    <type>shutdown</type>

    <Request>
    Shuts down TM-DT.

    <type>onshutdown</type>

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

    Restart

    <type>restart</type>

    <Request>
    Restarts TM-DT.

    <type>onrestart</type>

    <Response>
    Restart result of TM-DT.

    BarcodeScanner


    Controls the scanner to read a barcode.

    <type> element

    Description

    Data detection

    <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:
    • Cannot be used with ePOS-Device XML (Japanese version).
    • Refer to PrinterControl XML for details of print data.

    <type> element

    Description

    Device lock

    <type>lock</type>

    <Request>
    Locks the device port.

    <type>unlock</type>

    <Request>
    Unlocks the device port.

    Prints on receipt.

    <type>print</type>

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

    <type>onxmlresult</type>

    <Response>
    Data from the printer.

    Front side slip printing

    <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.

    Back 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 backside slip printing.

    MICR

    <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.

    Paper eject

    <type>eject</type>

    <Request>
    Ejects the check sheet.

    Reception of result

    <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

    Key detection

    <type>onkeypress</type>

    <Response>
    A string input from the keyboard.

    String setting

    <type>setprefix</type>

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

    String detection

    <type>onstring</type>

    <Response>
    A string input from the keyboard.

    Key code setting

    <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.

    Data detection

    <type>ondata</type>

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

    MSR


    Controls card reading by MSR.

    <type> element

    Description

    Data detection

    <data>ondata</data>

    <Response>
    Data from MSR.

    SerialDevice


    Controls serial communication between the TM intelligent printer and device.

    <type> element

    Description

    String setting

    <type>sendcommand</type>

    <Request>
    Transmits a command to a serial device.

    Detects acknowledgment.

    <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
    • Prints data line by line. Line spacing is automatically adjusted according to character size, image size, and barcode height. Suitable for printing receipts whose print length varies by print content.

    • Page mode
    • Prints page by page. Prints characters, images, and/or barcodes on a single page that is defined as a print area.
      To print in the page mode, switch to the page mode using <page>.

    XML document

    Child element

    Function

    Standard mode

    Page mode

    Print method

    Receipt

    Slip sheet

    Front side

    Back side

    Back side
    40cpl

    <epos-print>

    <text>

    Prints text.

    <feed>

    Paper feed

    <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.

    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 model.

    For details, refer to "Printer-specific Support Information”.

    <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 model.

    For details, refer to "Printer-specific Support Information”.

    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 display.

    <brightness>

    Changes the display brightness.

    <marquee>

    Displays a marquee.

    <clock>

    Displays the clock.

    <clear>

    Clears the current display area.

    <reset>

    Reset

    <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