![]() |
uFCoder 2.62
|
Functions | |
UFR_STATUS DL_API | JCStorageDeleteFileM (UFR_HANDLE hndUFR, uint8_t file_index) |
Multi reader support. After successful call to this function, the file on the DLStorage card will be deleted. Maximum files on the card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. If a file with index defined by the file_index parameter does not exist, the function will return UFR_APDU_SW_FILE_NOT_FOUND (0x000A6A82) error code. | |
UFR_STATUS DL_API | JCStorageGetFileSizeM (UFR_HANDLE hndUFR, uint8_t card_file_index, VAR uint32_t *file_size) |
Multi reader support. This function returns file size indexed by the parameter card_file_index, on successful execution. Returned file size is in bytes. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. You have to know file size to allocate an appropriate amount of data prior to calling the JCStorageReadFile() function. | |
UFR_STATUS DL_API | JCStorageGetFilesListSizeM (UFR_HANDLE hndUFR, VAR uint32_t *list_size) |
Multi reader support. This function has to be called before JCStorageListFiles() to acquire the size of the array of bytes needed to be allocated for the list of currently existing files on the DLStorage card. Maximum files on the DLStorage card is 16. | |
UFR_STATUS DL_API | JCStorageListFilesM (UFR_HANDLE hndUFR, OUT uint8_t *list, uint32_t list_bytes_allocated) |
Multi reader support. After calling the JCStorageGetFilesListSize() function and getting the size of the list of the currently existing files on the DLStorage card, and if the list size is greater than 0, you can allocate a convenient array of bytes and then call this function. On successful function execution, the array pointed by the list parameter will contain indexes of the existing files on the card. Maximum files on the DLStorage card is 16. Each byte of the array pointed by the list parameter contains a single index of the existing file on the DLStorage card. | |
UFR_STATUS DL_API | JCStorageReadFileM (UFR_HANDLE hndUFR, uint8_t card_file_index, OUT uint8_t *data, uint32_t data_bytes_allocated) |
Multi reader support. After calling the JCStorageGetFileSize() function and getting the size of the file on the DLStorage card you can allocate a convenient array of bytes and then call this function. On successful function execution, the array pointed by the data parameter will contain file content. If the file with the index defined by the card_file_index parameter does not exist, the function will return UFR_APDU_SW_FILE_NOT_FOUND (0x000A6A82) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. | |
UFR_STATUS DL_API | JCStorageReadFileToFileSystemM (UFR_HANDLE hndUFR, uint8_t card_file_index, IN const char *file_system_path_name) |
Multi reader support. This function reads a file from the DLStorage card directly to the new file on the host file-system. If the file on the host file system already exists, it will be overwritten. If the file with the index defined by the card_file_index parameter does not exist, the function will return UFR_APDU_SW_FILE_NOT_FOUND (0x000A6A82) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. | |
UFR_STATUS DL_API | JCStorageWriteFileFromFileSystemM (UFR_HANDLE hndUFR, uint8_t card_file_index, IN const char *file_system_path_name) |
Multi reader support. This function writes file content from the host file-system to the new file on the DLStorage card. If the file with the index defined by the card_file_index parameter already exists on the card, the function will return UFR_APDU_SW_ENTITY_ALREADY_EXISTS (0x000A6A89) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. If there is an error during the writing procedure, for example because of the loss of the NFC field and the file is only partially written (tearing event), a corrupted file on the DLStorage card should be deleted and then written again. Therefore we suggest you to always do verification of the data written to the card. | |
UFR_STATUS DL_API | JCStorageWriteFileM (UFR_HANDLE hndUFR, uint8_t card_file_index, IN const uint8_t *data, uint32_t data_size) |
Multi reader support. This function creates a file on the DLStorage card and writes an array of bytes pointed by the data parameter to it. Parameter data_size defines the amount of data to be written in the file on the DLStorage card. If the file with the index defined by the card_file_index parameter already exists on the card, the function will return UFR_APDU_SW_ENTITY_ALREADY_EXISTS (0x000A6A89) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. If there is an error during the writing procedure, for example because of the loss of the NFC field and the file is only partially written (tearing event), a corrupted file on the DLStorage card should be deleted and then written again. Therefore we suggest you to always do verification of the data written to the card. | |
UFR_STATUS DL_API JCStorageDeleteFileM | ( | UFR_HANDLE | hndUFR, |
uint8_t | file_index ) |
Multi reader support. After successful call to this function, the file on the DLStorage card will be deleted. Maximum files on the card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. If a file with index defined by the file_index parameter does not exist, the function will return UFR_APDU_SW_FILE_NOT_FOUND (0x000A6A82) error code.
hndUFR | handle of the uFR device |
file_index | It should contain an index of the file we want to delete. |
UFR_STATUS DL_API JCStorageGetFileSizeM | ( | UFR_HANDLE | hndUFR, |
uint8_t | card_file_index, | ||
VAR uint32_t * | file_size ) |
Multi reader support. This function returns file size indexed by the parameter card_file_index, on successful execution. Returned file size is in bytes. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. You have to know file size to allocate an appropriate amount of data prior to calling the JCStorageReadFile() function.
hndUFR | handle of the uFR device |
card_file_index | It should contain an index of the file which size we want to get |
file_size | Pointer to the 32-bit unsigned integer which will contain size in bytes of the file having card_file_index. |
UFR_STATUS DL_API JCStorageGetFilesListSizeM | ( | UFR_HANDLE | hndUFR, |
VAR uint32_t * | list_size ) |
Multi reader support. This function has to be called before JCStorageListFiles() to acquire the size of the array of bytes needed to be allocated for the list of currently existing files on the DLStorage card. Maximum files on the DLStorage card is 16.
hndUFR | handle of the uFR device |
list_size | Pointer to the 32-bit unsigned integer which will contain the size of the array of bytes needed to be allocated prior to calling the JCStorageListFiles() function. |
UFR_STATUS DL_API JCStorageListFilesM | ( | UFR_HANDLE | hndUFR, |
OUT uint8_t * | list, | ||
uint32_t | list_bytes_allocated ) |
Multi reader support. After calling the JCStorageGetFilesListSize() function and getting the size of the list of the currently existing files on the DLStorage card, and if the list size is greater than 0, you can allocate a convenient array of bytes and then call this function. On successful function execution, the array pointed by the list parameter will contain indexes of the existing files on the card. Maximum files on the DLStorage card is 16. Each byte of the array pointed by the list parameter contains a single index of the existing file on the DLStorage card.
hndUFR | handle of the uFR device |
list | Pointer to the allocated array of bytes of the size acquired by the previous call to JCStorageGetFilesListSize() function. |
list_bytes_allocated | Size of the array of bytes pointed by the list parameter. Have to be equal to the value of the *list_size acquired by the previous call to JCStorageGetFilesListSize() function. |
UFR_STATUS DL_API JCStorageReadFileM | ( | UFR_HANDLE | hndUFR, |
uint8_t | card_file_index, | ||
OUT uint8_t * | data, | ||
uint32_t | data_bytes_allocated ) |
Multi reader support. After calling the JCStorageGetFileSize() function and getting the size of the file on the DLStorage card you can allocate a convenient array of bytes and then call this function. On successful function execution, the array pointed by the data parameter will contain file content. If the file with the index defined by the card_file_index parameter does not exist, the function will return UFR_APDU_SW_FILE_NOT_FOUND (0x000A6A82) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15.
hndUFR | handle of the uFR device |
card_file_index | It should contain an index of the file we want to read. |
data | Pointer to the allocated array of bytes of the size acquired by the previous call to JCStorageGetFileSize() function. |
data_bytes_allocated | d Size of the array of bytes pointed by the data parameter. Have to be equal to the value of the *file_size acquired by the prior calling JCStorageGetFileSize() function. |
UFR_STATUS DL_API JCStorageReadFileToFileSystemM | ( | UFR_HANDLE | hndUFR, |
uint8_t | card_file_index, | ||
IN const char * | file_system_path_name ) |
Multi reader support. This function reads a file from the DLStorage card directly to the new file on the host file-system. If the file on the host file system already exists, it will be overwritten. If the file with the index defined by the card_file_index parameter does not exist, the function will return UFR_APDU_SW_FILE_NOT_FOUND (0x000A6A82) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15.
hndUFR | handle of the uFR device |
card_file_index | It should contain an index of the file we want to read. |
file_system_path_name | Pointer to the null-terminated string that should contain path and the name of the new file on the host file-system which will contain the data read from the file on the card in case of successful function execution. |
UFR_STATUS DL_API JCStorageWriteFileFromFileSystemM | ( | UFR_HANDLE | hndUFR, |
uint8_t | card_file_index, | ||
IN const char * | file_system_path_name ) |
Multi reader support. This function writes file content from the host file-system to the new file on the DLStorage card. If the file with the index defined by the card_file_index parameter already exists on the card, the function will return UFR_APDU_SW_ENTITY_ALREADY_EXISTS (0x000A6A89) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. If there is an error during the writing procedure, for example because of the loss of the NFC field and the file is only partially written (tearing event), a corrupted file on the DLStorage card should be deleted and then written again. Therefore we suggest you to always do verification of the data written to the card.
hndUFR | handle of the uFR device |
card_file_index | It should contain an index of the file on the card we want to create and write content of the file from the host file-sistem to it. |
file_system_path_name | Pointer to the null-terminated string that should contain path and the name of the file from the host file-sistem whose content we want to transfer to the new file on the card. |
UFR_STATUS DL_API JCStorageWriteFileM | ( | UFR_HANDLE | hndUFR, |
uint8_t | card_file_index, | ||
IN const uint8_t * | data, | ||
uint32_t | data_size ) |
Multi reader support. This function creates a file on the DLStorage card and writes an array of bytes pointed by the data parameter to it. Parameter data_size defines the amount of data to be written in the file on the DLStorage card. If the file with the index defined by the card_file_index parameter already exists on the card, the function will return UFR_APDU_SW_ENTITY_ALREADY_EXISTS (0x000A6A89) error code. Maximum files on the DLStorage card is 16 and file indexes are zero-based so indexes can be in the range of 0 to 15. If there is an error during the writing procedure, for example because of the loss of the NFC field and the file is only partially written (tearing event), a corrupted file on the DLStorage card should be deleted and then written again. Therefore we suggest you to always do verification of the data written to the card.
hndUFR | handle of the uFR device |
card_file_index | It should contain an index of the file we want to create and write data to it. |
data | Pointer to the data i.e. array of bytes to be written into the new file on the card. |
data_size | Size, in bytes, of the data to be written into the file on the card. |