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;
220 #ifdef BRP_SUPPORT_LEGACY_METHODS
221 brp_errcode brp_Sys_GetPort(brp_protocol protocol, brp_IoPortBitmask* PortMask);
222 #else
223 brp_errcode brp_Sys_GetPort(brp_Sys_GetPort_t params);
224 #endif
225 #endif // BALTECH_SDK_INTERNAL
226 #ifdef BALTECH_SDK_INTERNAL
227 typedef struct {
228  brp_protocol protocol;
229  brp_IoPortBitmask PortMask;
230 } brp_Sys_SetPort_t;
240 #ifdef BRP_SUPPORT_LEGACY_METHODS
241 brp_errcode brp_Sys_SetPort(brp_protocol protocol, brp_IoPortBitmask PortMask);
242 #else
243 brp_errcode brp_Sys_SetPort(brp_Sys_SetPort_t params);
244 #endif
245 #endif // BALTECH_SDK_INTERNAL
246 typedef struct {
248  unsigned Key;
249  unsigned Value;
251  size_t* Content_len;
265 #ifdef BRP_SUPPORT_LEGACY_METHODS
266 brp_errcode brp_Sys_CfgGetValue(brp_protocol protocol, unsigned Key, unsigned Value, brp_buf* Content, size_t* Content_len, brp_mempool *mempool);
267 #else
269 #endif
270 typedef struct {
272  unsigned Key;
273  unsigned Value;
275  size_t Content_len;
287 #ifdef BRP_SUPPORT_LEGACY_METHODS
288 brp_errcode brp_Sys_CfgSetValue(brp_protocol protocol, unsigned Key, unsigned Value, brp_buf Content, size_t Content_len);
289 #else
291 #endif
292 typedef struct {
294  unsigned Key;
295  unsigned Value;
311 #ifdef BRP_SUPPORT_LEGACY_METHODS
312 brp_errcode brp_Sys_CfgDelValues(brp_protocol protocol, unsigned Key, unsigned Value);
313 #else
315 #endif
316 typedef struct {
318  unsigned** KeyList;
319  size_t* KeyList_len;
331 #ifdef BRP_SUPPORT_LEGACY_METHODS
332 brp_errcode brp_Sys_CfgGetKeyList(brp_protocol protocol, unsigned** KeyList, size_t* KeyList_len, brp_mempool *mempool);
333 #else
335 #endif
336 typedef struct {
338  unsigned Key;
339  unsigned** ValueList;
340  size_t* ValueList_len;
353 #ifdef BRP_SUPPORT_LEGACY_METHODS
354 brp_errcode brp_Sys_CfgGetValueList(brp_protocol protocol, unsigned Key, unsigned** ValueList, size_t* ValueList_len, brp_mempool *mempool);
355 #else
357 #endif
358 #ifdef BALTECH_SDK_INTERNAL
359 typedef struct {
360  brp_protocol protocol;
361  brp_buf TlvBlock;
362  size_t TlvBlock_len;
363 } brp_Sys_CfgWriteTlvSector_t;
374 #ifdef BRP_SUPPORT_LEGACY_METHODS
375 brp_errcode brp_Sys_CfgWriteTlvSector(brp_protocol protocol, brp_buf TlvBlock, size_t TlvBlock_len);
376 #else
377 brp_errcode brp_Sys_CfgWriteTlvSector(brp_Sys_CfgWriteTlvSector_t params);
378 #endif
379 #endif // BALTECH_SDK_INTERNAL
380 typedef struct {
382  unsigned* TotalSize;
383  unsigned* FreeSize;
395 #ifdef BRP_SUPPORT_LEGACY_METHODS
396 brp_errcode brp_Sys_CfgCheck(brp_protocol protocol, unsigned* TotalSize, unsigned* FreeSize);
397 #else
399 #endif
400 #ifdef BALTECH_SDK_INTERNAL
401 typedef struct {
402  brp_protocol protocol;
403  brp_IoPortBitmask InpOutp;
404  brp_IoPortBitmask DefaultState;
405 } brp_Sys_ConfigPort_t;
420 #ifdef BRP_SUPPORT_LEGACY_METHODS
421 brp_errcode brp_Sys_ConfigPort(brp_protocol protocol, brp_IoPortBitmask InpOutp, brp_IoPortBitmask DefaultState);
422 #else
423 brp_errcode brp_Sys_ConfigPort(brp_Sys_ConfigPort_t params);
424 #endif
425 #endif // BALTECH_SDK_INTERNAL
426 #ifdef BALTECH_SDK_INTERNAL
427 typedef struct {
428  brp_protocol protocol;
429  bool ResetRegister;
430  brp_Sys_SetRegister_RegisterAssignments_Entry* RegisterAssignments;
431  size_t RegisterAssignments_len;
432 } brp_Sys_SetRegister_t;
448 #ifdef BRP_SUPPORT_LEGACY_METHODS
449 brp_errcode brp_Sys_SetRegister(brp_protocol protocol, bool ResetRegister, brp_Sys_SetRegister_RegisterAssignments_Entry* RegisterAssignments, size_t RegisterAssignments_len);
450 #else
451 brp_errcode brp_Sys_SetRegister(brp_Sys_SetRegister_t params);
452 #endif
453 #endif // BALTECH_SDK_INTERNAL
454 #ifdef BALTECH_SDK_INTERNAL
455 typedef struct {
456  brp_protocol protocol;
457  unsigned ID;
458  unsigned* Value;
459 } brp_Sys_GetRegister_t;
470 #ifdef BRP_SUPPORT_LEGACY_METHODS
471 brp_errcode brp_Sys_GetRegister(brp_protocol protocol, unsigned ID, unsigned* Value);
472 #else
473 brp_errcode brp_Sys_GetRegister(brp_Sys_GetRegister_t params);
474 #endif
475 #endif // BALTECH_SDK_INTERNAL
476 #ifdef BALTECH_SDK_INTERNAL
477 typedef struct {
478  brp_protocol protocol;
479 } brp_Sys_PowerDown_t;
490 #ifdef BRP_SUPPORT_LEGACY_METHODS
491 brp_errcode brp_Sys_PowerDown(brp_protocol protocol);
492 #else
493 brp_errcode brp_Sys_PowerDown(brp_Sys_PowerDown_t params);
494 #endif
495 #endif // BALTECH_SDK_INTERNAL
496 typedef struct {
515 #ifdef BRP_SUPPORT_LEGACY_METHODS
517 #else
519 #endif
520 #ifdef BALTECH_SDK_INTERNAL
521 typedef struct {
522  brp_protocol protocol;
523  brp_Baudrate NewBaudrate;
524  brp_Parity NewParity;
525  unsigned CWT;
526 } brp_Sys_SetCommParam_t;
550 #ifdef BRP_SUPPORT_LEGACY_METHODS
551 brp_errcode brp_Sys_SetCommParam(brp_protocol protocol, brp_Baudrate NewBaudrate, brp_Parity NewParity, unsigned CWT);
552 #else
553 brp_errcode brp_Sys_SetCommParam(brp_Sys_SetCommParam_t params);
554 #endif
555 #endif // BALTECH_SDK_INTERNAL
556 typedef struct {
558  unsigned Version;
560  size_t Data_len;
581 #ifdef BRP_SUPPORT_LEGACY_METHODS
582 brp_errcode brp_Sys_CfgLoadBlock(brp_protocol protocol, unsigned Version, brp_buf Data, size_t Data_len);
583 #else
585 #endif
586 #ifdef BALTECH_SDK_INTERNAL
587 typedef struct {
588  brp_protocol protocol;
589  brp_buf* PlatformId;
590  unsigned* BootloaderId;
591  unsigned* BootloaderMajor;
592  unsigned* BootloaderMinor;
593  unsigned* BootloaderBuild;
594  brp_mempool *mempool;
595 } brp_Sys_GetPlatformId_t;
610 #ifdef BRP_SUPPORT_LEGACY_METHODS
611 brp_errcode brp_Sys_GetPlatformId(brp_protocol protocol, brp_buf* PlatformId, unsigned* BootloaderId, unsigned* BootloaderMajor, unsigned* BootloaderMinor, unsigned* BootloaderBuild, brp_mempool *mempool);
612 #else
613 brp_errcode brp_Sys_GetPlatformId(brp_Sys_GetPlatformId_t params);
614 #endif
615 #endif // BALTECH_SDK_INTERNAL
616 typedef struct {
627 #ifdef BRP_SUPPORT_LEGACY_METHODS
629 #else
631 #endif
632 typedef struct {
643 #ifdef BRP_SUPPORT_LEGACY_METHODS
645 #else
647 #endif
648 typedef struct {
653  size_t Message_len;
669 #ifdef BRP_SUPPORT_LEGACY_METHODS
670 brp_errcode brp_Sys_SendMessage(brp_protocol protocol, brp_ProtocolID Protocol, brp_MessageType MsgType, brp_buf Message, size_t Message_len);
671 #else
673 #endif
674 typedef struct {
676  char** ConfigId;
677  char** ConfigName;
691 #ifdef BRP_SUPPORT_LEGACY_METHODS
692 brp_errcode brp_Sys_CfgGetId(brp_protocol protocol, char** ConfigId, char** ConfigName, brp_mempool *mempool);
693 #else
695 #endif
696 typedef struct {
698  char** ConfigId;
699  char** ConfigName;
713 #ifdef BRP_SUPPORT_LEGACY_METHODS
714 brp_errcode brp_Sys_CfgGetDeviceSettingsId(brp_protocol protocol, char** ConfigId, char** ConfigName, brp_mempool *mempool);
715 #else
717 #endif
718 #ifdef BALTECH_SDK_INTERNAL
719 typedef struct {
720  brp_protocol protocol;
721 } brp_Sys_FactoryResetLegacy_t;
734 #ifdef BRP_SUPPORT_LEGACY_METHODS
735 brp_errcode brp_Sys_FactoryResetLegacy(brp_protocol protocol);
736 #else
737 brp_errcode brp_Sys_FactoryResetLegacy(brp_Sys_FactoryResetLegacy_t params);
738 #endif
739 #endif // BALTECH_SDK_INTERNAL
740 typedef struct {
759 #ifdef BRP_SUPPORT_LEGACY_METHODS
760 brp_errcode brp_Sys_GetStatistics(brp_protocol protocol, bool DeleteCounters, brp_Sys_GetStatistics_CounterTuple_Entry** CounterTuple, size_t* CounterTuple_len, brp_mempool *mempool);
761 #else
763 #endif
764 typedef struct {
781 #ifdef BRP_SUPPORT_LEGACY_METHODS
782 brp_errcode brp_Sys_GetFeatures(brp_protocol protocol, brp_FeatureID** FeatureList, size_t* FeatureList_len, brp_FeatureID* MaxFeatureID, brp_mempool *mempool);
783 #else
785 #endif
786 typedef struct {
788  char** PartNo;
789  char** HwRevNo;
803 #ifdef BRP_SUPPORT_LEGACY_METHODS
804 brp_errcode brp_Sys_GetPartNumber(brp_protocol protocol, char** PartNo, char** HwRevNo, brp_mempool *mempool);
805 #else
807 #endif
808 typedef struct {
821 #ifdef BRP_SUPPORT_LEGACY_METHODS
823 #else
825 #endif
826 typedef struct {
844 #ifdef BRP_SUPPORT_LEGACY_METHODS
846 #else
848 #endif
849 typedef struct {
860 #ifdef BRP_SUPPORT_LEGACY_METHODS
861 brp_errcode brp_Sys_FactoryReset(brp_protocol protocol, bool PerformReboot);
862 #else
864 #endif
865 typedef struct {
876 #ifdef BRP_SUPPORT_LEGACY_METHODS
878 #else
880 #endif
881 #ifdef BALTECH_SDK_INTERNAL
882 typedef struct {
883  brp_protocol protocol;
884  unsigned* CRC;
885 } brp_Sys_GetFwCrc_t;
893 #ifdef BRP_SUPPORT_LEGACY_METHODS
894 brp_errcode brp_Sys_GetFwCrc(brp_protocol protocol, unsigned* CRC);
895 #else
896 brp_errcode brp_Sys_GetFwCrc(brp_Sys_GetFwCrc_t params);
897 #endif
898 #endif // BALTECH_SDK_INTERNAL
899 #endif
900 
brp_FeatureID ** FeatureList
Definition: sys.h:766
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:744
brp_mempool * mempool
Definition: sys.h:678
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:4648
char ** ConfigId
Definition: sys.h:676
brp_MessageType
Event that triggered the message.
Definition: typedefs.h:3179
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:745
brp_protocol protocol
Definition: sys.h:633
brp_protocol protocol
Definition: sys.h:741
brp_protocol protocol
Definition: sys.h:106
brp_protocol protocol
Definition: sys.h:675
unsigned * FreeSize
Definition: sys.h:383
brp_buf * Content
Definition: sys.h:250
brp_ProtocolID
A list of all protocols.
Definition: typedefs.h:3087
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:850
brp_errcode brp_Sys_SelectProtocol(brp_Sys_SelectProtocol_t params)
This command starts a host protocol.
brp_protocol protocol
Definition: sys.h:787
brp_buf Message
Definition: sys.h:652
brp_ProtocolID Protocol
Definition: sys.h:650
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:768
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:272
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:340
brp_errcode brp_Sys_CfgLoadFinish(brp_Sys_CfgLoadFinish_t params)
This command has to be called after transferring a BEC file with Sys.CfgLoadBlock.
brp_Sys_CfgLoadFinish_FinalizeAction
Defines the reader's behaviour on error/success.
Definition: typedefs.h:2156
brp_protocol protocol
Definition: sys.h:381
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:295
size_t * FeatureList_len
Definition: sys.h:767
brp_protocol protocol
Definition: sys.h:337
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:557
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
brp_protocol protocol
Definition: sys.h:497
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:743
brp_errcode brp_Sys_StopProtocol(brp_Sys_StopProtocol_t params)
This command stops a host protocol.
unsigned Version
Definition: sys.h:558
size_t Message_len
Definition: sys.h:653
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:247
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:617
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:866
brp_mempool * mempool
Definition: sys.h:769
brp_protocol protocol
Definition: sys.h:293
brp_errcode brp_Sys_CfgReset(brp_Sys_CfgReset_t params)
Deletes the complete configuration.
brp_protocol protocol
Definition: sys.h:649
brp_mempool * mempool
Definition: sys.h:341
char ** ConfigName
Definition: sys.h:677
brp_LicenseBitMask * LicenseBitMask
Definition: sys.h:867
brp_mempool * mempool
Definition: sys.h:790
brp_protocol protocol
Definition: sys.h:809
brp_Parity
Specifies the Parity-bit mode which is used for RS-232/UART protocols.
Definition: typedefs.h:3791
brp_buf Content
Definition: sys.h:274
char ** Info
Definition: sys.h:160
brp_protocol protocol
Definition: sys.h:827
brp_protocol protocol
Definition: sys.h:317
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:3452
brp_protocol protocol
Definition: sys.h:84
unsigned Key
Definition: sys.h:248
brp_protocol protocol
Definition: sys.h:271
brp_protocol protocol
Definition: sys.h:765
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:634
size_t Content_len
Definition: sys.h:275
size_t * KeyList_len
Definition: sys.h:319
unsigned ** ValueList
Definition: sys.h:339
brp_errcode brp_Sys_CfgLoadPrepare(brp_Sys_CfgLoadPrepare_t params)
This command initiates the transfer of a BEC file via Sys.CfgLoadBlock.
unsigned Value
Definition: sys.h:273
brp_ProtocolID Protocol
Definition: sys.h:498
brp_protocol protocol
Definition: sys.h:188
unsigned Key
Definition: sys.h:294
brp_MessageType MsgType
Definition: sys.h:651
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:318
brp_AuthReqUpload AuthReq
Definition: sys.h:810
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:382
brp_AuthReqUpload
Specifies the authentication level the BEC/BEC2/BF3 file or ConfigCard has to fulfill to be accepted...
Definition: typedefs.h:4389
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:320
brp_Baudrate
The Baudrate specifies the performance of an RS-232/UART based interface in bits per second...
Definition: typedefs.h:3811
unsigned Value
Definition: sys.h:249
size_t * Content_len
Definition: sys.h:251
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:828
brp_mempool * mempool
Definition: sys.h:252