fingerprint.py
def add_fingerprint_by_data(self, user_id, user_pri, eigenvalue):
        """
        Module get eigen value and save the fingerprint by user id and privilege
        :param user_id: number
        :param user_pri: number or Privilege
        :param eigenvalue: binary data
        :return: Response val User
        """
        id_high, id_low = text_to_byte(user_id)
        high_len, low_len = int.to_bytes(len(eigenvalue), 2, 'big')
        cmd_header = [Command.HEAD, Command.DOWN_ONE_DB, high_len, low_len,
                      0, 0, Command.CHK, Command.TAIL]
        cmd_packet = [Command.HEAD, id_high, id_low, user_pri]
        cmd_packet += eigenvalue
        cmd_packet += [Command.CHK, Command.TAIL]
        cmd_packet[-2] = get_chksum(cmd_packet[1:-2])
        res = self.send_cmd_packet(cmd_header, cmd_packet, 8)
        if res.ack == Ack.SUCCESS:
            res.val = User(id_high, id_low, user_pri)
        return res

        Module get eigen value and save the fingerprint by user id and privilege
        :param user_id: number
        :param user_pri: number or Privilege
        :param eigenvalue: binary data
        :return: Response val User
        
Module get eigen value and save the fingerprint by user id and privilege
Module get eigen value and save the fingerprint by user id and privilege
def add_fingerprint_by_data(self, user_id, user_pri, eigenvalue):
        id_high, id_low = text_to_byte(user_id)
        high_len, low_len = int.to_bytes(len(eigenvalue), 2, 'big')
        cmd_header = [Command.HEAD, Command.DOWN_ONE_DB, high_len, low_len,
                      0, 0, Command.CHK, Command.TAIL]
        cmd_packet = [Command.HEAD, id_high, id_low, user_pri]
        cmd_packet += eigenvalue
        cmd_packet += [Command.CHK, Command.TAIL]
        cmd_packet[-2] = get_chksum(cmd_packet[1:-2])
        res = self.send_cmd_packet(cmd_header, cmd_packet, 8)
        if res.ack == Ack.SUCCESS:
            res.val = User(id_high, id_low, user_pri)
        return res
def add_fingerprint_by_data ( self , user_id , user_pri , eigenvalue ) : id_high , id_low = text_to_byte ( user_id ) high_len , low_len = int . to_bytes ( len ( eigenvalue ) , 2 , 'big' ) cmd_header = [ Command . HEAD , Command . DOWN_ONE_DB , high_len , low_len , 0 , 0 , Command . CHK , Command . TAIL ] cmd_packet = [ Command . HEAD , id_high , id_low , user_pri ] cmd_packet += eigenvalue cmd_packet += [ Command . CHK , Command . TAIL ] cmd_packet [ - 2 ] = get_chksum ( cmd_packet [ 1 : - 2 ] ) res = self . send_cmd_packet ( cmd_header , cmd_packet , 8 ) if res . ack == Ack . SUCCESS : res . val = User ( id_high , id_low , user_pri ) return res
Module get eigen value and save the fingerprint by user id and privilege
Module get eigen value and save the fingerprint by user id and privilege
"""
        Module get eigen value and save the fingerprint by user id and privilege
        :param user_id: number
        :param user_pri: number or Privilege
        :param eigenvalue: binary data
        :return: Response val User
        """
Response val User
Response val User
self
user_id
None
user_pri
number or Privilege
number or Privilege
eigenvalue
None