Epson TM-H6000IV-DT ePOS-Device XML Users Manual - Page 142
Configuration of Device Control Script, Functions Using Device Control Script Object
View all Epson TM-H6000IV-DT manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 142 highlights
Functions Using Device Control Script Object Using API for the device control script enables the following functions: ❏ Calling a desired event of device object on the browser ❏ Sending data to the device ❏ Receiving data generated in the device Configuration of Device Control Script Coding of the device control script must satisfy the following conditions: ❏ Describe the codes required for device control collectively in a file. (Only one file can be registered when using WebConfig for device setting.) ❏ The part before the first dot "." of the file name must be identical to the constructor name. (Example) File name : Keyboard_Generic.ver1.0.js -> Constructor name : Keyboard_Generic ❏ For external reference of constructor, declare exports. Ex) exports.Keyboard_Generic = Keyboard_Generic; ❏ The constructor must have two arguments. ❏ The device control script must have the properties as shown below. Set an appropriate name with the constructor. DEVICE_TYPE property (Object type :String) Set value type_keyboard type_scanner type_simple_serial Description Specify this to use a keyboard device. Specify this to use a barcode scanner. Specify this to perform simple serial communication. DEVICE_GROUP property (Object type :String) Set value group_hid group_serial group_other Description Specify this to use an input device that can run with an HID driver. Specify this to use a serial communication device. Specify this to use other device. ❏ The "onDeviceData" method is provided to receive data generated in the device. For details, refer to Device Control Script Name object (p.144). ❏ The method corresponding to the method of a device object that can run on the application is provided. For details, refer to Any event (p.148). 142