Class BasicDeviceInfo

java.lang.Object
net.solarnetwork.domain.BasicDeviceInfo
All Implemented Interfaces:
DeviceInfo

public class BasicDeviceInfo extends Object implements DeviceInfo
Basic implementation of DeviceInfo.
Since:
1.75
Version:
1.0
Author:
matt
  • Constructor Details

    • BasicDeviceInfo

      public BasicDeviceInfo(String manufacturer, String modelName, String version, String serialNumber, LocalDate manufactureDate)
      Constructor.
      Parameters:
      manufacturer - the manufacturer
      modelName - the model name
      version - the version
      serialNumber - the serial number
      manufactureDate - the manufacture date
  • Method Details

    • builder

      public static BasicDeviceInfo.Builder builder()
      Creates builder to build BasicDeviceInfo.
      Returns:
      created builder
    • builderFrom

      public static BasicDeviceInfo.Builder builderFrom(DeviceInfo basicDeviceInfo)
      Creates a builder to build BasicDeviceInfo and initialize it with the given object.
      Parameters:
      basicDeviceInfo - to initialize the builder with
      Returns:
      created builder
    • getName

      public String getName()
      Description copied from interface: DeviceInfo
      Get the name of the device.
      Specified by:
      getName in interface DeviceInfo
      Returns:
      the name
    • getManufacturer

      public String getManufacturer()
      Description copied from interface: DeviceInfo
      Get the name of the manufacturer.
      Specified by:
      getManufacturer in interface DeviceInfo
      Returns:
      the manufacturer
    • getModelName

      public String getModelName()
      Description copied from interface: DeviceInfo
      Get the model name.
      Specified by:
      getModelName in interface DeviceInfo
      Returns:
      the model name
    • getVersion

      public String getVersion()
      Description copied from interface: DeviceInfo
      Get the model revision.
      Specified by:
      getVersion in interface DeviceInfo
      Returns:
      the version
    • getSerialNumber

      public String getSerialNumber()
      Description copied from interface: DeviceInfo
      Get the device serial number.
      Specified by:
      getSerialNumber in interface DeviceInfo
      Returns:
      the device serial number
    • getManufactureDate

      public LocalDate getManufactureDate()
      Description copied from interface: DeviceInfo
      Get the device manufacture date.
      Specified by:
      getManufactureDate in interface DeviceInfo
      Returns:
      the manufacture date
    • getDeviceAddress

      public String getDeviceAddress()
      Description copied from interface: DeviceInfo
      Get a deployment-specific location identifier, such as IP address or Modbus unit ID.
      Specified by:
      getDeviceAddress in interface DeviceInfo
      Returns:
      the device address