uFCoder 2.62
Loading...
Searching...
No Matches

Functions

void DL_API closeBLESession (void)
 This function is used to stop receiving asynchronous callbacks previously set by openBLESession()
 
void DL_API closeNFCSession (void)
 This function is used to stop receiving asynchronous callbacks previously set by openNFCSession()
 
UFR_STATUS DL_API GetAsyncCardIdSendConfig (VAR uint8_t *send_enable, VAR uint8_t *prefix_enable, VAR uint8_t *prefix, VAR uint8_t *suffix, VAR uint8_t *send_removed_enable, VAR uint32_t *async_baud_rate)
 Returns info about parameters configured with previous function.
 
UFR_STATUS DL_API GetAsyncCardIdSendConfigEx (VAR uint8_t *send_enable, VAR uint8_t *prefix_enable, VAR uint8_t *prefix, VAR uint8_t *suffix, VAR uint8_t *send_removed_enable, VAR uint8_t *reverse_byte_order, VAR uint8_t *decimal_representation, VAR uint32_t *async_baud_rate)
 Function returns the parameters of card ID sending.
 
UFR_STATUS DL_API openBLESession (const char *reader_sn, int timeout, CardDetectedCallback card_detected_callback, CardRemovedCallback card_removed_callback, SessionErrorCallback error_callback)
 For Android only: This function is used to enable asynchronous event-driven API callbacks via BLE.
uFR Online reader only. Must be set in 'BLE' mode
The function takes pointers to user-defined functions as 'card_detected_callback', 'card_removed_callback' and 'error_callback'

 
UFR_STATUS DL_API openBLESession (void *_Nonnull context, const char *reader_sn, int timeout, CardDetectedCallback card_detected_callback, CardRemovedCallback card_removed_callback, SessionErrorCallback error_callback)
 For iOS only: This function is used to enable asynchronous event-driven API callbacks via BLE.
uFR Online reader only. Must be set in 'BLE' mode
The function takes pointers to user-defined functions as 'card_detected_callback', 'card_removed_callback' and 'error_callback'

 
UFR_STATUS DL_API openNFCSession (int timeout, CardDetectedCallback card_detected_callback, CardRemovedCallback card_removed_callback, SessionErrorCallback error_callback, const char *license_json)
 For Android only: This function is used to enable asynchronous event-driven API callbacks for internal NFC.
The function takes pointers to user-defined functions as 'card_detected_callback' and 'card_removed_callback'

 
UFR_STATUS DL_API openNFCSession (void *_Nonnull context, int timeout, CardDetectedCallback card_detected_callback, CardRemovedCallback card_removed_callback, SessionErrorCallback error_callback, const char *license_json)
 For iOS only: This function is used to enable asynchronous event-driven API callbacks for internal NFC.
The function takes pointers to user-defined functions as 'card_detected_callback', 'card_removed_callback' and 'error_callback'

 
UFR_STATUS DL_API SetAsyncCardIdSendConfig (uint8_t send_enable, uint8_t prefix_enable, uint8_t prefix, uint8_t suffix, uint8_t send_removed_enable, uint32_t async_baud_rate)
 This function is used for the “Asynchronous UID sending” feature. Returned string contains hexadecimal notation of card ID with one mandatory suffix character and one optional prefix character.
 
UFR_STATUS DL_API SetAsyncCardIdSendConfigEx (uint8_t send_enable, uint8_t prefix_enable, uint8_t prefix, uint8_t suffix, uint8_t send_removed_enable, uint8_t reverse_byte_order, uint8_t decimal_representation, uint32_t async_baud_rate)
 Function sets the parameters of card ID sending.
 
void DL_API setCardDetectedCallback (CardDetectedCallback callback)
 This function is used to set or change the function that wil be called as a 'CardDetectedCallback'

 
void DL_API setCardRemovedCallback (CardRemovedCallback callback)
 This function is used to set or change the function that wil be called as a 'CardRemovedCallback'

 
void DL_API setSessionErrorCallback (SessionErrorCallback callback)
 This function is used to set or change the function that wil be called as a 'SessionErrorCallback'

 
UFR_STATUS DL_API StartAsyncSession (CardDetectedCallback card_detected_callback, CardRemovedCallback card_removed_callback)
 This function is used to enable asynchronous event-driven API callbacks.
Prerequisites: ReaderOpen() or ReaderOpenEx() must be called first and must return UFR_OK status to open connection with the reader
The function takes pointers to user-defined functions as 'card_detected_callback' and 'card_removed_callback'

 
UFR_STATUS DL_API StopAsyncSession ()
 This function is used to stop receiving asynchronous callbacks previously set by StartAsyncSession()
 

Detailed Description

Function Documentation

◆ closeBLESession()

void DL_API closeBLESession ( void )

This function is used to stop receiving asynchronous callbacks previously set by openBLESession()

Since
uFCoder library version 6.0.3
Returns
Operation status

◆ closeNFCSession()

void DL_API closeNFCSession ( void )

This function is used to stop receiving asynchronous callbacks previously set by openNFCSession()

Since
uFCoder library version 6.0.3
Returns
Operation status
Operation status

◆ GetAsyncCardIdSendConfig()

UFR_STATUS DL_API GetAsyncCardIdSendConfig ( VAR uint8_t * send_enable,
VAR uint8_t * prefix_enable,
VAR uint8_t * prefix,
VAR uint8_t * suffix,
VAR uint8_t * send_removed_enable,
VAR uint32_t * async_baud_rate )

Returns info about parameters configured with previous function.

Parameters
send_enablepointer, if feature is on/off (0/1)
prefix_enablepointer, if prefix is used or not (0/1)
prefixpointer to variable holding prefix character
suffixpointer to variable holding suffix character
send_removed_enablePointer. If value is 0 then feature is off. Otherwise, feature is on. If feature is enabled then Asynchronous UID is sent when the card is removed from the reader field.
async_baud_ratepointer to variable holding configured baud rate
Returns
Operation status

◆ GetAsyncCardIdSendConfigEx()

UFR_STATUS DL_API GetAsyncCardIdSendConfigEx ( VAR uint8_t * send_enable,
VAR uint8_t * prefix_enable,
VAR uint8_t * prefix,
VAR uint8_t * suffix,
VAR uint8_t * send_removed_enable,
VAR uint8_t * reverse_byte_order,
VAR uint8_t * decimal_representation,
VAR uint32_t * async_baud_rate )

Function returns the parameters of card ID sending.

Parameters
send_enablepointer, if feature is on/off (0/1)
prefix_enablepointer, if prefix is used or not (0/1)
prefixpointer to variable holding prefix character
suffixpointer to variable holding suffix character
send_removed_enablePointer. If value is 0 then feature is off. Otherwise, feature is on. If feature is enabled then Asynchronous UID is sent when the card is removed from the reader field.
reverse_byte_orderTurn feature on/off (0/1). If feature is disabled then the order of bytes (UID) will be as on card. If feature is enabled then the order of bytes will be reversed then the card’s order of bytes.
decimal_representationTurn feature on/off (0/1). If feature is enabled then the UID will be presented as a decimal number. If feature is disabled then the UID will be presented as a hexadecimal number
async_baud_ratepointer to baud rate variable
Returns
Operation status

◆ openBLESession() [1/2]

UFR_STATUS DL_API openBLESession ( const char * reader_sn,
int timeout,
CardDetectedCallback card_detected_callback,
CardRemovedCallback card_removed_callback,
SessionErrorCallback error_callback )

For Android only: This function is used to enable asynchronous event-driven API callbacks via BLE.
uFR Online reader only. Must be set in 'BLE' mode
The function takes pointers to user-defined functions as 'card_detected_callback', 'card_removed_callback' and 'error_callback'

Since
uFCoder library version 6.0.3
Parameters
reader_snuFR Online reader serial number (e.g ONXXXXXX)
timeoutsession duration, how long it will keep receiving callbacks (in seconds)
card_detected_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h
card_removed_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h
error_callbackPointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h
session_error_callbackTEST
Returns
Operation status

◆ openBLESession() [2/2]

UFR_STATUS DL_API openBLESession ( void *_Nonnull context,
const char * reader_sn,
int timeout,
CardDetectedCallback card_detected_callback,
CardRemovedCallback card_removed_callback,
SessionErrorCallback error_callback )

For iOS only: This function is used to enable asynchronous event-driven API callbacks via BLE.
uFR Online reader only. Must be set in 'BLE' mode
The function takes pointers to user-defined functions as 'card_detected_callback', 'card_removed_callback' and 'error_callback'

Since
uFCoder library version 6.0.3
Parameters
contextpointer to UIView that bridges Swift with native code. e.g let ble_context = Unmanaged.passUnretained(contentView).toOpaque()
timeoutsession duration, how long it will keep receiving callbacks (in seconds)
card_detected_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h
card_removed_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h
error_callbackPointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h
Returns
Operation status

◆ openNFCSession() [1/2]

UFR_STATUS DL_API openNFCSession ( int timeout,
CardDetectedCallback card_detected_callback,
CardRemovedCallback card_removed_callback,
SessionErrorCallback error_callback,
const char * license_json )

For Android only: This function is used to enable asynchronous event-driven API callbacks for internal NFC.
The function takes pointers to user-defined functions as 'card_detected_callback' and 'card_removed_callback'

Since
uFCoder library version 6.0.3
Parameters
timeoutsession duration, how long it will keep receiving callbacks (in seconds)
card_detected_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h
card_removed_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h
error_callbackPointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h
license_jsonJSON string containing full license data for offline use. Use the GetLicenseRequestData() and refer to additional documentation there on how to obtain an offline license.
Returns
Operation status

◆ openNFCSession() [2/2]

UFR_STATUS DL_API openNFCSession ( void *_Nonnull context,
int timeout,
CardDetectedCallback card_detected_callback,
CardRemovedCallback card_removed_callback,
SessionErrorCallback error_callback,
const char * license_json )

For iOS only: This function is used to enable asynchronous event-driven API callbacks for internal NFC.
The function takes pointers to user-defined functions as 'card_detected_callback', 'card_removed_callback' and 'error_callback'

Since
uFCoder library version 6.0.3
Parameters
contextpointer to UIView that bridges Swift with native code. e.g let nfc_context = Unmanaged.passUnretained(contentView).toOpaque()
timeoutsession duration, how long it will keep receiving callbacks (in seconds)
card_detected_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h
card_removed_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h
error_callbackPointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h
license_jsonJSON string containing full license data for offline use. Use the GetLicenseRequestData() and refer to additional documentation there on how to obtain an offline license.
Returns
Operation status

◆ SetAsyncCardIdSendConfig()

UFR_STATUS DL_API SetAsyncCardIdSendConfig ( uint8_t send_enable,
uint8_t prefix_enable,
uint8_t prefix,
uint8_t suffix,
uint8_t send_removed_enable,
uint32_t async_baud_rate )

This function is used for the “Asynchronous UID sending” feature. Returned string contains hexadecimal notation of card ID with one mandatory suffix character and one optional prefix character.

On the uFR Zero USB series there is an option to enable USB HID keyboard simulation. It is needed to set the baud rate to 0. For example, if baud rate is setted to any other value than 0, UID is sent to UART, but if it is setted to 0 UID is sent as keyboard simulation. Example: Card ID is 0xA103C256, prefix is 0x58 ('X'), suffix is 0x59 ('Y') Returned string is “XA103C256Y” Function sets configuration parameters for this feature.

Parameters
send_enableturn feature on/off (0/1)
prefix_enableuse prefix or not (0/1)
prefixprefix character
suffixsuffix character
send_removed_enableTurn feature on/off (0/1). If feature is enabled then Asynchronous UID will also be sent when removing a card from the reader field.
async_baud_ratebaud rate value (e.g. 9600)
Returns
Operation status

◆ SetAsyncCardIdSendConfigEx()

UFR_STATUS DL_API SetAsyncCardIdSendConfigEx ( uint8_t send_enable,
uint8_t prefix_enable,
uint8_t prefix,
uint8_t suffix,
uint8_t send_removed_enable,
uint8_t reverse_byte_order,
uint8_t decimal_representation,
uint32_t async_baud_rate )

Function sets the parameters of card ID sending.

Parameters
send_enableturn feature on/off (0/1)
prefix_enableuse prefix or not (0/1)
prefixprefix character
suffixsuffix character
send_removed_enableTurn feature on/off (0/1). If feature is enabled then Asynchronous UID will also be sent when removing a card from the reader field.
reverse_byte_orderTurn feature on/off (0/1). If feature is disabled then the order of bytes (UID) will be as on card. If feature is enabled then the order of bytes will be reversed then the card’s order of bytes.
decimal_representationTurn feature on/off (0/1). If feature is enabled then the UID will be presented as a decimal number. If feature is disabled then the UID will be presented as a hexadecimal number
async_baud_ratebaud rate value (e.g. 9600)
Returns
Operation status

◆ setCardDetectedCallback()

void DL_API setCardDetectedCallback ( CardDetectedCallback callback)

This function is used to set or change the function that wil be called as a 'CardDetectedCallback'

Since
uFCoder library version 6.0.3
Parameters
callbackPointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h
Returns
Operation status

◆ setCardRemovedCallback()

void DL_API setCardRemovedCallback ( CardRemovedCallback callback)

This function is used to set or change the function that wil be called as a 'CardRemovedCallback'

Since
uFCoder library version 6.0.3
Parameters
callbackPointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h
Returns
Operation status

◆ setSessionErrorCallback()

void DL_API setSessionErrorCallback ( SessionErrorCallback callback)

This function is used to set or change the function that wil be called as a 'SessionErrorCallback'

Since
uFCoder library version 6.0.3
Parameters
callbackPointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h
Returns
Operation status

◆ StartAsyncSession()

UFR_STATUS DL_API StartAsyncSession ( CardDetectedCallback card_detected_callback,
CardRemovedCallback card_removed_callback )

This function is used to enable asynchronous event-driven API callbacks.
Prerequisites: ReaderOpen() or ReaderOpenEx() must be called first and must return UFR_OK status to open connection with the reader
The function takes pointers to user-defined functions as 'card_detected_callback' and 'card_removed_callback'

Since
uFCoder library version 6.0.3
Parameters
card_detected_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h
card_removed_callbackPointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h
Returns
Operation status

◆ StopAsyncSession()

UFR_STATUS DL_API StopAsyncSession ( )

This function is used to stop receiving asynchronous callbacks previously set by StartAsyncSession()

Since
uFCoder library version 6.0.3
Returns
Operation status