Class FirmwareService

All Implemented Interfaces:
CtxEventListener, ContextHandleAware, HandleAware, Ready, ReadyListener

public final class FirmwareService extends AbstractService
Service that handles updating firmware on update-capable devices.
Version:
2023-10-05
  • Method Details

    • updateFirmware

      public void updateFirmware(FirmwareUpdatableDevice device, FirmwareUpdater updater, FirmwareUpdateCallback callback)
      Queue the device for firmware update if needed. Devices will sit in this queue until firmware mgr finishes scanning all available firmware and then each device will be checked one at a time. If the firmware on a given device needs to be updated, that device will be put into the upgrade queue.
      Parameters:
      device - device to update
      updater - performs the actual update
      callback - callback to notify when device is ready
    • cancelUpdate

      public void cancelUpdate(FirmwareUpdatableDevice device)
      Called if a device is no longer valid. This will remove it from the update process, allowing a new instance of the device to queue a new job. If an update is in progress, it will be cancelled. It's the responsibility of the updater to leave the hardware in a valid state when cancelled.
    • queueUpdate

      public void queueUpdate(UpdateTask task)
      Queue an UpdateTask to be run. This should only be called with an UpdateTask provided to onUpdateRequired() where this method returned false. This provides a way for user code to start the otherwise blocked update. The most common reason for this flow is in the event that a user must confirm an update. This allows onUpdateRequired() to return false, user code can then hold the task and call queueUpdate() once the user confirms the update.
    • getHardwareService

      public HardwareService getHardwareService()