FirmwareUpload
- class iio.FirmwareUpload
iio.FirmwareUpload class: Contains the representation of a firmware upload instance of an IIO device.
Public Functions
- FwuStatus get_status (out ulong remaining)
Get the progress of this firmware upload instance.
- Param remaining:
The number of bytes that remain to be processed by the device.
- Throws IioLib.IIOException:
The status could not be read.
- void write (byte[] data)
Start uploading a firmware image.
This returns as soon as the image has been handed over to the device. Use wait to wait for the upload to complete.
- Param data:
The firmware image.
- Throws IioLib.IIOException:
The image could not be uploaded.
- bool wait (int timeout_ms = TimeoutInfinite, bool nonblock = false)
Wait for a firmware upload to complete.
- Param timeout_ms:
Maximum time to wait, in milliseconds. Wait until the upload completes if negative.
- Param nonblock:
If true, don’t wait, and return false if the upload is still in progress.
- Throws IioLib.IIOException:
The device reported an error.
- Return:
true if the upload completed, false if it is still in progress (nonblock is set, or timeout_ms expired). The upload continues, and this method can be called again.
- bool upload (byte[] data, int timeout_ms = TimeoutInfinite)
Upload a firmware image, and wait for the upload to complete.
- Param data:
The firmware image.
- Param timeout_ms:
Maximum time to wait, in milliseconds. Wait until the upload completes if negative.
- Throws IioLib.IIOException:
The image could not be uploaded, or the device reported an error.
- Return:
true if the upload completed, false if it is still in progress after timeout_ms .
Properties
- FwuStatus status { get; }
The progress of this firmware upload instance.