public class YFirmwareUpdate extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
_firmwarepath |
protected boolean |
_force |
protected int |
_progress |
protected int |
_progress_c |
protected String |
_progress_msg |
protected int |
_restore_step |
protected String |
_serial |
protected byte[] |
_settings |
Constructor and Description |
---|
YFirmwareUpdate(String serial,
String path,
byte[] settings) |
YFirmwareUpdate(YAPIContext yctx,
String serial,
String path,
byte[] settings) |
YFirmwareUpdate(YAPIContext yctx,
String serial,
String path,
byte[] settings,
boolean force) |
Modifier and Type | Method and Description |
---|---|
int |
_processMore(int newupdate) |
static String |
CheckFirmware(String serial,
String path,
int minrelease)
Test if the byn file is valid for this module.
|
int |
get_progress()
Returns the progress of the firmware update, on a scale from 0 to 100.
|
String |
get_progressMessage()
Returns the last progress message of the firmware update process.
|
static ArrayList<String> |
GetAllBootLoaders()
Returns a list of all the modules in "firmware update" mode.
|
static ArrayList<String> |
GetAllBootLoadersInContext(YAPIContext yctx)
Returns a list of all the modules in "firmware update" mode.
|
int |
startUpdate()
Starts the firmware update process.
|
protected String _serial
protected byte[] _settings
protected String _firmwarepath
protected String _progress_msg
protected int _progress_c
protected int _progress
protected int _restore_step
protected boolean _force
public YFirmwareUpdate(YAPIContext yctx, String serial, String path, byte[] settings, boolean force)
public YFirmwareUpdate(YAPIContext yctx, String serial, String path, byte[] settings)
public int _processMore(int newupdate)
public static ArrayList<String> GetAllBootLoaders()
public static ArrayList<String> GetAllBootLoadersInContext(YAPIContext yctx)
yctx
- : a YAPI context.public static String CheckFirmware(String serial, String path, int minrelease)
serial
- : the serial number of the module to updatepath
- : the path of a byn file or a directory that contains byn filesminrelease
- : a positive integerpublic int get_progress()
public String get_progressMessage()
public int startUpdate()
Copyright © 2020. All rights reserved.