GenICam_SDK.docx
26
4.5 File transfer functions
csiGetUpdateFileType
Request the update file type of a file (if available)
Syntax
csiErr csiGetUpdateFileType(csiHandle device, const char* fileName, char* fileTypeOut, size_t bufferSize)
Parameters:
In: device:
Handle provided by the
-function
filename:
The path to a file that should be checked
bufferSize
the size of the output buffer fileTypeOut
Out: fileTypeOut
If the file is a valid file that can be used to update on the device, this buffer should contain the type
of that file as string representation
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
This function can be used to request the type of a specific file. There are multiple different types of files that can be uploaded
to a camera (for example firmware, sensor file, user settings, XML description, reference files, etc.). It can be used to detect if
a file is a valid file that can be used for an update and to detect the type of the file.
It is required to first get the type of a file before uploading it to the device to see if it is a valid file.
csiFileDownloadToDevice
Downloads a file located on the local PC to the camera
Syntax
csiErr csiFileDownloadToDevice(csiHandle device, const char* fileName, const char* fileType,
uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener = NULL,
csiMemTransferUserData* userdata = NULL)
Parameters:
In: device:
Handle provided by the
-function
filename
Full path of the fule to be uploaded
filetype
Type of the update file as returned from
timeOutMilliSeconds
Timeout for the update procedure in milliseconds.
Note: An update process might take several minutes depending on the type of file, please choose
a timeout of at least a few minutes here.
linstener
Optional callback function that will be called during the update process to inform about the
progress.
userdata
Optional user data that will be passed as parameter to the progress callback function.
Out: None
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
csiFileUploadFromDevice
Uploads a file from device to the local PC
Syntax
csiErr csiFileUploadFromDevice(csiHandle device, const char* fileName, const char* fileType, uint64_t timeoutMilliseconds,
csiMemTransferCallbackFunc listener = NULL, csiMemTransferUserData* userdata = NULL)
Parameters:
In: device:
Handle provided by the
-function
filename
Name of the file on the local PC
filetype
the type of the file, corresponds to the name of the file on the device.
timeoutMilliseconds
Timeout for the upload procedure in milliseconds.
Note: A file transfer process might take several minutes depending on the type of file, please
choose a timeout of at least a few minutes here.
listener
Optional callback function that will be called during the transfer process to inform about the
progress.
userdata
Optional user data that will be passed as parameter to the progress callback function.
Out: None
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment: