ifm3dpy.swupdater.SWUpdater

class ifm3dpy.swupdater.SWUpdater

Bases: None

Class for managing an instance of an swupdater

__init__(self: ifm3dpy.swupdater.SWUpdater, cam: ifm3dpy.device.Device, cb: Optional[Callable[[float, str], None]] = None, swupdate_recovery_port: int = 8080) None

Constructor

Parameters
  • cam (ifm3dpy.Camera) – The camera instance to grab frames from

  • cb (callback function with parameters (float, string)) – A function for progress of the update

  • swupdate_recovery_port (uint16_t) – The Swupdate communication port

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: ifm3dpy.swupdater.SWUpdater, swu_file: str, timeout_millis: int = 0) bool

Flash the firmware .swu file to the device

Parameter

swu_filestring

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: ifm3dpy.swupdater.SWUpdater) None

Reboot the device in productive mode

reboot_to_recovery(self: ifm3dpy.swupdater.SWUpdater) None

Reboot the device in Recovery Modes

wait_for_productive(self: ifm3dpy.swupdater.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: ifm3dpy.swupdater.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