A class to perform a firmware update of a specific device.
This class is intended to provide an ease of use possibility to update the firmware of specific devices. It is possible to specify the behavior of the class very detailed to make sure the update suits the users expectations. It is also possible to derive from this class and override various functions in order to get custom notifications e.g. to update a GUI application.
To start a firmware update for Balluff GenICam devices the following code will be sufficient:
try
{
const string pathToFirmwareArchive( "someArchive.mvu" );
const int FWUpdateResult = fwUpdater.update( pathToFirmwareArchive );
}
{
cout << "An error occurred while updating the firmware of the device " << pDev->serial.read()
cout << "Status: " << fwUpdater.statusMessage() << endl;
return 1;
}
A class to perform a firmware update of a specific device.
Definition mvIMPACT_acquire.h:22712
A base class for exceptions generated by Impact Acquire.
Definition mvIMPACT_acquire.h:256
std::string getErrorCodeAsString(void) const
Returns a string representation of the error associated with the exception.
Definition mvIMPACT_acquire.h:288
To start a firmware update for Balluff mvBlueFOX devices the following code will be sufficient:
{
public:
explicit MyFirmwareUpdater(
mvIMPACT::acquire::Device* pDev,
bool boForceOverideSameVersion =
false,
bool boForceDowngrade =
false,
bool boForceSameVersion =
false,
bool boForceBreakingChange =
false ) :
mvIMPACT::
acquire::
FirmwareUpdater( pDev, boForceOverideSameVersion, boForceDowngrade, boForceSameVersion, boForceBreakingChange ) {}
{
cout <<
"Error: " <<
statusMessage() <<
"@" << timeElapsed_s <<
" s" << endl;
}
int onErasingFlash(
const int currentProgress_pc,
const double timeElapsed_s )
const override
{
cout << "Erasing - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl;
}
{
cout << "Unzipping firmware archive - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl;
}
{
cout << "Updating boot programmer - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl;
}
int onUploadingImage(
const int currentProgress_pc,
const double timeElapsed_s )
const override
{
cout << "Uploading - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl;
}
int onRebooting(
const int currentProgress_pc,
const double timeElapsed_s )
const override
{
cout << "Rebooting - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl;
}
int onHardResetRequired(
const int currentProgress_pc,
const double timeElapsed_s )
const override
{
cout << "Rebooting - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl << "Manual hard reset required." << endl;
}
int onSavingUserSets(
const int currentProgress_pc,
const double timeElapsed_s )
const override
{
cout << "Saving sets - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl;
}
int onLoadingUserSets(
const int currentProgress_pc,
const double timeElapsed_s )
const override
{
cout << "Loading sets - Update progress: " << currentProgress_pc << ", time " << timeElapsed_s << " s" << endl;
}
};
This class and its functions represent an actual device detected by this interface in the current sys...
Definition mvIMPACT_acquire.h:6059
virtual int onErasingFlash(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called once the devices flash memory is erased.
Definition mvIMPACT_acquire.h:22883
virtual int onUploadingImage(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called once the actual firmware file is uploaded to the device's flash memory.
Definition mvIMPACT_acquire.h:22946
std::string statusMessage(void) const
Returns the current status from the status property.
Definition mvIMPACT_acquire.h:23085
virtual int onUpdatingBootProgrammer(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called once the boot programmer of an mvBlueFOX3 camera is updated.
Definition mvIMPACT_acquire.h:22923
virtual int onRebooting(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called once the device reboots to make sure the new firmware is applied to the ...
Definition mvIMPACT_acquire.h:22966
FirmwareUpdater(mvIMPACT::acquire::Device *pDev, bool boForceOverideSameVersion=false, bool boForceDowngrade=false, bool boKeepUserSets=true, bool boForceBreakingChange=false)
Creates a new mvIMPACT::acquire::FirmwareUpdater object.
Definition mvIMPACT_acquire.h:22837
virtual int onErrorMessage(const double timeElapsed_s) const
This function will be called once a message is waiting to be passed to the user.
Definition mvIMPACT_acquire.h:22866
virtual int onLoadingUserSets(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called when the settings of the device are written back after updating the firm...
Definition mvIMPACT_acquire.h:23026
virtual int onSavingUserSets(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called when the settings of the device are stored before updating the firmware.
Definition mvIMPACT_acquire.h:23006
virtual int onHardResetRequired(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called once the device reboots and a manual hard reset is required.
Definition mvIMPACT_acquire.h:22986
virtual int onUnzippingFirmwareArchive(const int currentProgress_pc, const double timeElapsed_s) const
This function will be called once firmware archive (*.mvu) is unzipped to provide the correct firmwar...
Definition mvIMPACT_acquire.h:22901
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Definition mvImageBuffer.h:44
@ fuaContinue
The default return value to tell the driver to continue processing the firmware update.
Definition mvDriverBaseEnums.h:3035
@ fuaCancel
Return this value to request the driver to terminate an ongoing firmware update as soon as possible.
Definition mvDriverBaseEnums.h:3037
Definition mvImageBuffer.h:42