C API for BALTECH SDK
main.h
Go to the documentation of this file.
1 
11 #ifndef __BRP_BALTECH_API_CMDS_MAIN_H__
12 #define __BRP_BALTECH_API_CMDS_MAIN_H__
13 #include "../typedefs.h"
18 #define BRP_Main_ErrOutdatedFirmware BRP_ERR_STATUS(0xF000, 0x01)
19 
23 #define BRP_Main_ErrUnknownVersion BRP_ERR_STATUS(0xF000, 0x02)
24 
28 #define BRP_Main_ErrInvalidState BRP_ERR_STATUS(0xF000, 0x10)
29 
33 #define BRP_Main_ErrReadFile BRP_ERR_STATUS(0xF000, 0x11)
34 
37 #define BRP_Main_ErrInvalidFormat BRP_ERR_STATUS(0xF000, 0x12)
38 
42 #define BRP_Main_ErrInvalidCustomerKey BRP_ERR_STATUS(0xF000, 0x13)
43 
47 #define BRP_Main_ErrInvalidConfigSecurityCode BRP_ERR_STATUS(0xF000, 0x14)
48 
52 #define BRP_Main_ErrInvalidConfigVersion BRP_ERR_STATUS(0xF000, 0x15)
53 
57 #define BRP_Main_ErrInvalidCmac BRP_ERR_STATUS(0xF000, 0x16)
58 
62 #define BRP_Main_ErrUpload BRP_ERR_STATUS(0xF000, 0x17)
63 
67 #define BRP_Main_ErrUnsupportedFirmware BRP_ERR_STATUS(0xF000, 0x18)
68 
72 #define BRP_Main_ErrAlreadyUpToDate BRP_ERR_STATUS(0xF000, 0x19)
73 
78 #define BRP_Main_ErrMissingConfigSecurityCode BRP_ERR_STATUS(0xF000, 0x1A)
79 
82 #define BRP_Main_ErrInvalidEccKey BRP_ERR_STATUS(0xF000, 0x1B)
83 
93 brp_errcode brp_Main_Bf2Upload(brp_protocol protocol, unsigned* Lines, size_t Lines_len, brp_Main_Bf2Upload_ResultCode* ResultCode, unsigned* InvertedResultCode);
113 brp_errcode brp_Main_MatchPlatformId2(brp_protocol protocol, brp_buf Filter, size_t Filter_len, bool* Matches);
125 brp_errcode brp_Main_IsFirmwareUpToDate(brp_protocol protocol, brp_buf VersionDesc, size_t VersionDesc_len);
141 brp_errcode brp_Main_Bf3UploadStart(brp_protocol protocol, unsigned* ReqDataAdr, unsigned* ReqDataLen);
171 brp_errcode brp_Main_Bf3UploadContinue(brp_protocol protocol, unsigned DataAdr, brp_buf Data, size_t Data_len, bool* Reconnect, bool* Continue, unsigned* ReqDataAdr, unsigned* ReqDataLen, bool* ContainsEstimation, bool* ContainsReconnectRetryTimeout, unsigned* ReconnectRetryTimeout, unsigned* EstimatedNumberOfBytes, unsigned* EstimatedTimeOverhead);
172 #endif
173 
brp_Main_Bf2Upload_ResultCode
Error code of this operation.
Definition: typedefs.h:1974
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
brp_errcode brp_Main_IsFirmwareUpToDate(brp_protocol protocol, brp_buf VersionDesc, size_t VersionDesc_len)
This command checks if the following part of the firmware is already up to date.
brp_errcode brp_Main_Bf2Upload(brp_protocol protocol, unsigned *Lines, size_t Lines_len, brp_Main_Bf2Upload_ResultCode *ResultCode, unsigned *InvertedResultCode)
This command transfers a single line of a BF2 file to the reader (needed for firmware upload)...
brp_errcode brp_Main_MatchPlatformId2(brp_protocol protocol, brp_buf Filter, size_t Filter_len, bool *Matches)
This command checks if the PlatformID2 of the reader matches the PlatformID2 provided in the Filter p...
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
brp_errcode brp_Main_Bf3UploadContinue(brp_protocol protocol, unsigned DataAdr, brp_buf Data, size_t Data_len, bool *Reconnect, bool *Continue, unsigned *ReqDataAdr, unsigned *ReqDataLen, bool *ContainsEstimation, bool *ContainsReconnectRetryTimeout, unsigned *ReconnectRetryTimeout, unsigned *EstimatedNumberOfBytes, unsigned *EstimatedTimeOverhead)
This command is used to transfer the data of a BEC2/BF3 file block by block to the reader...
brp_errcode brp_Main_SwitchFW(brp_protocol protocol)
After uploading the complete firmware with brp_Main_Bf2Upload(), this command is needed to activate t...
brp_errcode brp_Main_Bf3UploadStart(brp_protocol protocol, unsigned *ReqDataAdr, unsigned *ReqDataLen)
This command starts the upload of a BEC2/BF3 file to update the reader's configuration and/or firmwar...