Allows to update the firmware of a device.
More...
#include <peak/device/peak_firmware_updater.hpp>
Allows to update the firmware of a device.
To update the device firmware, call CollectFirmwareUpdateInformation() with a *.guf file and the device to update, select one of the firmware updates in the list, then pass it to UpdateDevice() to exectue the update.
To observe the update progress, pass a FirmwareUpdateProgressObserver to the UpdateDevice(). This is optional, but very helpful, since firmware updates can take several minutes.
- Note
- The DeviceDescriptor passed to CollectFirmwareUpdateInformation() and UpdateDevice() will be opened in Exclusive mode. Therefore, if the Device is opened in any other application, both methods will fail with an InternalErrorException.
◆ FirmwareUpdater() [1/3]
| peak::core::FirmwareUpdater::FirmwareUpdater |
( |
| ) |
|
|
inline |
◆ ~FirmwareUpdater()
| peak::core::FirmwareUpdater::~FirmwareUpdater |
( |
| ) |
|
|
inline |
◆ FirmwareUpdater() [2/3]
| peak::core::FirmwareUpdater::FirmwareUpdater |
( |
const FirmwareUpdater & |
other | ) |
|
|
delete |
◆ FirmwareUpdater() [3/3]
◆ CollectFirmwareUpdateInformation() [1/2]
| std::vector< std::shared_ptr< FirmwareUpdateInformation > > peak::core::FirmwareUpdater::CollectFirmwareUpdateInformation |
( |
const std::string & |
gufPath | ) |
const |
|
inline |
Collects all firmware update information of a given *.guf file.
- Parameters
-
| [in] | gufPath | The path of the *.guf file containing the firmware update. |
- Returns
- A list of firmware update information.
- Since
- 1.2
- Exceptions
-
◆ CollectFirmwareUpdateInformation() [2/2]
| std::vector< std::shared_ptr< FirmwareUpdateInformation > > peak::core::FirmwareUpdater::CollectFirmwareUpdateInformation |
( |
const std::string & |
gufPath, |
|
|
const std::shared_ptr< DeviceDescriptor > & |
device |
|
) |
| const |
|
inline |
Collects the firmware update information of a given *.guf file fitting to a given device.
- Parameters
-
| [in] | gufPath | The path of the *.guf file containing the firmware update. |
| [in] | device | The device to update. |
- Returns
- A list of firmware update information fitting to the given device
- Since
- 1.0
- Exceptions
-
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ UpdateDevice()
Updates a given device by using a given firmware update information.
This is a blocking call, i.e. it only returns once the update is done. Depending on the device, the update may take several minutes. To watch the progress during the update, pass a FirmwareUpdateProgressObserver.
- Parameters
-
| [in] | device | The device to update. |
| [in] | updateInformation | The firmware update information to update the device. |
| [in] | progressObserver | The progress observer to observe the update process. It is optional. |
| [in] | deviceResetDiscoveryTimeout | Time to wait for a device to reboot during the update. |
- Note
- The DeviceDescriptor passed to this function will be invalid after the update. Update the DeviceManager/Interface and retrieve a new DeviceDescriptor.
- Since
- 1.0
-
1.2 Added deviceResetDiscoveryTimeout parameter.
- Exceptions
-
The documentation for this class was generated from the following file: