![]() |
uFCoder 2.62
|
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() | |
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.
send_enable | pointer, if feature is on/off (0/1) |
prefix_enable | pointer, if prefix is used or not (0/1) |
prefix | pointer to variable holding prefix character |
suffix | pointer to variable holding suffix character |
send_removed_enable | Pointer. 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_rate | pointer to variable holding configured baud rate |
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.
send_enable | pointer, if feature is on/off (0/1) |
prefix_enable | pointer, if prefix is used or not (0/1) |
prefix | pointer to variable holding prefix character |
suffix | pointer to variable holding suffix character |
send_removed_enable | Pointer. 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_order | Turn 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_representation | Turn 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_rate | pointer to baud rate variable |
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'
reader_sn | uFR Online reader serial number (e.g ONXXXXXX) |
timeout | session duration, how long it will keep receiving callbacks (in seconds) |
card_detected_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h |
card_removed_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h |
error_callback | Pointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h |
session_error_callback | TEST |
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'
context | pointer to UIView that bridges Swift with native code. e.g let ble_context = Unmanaged.passUnretained(contentView).toOpaque() |
timeout | session duration, how long it will keep receiving callbacks (in seconds) |
card_detected_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h |
card_removed_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h |
error_callback | Pointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h |
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'
timeout | session duration, how long it will keep receiving callbacks (in seconds) |
card_detected_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h |
card_removed_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h |
error_callback | Pointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h |
license_json | JSON string containing full license data for offline use. Use the GetLicenseRequestData() and refer to additional documentation there on how to obtain an offline license. |
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'
context | pointer to UIView that bridges Swift with native code. e.g let nfc_context = Unmanaged.passUnretained(contentView).toOpaque() |
timeout | session duration, how long it will keep receiving callbacks (in seconds) |
card_detected_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h |
card_removed_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h |
error_callback | Pointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h |
license_json | JSON string containing full license data for offline use. Use the GetLicenseRequestData() and refer to additional documentation there on how to obtain an offline license. |
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.
send_enable | turn feature on/off (0/1) |
prefix_enable | use prefix or not (0/1) |
prefix | prefix character |
suffix | suffix character |
send_removed_enable | Turn 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_rate | baud rate value (e.g. 9600) |
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.
send_enable | turn feature on/off (0/1) |
prefix_enable | use prefix or not (0/1) |
prefix | prefix character |
suffix | suffix character |
send_removed_enable | Turn 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_order | Turn 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_representation | Turn 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_rate | baud rate value (e.g. 9600) |
void DL_API setCardDetectedCallback | ( | CardDetectedCallback | callback | ) |
This function is used to set or change the function that wil be called as a 'CardDetectedCallback'
callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h |
void DL_API setCardRemovedCallback | ( | CardRemovedCallback | callback | ) |
This function is used to set or change the function that wil be called as a 'CardRemovedCallback'
callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h |
void DL_API setSessionErrorCallback | ( | SessionErrorCallback | callback | ) |
This function is used to set or change the function that wil be called as a 'SessionErrorCallback'
callback | Pointer to a function that user defines, signature of user-defined method must match the 'SessionErrorCallback' typedef defined in uFCoder.h |
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'
card_detected_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardDetectedCallback' typedef defined in uFCoder.h |
card_removed_callback | Pointer to a function that user defines, signature of user-defined method must match the 'CardRemovedCallback' typedef defined in uFCoder.h |
UFR_STATUS DL_API StopAsyncSession | ( | ) |
This function is used to stop receiving asynchronous callbacks previously set by StartAsyncSession()