API for communicating with local devices from the browser.
- Source:
Methods
(static) BrowserPrint.bindFieldToReadData(device, field, readIntervalopt, onReadCallbackopt)
Continually reads from a device with a specified interval, placing the result of a non-empty read into the value of the field specified.
Client Client API Level 2Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
device |
Device | The device you want to read from | |
field |
Object | The field you want the read data to be placed in. | |
readInterval |
int |
<optional> |
The time between read attempts, defaulting to 1 second. |
onReadCallback |
function |
<optional> |
The function that is called when the read is completed with non empty data. |
- Source:
(static) BrowserPrint.getApplicationConfiguration(finishedCallback, errorCallbackopt)
Gets the application configuration.
Client API Level 3Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
finishedCallback |
function | The function that is called when the application configuration is retrieved, passing the ApplicationConfiguration to the function. | |
errorCallback |
function |
<optional> |
The function that is called if an error occurs while getting the application configuration, passing the error message to the function if there is one.. |
- Source:
(static) BrowserPrint.getDefaultDevice(type, finishedCallback, errorCallbackopt)
Gets the user specified default device by type
Client API Level 2Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | The type of device you are looking for. | |
finishedCallback |
function | The function that is called when a default device is retrieved, passing the device to the function. | |
errorCallback |
function |
<optional> |
The function that is called if an error occurs while getting the default device, passing the error message to the function if there is one.. |
- Source:
(static) BrowserPrint.getLocalDevices(finishedCallback, errorCallbackopt, typeFilteropt)
Get devices available to the local client
Client API Level 2Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
finishedCallback |
function | The function that is called when finding devices is completed, passing an array of devices to the function. | |
errorCallback |
function |
<optional> |
The function that is called if an error occurs while finding devices, passing the error message to the function if there is one.. |
typeFilter |
string |
<optional> |
The type of device you are looking for. Not specifying a type will return all devices. |
- Source:
(static) BrowserPrint.readOnInterval(device, callback, readIntervalopt)
Continually reads from a device with a specified interval
Client API Level 2Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
device |
Device | The device you want to read from | |
callback |
function | The function that is called when the read is completed with non empty data. | |
readInterval |
int |
<optional> |
The time between read attempts, defaulting to 1 second. |
- Source:
(static) BrowserPrint.stopReadOnInterval(device)
Stops continually reading from a device that was registered with readOnInterval or bindFieldToReadData
Client API Level 2Parameters:
Name | Type | Description |
---|---|---|
device |
Device | The device you want to stop reading from |
- Source: