"""Constantes del protocolo ID809"""

# Capacidad y configuracion
FINGERPRINT_CAPACITY = 80
MODULE_SN_SIZE = 16
DELALL = 0xFF

# Codigos de prefijo
CMD_PREFIX_CODE = 0xAA55      # Prefijo paquete comando
RCM_PREFIX_CODE = 0x55AA      # Prefijo paquete respuesta
CMD_DATA_PREFIX_CODE = 0xA55A # Prefijo paquete datos comando
RCM_DATA_PREFIX_CODE = 0x5AA5 # Prefijo paquete datos respuesta

# Tipos de paquete
CMD_TYPE = 0xF0
RCM_TYPE = 0xF0
DATA_TYPE = 0x0F

# Comandos
CMD_TEST_CONNECTION = 0x0001
CMD_SET_PARAM = 0x0002
CMD_GET_PARAM = 0x0003
CMD_DEVICE_INFO = 0x0004
CMD_SET_MODULE_SN = 0x0008
CMD_GET_MODULE_SN = 0x0009
CMD_ENTER_STANDBY_STATE = 0x000C
CMD_GET_IMAGE = 0x0020
CMD_FINGER_DETECT = 0x0021
CMD_UP_IMAGE_CODE = 0x0022
CMD_DOWN_IMAGE = 0x0023
CMD_SLED_CTRL = 0x0024
CMD_STORE_CHAR = 0x0040
CMD_LOAD_CHAR = 0x0041
CMD_UP_CHAR = 0x0042
CMD_DOWN_CHAR = 0x0043
CMD_DEL_CHAR = 0x0044
CMD_GET_EMPTY_ID = 0x0045
CMD_GET_STATUS = 0x0046
CMD_GET_BROKEN_ID = 0x0047
CMD_GET_ENROLL_COUNT = 0x0048
CMD_GET_ENROLLED_ID_LIST = 0x0049
CMD_GENERATE = 0x0060
CMD_MERGE = 0x0061
CMD_MATCH = 0x0062
CMD_SEARCH = 0x0063
CMD_VERIFY = 0x0064

# Codigos de error
ERR_SUCCESS = 0x00
ERR_ID809 = 0xFF
