![]() |
Handling files and the files system on devices. More...
Functions | |
kvStatus | kvFileCopyToDevice (const CanHandle hnd, char *hostFileName, char *deviceFileName) |
kvStatus | kvFileCopyFromDevice (const CanHandle hnd, char *deviceFileName, char *hostFileName) |
kvStatus | kvFileDelete (const CanHandle hnd, char *deviceFileName) |
kvStatus | kvFileGetName (const CanHandle hnd, int fileNo, char *name, int namelen) |
kvStatus | kvFileGetCount (const CanHandle hnd, int *count) |
kvStatus | kvFileGetSystemData (const CanHandle hnd, int itemCode, int *result) |
kvStatus | kvFileDiskFormat (const CanHandle hnd) |
Handling files and the files system on devices.
The kvFileCopyFromDevice() function copies an arbitrary file from the device to the host.
[in] | hnd | An open handle to a CAN channel. |
[in] | deviceFileName | The device file name; a pointer to a NULL terminated array of chars. |
[in] | hostFileName | The target host file name; a pointer to a NULL terminated array of chars. |
The kvFileCopyToDevice() function copies an arbitrary file from the host to the device.
[in] | hnd | An open handle to a CAN channel. |
[in] | hostFileName | The host file name; a pointer to a NULL terminated array of chars. |
[in] | deviceFileName | The target device file name; a pointer to a NULL terminated array of chars. |
The kvFileDelete() function deletes a file on the device.
[in] | hnd | An open handle to a CAN channel. |
[in] | deviceFileName | The file on the device to delete; a pointer to a NULL terminated array of chars. |
The kvFileDiskFormat() function is used for formating the disk, back to FAT32.
[in] | hnd | An open handle to a CAN channel. |
The kvFileGetCount() function returns the number of files.
[in] | hnd | An open handle to a CAN channel. |
[out] | count | A pointer to a 32-bit integer that will receive the file count. |
The kvFileGetName() function returns the name of the file with number fileNo.
[in] | hnd | An open handle to a CAN channel. |
[in] | fileNo | The number of the file. |
[out] | name | A buffer that will contain the name of the file. The name is a zero-terminated ASCII string. |
[in] | namelen | The length, in bytes, of the name buffer. |
The kvFileGetSystemData() function is used for reading disk parameters, e.g. size, max number of (user) files, etc.
[in] | hnd | An open handle to a CAN channel. |
[in] | itemCode | The item we want information on. |
[out] | result | A pointer to a 32-bit integer that will receive the result. |