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 POSKeyboard Message MSR Message SerialDevice Message OtherPeripheral Message Message2

    List of ePOS-Device XMLs

    The ePOS-Device XMLs provide the following.

    Message


    These XMLs are messages requested from applications to the printer and returned from the 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.

    Refer to Supported Printers by XMLs for the types of devices available for each printer.

    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.

    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 the hybrid model printers.

    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.

    Receipt printing

    <type>print</type>

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

    <type>onxmlresult</type>

    <Response>
    Data from the printer.

    Slip printing

    <type>slipwaitinsertion</type>

    <Request>
    Waiting for insertion of a slip sheet for slip printing.

    <type>slipprint2</type>

    <Request>
    Print data and configuration data for slip printing.

    <type>slipcancel</type>

    <Request>
    Cancels the slip sheet insertion wait status for slip printing.

    Endorsement printing

    <type>endorsewaitinsertion</type>

    <Request>
    Waiting for insertion of a slip sheet for endorsement printing.

    <type>endorseprint2</type>

    <Request>
    Print data and setting data for endorsement printing.

    <type>endorsecancel</type>

    <Request>
    Cancels the slip sheet insertion wait status for endorsement printing.

    Validation printing

    <type>validationwaitinsertion</type>

    <Request>
    Waiting for validation sheet insertion for validation printing.

    <type>validationprint2</type>

    <Request>
    Print data and setting data for validation printing.

    <type>validationcancel</type>

    <Request>
    Cancels the validation sheet insertion wait status for validation 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 paper.

    Reception of result

    <type>onreceive</type>

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

    List of control operations

    <type>element available for HybridPrinter message data depends on the operation to control.

    The following lists control operation types and available <type>element.

    <type>element

    Control operation

    Receipt

    Slip

    Endorsement

    Validation

    MICR

    <type>lock</type>

    <type>unlock</type>

    <type>print</type>

    -

    <type>onxmlresult</type>

    -

    <type>slipwaitinsertion</type>

    -

    -

    -

    -

    <type>slipprint2</type>

    -

    -

    -

    -

    <type>slipcancel</type>

    -

    -

    -

    -

    <type>endorsewaitinsertion</type>

    -

    -

    -

    -

    <type>endorseprint2</type>

    -

    -

    -

    -

    <type>endorsecancel</type>

    -

    -

    -

    -

    <type>validationwaitinsertion</type>

    -

    -

    -

    -

    <type>validationprint2</type>

    -

    -

    -

    -

    <type>validationcancel</type>

    -

    -

    -

    -

    <type>micrread</type>

    -

    -

    -

    -

    <type>micrcleaning</type>

    -

    -

    -

    -

    <type>micrcancel</type>

    -

    -

    -

    -

    <type>eject</type>

    -

    <type>onreceive</type>

    CustomerDisplay


    Controls text display on the customer display.

    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.

    POSKeyboard


    Controls character entry from the POS keyboard.

    <type> element

    Description

    Data detection

    <data>onkeypress</data>

    <Response>
    A string input from the keyboard.

    MSR


    Controls card reading by MSR.

    <type> element

    Description

    Data detection

    <data>ondata</data>

    <Response>
    Data from MSR.

    SerialDevice


    Controls serial communication between the 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.

    OtherPeripheral


    Controls peripheral devices with a device control program.

    <type> element

    Description

    Send

    <type>User-defined Function</type>

    <Request>
    Sends data to peripheral devices.

    Reception of result

    <type>User-defined Event</type>

    <Response>
    Receives data from peripheral devices.

    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.

    Creating print document

    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

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

    List of support per print method

    Child element

    Print method

    Receipt

    Slip

    Endorsement

    Endorsement (40cpl)

    Validation

    <text>

    <feed>

    <image>

    -

    -

    -

    -

    <logo>

    -

    -

    -

    -

    <barcode>

    -

    -

    -

    -

    <symbol>

    -

    -

    -

    -

    <hline>

    -

    -

    -

    -

    <vline-begin>

    -

    -

    -

    -

    <vline-end>

    -

    -

    -

    -

    <page>

    -

    -

    <area>

    -

    -

    <direction>

    -

    -

    <position>

    -

    -

    <line>

    -

    -

    -

    <rectangle>

    -

    -

    -

    <cut>

    -

    -

    -

    -

    <pulse>

    <sound>

    -

    -

    -

    -

    <command>

    <layout>

    -

    -

    -

    -

    <recovery>

    <reset>

    List of child element default values

    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