var errno = ErrorToId[msg];
if (!errno)
errno = 100;
this.send('E' + errno + ',"' + msg + '"\r\n');
},
// We delay sending the result until trigger off to be sure that the
package id is received.
setResult: function (decodeResults) {
storedDecodeResults = decodeResults;
},
onDisconnect: function ()
{
bConnected = false;
},
onExpectedData: function (input)
{
var input = input.replace(/\n/g, '');
switch(input.charAt(0).toUpperCase())
case 'B':
dmccCommand("TRIGGER", true);
break;
case 'E':
dmccCommand("TRIGGER", false);
break;
case 'I':
var match = package_idtray_
expr.exec(input);
if(!match)
match = package_id_
expr.exec(input);
packageID = match[1];
if(match[2])
tray = match[2];
else
tray = "0000";
break;
65
DataMan Application Development