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 _input_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 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 _input_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 _input_Key, unsigned _input_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 _input_Key, unsigned _input_Value, brp_buf _input_Content, size_t _input_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 _input_Key, unsigned _input_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 _input_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 _input_TlvBlock, size_t _input_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;
418 #ifdef BRP_SUPPORT_LEGACY_METHODS
419 brp_errcode brp_Sys_ConfigPort(brp_protocol protocol, brp_IoPortBitmask _input_InpOutp, brp_IoPortBitmask _input_DefaultState);
420 #else
421 brp_errcode brp_Sys_ConfigPort(brp_Sys_ConfigPort_t params);
422 #endif
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 _input_ResetRegister, brp_Sys_SetRegister_RegisterAssignments_Entry* _input_RegisterAssignments, size_t _input_RegisterAssignments_len);
446 #else
447 brp_errcode brp_Sys_SetRegister(brp_Sys_SetRegister_t params);
448 #endif
449 typedef struct {
450  brp_protocol protocol;
451  unsigned ID;
452  unsigned* Value;
453 } brp_Sys_GetRegister_t;
464 #ifdef BRP_SUPPORT_LEGACY_METHODS
465 brp_errcode brp_Sys_GetRegister(brp_protocol protocol, unsigned _input_ID, unsigned* Value);
466 #else
467 brp_errcode brp_Sys_GetRegister(brp_Sys_GetRegister_t params);
468 #endif
469 typedef struct {
470  brp_protocol protocol;
471 } brp_Sys_PowerDown_t;
482 #ifdef BRP_SUPPORT_LEGACY_METHODS
483 brp_errcode brp_Sys_PowerDown(brp_protocol protocol);
484 #else
485 brp_errcode brp_Sys_PowerDown(brp_Sys_PowerDown_t params);
486 #endif
487 #endif // BALTECH_SDK_INTERNAL
488 typedef struct {
507 #ifdef BRP_SUPPORT_LEGACY_METHODS
509 #else
511 #endif
512 #ifdef BALTECH_SDK_INTERNAL
513 typedef struct {
514  brp_protocol protocol;
515  brp_Baudrate NewBaudrate;
516  brp_Parity NewParity;
517  unsigned CWT;
518 } brp_Sys_SetCommParam_t;
542 #ifdef BRP_SUPPORT_LEGACY_METHODS
543 brp_errcode brp_Sys_SetCommParam(brp_protocol protocol, brp_Baudrate _input_NewBaudrate, brp_Parity _input_NewParity, unsigned _input_CWT);
544 #else
545 brp_errcode brp_Sys_SetCommParam(brp_Sys_SetCommParam_t params);
546 #endif
547 #endif // BALTECH_SDK_INTERNAL
548 typedef struct {
550  unsigned Version;
552  size_t Data_len;
573 #ifdef BRP_SUPPORT_LEGACY_METHODS
574 brp_errcode brp_Sys_CfgLoadBlock(brp_protocol protocol, unsigned _input_Version, brp_buf _input_Data, size_t _input_Data_len);
575 #else
577 #endif
578 #ifdef BALTECH_SDK_INTERNAL
579 typedef struct {
580  brp_protocol protocol;
581  brp_buf* PlatformId;
582  unsigned* BootloaderId;
583  unsigned* BootloaderMajor;
584  unsigned* BootloaderMinor;
585  unsigned* BootloaderBuild;
586  brp_mempool *mempool;
587 } brp_Sys_GetPlatformId_t;
602 #ifdef BRP_SUPPORT_LEGACY_METHODS
603 brp_errcode brp_Sys_GetPlatformId(brp_protocol protocol, brp_buf* PlatformId, unsigned* BootloaderId, unsigned* BootloaderMajor, unsigned* BootloaderMinor, unsigned* BootloaderBuild, brp_mempool *mempool);
604 #else
605 brp_errcode brp_Sys_GetPlatformId(brp_Sys_GetPlatformId_t params);
606 #endif
607 #endif // BALTECH_SDK_INTERNAL
608 typedef struct {
619 #ifdef BRP_SUPPORT_LEGACY_METHODS
621 #else
623 #endif
624 typedef struct {
635 #ifdef BRP_SUPPORT_LEGACY_METHODS
637 #else
639 #endif
640 typedef struct {
645  size_t Message_len;
661 #ifdef BRP_SUPPORT_LEGACY_METHODS
662 brp_errcode brp_Sys_SendMessage(brp_protocol protocol, brp_ProtocolID _input_Protocol, brp_MessageType _input_MsgType, brp_buf _input_Message, size_t _input_Message_len);
663 #else
665 #endif
666 typedef struct {
668  char** ConfigId;
669  char** ConfigName;
683 #ifdef BRP_SUPPORT_LEGACY_METHODS
684 brp_errcode brp_Sys_CfgGetId(brp_protocol protocol, char** ConfigId, char** ConfigName, brp_mempool *mempool);
685 #else
687 #endif
688 typedef struct {
690  char** ConfigId;
691  char** ConfigName;
705 #ifdef BRP_SUPPORT_LEGACY_METHODS
706 brp_errcode brp_Sys_CfgGetDeviceSettingsId(brp_protocol protocol, char** ConfigId, char** ConfigName, brp_mempool *mempool);
707 #else
709 #endif
710 #ifdef BALTECH_SDK_INTERNAL
711 typedef struct {
712  brp_protocol protocol;
713 } brp_Sys_FactoryResetLegacy_t;
726 #ifdef BRP_SUPPORT_LEGACY_METHODS
727 brp_errcode brp_Sys_FactoryResetLegacy(brp_protocol protocol);
728 #else
729 brp_errcode brp_Sys_FactoryResetLegacy(brp_Sys_FactoryResetLegacy_t params);
730 #endif
731 #endif // BALTECH_SDK_INTERNAL
732 typedef struct {
751 #ifdef BRP_SUPPORT_LEGACY_METHODS
752 brp_errcode brp_Sys_GetStatistics(brp_protocol protocol, bool _input_DeleteCounters, brp_Sys_GetStatistics_CounterTuple_Entry** CounterTuple, size_t* CounterTuple_len, brp_mempool *mempool);
753 #else
755 #endif
756 typedef struct {
773 #ifdef BRP_SUPPORT_LEGACY_METHODS
774 brp_errcode brp_Sys_GetFeatures(brp_protocol protocol, brp_FeatureID** FeatureList, size_t* FeatureList_len, brp_FeatureID* MaxFeatureID, brp_mempool *mempool);
775 #else
777 #endif
778 typedef struct {
780  char** PartNo;
781  char** HwRevNo;
795 #ifdef BRP_SUPPORT_LEGACY_METHODS
796 brp_errcode brp_Sys_GetPartNumber(brp_protocol protocol, char** PartNo, char** HwRevNo, brp_mempool *mempool);
797 #else
799 #endif
800 typedef struct {
813 #ifdef BRP_SUPPORT_LEGACY_METHODS
815 #else
817 #endif
818 typedef struct {
836 #ifdef BRP_SUPPORT_LEGACY_METHODS
838 #else
840 #endif
841 typedef struct {
852 #ifdef BRP_SUPPORT_LEGACY_METHODS
853 brp_errcode brp_Sys_FactoryReset(brp_protocol protocol, bool _input_PerformReboot);
854 #else
856 #endif
857 typedef struct {
868 #ifdef BRP_SUPPORT_LEGACY_METHODS
870 #else
872 #endif
873 #ifdef BALTECH_SDK_INTERNAL
874 typedef struct {
875  brp_protocol protocol;
876  unsigned* CRC;
877 } brp_Sys_GetFwCrc_t;
885 #ifdef BRP_SUPPORT_LEGACY_METHODS
886 brp_errcode brp_Sys_GetFwCrc(brp_protocol protocol, unsigned* CRC);
887 #else
888 brp_errcode brp_Sys_GetFwCrc(brp_Sys_GetFwCrc_t params);
889 #endif
890 #endif // BALTECH_SDK_INTERNAL
891 #endif
892 
brp_FeatureID ** FeatureList
Definition: sys.h:758
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:736
brp_mempool * mempool
Definition: sys.h:670
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:3340
char ** ConfigId
Definition: sys.h:668
brp_MessageType
Event that triggered the message.
Definition: typedefs.h:511
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:737
brp_protocol protocol
Definition: sys.h:625
brp_protocol protocol
Definition: sys.h:733
brp_protocol protocol
Definition: sys.h:106
brp_protocol protocol
Definition: sys.h:667
unsigned * FreeSize
Definition: sys.h:381
brp_buf * Content
Definition: sys.h:248
brp_ProtocolID
A list of all protocols.
Definition: typedefs.h:392
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:842
brp_errcode brp_Sys_SelectProtocol(brp_Sys_SelectProtocol_t params)
This command starts a host protocol.
brp_protocol protocol
Definition: sys.h:779
brp_buf Message
Definition: sys.h:644
brp_ProtocolID Protocol
Definition: sys.h:642
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:760
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 Sys.CfgLoadBlock.
brp_Sys_CfgLoadFinish_FinalizeAction
Defines the reader's behaviour on error/success.
Definition: typedefs.h:5699
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:759
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:5686
brp_protocol protocol
Definition: sys.h:549
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
brp_protocol protocol
Definition: sys.h:489
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:735
brp_errcode brp_Sys_StopProtocol(brp_Sys_StopProtocol_t params)
This command stops a host protocol.
unsigned Version
Definition: sys.h:550
size_t Message_len
Definition: sys.h:645
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:609
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:858
brp_mempool * mempool
Definition: sys.h:761
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:641
brp_mempool * mempool
Definition: sys.h:339
char ** ConfigName
Definition: sys.h:669
brp_LicenseBitMask * LicenseBitMask
Definition: sys.h:859
brp_mempool * mempool
Definition: sys.h:782
brp_protocol protocol
Definition: sys.h:801
brp_Parity
Specifies the Parity-bit mode which is used for RS-232/UART protocols.
Definition: typedefs.h:1698
brp_buf Content
Definition: sys.h:272
char ** Info
Definition: sys.h:160
brp_protocol protocol
Definition: sys.h:819
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:1279
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:757
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:626
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 Sys.CfgLoadBlock.
unsigned Value
Definition: sys.h:271
brp_ProtocolID Protocol
Definition: sys.h:490
brp_protocol protocol
Definition: sys.h:188
unsigned Key
Definition: sys.h:292
brp_MessageType MsgType
Definition: sys.h:643
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:802
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:3011
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:1728
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:820
brp_mempool * mempool
Definition: sys.h:250