Class Index | File Index

Classes


Namespace LineaBrowser

LineaBrowser Class
Defined in: js.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
LineaBrowser class used to communicate between the Linea device and javascript.
Field Summary
Field Attributes Field Name and Description
<static> <constant>  
LineaBrowser.BARCODE_TYPE_DEFAULT
For Barcode Scan Type Return Mode
<static> <constant>  
LineaBrowser.BARCODE_TYPE_EXTENDED
For Barcode Scan Type Return Mode
<static> <constant>  
LineaBrowser.BUTTON_DISABLED
For Button States
<static> <constant>  
LineaBrowser.BUTTON_ENABLED
For Button States
<static> <constant>  
LineaBrowser.CONN_CONNECTED
For Connection State Changes
<static> <constant>  
LineaBrowser.CONN_CONNECTING
For Connection State Changes
<static> <constant>  
LineaBrowser.CONN_DISCONNECTED
For Connection State Changes
<static> <constant>  
LineaBrowser.MODE_MULTI_SCAN
For Scan Modes
<static> <constant>  
LineaBrowser.MODE_SINGLE_SCAN
For Scan Modes
<static> <constant>  
LineaBrowser.MS_PROCESSED_CARD_DATA
For Card Processing
<static> <constant>  
LineaBrowser.MS_RAW_CARD_DATA
For Card Processing
Method Summary
Method Attributes Method Name and Description
<private> <static>  
LineaBrowser.barcodeData()
This function will be fired when a barcode is successfully read on the LineaDevice.
<private> <static>  
LineaBrowser.buttonPressed()
This function will be fired when the button is pressed on the LineaDevice.
<private> <static>  
LineaBrowser.buttonReleased()
This function will be fired when the button is released on the LineaDevice.
<static>  
LineaBrowser.clearCommandQueue()
Clears the queue of commands about to be sent to the LineaBrowser app.
<private> <static>  
LineaBrowser.connectionState()
This function will be fired when the LineaDevice changes connection state.
<private> <static>  
LineaBrowser.creditCardData()
This function will be fired when the LineaDevice reads a credit card.
<static>  
LineaBrowser.enableBarcode(barcodeType, enabled)
Enables or disables the specified barcode.
<static>  
LineaBrowser.hideConfigBar()
Hides the config bar at the bottom of the screen to give more realestate or to make your own.
<private> <static>  
LineaBrowser.magneticCardData()
This function will be fired when a card is successfully read on the LineaDevice.
<static>  
Currently not fully supported!
<static>  
Currently not fully supported!
<static>  
LineaBrowser.magneticCardRawData()
Currently not fully supported!
<static>  
LineaBrowser.on(event, fn, scope)
Adds an event listener to the specified event.
<static>  
LineaBrowser.playSound(volume, beepData)
Plays a sound though the Linea device.
<static>  
LineaBrowser.setBarcodeTypeMode(mode)
Sets which barcode type subset is used for returning.
<static>  
LineaBrowser.setMSCardDataMode(mode)
Sets the mode which the card reader data is returned.
<static>  
LineaBrowser.setScanBeep(Weather, Volume, Beep)
Sets the beep settings for when a barcode is successfully scanned.
<static>  
LineaBrowser.setScanButtonMode(mode)
Used to specifiy weather the button on the device will activate the lazer when pressed.
<static>  
LineaBrowser.setScanMode(mode)
Used to tell the barcode engine to go into persistant scanning or not.
<static>  
LineaBrowser.setScanTimeout(timeout)
Used to turn off the lazer after a the specified amount of time has passed without scanning a barcode.
<static>  
LineaBrowser.showConfigBar()
Shows the config bar at the bottom of the screen.
<static>  
LineaBrowser.startScan()
Turns on the barcode lazer (it will accept barcodes).
<static>  
LineaBrowser.stopScan()
Turns off the barcode lazer (it will stop accepting barcodes).
<static>  
LineaBrowser.un(event, fn)
Removes an event listener.
Namespace Detail
LineaBrowser
LineaBrowser class used to communicate between the Linea device and javascript.
Field Detail
<static> <constant> LineaBrowser.BARCODE_TYPE_DEFAULT
For Barcode Scan Type Return Mode

<static> <constant> LineaBrowser.BARCODE_TYPE_EXTENDED
For Barcode Scan Type Return Mode

<static> <constant> LineaBrowser.BUTTON_DISABLED
For Button States

<static> <constant> LineaBrowser.BUTTON_ENABLED
For Button States

<static> <constant> LineaBrowser.CONN_CONNECTED
For Connection State Changes

<static> <constant> LineaBrowser.CONN_CONNECTING
For Connection State Changes

<static> <constant> LineaBrowser.CONN_DISCONNECTED
For Connection State Changes

<static> <constant> LineaBrowser.MODE_MULTI_SCAN
For Scan Modes

<static> <constant> LineaBrowser.MODE_SINGLE_SCAN
For Scan Modes

<static> <constant> LineaBrowser.MS_PROCESSED_CARD_DATA
For Card Processing

<static> <constant> LineaBrowser.MS_RAW_CARD_DATA
For Card Processing
Method Detail
<private> <static> LineaBrowser.barcodeData()
This function will be fired when a barcode is successfully read on the LineaDevice. You may attach a listener to this by calling:

 LineaBrowser.on('barcodeData', function (barcode, type){
     // Your Code
 });
The first argument is the barcode's data as a string and the second argument is the barcode type as an integer which should correspond to the number in LineaBrowser.BAR_TYPES.*(_EX)?

<private> <static> LineaBrowser.buttonPressed()
This function will be fired when the button is pressed on the LineaDevice. You may attach a listener to this by calling:

 LineaBrowser.on('buttonPressed', function (button){
     // Your Code
 });
The first parameter is which button was pressed, however it will always return 0 currently.

<private> <static> LineaBrowser.buttonReleased()
This function will be fired when the button is released on the LineaDevice. You may attach a listener to this by calling:

 LineaBrowser.on('buttonReleased', function (button){
     // Your Code
 });
The first parameter is which button was pressed, however it will always return 0 currently.

<static> LineaBrowser.clearCommandQueue()
Clears the queue of commands about to be sent to the LineaBrowser app.

<private> <static> LineaBrowser.connectionState()
This function will be fired when the LineaDevice changes connection state. You may attach a listener to this by calling:

 LineaBrowser.on('connectionState', function (state){
     // Your Code
 });
The first parameter is the state corresponding to LineaBrowser.CONN_* for which state it was changed into.

<private> <static> LineaBrowser.creditCardData()
This function will be fired when the LineaDevice reads a credit card. You may attach a listener to this by calling:

 LineaBrowser.on('creditCardData', function (accountNumber, cardholderName, experationYear, experationMonth, serviceCode, discretionaryData, firstName, lastName){
     // Your Code
 });
See above for the parameters passed and their names.

<static> LineaBrowser.enableBarcode(barcodeType, enabled)
Enables or disables the specified barcode.
Parameters:
{Integer} barcodeType
The specified barcode of LineaBrowser.BAR_TYPES.*
{Boolean} enabled
Weather the barcode will be enabled or disabled.

<static> LineaBrowser.hideConfigBar()
Hides the config bar at the bottom of the screen to give more realestate or to make your own. (this will resize the window size)

<private> <static> LineaBrowser.magneticCardData()
This function will be fired when a card is successfully read on the LineaDevice. You may attach a listener to this by calling:

 LineaBrowser.on('magneticCardData', function (track1, track2, track3){
     // Your Code
 });
The parameters passed are track1, track2, and track3.

<static> LineaBrowser.magneticCardEncryptedData()
Currently not fully supported!

<static> LineaBrowser.magneticCardEncryptedRawData()
Currently not fully supported!

<static> LineaBrowser.magneticCardRawData()
Currently not fully supported!

<static> LineaBrowser.on(event, fn, scope)
Adds an event listener to the specified event.
Parameters:
{String} event
The event name to attach function to.
{Function} fn
The function to execute when event fires.
scope

<static> LineaBrowser.playSound(volume, beepData)
Plays a sound though the Linea device.
LineaBrowser.playSound(100, [1000, 200, 4000, 100, 100, 500]); // This will play as the following: 1000mhz @ 200ms, 4000mhz @ 100ms, 100mhz @ 500ms
Parameters:
{Integer} volume
The volume to play sound at (Currently the Linea device does not support other values than 0 or 100).
{Array} beepData
An array of data to play.

<static> LineaBrowser.setBarcodeTypeMode(mode)
Sets which barcode type subset is used for returning. If BARCODE_TYPE_DEFAULT is used it will use LineaBrowser.BAR_TYPES.*(^_EX) (without the _EX extension). If BARCODE_TYPE_EXTENDED is used it wil return barcode types using LineaBrowser.BAR_TYPES.*_EX (with the _EX extension).
Parameters:
{Integer} mode
The mode to return the barcode type as. (Should be one of LineaBrowser.BARCODE_TYPE_DEFAULT or LineaBrowser.BARCODE_TYPE_EXTENDED)

<static> LineaBrowser.setMSCardDataMode(mode)
Sets the mode which the card reader data is returned. If MS_PROCESSED_CARD_DATA is used it will return with magneticCardData event if MS_RAW_CARD_DATA is used it will return the card data with magenticCardRawData.
Parameters:
{Integer} mode
The mode to use. (should be one of the following LineaBrowser.MS_PROCESSED_CARD_DATA or LineaBrowser.MS_RAW_CARD_DATA)

<static> LineaBrowser.setScanBeep(Weather, Volume, Beep)
Sets the beep settings for when a barcode is successfully scanned.
Parameters:
{Boolean} Weather
the beep should play or not.
{Integer} Volume
to play the sound at (Currently the Linea device does not support this).
{Array} Beep
data to send (see LineaBrowser.playSound for more info)

<static> LineaBrowser.setScanButtonMode(mode)
Used to specifiy weather the button on the device will activate the lazer when pressed. (the buttonPress and buttonRelease event will still fire)
Parameters:
{Integer} mode
One of the following: LineaBrowser.BUTTON_DISABLED or LineaBrowser.BUTTON_ENABLED

<static> LineaBrowser.setScanMode(mode)
Used to tell the barcode engine to go into persistant scanning or not. Persistant scanning will keep the lazer active even when a barcode is scanned allowing you to scan multiple barcodes in sequence without having to keep pressing and depressing the button.
Parameters:
{Integer} mode
The mode the barcode engine goes into. Should be on of the following: LineaBrowser.MODE_SINGLE_SCAN or LineaBrowser.MODE_MULTI_SCAN.

<static> LineaBrowser.setScanTimeout(timeout)
Used to turn off the lazer after a the specified amount of time has passed without scanning a barcode.
Parameters:
{Integer} timeout
The time in seconds to turn off lazer on no barcode scan (0 will never timeout).

<static> LineaBrowser.showConfigBar()
Shows the config bar at the bottom of the screen. (this will resize the window size)

<static> LineaBrowser.startScan()
Turns on the barcode lazer (it will accept barcodes).

<static> LineaBrowser.stopScan()
Turns off the barcode lazer (it will stop accepting barcodes).

<static> LineaBrowser.un(event, fn)
Removes an event listener.
Parameters:
{String} event
The event name to search for function in.
{Function} fn
The function to remove.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Aug 30 2011 19:57:13 GMT-0500 (CDT)