📄 errandcmd_code.h
字号:
/*
Brief: This file main describes about the command code of
cash code and the error code of test programe
*/
//command code
//////////////////////////////////////////////////////////////////////////
#define SYNC 0x02
#define ACK 0x00 //!< ACK code
#define NAK 0xFF //!< NAK code
#define ST_INV_CMD 0x30//!< INVALID COMMAND response
#define RESET 0x30 //!<REST command code
#define GET_STATUS 0x31 //!<STATUS REQUEST command code
#define SET_SECURITY 0x32 //!<SET SECURITY command code
#define POLL 0x33 //!<POLL command code
#define BILL_TYPE 0x34//!<BILL TYPE command code
#define STACK 0x35//!<PACK command code
#define RETURN 0x36//!<RETURN command code
#define IDENTIFICATION 0x37//!<IDENTIFICATION command code
#define IDENT_EXT 0x3E//!<EXTENDED IDENTIFICATION command code
#define HOLD 0x38//!<HOLD command code
#define C_STATUS 0x3B//!<RECYCLING CASSETTE STATUS REQUEST command code
#define DISPENSE 0x3C//!<DISPENSE command code
#define UNLOAD 0x3D//!<UNLOAD command code
#define SET_CASSETES 0x40//!<SET RECYCLING CASSETTE TYPE command code
#define GET_BILL_TABLE 0x41//!<BILL TABLE REQUEST command code
#define DOWNLOAD 0x50//!<DOWNLOAD command code
#define CRC32 0x51//!<CRC32 REQUEST command code
#define SET_TIME 0x62//!<SET BB TIME command code
#define SET_BAR_PARAMS 0x39//!<SET BARCODE PARAMETERS command code
#define EXTRACT_BAR_DATA 0x3A//!<EXTRACT BARCODE DATA command code
#define POWER_RECOVERY 0x66//!<POWER RECOVERY command code
#define EMPTY_DISPENSER 0x67//!<EMPTY DISPENSER command code
#define SET_OPTIONS 0x68//!<SET OPTIONS command code
#define GET_OPTIONS 0x69//!<GET OPTIONS command code
#define ST_POWER_UP 0x10//!< POWER UP state
#define ST_POWER_BILL_ESCROW 0x11//!< POWER UP WITH BILL IN ESCROW state
#define ST_POWER_BILL_STACKER 0x12//!< POWER UP WITH BILL IN STACKER state
#define ST_INITIALIZE 0x13//!< INITIALIZING state
#define ST_IDLING 0x14//!< IDLING state
#define ST_ACCEPTING 0x15//!< ACCEPTING state
#define ST_PACKING 0x17//!< STACKING/PACKING state
#define ST_RETURNING 0x18//!< RETURNING state
#define ST_DISABLED 0x19//!< UNIT DISABLED state
#define ST_HOLDING 0x1A//!< HOLDING state
#define ST_BUSY 0x1B//!< Device is busy
#define ST_REJECTING 0x1C//!< REJECTING state. Followed by a rejection code
//retuen and error code
//////////////////////////////////////////////////////////////////////////
/** \defgroup Addr Device Addresses
* @{
*/
#define ADDR_BB 0x01//!< Address for Bill-To-Bill units
#define ADDR_CHANGER 0x02 //!< Address for Coin Changer
#define ADDR_FL 0x03//!< Address for Bill Validators
#define ADDR_CR 0x04//!< Address for Smart Card Reader
//Rejection codes
//defgroup RCodes Rejection codes
#define RJ_INSERTION 0x60 //!< Rejection because of insertion problem
#define RJ_MAGNETIC 0x61 //!< Rejection because of invalid magnetic pattern
#define RJ_REMAINING 0x62 //!< Rejection because of other bill remaining in the device
#define RJ_MULTIPLYING 0x63 //!< Rejection because of multiple check failures
#define RJ_CONVEYING 0x64 //!< Rejection because of conveying
#define RJ_IDENT 0x65 //!< Rejection because of identification failure
#define RJ_VRFY 0x66 //!< Rejection because of verification failure
#define RJ_OPT 0x67 //!< Rejection because of optical pattern mismatch
#define RJ_INHIBIT 0x68 //!< Rejection because the denomination is inhibited
#define RJ_CAP 0x69 //!< Rejection because of capacity sensor pattern mismatch
#define RJ_OPERATION 0x6A //!< Rejection because of operation error
#define RJ_LNG 0x6C //!< Rejection because of invalid bill length
#define RJ_UV 0x6D //!< Rejection because of invalid UV pattern
#define RJ_BAR 0x92 //!< Rejection because of unrecognized barcode
#define RJ_BAR_LNG 0x93 //!< Rejection because of invalid barcode length
#define RJ_BAR_START 0x94 //!< Rejection because of invalid barcode start sequence
#define RJ_BAR_STOP 0x95 //!< Rejection because of invalid barcode stop sequence
#define ST_DISPENSING 0x1D//!< DISPENSING state
#define ST_UNLOADING 0x1E//!< UNLOADING state
#define ST_SETTING_CS_TYPE 0x21//!< SETTING RECYCLING CASSETTE TYPE state
#define ST_DISPENSED 0x25//!< DISPENSED event
#define ST_UNLOADED 0x26//!< UNLOADED event
#define ST_BILL_NUMBER_ERR 0x28//!< INVALID BILL NUMBER event
#define ST_CS_TYPE_SET 0x29//!< RECYCLING CASSETTE TYPE SET event
#define ST_ST_FULL 0x41//!< DROP CASSETTE IS FULL state
#define ST_BOX 0x42//!< DROP CASSETTE REMOVED state
#define ST_BV_JAMMED 0x43//!< JAM IN VALIDATOR state
#define ST_ST_JAMMED 0x44//!< JAM IN STACKER state
#define ST_CHEATED 0x45//!< CHEATED event
#define ST_PAUSED 0x46//!< PAUSED state
#define ST_FAILURE 0x47//!< FAILURE state
//Failure codes
//defgroup FCodes Failure codes
#define FLR_STACKER 0x50 //!< Stacking mechanism failure
#define FLR_TR_SPEED 0x51 //!< Invalid speed of transport mechanism
#define FLR_TRANSPORT 0x52 //!< Transport mechanism failure
#define FLR_ALIGNING 0x53 //!< Aligning mechanism failure
#define FLR_INIT_CAS 0x54 //!< Initial cassette status failure
#define FLR_OPT 0x65 //!< Optical channel failure
#define FLR_MAG 0x66 //!< Inductive channel failure
#define FLR_CAP 0x67 //!< Capacity sensor failure
// Credit events
#define ST_PACKED 0x81
/*
A bill has been packed. 2nd byte - 0xXY:
\n X-bill type
\n Y-Packed into:
\n 0-BOX, else - Cassette Y;
*/
#define ESCROW 0x80 //!< A bill is held in the escrow position
#define RETURNED 0x82 //!< A bill was returned
// Cassetes status
//defgroup CSStatus Possible cassette status codes
#define CS_OK 0 //!< Cassette is present and operational
#define CS_FULL 1 //!< Cassette is full
#define CS_NU 0xFE//!< Cassette is not present
#define CS_MALFUNCTION 0xFF//!< Cassette is malfunctioning
#define CS_NA 0xFD//!< Cassette is not assigned to any denomination
#define CS_ESCROW 0xFC//!< Cassette is assigned to multi-escrow
//defgroup BTs Predefined bill type values
#define BT_ESCROW 24//!< Bill type associated with the escrow cassette
#define BT_NO_TYPE 0x1f //!< Invalid bill type
#define BT_BAR 23 //!< Bill type associated with barcode coupon
// Error codes
/*
defgroup ErrCode CCNET Interface error codes
defgroup CErrs Communication error codes
The codes related to phisical data transmission and frame integrity
*/
#define RE_NONE 0 //!< No error happened
#define RE_TIMEOUT -1//!< Communication timeout
#define RE_SYNC -2//!< Synchronization error (invalid synchro byte)
#define RE_DATA -3//!< Data reception error
#define RE_CRC -4
//!< CRC error
/*
defgroup LErrs Logical error codes
The codes related to the interface logic
*/
#define ER_NAK -5//!< NAK received
#define ER_INVALID_CMD -6//!< Invalid command response received
#define ER_EXECUTION -7//!< Execution error response received
#define ERR_INVALID_STATE -8//!< Invalid state received
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -