#include <yocto_api.h>
Public Member Functions | |
virtual int | _processMore (int newupdate) |
virtual int | get_progress (void) |
virtual string | get_progressMessage (void) |
virtual int | startUpdate (void) |
YFirmwareUpdate (string serialNumber, string path, string settings) | |
YFirmwareUpdate (string serialNumber, string path, string settings, bool force) | |
YFirmwareUpdate () | |
Static Public Member Functions | |
static string | CheckFirmware (string serial, string path, int minrelease) |
static vector< string > | GetAllBootLoaders (void) |
Protected Attributes | |
string | _firmwarepath |
bool | _force |
int | _progress |
int | _progress_c |
string | _progress_msg |
int | _restore_step |
string | _serial |
string | _settings |
YFirmwareUpdate Class: Control interface for the firmware update process
The YFirmwareUpdate class let you control the firmware update of a Yoctopuce module. This class should not be instantiate directly, instead the method updateFirmware should be called to get an instance of YFirmwareUpdate.
Definition at line 833 of file yocto_api.h.
YFirmwareUpdate::YFirmwareUpdate | ( | string | serialNumber, |
string | path, | ||
string | settings | ||
) |
Definition at line 1106 of file yocto_api.cpp.
YFirmwareUpdate::YFirmwareUpdate | ( | string | serialNumber, |
string | path, | ||
string | settings, | ||
bool | force | ||
) |
Definition at line 1118 of file yocto_api.cpp.
YFirmwareUpdate::YFirmwareUpdate | ( | ) |
Definition at line 1132 of file yocto_api.cpp.
|
virtual |
Definition at line 1147 of file yocto_api.cpp.
|
static |
Test if the byn file is valid for this module. It is possible to pass a directory instead of a file. In that case, this method returns the path of the most recent appropriate byn file. This method will ignore any firmware older than minrelease.
serial | : the serial number of the module to update |
path | : the path of a byn file or a directory that contains byn files |
minrelease | : a positive integer |
On failure, returns a string that starts with "error:".
Definition at line 1272 of file yocto_api.cpp.
|
virtual |
Returns the progress of the firmware update, on a scale from 0 to 100. When the object is instantiated, the progress is zero. The value is updated during the firmware update process until the value of 100 is reached. The 100 value means that the firmware update was completed successfully. If an error occurs during the firmware update, a negative value is returned, and the error message can be retrieved with get_progressMessage.
Definition at line 1315 of file yocto_api.cpp.
|
virtual |
Returns the last progress message of the firmware update process. If an error occurs during the firmware update process, the error message is returned
Definition at line 1329 of file yocto_api.cpp.
|
static |
Returns a list of all the modules in "firmware update" mode. Only devices connected over USB are listed. For devices connected to a YoctoHub, you must connect yourself to the YoctoHub web interface.
Definition at line 1224 of file yocto_api.cpp.
|
virtual |
Starts the firmware update process. This method starts the firmware update process in background. This method returns immediately. You can monitor the progress of the firmware update with the get_progress() and get_progressMessage() methods.
On failure returns a negative error code.
Definition at line 1344 of file yocto_api.cpp.
|
protected |
Definition at line 843 of file yocto_api.h.
|
protected |
Definition at line 848 of file yocto_api.h.
|
protected |
Definition at line 846 of file yocto_api.h.
|
protected |
Definition at line 845 of file yocto_api.h.
|
protected |
Definition at line 844 of file yocto_api.h.
|
protected |
Definition at line 847 of file yocto_api.h.
|
protected |
Definition at line 841 of file yocto_api.h.
|
protected |
Definition at line 842 of file yocto_api.h.