Module: RBZK::Constants

Included in:
ZK
Defined in:
lib/rbzk/constants.rb

Constant Summary collapse

USHRT_MAX =
65_535
CMD_DB_RRQ =

Command codes

7
CMD_USER_WRQ =

Read in some kind of data from the machine

8
CMD_USERTEMP_RRQ =

Upload the user information (from PC to terminal)

9
CMD_USERTEMP_WRQ =

Read some fingerprint template or some kind of data entirely

10
CMD_OPTIONS_RRQ =

Upload some fingerprint template

11
CMD_OPTIONS_WRQ =

Read in the machine some configuration parameter

12
CMD_ATTLOG_RRQ =

Set machines configuration parameter

13
CMD_CLEAR_DATA =

Read all attendance record

14
CMD_CLEAR_ATTLOG =

clear Data

15
CMD_DELETE_USER =

Clear attendance records

18
CMD_DELETE_USERTEMP =

Delete some user

19
CMD_CLEAR_ADMIN =

Delete some fingerprint template

20
CMD_USERGRP_RRQ =

Cancel the manager

21
CMD_USERGRP_WRQ =

Read the user grouping

22
CMD_USERTZ_RRQ =

Set users grouping

23
CMD_USERTZ_WRQ =

Read the user Time Zone set

24
CMD_GRPTZ_RRQ =

Write the user Time Zone set

25
CMD_GRPTZ_WRQ =

Read the group Time Zone set

26
CMD_TZ_RRQ =

Write the group Time Zone set

27
CMD_TZ_WRQ =

Read Time Zone set

28
CMD_ULG_RRQ =

Write the Time Zone

29
CMD_ULG_WRQ =

Read unlocks combination

30
CMD_UNLOCK =

write unlocks combination

31
CMD_CLEAR_ACC =

unlock

32
CMD_CLEAR_OPLOG =

Restores Access Control set to the default condition

33
CMD_OPLOG_RRQ =

Delete attendance machines all attendance record

34
CMD_GET_FREE_SIZES =

Read manages the record

50
CMD_ENABLE_CLOCK =

Obtain machines condition, like user recording number and so on

57
CMD_STARTVERIFY =

Ensure the machine to be at the normal work condition

60
CMD_STARTENROLL =

Ensure the machine to be at the authentication condition

61
CMD_CANCELCAPTURE =

Start to enroll some user, ensure the machine to be at the registration user condition

62
CMD_STATE_RRQ =

Make the machine to be at the waiting order status

64
CMD_WRITE_LCD =

Gain the machine the condition

66
CMD_CLEAR_LCD =

Write LCD

67
CMD_GET_PINWIDTH =

Clear the LCD captions (clear screen)

69
CMD_SMS_WRQ =

Obtain the length of user’s serial number

70
CMD_SMS_RRQ =

Upload the short message

71
CMD_DELETE_SMS =

Download the short message

72
CMD_UDATA_WRQ =

Delete the short message

73
CMD_DELETE_UDATA =

Set user’s short message

74
CMD_DOORSTATE_RRQ =

Delete user’s short message

75
CMD_WRITE_MIFARE =

Obtain the door condition

76
CMD_EMPTY_MIFARE =

Write the Mifare card

78
CMD_READFILE_DATA =

Clear the Mifare card

81
CMD_GET_USERTEMP =

Read data from buffer

88
CMD_SAVE_USERTEMPS =

Get an specific user template (uid, fid)

110
CMD_DEL_USER_TEMP =

Save user and multiple templates

134
CMD_GET_TIME =

Delete an specific user template (uid, fid)

201
CMD_SET_TIME =

Obtain the machine time

202
CMD_REG_EVENT =

Set machines time

500
CMD_CONNECT =

Register the event

1000
CMD_EXIT =

Connections requests

1001
CMD_ENABLEDEVICE =

Disconnection requests

1002
CMD_DISABLEDEVICE =

Ensure the machine to be at the normal work condition

1003
CMD_RESTART =

Make the machine to be at the shut-down condition

1004
CMD_POWEROFF =

Restart the machine

1005
CMD_SLEEP =

Shut-down power source

1006
CMD_RESUME =

Ensure the machine to be at the idle state

1007
CMD_CAPTUREFINGER =

Awakens the sleep machine (temporarily not to support)

1009
CMD_TEST_TEMP =

Captures fingerprints picture

1011
CMD_CAPTUREIMAGE =

Test some fingerprint exists or does not

1012
CMD_REFRESHDATA =

Capture the entire image

1013
CMD_REFRESHOPTION =

Refresh the machine interior data

1014
CMD_TESTVOICE =

Refresh the configuration parameter

1017
CMD_GET_VERSION =

Play voice

1100
CMD_CHANGE_SPEED =

Obtain the firmware edition

1101
CMD_AUTH =

Change transmission speed

1102
CMD_PREPARE_DATA =

Connections authorizations

1500
CMD_DATA =

Prepares to transmit the data

1501
CMD_FREE_DATA =

Transmit a data packet

1502
CMD_PREPARE_BUFFER =

Clear machines opened buffer

1503
CMD_READ_BUFFER =

Initialize buffer for partial reads

1504
CMD_ACK_OK =

Ready a partial chunk of data from buffer

2000
CMD_ACK_ERROR =

Return value for order perform successfully

2001
CMD_ACK_DATA =

Return value for order perform failed

2002
CMD_ACK_RETRY =

Return data

2003
CMD_ACK_REPEAT =

Registered event occurred

2004
CMD_ACK_UNAUTH =

Not available

2005
CMD_ACK_UNKNOWN =

Connection unauthorized

0xffff
CMD_ACK_ERROR_CMD =

Unknown order

0xfffd
CMD_ACK_ERROR_INIT =

Order false

0xfffc
CMD_ACK_ERROR_DATA =

Not Initialized

0xfffb
EF_ATTLOG =

Event flags

1
EF_FINGER =

Be real-time to verify successfully

(1 << 1)
EF_ENROLLUSER =

Be real-time to enroll user

(1 << 2)
EF_ENROLLFINGER =

Be real-time to enroll fingerprint

(1 << 3)
EF_BUTTON =

Be real-time to press button

(1 << 4)
EF_UNLOCK =

Be real-time to unlock

(1 << 5)
EF_VERIFY =

Be real-time to verify fingerprint

(1 << 7)
EF_FPFTR =

Be real-time capture fingerprint minutia

(1 << 8)
EF_ALARM =

Alarm signal

(1 << 9)
USER_DEFAULT =

User types

0
USER_ENROLLER =
2
USER_MANAGER =
6
USER_ADMIN =
14
FCT_ATTLOG =

Data flags

1
FCT_WORKCODE =
8
FCT_FINGERTMP =
2
FCT_OPLOG =
4
FCT_USER =
5
FCT_SMS =
6
FCT_UDATA =
7
MACHINE_PREPARE_DATA_1 =

Machine constants These values are in little-endian format when packed 0x5050 = ‘PP’ in ASCII when packed as ‘<H’

20_560
MACHINE_PREPARE_DATA_2 =

0x7D82 = 0x827D in little-endian format

32_130