BALTECH SDK wrapper functions reference
sys.h
Go to the documentation of this file.
1 
12 #ifndef __BRP_BALTECH_SDK_CMDS_SYS_H__
13 #define __BRP_BALTECH_SDK_CMDS_SYS_H__
14 #include "../typedefs.h"
18 #define BRP_Sys_ErrCfgFull BRP_ERR_STATUS(0x0000, 0x01)
19 
25 #define BRP_Sys_ErrCfgAccess BRP_ERR_STATUS(0x0000, 0x02)
26 
32 #define BRP_Sys_ErrCfgNotFound BRP_ERR_STATUS(0x0000, 0x03)
33 
36 #define BRP_Sys_ErrInvalidCfgBlock BRP_ERR_STATUS(0x0000, 0x04)
37 
40 #define BRP_Sys_ErrCfgAccessDenied BRP_ERR_STATUS(0x0000, 0x05)
41 #ifdef BALTECH_SDK_INTERNAL
42 
45 #define BRP_Sys_ErrRegAccess BRP_ERR_STATUS(0x0000, 0x06)
46 #endif // BALTECH_SDK_INTERNAL
47 
50 #define BRP_Sys_ErrInvalidProtocol BRP_ERR_STATUS(0x0000, 0x07)
51 
54 #define BRP_Sys_ErrNotSupportedByHardware BRP_ERR_STATUS(0x0000, 0x08)
55 
58 #define BRP_Sys_ErrFactsetRestore BRP_ERR_STATUS(0x0000, 0x09)
59 #ifdef BALTECH_SDK_INTERNAL
60 
63 #define BRP_Sys_ErrCfgConfigSecurityCode BRP_ERR_STATUS(0x0000, 0x0A)
64 #endif // BALTECH_SDK_INTERNAL
65 #ifdef BALTECH_SDK_INTERNAL
66 
69 #define BRP_Sys_ErrCfgVersion BRP_ERR_STATUS(0x0000, 0x0B)
70 #endif // BALTECH_SDK_INTERNAL
71 #ifdef BALTECH_SDK_INTERNAL
72 
75 #define BRP_Sys_ErrCfgLoadWrongState BRP_ERR_STATUS(0x0000, 0x0C)
76 #endif // BALTECH_SDK_INTERNAL
77 #ifdef BALTECH_SDK_INTERNAL
78 
81 #define BRP_Sys_ErrInvalidFwCrc BRP_ERR_STATUS(0x0000, 0x7F)
82 #endif // BALTECH_SDK_INTERNAL
83 typedef struct {
85  unsigned* MaxSendSize;
86  unsigned* MaxRecvSize;
87  unsigned* TotalSize;
100 #ifdef BRP_SUPPORT_LEGACY_METHODS
101 brp_errcode brp_Sys_GetBufferSize(brp_protocol protocol, unsigned* MaxSendSize, unsigned* MaxRecvSize, unsigned* TotalSize);
102 #else
104 #endif
105 typedef struct {
107  unsigned OffDuration;
127 #ifdef BRP_SUPPORT_LEGACY_METHODS
128 brp_errcode brp_Sys_HFReset(brp_protocol protocol, unsigned OffDuration);
129 #else
131 #endif
132 typedef struct {
153 #ifdef BRP_SUPPORT_LEGACY_METHODS
155 #else
157 #endif
158 typedef struct {
160  char** Info;
182 #ifdef BRP_SUPPORT_LEGACY_METHODS
183 brp_errcode brp_Sys_GetInfo(brp_protocol protocol, char** Info, brp_mempool *mempool);
184 #else
186 #endif
187 typedef struct {
201 #ifdef BRP_SUPPORT_LEGACY_METHODS
203 #else
205 #endif
206 #ifdef BALTECH_SDK_INTERNAL
207 typedef struct {
208  brp_protocol protocol;
209  brp_IoPortBitmask* PortMask;
210 } brp_Sys_GetPort_t;
218 #ifdef BRP_SUPPORT_LEGACY_METHODS
219 brp_errcode brp_Sys_GetPort(brp_protocol protocol, brp_IoPortBitmask* PortMask);
220 #else
221 brp_errcode brp_Sys_GetPort(brp_Sys_GetPort_t params);
222 #endif
223 #endif // BALTECH_SDK_INTERNAL
224 #ifdef BALTECH_SDK_INTERNAL
225 typedef struct {
226  brp_protocol protocol;
227  brp_IoPortBitmask PortMask;
228 } brp_Sys_SetPort_t;
238 #ifdef BRP_SUPPORT_LEGACY_METHODS
239 brp_errcode brp_Sys_SetPort(brp_protocol protocol, brp_IoPortBitmask PortMask);
240 #else
241 brp_errcode brp_Sys_SetPort(brp_Sys_SetPort_t params);
242 #endif
243 #endif // BALTECH_SDK_INTERNAL
244 typedef struct {
246  unsigned Key;
247  unsigned Value;
249  size_t* Content_len;
263 #ifdef BRP_SUPPORT_LEGACY_METHODS
264 brp_errcode brp_Sys_CfgGetValue(brp_protocol protocol, unsigned Key, unsigned Value, brp_buf* Content, size_t* Content_len, brp_mempool *mempool);
265 #else
267 #endif
268 typedef struct {
270  unsigned Key;
271  unsigned Value;
273  size_t Content_len;
285 #ifdef BRP_SUPPORT_LEGACY_METHODS
286 brp_errcode brp_Sys_CfgSetValue(brp_protocol protocol, unsigned Key, unsigned Value, brp_buf Content, size_t Content_len);
287 #else
289 #endif
290 typedef struct {
292  unsigned Key;
293  unsigned Value;
309 #ifdef BRP_SUPPORT_LEGACY_METHODS
310 brp_errcode brp_Sys_CfgDelValues(brp_protocol protocol, unsigned Key, unsigned Value);
311 #else
313 #endif
314 typedef struct {
316  unsigned** KeyList;
317  size_t* KeyList_len;
329 #ifdef BRP_SUPPORT_LEGACY_METHODS
330 brp_errcode brp_Sys_CfgGetKeyList(brp_protocol protocol, unsigned** KeyList, size_t* KeyList_len, brp_mempool *mempool);
331 #else
333 #endif
334 typedef struct {
336  unsigned Key;
337  unsigned** ValueList;
338  size_t* ValueList_len;
351 #ifdef BRP_SUPPORT_LEGACY_METHODS
352 brp_errcode brp_Sys_CfgGetValueList(brp_protocol protocol, unsigned Key, unsigned** ValueList, size_t* ValueList_len, brp_mempool *mempool);
353 #else
355 #endif
356 #ifdef BALTECH_SDK_INTERNAL
357 typedef struct {
358  brp_protocol protocol;
359  brp_buf TlvBlock;
360  size_t TlvBlock_len;
361 } brp_Sys_CfgWriteTlvSector_t;
372 #ifdef BRP_SUPPORT_LEGACY_METHODS
373 brp_errcode brp_Sys_CfgWriteTlvSector(brp_protocol protocol, brp_buf TlvBlock, size_t TlvBlock_len);
374 #else
375 brp_errcode brp_Sys_CfgWriteTlvSector(brp_Sys_CfgWriteTlvSector_t params);
376 #endif
377 #endif // BALTECH_SDK_INTERNAL
378 typedef struct {
380  unsigned* TotalSize;
381  unsigned* FreeSize;
393 #ifdef BRP_SUPPORT_LEGACY_METHODS
394 brp_errcode brp_Sys_CfgCheck(brp_protocol protocol, unsigned* TotalSize, unsigned* FreeSize);
395 #else
397 #endif
398 #ifdef BALTECH_SDK_INTERNAL
399 typedef struct {
400  brp_protocol protocol;
401  brp_IoPortBitmask InpOutp;
402  brp_IoPortBitmask DefaultState;
403 } brp_Sys_ConfigPort_t;
416 #ifdef BRP_SUPPORT_LEGACY_METHODS
417 brp_errcode brp_Sys_ConfigPort(brp_protocol protocol, brp_IoPortBitmask InpOutp, brp_IoPortBitmask DefaultState);
418 #else
419 brp_errcode brp_Sys_ConfigPort(brp_Sys_ConfigPort_t params);
420 #endif
421 #endif // BALTECH_SDK_INTERNAL
422 #ifdef BALTECH_SDK_INTERNAL
423 typedef struct {
424  brp_protocol protocol;
425  bool ResetRegister;
426  brp_Sys_SetRegister_RegisterAssignments_Entry* RegisterAssignments;
427  size_t RegisterAssignments_len;
428 } brp_Sys_SetRegister_t;
444 #ifdef BRP_SUPPORT_LEGACY_METHODS
445 brp_errcode brp_Sys_SetRegister(brp_protocol protocol, bool ResetRegister, brp_Sys_SetRegister_RegisterAssignments_Entry* RegisterAssignments, size_t RegisterAssignments_len);
446 #else
447 brp_errcode brp_Sys_SetRegister(brp_Sys_SetRegister_t params);
448 #endif
449 #endif // BALTECH_SDK_INTERNAL
450 #ifdef BALTECH_SDK_INTERNAL
451 typedef struct {
452  brp_protocol protocol;
453  unsigned ID;
454  unsigned* Value;
455 } brp_Sys_GetRegister_t;
466 #ifdef BRP_SUPPORT_LEGACY_METHODS
467 brp_errcode brp_Sys_GetRegister(brp_protocol protocol, unsigned ID, unsigned* Value);
468 #else
469 brp_errcode brp_Sys_GetRegister(brp_Sys_GetRegister_t params);
470 #endif
471 #endif // BALTECH_SDK_INTERNAL
472 #ifdef BALTECH_SDK_INTERNAL
473 typedef struct {
474  brp_protocol protocol;
475 } brp_Sys_PowerDown_t;
486 #ifdef BRP_SUPPORT_LEGACY_METHODS
487 brp_errcode brp_Sys_PowerDown(brp_protocol protocol);
488 #else
489 brp_errcode brp_Sys_PowerDown(brp_Sys_PowerDown_t params);
490 #endif
491 #endif // BALTECH_SDK_INTERNAL
492 typedef struct {
511 #ifdef BRP_SUPPORT_LEGACY_METHODS
513 #else
515 #endif
516 #ifdef BALTECH_SDK_INTERNAL
517 typedef struct {
518  brp_protocol protocol;
519  brp_Baudrate NewBaudrate;
520  brp_Parity NewParity;
521  unsigned CWT;
522 } brp_Sys_SetCommParam_t;
546 #ifdef BRP_SUPPORT_LEGACY_METHODS
547 brp_errcode brp_Sys_SetCommParam(brp_protocol protocol, brp_Baudrate NewBaudrate, brp_Parity NewParity, unsigned CWT);
548 #else
549 brp_errcode brp_Sys_SetCommParam(brp_Sys_SetCommParam_t params);
550 #endif
551 #endif // BALTECH_SDK_INTERNAL
552 typedef struct {
554  unsigned Version;
556  size_t Data_len;
577 #ifdef BRP_SUPPORT_LEGACY_METHODS
578 brp_errcode brp_Sys_CfgLoadBlock(brp_protocol protocol, unsigned Version, brp_buf Data, size_t Data_len);
579 #else
581 #endif
582 #ifdef BALTECH_SDK_INTERNAL
583 typedef struct {
584  brp_protocol protocol;
585  brp_buf* PlatformId;
586  unsigned* BootloaderId;
587  unsigned* BootloaderMajor;
588  unsigned* BootloaderMinor;
589  unsigned* BootloaderBuild;
590  brp_mempool *mempool;
591 } brp_Sys_GetPlatformId_t;
606 #ifdef BRP_SUPPORT_LEGACY_METHODS
607 brp_errcode brp_Sys_GetPlatformId(brp_protocol protocol, brp_buf* PlatformId, unsigned* BootloaderId, unsigned* BootloaderMajor, unsigned* BootloaderMinor, unsigned* BootloaderBuild, brp_mempool *mempool);
608 #else
609 brp_errcode brp_Sys_GetPlatformId(brp_Sys_GetPlatformId_t params);
610 #endif
611 #endif // BALTECH_SDK_INTERNAL
612 typedef struct {
623 #ifdef BRP_SUPPORT_LEGACY_METHODS
625 #else
627 #endif
628 typedef struct {
639 #ifdef BRP_SUPPORT_LEGACY_METHODS
641 #else
643 #endif
644 typedef struct {
649  size_t Message_len;
665 #ifdef BRP_SUPPORT_LEGACY_METHODS
666 brp_errcode brp_Sys_SendMessage(brp_protocol protocol, brp_ProtocolID Protocol, brp_MessageType MsgType, brp_buf Message, size_t Message_len);
667 #else
669 #endif
670 typedef struct {
672  char** ConfigId;
673  char** ConfigName;
687 #ifdef BRP_SUPPORT_LEGACY_METHODS
688 brp_errcode brp_Sys_CfgGetId(brp_protocol protocol, char** ConfigId, char** ConfigName, brp_mempool *mempool);
689 #else
691 #endif
692 typedef struct {
694  char** ConfigId;
695  char** ConfigName;
709 #ifdef BRP_SUPPORT_LEGACY_METHODS
710 brp_errcode brp_Sys_CfgGetDeviceSettingsId(brp_protocol protocol, char** ConfigId, char** ConfigName, brp_mempool *mempool);
711 #else
713 #endif
714 #ifdef BALTECH_SDK_INTERNAL
715 typedef struct {
716  brp_protocol protocol;
717 } brp_Sys_FactoryResetLegacy_t;
730 #ifdef BRP_SUPPORT_LEGACY_METHODS
731 brp_errcode brp_Sys_FactoryResetLegacy(brp_protocol protocol);
732 #else
733 brp_errcode brp_Sys_FactoryResetLegacy(brp_Sys_FactoryResetLegacy_t params);
734 #endif
735 #endif // BALTECH_SDK_INTERNAL
736 typedef struct {
755 #ifdef BRP_SUPPORT_LEGACY_METHODS
756 brp_errcode brp_Sys_GetStatistics(brp_protocol protocol, bool DeleteCounters, brp_Sys_GetStatistics_CounterTuple_Entry** CounterTuple, size_t* CounterTuple_len, brp_mempool *mempool);
757 #else
759 #endif
760 typedef struct {
777 #ifdef BRP_SUPPORT_LEGACY_METHODS
778 brp_errcode brp_Sys_GetFeatures(brp_protocol protocol, brp_FeatureID** FeatureList, size_t* FeatureList_len, brp_FeatureID* MaxFeatureID, brp_mempool *mempool);
779 #else
781 #endif
782 typedef struct {
784  char** PartNo;
785  char** HwRevNo;
799 #ifdef BRP_SUPPORT_LEGACY_METHODS
800 brp_errcode brp_Sys_GetPartNumber(brp_protocol protocol, char** PartNo, char** HwRevNo, brp_mempool *mempool);
801 #else
803 #endif
804 typedef struct {
817 #ifdef BRP_SUPPORT_LEGACY_METHODS
819 #else
821 #endif
822 typedef struct {
840 #ifdef BRP_SUPPORT_LEGACY_METHODS
842 #else
844 #endif
845 typedef struct {
856 #ifdef BRP_SUPPORT_LEGACY_METHODS
857 brp_errcode brp_Sys_FactoryReset(brp_protocol protocol, bool PerformReboot);
858 #else
860 #endif
861 typedef struct {
872 #ifdef BRP_SUPPORT_LEGACY_METHODS
874 #else
876 #endif
877 #ifdef BALTECH_SDK_INTERNAL
878 typedef struct {
879  brp_protocol protocol;
880  unsigned* CRC;
881 } brp_Sys_GetFwCrc_t;
889 #ifdef BRP_SUPPORT_LEGACY_METHODS
890 brp_errcode brp_Sys_GetFwCrc(brp_protocol protocol, unsigned* CRC);
891 #else
892 brp_errcode brp_Sys_GetFwCrc(brp_Sys_GetFwCrc_t params);
893 #endif
894 #endif // BALTECH_SDK_INTERNAL
895 #endif
896 
brp_FeatureID ** FeatureList
Definition: sys.h:762
brp_errcode brp_Sys_CfgGetValueList(brp_Sys_CfgGetValueList_t params)
Returns a list of all configuration values within a specified Key.
brp_protocol protocol
Definition: sys.h:133
size_t * CounterTuple_len
Definition: sys.h:740
brp_mempool * mempool
Definition: sys.h:674
brp_errcode brp_Sys_GetPartNumber(brp_Sys_GetPartNumber_t params)
This command returns the part number and the hardware revision number of the device.
License bit mask.
Definition: typedefs.h:4634
char ** ConfigId
Definition: sys.h:672
brp_MessageType
Event that triggered the message.
Definition: typedefs.h:3165
unsigned * MaxSendSize
Definition: sys.h:85
brp_errcode brp_Sys_GetStatistics(brp_Sys_GetStatistics_t params)
This command retrieves all available statistics counters from the reader's configuration.
brp_mempool * mempool
Definition: sys.h:741
brp_protocol protocol
Definition: sys.h:629
brp_protocol protocol
Definition: sys.h:737
brp_protocol protocol
Definition: sys.h:106
brp_protocol protocol
Definition: sys.h:671
unsigned * FreeSize
Definition: sys.h:381
brp_buf * Content
Definition: sys.h:248
brp_ProtocolID
A list of all protocols.
Definition: typedefs.h:3073
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
brp_protocol protocol
Definition: sys.h:846
brp_errcode brp_Sys_SelectProtocol(brp_Sys_SelectProtocol_t params)
This command starts a host protocol.
brp_protocol protocol
Definition: sys.h:783
brp_buf Message
Definition: sys.h:648
brp_ProtocolID Protocol
Definition: sys.h:646
brp_errcode brp_Sys_CfgGetDeviceSettingsId(brp_Sys_CfgGetDeviceSettingsId_t params)
This command retrieves the ID of the reader configuration containing the device settings.
brp_FeatureID * MaxFeatureID
Definition: sys.h:764
unsigned OffDuration
Definition: sys.h:107
brp_errcode brp_Sys_CfgGetId(brp_Sys_CfgGetId_t params)
This command returns the identifier of the reader configuration.
unsigned Key
Definition: sys.h:270
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
brp_mempool * mempool
Definition: sys.h:161
size_t * ValueList_len
Definition: sys.h:338
brp_errcode brp_Sys_CfgLoadFinish(brp_Sys_CfgLoadFinish_t params)
This command has to be called after transferring a BEC file with brp_Sys_CfgLoadBlock().
brp_Sys_CfgLoadFinish_FinalizeAction
Defines the reader's behaviour on error/success.
Definition: typedefs.h:2156
brp_protocol protocol
Definition: sys.h:379
brp_errcode brp_Sys_GetInfo(brp_Sys_GetInfo_t params)
This command retrieves the firmware string of the reader, which holds information about the reader fi...
unsigned Value
Definition: sys.h:293
size_t * FeatureList_len
Definition: sys.h:763
brp_protocol protocol
Definition: sys.h:335
brp_errcode brp_Sys_FactoryReset(brp_Sys_FactoryReset_t params)
This command restores the reader's factory settings.
brp_Sys_GetBootStatus_BootStatus * BootStatus
Definition: sys.h:189
Definition: typedefs.h:2143
brp_protocol protocol
Definition: sys.h:553
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
brp_protocol protocol
Definition: sys.h:493
brp_errcode brp_Sys_CfgLoadBlock(brp_Sys_CfgLoadBlock_t params)
This command transfers the configuration from a BEC file into the reader.
brp_errcode brp_Sys_CfgGetKeyList(brp_Sys_CfgGetKeyList_t params)
Retrieves a list of all keys stored in the reader's configuration.
brp_Sys_GetStatistics_CounterTuple_Entry ** CounterTuple
Definition: sys.h:739
brp_errcode brp_Sys_StopProtocol(brp_Sys_StopProtocol_t params)
This command stops a host protocol.
unsigned Version
Definition: sys.h:554
size_t Message_len
Definition: sys.h:649
brp_errcode brp_Sys_HFReset(brp_Sys_HFReset_t params)
This command turns the HF antenna off or on.
brp_protocol protocol
Definition: sys.h:245
brp_errcode brp_Sys_CfgCheck(brp_Sys_CfgCheck_t params)
This command checks the consistency of the reader's internal configuration.
brp_protocol protocol
Definition: sys.h:613
unsigned * MaxRecvSize
Definition: sys.h:86
brp_errcode brp_Sys_GetFeatures(brp_Sys_GetFeatures_t params)
This command retrieves the list of features supported by the reader, so you can find out if the reade...
brp_errcode brp_Sys_GetBootStatus(brp_Sys_GetBootStatus_t params)
This command retrieves the boot status of the reader, i.e.
brp_protocol protocol
Definition: sys.h:159
brp_protocol protocol
Definition: sys.h:862
brp_mempool * mempool
Definition: sys.h:765
brp_protocol protocol
Definition: sys.h:291
brp_errcode brp_Sys_CfgReset(brp_Sys_CfgReset_t params)
Deletes the complete configuration.
brp_protocol protocol
Definition: sys.h:645
brp_mempool * mempool
Definition: sys.h:339
char ** ConfigName
Definition: sys.h:673
brp_LicenseBitMask * LicenseBitMask
Definition: sys.h:863
brp_mempool * mempool
Definition: sys.h:786
brp_protocol protocol
Definition: sys.h:805
brp_Parity
Specifies the Parity-bit mode which is used for RS-232/UART protocols.
Definition: typedefs.h:3777
brp_buf Content
Definition: sys.h:272
char ** Info
Definition: sys.h:160
brp_protocol protocol
Definition: sys.h:823
brp_protocol protocol
Definition: sys.h:315
brp_errcode brp_Sys_CfgGetValue(brp_Sys_CfgGetValue_t params)
This command retrieves a desired value of the reader's configuration, specified by the Key and Value ...
brp_FeatureID
Definition: typedefs.h:3438
brp_protocol protocol
Definition: sys.h:84
unsigned Key
Definition: sys.h:246
brp_protocol protocol
Definition: sys.h:269
brp_protocol protocol
Definition: sys.h:761
brp_errcode brp_Sys_SendMessage(brp_Sys_SendMessage_t params)
This command sends a message to the host via a certain protocol.
brp_errcode brp_Sys_GetBufferSize(brp_Sys_GetBufferSize_t params)
This command returns the maximum sizes of command and response frames that the reader can send and re...
brp_ProtocolID Protocol
Definition: sys.h:630
size_t Content_len
Definition: sys.h:273
size_t * KeyList_len
Definition: sys.h:317
unsigned ** ValueList
Definition: sys.h:337
brp_errcode brp_Sys_CfgLoadPrepare(brp_Sys_CfgLoadPrepare_t params)
This command initiates the transfer of a BEC file via brp_Sys_CfgLoadBlock().
unsigned Value
Definition: sys.h:271
brp_ProtocolID Protocol
Definition: sys.h:494
brp_protocol protocol
Definition: sys.h:188
unsigned Key
Definition: sys.h:292
brp_MessageType MsgType
Definition: sys.h:647
brp_errcode brp_Sys_CfgDelValues(brp_Sys_CfgDelValues_t params)
This command deletes a key or a value from the reader's configuration.
unsigned ** KeyList
Definition: sys.h:316
brp_AuthReqUpload AuthReq
Definition: sys.h:806
brp_errcode brp_Sys_CfgSetValue(brp_Sys_CfgSetValue_t params)
This command stores a value in the reader's configuration.
unsigned * TotalSize
Definition: sys.h:380
brp_AuthReqUpload
Specifies the authentication level the BEC/BEC2/BF3 file or ConfigCard has to fulfill to be accepted...
Definition: typedefs.h:4375
unsigned * TotalSize
Definition: sys.h:87
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
brp_mempool * mempool
Definition: sys.h:318
brp_Baudrate
The Baudrate specifies the performance of an RS-232/UART based interface in bits per second...
Definition: typedefs.h:3797
unsigned Value
Definition: sys.h:247
size_t * Content_len
Definition: sys.h:249
brp_errcode brp_Sys_Reset(brp_Sys_Reset_t params)
This command reboots the reader.
brp_errcode brp_Sys_GetLicenses(brp_Sys_GetLicenses_t params)
This command retrieves a bit mask of the licenses that are activated in the reader.
brp_Sys_CfgLoadFinish_FinalizeAction FinalizeAction
Definition: sys.h:824
brp_mempool * mempool
Definition: sys.h:250