ifm3dpy.swupdater.SWUpdater

class ifm3dpy.swupdater.SWUpdater

Bases: object

Class for managing an instance of an swupdater

__init__(self: SWUpdater, cam: Device, cb: Callable[[float, str], None] | None = None, swupdate_recovery_port: int = 8080) None

Constructor

Parameters

Methods

__init__(self, cam[, cb, swupdate_recovery_port])

Constructor

flash_firmware(self, swu_file[, timeout_millis])

Flash the firmware .swu file to the device

reboot_to_productive(self)

Reboot the device in productive mode

reboot_to_recovery(self)

Reboot the device in Recovery Modes

wait_for_productive(self[, timeout_millis])

Waits and check for device in productive mode till timeout

wait_for_recovery(self[, timeout_millis])

Waits and check for device in recovery mode till timeout

flash_firmware(self: SWUpdater, swu_file: str, timeout_millis: int = 0) bool

Flash the firmware .swu file to the device

Parameter

swu_filestr

A .swu file to flash on the device

timeout_millislong

A timeout value in milliseconds

returns

True if firmware upload is successful

rtype

bool

reboot_to_productive(self: SWUpdater) None

Reboot the device in productive mode

reboot_to_recovery(self: SWUpdater) None

Reboot the device in Recovery Modes

wait_for_productive(self: SWUpdater, timeout_millis: int = 0) bool

Waits and check for device in productive mode till timeout

Parameter

timeout_millislong

A timeout value in milliseconds

returns

True if device in the productive mode

rtype

bool

wait_for_recovery(self: SWUpdater, timeout_millis: int = 0) bool

Waits and check for device in recovery mode till timeout

Parameter

timeout_millislong

A timeout value in milliseconds

returns

True if device in the recovery mode

rtype

bool