com.ibm.wiotp.sdk.devicemgmt

Class DeviceInfo



  • public class DeviceInfo
    extends Resource
    Device Info as specified in Watson IoT Platform Device Model, The following attributes provide the information about the device,
    • serialNumber
    • manufacturer
    • model
    • deviceClass
    • description
    • fwVersion
    • hwVersion
    • descriptiveLocation
    • Method Detail

      • update

        public int update(DeviceInfo deviceInfo)
        Update the device with new values
        Parameters:
        deviceInfo - The device info to be updated
        Returns:
        code indicating whether the update is successful or not (200 means success, otherwise unsuccessful)
      • update

        public int update(com.google.gson.JsonElement deviceInfo)
        Update the device with new values
        Specified by:
        update in class Resource
        Parameters:
        deviceInfo - - JsonObject containing the new values
        Returns:
        code indicating whether the update is successful or not (200 means success, otherwise unsuccessful)
      • update

        public int update(com.google.gson.JsonElement deviceInfo,
                          boolean fireEvent)
        Update the device with new values
        Specified by:
        update in class Resource
        Parameters:
        deviceInfo - - JsonObject containing the new values
        fireEvent - - whether to fire an update or not
        Returns:
        code indicating whether the update is successful or not (200 means success, otherwise unsuccessful)
      • getSerialNumber

        public String getSerialNumber()
      • setSerialNumber

        public void setSerialNumber(String serialNumber)
      • getManufacturer

        public String getManufacturer()
      • setManufacturer

        public void setManufacturer(String manufacturer)
      • getModel

        public String getModel()
      • setModel

        public void setModel(String model)
      • getDeviceClass

        public String getDeviceClass()
      • setDeviceClass

        public void setDeviceClass(String deviceClass)
      • getDescription

        public String getDescription()
      • setDescription

        public void setDescription(String description)
      • getFwVersion

        public String getFwVersion()
      • setFwVersion

        public void setFwVersion(String fwVersion)
      • getHwVersion

        public String getHwVersion()
      • setHwVersion

        public void setHwVersion(String hwVersion)
      • getDescriptiveLocation

        public String getDescriptiveLocation()
      • setDescriptiveLocation

        public void setDescriptiveLocation(String descriptiveLocation)
      • toJsonObject

        public com.google.gson.JsonObject toJsonObject()
        Specified by:
        toJsonObject in class Resource
        Returns:
        JsonObject of the DeviceInfo
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        JSON string of the DeviceInfo

Copyright © 2019. All rights reserved.