Cordova Plugin to be used with Nedap's !D Hand 2.
- Instantiate a
NedapReader
instance
NedapReader.connect()
.then(function(reader) {
// returns an instance of NedapReader
})
.catch(function(error) {
// capture the error here..
})
NedapReader.connect()
also accepts an object where you can pass in the following and configure:
{
session: "Session1", // possible values: "Session0", "Session1", "Session2", "Session3"
disableFeedback: true, // possible values: true/false. Enables or disables Device feedback: Sounds & Vibration altogether.
}
Initiates an RFID observation session.
Closes RFID observation session.
Initiates a Barcode observation session.
Closes barcode observation session.
Start the tag writing/programming session.
Closes the tag writing/programming session.
Prepares the value that needs to be written to the Tag.
Disconnects the reader.
reader.disconnect()
.then(function() {
// successfully disconnected the reader.
})
Add callbacks on interesting events. Check the supported events section for name and type of events that can be listened to.
Returns true
if the RFID observation session is active and the !D Hand is observing RFID Tags, returns false
otherwise.
Returns true
if the Barcode observation session is active and the !D Hand is observing Barcodes, returns false
otherwise.
Object containing observed EPCs data, following properties are available:
{
total_count: N,
unique_count: N,
epcs: [{
hex: "hex value",
rssi: -N,
times_observed: N
}]
}
Returns the serial number of the connected !D Hand.
Returns the Manufacturer name of the connected !D Hand.
Returns the Name of the connected !D Hand.
Returns the current output power of the !D Hand. Setting this to a new value attempts an update for the output power.
Returns the current session of the !D Hand. Setting this to a new value attempts to update the session being used.
Example:
reader.on('idHandDidStartReading', function() {
// do something interesting
})
Example:
reader.on('idHandDidStopReading', function() {
// do something interesting
})
onTagRead
initiates a stream of events, and the callback is continuously called untill reader.stopObservingEpcs()
is called.
Example:
reader.on('onTagRead', function(result) {
// result is an object with the following structure:
// {
// "unique_count": N,
// "total_count": N,
// "epcs": [{ hex: "hexvalue", rssi: -N, times_observed: N }]
// }
})
Example:
reader.on('barcodeIdHandDidRead', function(result) {
// result is an object with the following structure:
// {
// "barcodeValue": "value"
// "barcodeType": "barcodetype"
// }
})
Example:
reader.on('barcodeIdHandReadFailed', function() {
// do something interesting
})
Example:
reader.on('idHandDidNotProgram', function(reason) {
// returns back with the reason why the idHand was unable to program an RFID Tag.
})
Example:
reader.on('idHandDidProgram', function() {
// called when ID Hand is able to successfully write data to the tag
})
Example:
reader.on('idHandDidStartProgramming', function() {
// called when ID hand begins tag writing.
})
Example:
reader.on('idHandDidStartProgramming', function() {
// called when ID hand finishes tag writing
})
Example:
reader.on('idHandBatteryLevelUpdate', function(percentage) {
// called when ID hand finishes tag writing
})