10 #ifndef __BRP_BALTECH_API_CMDS_ULRDR_H__    11 #define __BRP_BALTECH_API_CMDS_ULRDR_H__    12 #include "../typedefs.h"    16 #define BRP_UlRdr_ErrResponse BRP_ERR_STATUS(0xA500, 0x01)    20 #define BRP_UlRdr_ErrSequence BRP_ERR_STATUS(0xA500, 0x02)    24 #define BRP_UlRdr_ErrSignature BRP_ERR_STATUS(0xA500, 0x03)    83 brp_errcode brp_UlRdr_SendEncryptedCmd(
brp_protocol protocol, 
brp_buf Signature, 
unsigned DevCode, 
unsigned CmdCode, 
brp_buf Params, 
size_t Params_len, 
unsigned* SendDevCode, 
unsigned* SendCmdCode, 
brp_buf* SendParams, 
size_t* SendParams_len, 
brp_mempool *mempool);
 brp_errcode brp_UlRdr_SendAuth1(brp_protocol protocol, unsigned *SendDevCode, unsigned *SendCmdCode, brp_buf *SendParams, size_t *SendParams_len, brp_mempool *mempool)
Retrieves the command that has to be sent to the reader to unlock, to initiate authentication. 
 
brp_errcode brp_UlRdr_RecvAuth2(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len)
Passes the response of the reader to unlock. 
 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions. 
 
brp_errcode brp_UlRdr_SendAuth2(brp_protocol protocol, unsigned *SendDevCode, unsigned *SendCmdCode, brp_buf *SendParams, size_t *SendParams_len, brp_mempool *mempool)
Retrieves the command that has to be send to the reader to unlock, to continue authentication. 
 
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol. 
 
struct brp_mempool_object_t * brp_mempool
mempool handle. 
 
brp_errcode brp_UlRdr_RecvAuth1(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len)
Passes the response of the reader to unlock. 
 
brp_errcode brp_UlRdr_RecvEncryptedCmd(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len, unsigned *Status)
Check the response received by the command brp_UlRdr_SendEncryptedCmd(). 
 
unsigned char * brp_buf
represents a pointer to a protocol data buffer. 
 
brp_errcode brp_UlRdr_SendEncryptedCmd(brp_protocol protocol, brp_buf Signature, unsigned DevCode, unsigned CmdCode, brp_buf Params, size_t Params_len, unsigned *SendDevCode, unsigned *SendCmdCode, brp_buf *SendParams, size_t *SendParams_len, brp_mempool *mempool)
Encrypts the given command with the session key generated in the previous 3-pass-authentication.