IDS peak genericC++ v1.17.0
Loading...
Searching...
No Matches
peak::core::FirmwareUpdateProgressObserver Class Reference

Allows to observe a firmware update process. More...

#include <peak/device/peak_firmware_update_progress_observer.hpp>

Public Types

using UpdateStartedCallback
using UpdateStartedCallbackHandle = UpdateStartedCallback*
using UpdateStepStartedCallback
using UpdateStepStartedCallbackHandle = UpdateStepStartedCallback*
using UpdateStepProgressChangedCallback
using UpdateStepProgressChangedCallbackHandle = UpdateStepProgressChangedCallback*
using UpdateStepFinishedCallback = std::function<void(FirmwareUpdateStep updateStep)>
using UpdateStepFinishedCallbackHandle = UpdateStepFinishedCallback*
using UpdateFinishedCallback = std::function<void(void)>
using UpdateFinishedCallbackHandle = UpdateFinishedCallback*
using UpdateFailedCallback = std::function<void(const std::string& errorDescription)>
using UpdateFailedCallbackHandle = UpdateFailedCallback*

Public Member Functions

 FirmwareUpdateProgressObserver ()
 ~FirmwareUpdateProgressObserver ()
 FirmwareUpdateProgressObserver (const FirmwareUpdateProgressObserver &other)=delete
FirmwareUpdateProgressObserver & operator= (const FirmwareUpdateProgressObserver &other)=delete
 FirmwareUpdateProgressObserver (FirmwareUpdateProgressObserver &&other)=delete
FirmwareUpdateProgressObserver & operator= (FirmwareUpdateProgressObserver &&other)=delete
UpdateStartedCallbackHandle RegisterUpdateStartedCallback (UpdateStartedCallback callback)
 Registers a callback for signaling a started update.
void UnregisterUpdateStartedCallback (UpdateStartedCallbackHandle callbackHandle)
 Unregisters an update started callback.
UpdateStepStartedCallbackHandle RegisterUpdateStepStartedCallback (UpdateStepStartedCallback callback)
 Registers a callback for signaling a started update step.
void UnregisterUpdateStepStartedCallback (UpdateStepStartedCallbackHandle callbackHandle)
 Unregisters an update step started callback.
UpdateStepProgressChangedCallbackHandle RegisterUpdateStepProgressChangedCallback (UpdateStepProgressChangedCallback callback)
 Registers a callback for signaling progress in an update step.
void UnregisterUpdateStepProgressChangedCallback (UpdateStepProgressChangedCallbackHandle callbackHandle)
 Unregisters an update step progress changed callback.
UpdateStepFinishedCallbackHandle RegisterUpdateStepFinishedCallback (UpdateStepFinishedCallback callback)
 Registers a callback for signaling a finished update step.
void UnregisterUpdateStepFinishedCallback (UpdateStepFinishedCallbackHandle callbackHandle)
 Unregisters an update step finished callback.
UpdateFinishedCallbackHandle RegisterUpdateFinishedCallback (UpdateFinishedCallback callback)
 Registers a callback for signaling a finished update.
void UnregisterUpdateFinishedCallback (UpdateFinishedCallbackHandle callbackHandle)
 Unregisters an update finished callback.
UpdateFailedCallbackHandle RegisterUpdateFailedCallback (UpdateFailedCallback callback)
 Registers a callback for signaling a failed update.
void UnregisterUpdateFailedCallback (UpdateFailedCallbackHandle callbackHandle)
 Unregisters an update failed callback.

Friends

class FirmwareUpdater

Detailed Description

Allows to observe a firmware update process.

Observe a firmware update process by registering several callbacks. These callbacks get called when the observer is passed to the FirmwareUpdater::UpdateDevice() function. The callbacks inform about changes of the status of the firmware update process.

Member Typedef Documentation

◆ UpdateFailedCallback

using peak::core::FirmwareUpdateProgressObserver::UpdateFailedCallback = std::function<void(const std::string& errorDescription)>

The type of update failed callbacks.

◆ UpdateFailedCallbackHandle

◆ UpdateFinishedCallback

The type of update finished callbacks.

◆ UpdateFinishedCallbackHandle

◆ UpdateStartedCallback

Initial value:
std::function<void(
const std::shared_ptr<FirmwareUpdateInformation>& updateInformation, uint32_t estimatedDuration_ms)>

The type of update started callbacks.

◆ UpdateStartedCallbackHandle

◆ UpdateStepFinishedCallback

The type of update step finished callbacks.

◆ UpdateStepFinishedCallbackHandle

◆ UpdateStepProgressChangedCallback

Initial value:
std::function<void(FirmwareUpdateStep updateStep, double progressPercentage)>
FirmwareUpdateStep
The possible firmware update step types.
Definition peak_firmware_update_progress_observer.hpp:32

The type of update step progress changed callbacks.

◆ UpdateStepProgressChangedCallbackHandle

◆ UpdateStepStartedCallback

Initial value:
std::function<void(
FirmwareUpdateStep updateStep, uint32_t estimatedDuration_ms, const std::string& description)>

The type of update step started callbacks.

◆ UpdateStepStartedCallbackHandle

Constructor & Destructor Documentation

◆ FirmwareUpdateProgressObserver() [1/3]

peak::core::FirmwareUpdateProgressObserver::FirmwareUpdateProgressObserver ( )
inline

◆ ~FirmwareUpdateProgressObserver()

peak::core::FirmwareUpdateProgressObserver::~FirmwareUpdateProgressObserver ( )
inline

◆ FirmwareUpdateProgressObserver() [2/3]

peak::core::FirmwareUpdateProgressObserver::FirmwareUpdateProgressObserver ( const FirmwareUpdateProgressObserver & other)
delete

◆ FirmwareUpdateProgressObserver() [3/3]

peak::core::FirmwareUpdateProgressObserver::FirmwareUpdateProgressObserver ( FirmwareUpdateProgressObserver && other)
delete

Member Function Documentation

◆ operator=() [1/2]

FirmwareUpdateProgressObserver & peak::core::FirmwareUpdateProgressObserver::operator= ( const FirmwareUpdateProgressObserver & other)
delete

◆ operator=() [2/2]

FirmwareUpdateProgressObserver & peak::core::FirmwareUpdateProgressObserver::operator= ( FirmwareUpdateProgressObserver && other)
delete

◆ RegisterUpdateFailedCallback()

FirmwareUpdateProgressObserver::UpdateFailedCallbackHandle peak::core::FirmwareUpdateProgressObserver::RegisterUpdateFailedCallback ( FirmwareUpdateProgressObserver::UpdateFailedCallback callback)
inline

Registers a callback for signaling a failed update.

Parameters
[in]callbackThe callback to call if a update has failed.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ RegisterUpdateFinishedCallback()

FirmwareUpdateProgressObserver::UpdateFinishedCallbackHandle peak::core::FirmwareUpdateProgressObserver::RegisterUpdateFinishedCallback ( FirmwareUpdateProgressObserver::UpdateFinishedCallback callback)
inline

Registers a callback for signaling a finished update.

Parameters
[in]callbackThe callback to call if a update is finished.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ RegisterUpdateStartedCallback()

FirmwareUpdateProgressObserver::UpdateStartedCallbackHandle peak::core::FirmwareUpdateProgressObserver::RegisterUpdateStartedCallback ( FirmwareUpdateProgressObserver::UpdateStartedCallback callback)
inline

Registers a callback for signaling a started update.

Parameters
[in]callbackThe callback to call if a update is started.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ RegisterUpdateStepFinishedCallback()

FirmwareUpdateProgressObserver::UpdateStepFinishedCallbackHandle peak::core::FirmwareUpdateProgressObserver::RegisterUpdateStepFinishedCallback ( FirmwareUpdateProgressObserver::UpdateStepFinishedCallback callback)
inline

Registers a callback for signaling a finished update step.

Parameters
[in]callbackThe callback to call if a update step is finished.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ RegisterUpdateStepProgressChangedCallback()

FirmwareUpdateProgressObserver::UpdateStepProgressChangedCallbackHandle peak::core::FirmwareUpdateProgressObserver::RegisterUpdateStepProgressChangedCallback ( FirmwareUpdateProgressObserver::UpdateStepProgressChangedCallback callback)
inline

Registers a callback for signaling progress in an update step.

Parameters
[in]callbackThe callback to call if progress is made in a update step.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ RegisterUpdateStepStartedCallback()

FirmwareUpdateProgressObserver::UpdateStepStartedCallbackHandle peak::core::FirmwareUpdateProgressObserver::RegisterUpdateStepStartedCallback ( FirmwareUpdateProgressObserver::UpdateStepStartedCallback callback)
inline

Registers a callback for signaling a started update step.

Parameters
[in]callbackThe callback to call if a update step is started.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterUpdateFailedCallback()

void peak::core::FirmwareUpdateProgressObserver::UnregisterUpdateFailedCallback ( FirmwareUpdateProgressObserver::UpdateFailedCallbackHandle callbackHandle)
inline

Unregisters an update failed callback.

This function unregisters an update failed callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterUpdateFinishedCallback()

void peak::core::FirmwareUpdateProgressObserver::UnregisterUpdateFinishedCallback ( FirmwareUpdateProgressObserver::UpdateFinishedCallbackHandle callbackHandle)
inline

Unregisters an update finished callback.

This function unregisters an update finished callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterUpdateStartedCallback()

void peak::core::FirmwareUpdateProgressObserver::UnregisterUpdateStartedCallback ( FirmwareUpdateProgressObserver::UpdateStartedCallbackHandle callbackHandle)
inline

Unregisters an update started callback.

This function unregisters an update started callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterUpdateStepFinishedCallback()

void peak::core::FirmwareUpdateProgressObserver::UnregisterUpdateStepFinishedCallback ( FirmwareUpdateProgressObserver::UpdateStepFinishedCallbackHandle callbackHandle)
inline

Unregisters an update step finished callback.

This function unregisters an update step finished callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterUpdateStepProgressChangedCallback()

void peak::core::FirmwareUpdateProgressObserver::UnregisterUpdateStepProgressChangedCallback ( FirmwareUpdateProgressObserver::UpdateStepProgressChangedCallbackHandle callbackHandle)
inline

Unregisters an update step progress changed callback.

This function unregisters an update step progress changed callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterUpdateStepStartedCallback()

void peak::core::FirmwareUpdateProgressObserver::UnregisterUpdateStepStartedCallback ( FirmwareUpdateProgressObserver::UpdateStepStartedCallbackHandle callbackHandle)
inline

Unregisters an update step started callback.

This function unregisters an update step started callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ FirmwareUpdater

friend class FirmwareUpdater
friend

The documentation for this class was generated from the following file: