com.ibm.wiotp.sdk.devicemgmt

Class DeviceFirmwareHandler



  • public abstract class DeviceFirmwareHandler
    extends Object

    If a Gateway (and devices behind Gateway) and directly connected device, supports firmware update, this abstract class DeviceFirmwareHandler should be extended by the Gateway/Device code.

    The downloadFirmware and updateFirmware must be implemented to handle

    • Constructor Detail

      • DeviceFirmwareHandler

        public DeviceFirmwareHandler()
    • Method Detail

      • downloadFirmware

        public abstract void downloadFirmware(DeviceFirmware deviceFirmware)

        Subclass must implement this method.

        If the Gateway or Device supports firmware download, subclass must add logic to download the firmware to the device. When done, set the state and status accordingly.

        Gateway must use the class DeviceFirmware to retrieve the DeviceType and DeviceId for which the firmware download request is received and act accordingly.

        Parameters:
        deviceFirmware - DeviceFirmware where the device code can set the Firmware Download progress
        See Also:
        DeviceFirmware
      • updateFirmware

        public abstract void updateFirmware(DeviceFirmware deviceFirmware)

        Subclass must implement this method.

        If the device supports firmware update, subclass should start updating the firmware on the device. When done, set the update status accordingly.

        Gateway must use the class DeviceFirmware to retrieve the DeviceType and DeviceId for which the firmware update request is received and act accordingly.

        Parameters:
        deviceFirmware - DeviceFirmware where the device code can set the Firmware Update progress
        See Also:
        DeviceFirmware

Copyright © 2019. All rights reserved.