@kybarg/ebds
Version:
Node.js package to work with bill acceptors using EBDS protocol. Linux, OSX and Windows.
149 lines (147 loc) • 2.83 kB
JavaScript
const states = [
{
name: 'IDLING',
description: 'Waiting for a bill/bar code',
type: 'transient',
byte: 0,
bit: 0,
},
{
name: 'ACCEPTING',
description: 'Drawing a bill/bar code in',
type: 'transient',
byte: 0,
bit: 1,
},
{
name: 'ESCROWED',
description: 'Note/barcode now in Escrow',
type: 'persistent',
byte: 0,
bit: 2,
denomination: true,
},
{
name: 'STACKING',
description: 'In the Stacking process',
type: 'transient',
byte: 0,
bit: 3,
},
{
name: 'STACKED',
description: 'The bill/bar code has been Stacked',
type: 'event',
byte: 0,
bit: 4,
denomination: true,
},
{
name: 'RETURNING',
description: 'Returning a bill/bar code',
type: 'transient',
byte: 0,
bit: 5,
},
{
name: 'RETURNED',
description: 'Bill/bar code has been Returned',
type: 'event',
byte: 0,
bit: 6,
denomination: true,
},
{
name: 'CHEATED',
description: 'A Cheat has been detected',
type: 'event',
byte: 1,
bit: 0,
},
{
name: 'REJECTED',
description: 'A bill/bar code was Rejected',
type: 'event',
byte: 1,
bit: 1,
},
{
name: 'JAMMED',
description: 'The Acceptor is Jammed',
type: 'persistent',
byte: 1,
bit: 2,
},
{
name: 'CASSETTE_FULL',
description: 'The Cassette is Full',
type: 'persistent',
byte: 1,
bit: 3,
},
{
name: 'LRC_REMOVED',
description: 'Lockable Removable Cassette is removed',
type: 'persistent',
negative: true,
byte: 1,
bit: 4,
},
{
name: 'PAUSED',
description: 'The Acceptor is paused',
type: 'persistent',
byte: 1,
bit: 5,
},
{
name: 'CALIBRATION',
description: 'Entering Calibration mode',
type: 'state',
byte: 1,
bit: 6,
},
{
name: 'POWER_UP',
description: 'The Acceptor has just been reset',
type: 'event',
byte: 2,
bit: 0,
},
{
name: 'INVALID_COMMAND',
description: 'Invalid command was received',
type: 'event',
byte: 2,
bit: 1,
},
{
name: 'FAILURE',
description: 'Requires reset or repair',
type: 'persistent',
byte: 2,
bit: 2,
},
{
name: 'NO_PUSH_MODE',
description: 'Acceptor is stalled in the No Push Mode',
type: 'persistent',
byte: 3,
bit: 0,
},
{
name: 'FLASH_DOWNLOAD',
description: 'Entering Flash Download mode',
type: 'state',
byte: 3,
bit: 1,
},
{
name: 'PRESTACK',
description: 'The bill is not retrievable',
type: 'event',
byte: 3,
bit: 2,
},
];
module.exports = states;