Package net.solarnetwork.domain
Class BasicDeviceInfo
java.lang.Object
net.solarnetwork.domain.BasicDeviceInfo
- All Implemented Interfaces:
DeviceInfo
Basic implementation of
DeviceInfo.- Since:
- 1.75
- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface net.solarnetwork.domain.DeviceInfo
DEVICE_INFO_METADATA_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BasicDeviceInfo.Builderbuilder()Creates builder to buildBasicDeviceInfo.static BasicDeviceInfo.BuilderbuilderFrom(DeviceInfo basicDeviceInfo) Creates a builder to buildBasicDeviceInfoand initialize it with the given object.Get a deployment-specific location identifier, such as IP address or Modbus unit ID.Get the device manufacture date.Get the name of the manufacturer.Get the model name.getName()Get the name of the device.Get the device serial number.Get the model revision.
-
Constructor Details
-
BasicDeviceInfo
public BasicDeviceInfo(String manufacturer, String modelName, String version, String serialNumber, LocalDate manufactureDate) Constructor.- Parameters:
manufacturer- the manufacturermodelName- the model nameversion- the versionserialNumber- the serial numbermanufactureDate- the manufacture date
-
-
Method Details
-
builder
Creates builder to buildBasicDeviceInfo.- Returns:
- created builder
-
builderFrom
Creates a builder to buildBasicDeviceInfoand initialize it with the given object.- Parameters:
basicDeviceInfo- to initialize the builder with- Returns:
- created builder
-
getName
Description copied from interface:DeviceInfoGet the name of the device.- Specified by:
getNamein interfaceDeviceInfo- Returns:
- the name
-
getManufacturer
Description copied from interface:DeviceInfoGet the name of the manufacturer.- Specified by:
getManufacturerin interfaceDeviceInfo- Returns:
- the manufacturer
-
getModelName
Description copied from interface:DeviceInfoGet the model name.- Specified by:
getModelNamein interfaceDeviceInfo- Returns:
- the model name
-
getVersion
Description copied from interface:DeviceInfoGet the model revision.- Specified by:
getVersionin interfaceDeviceInfo- Returns:
- the version
-
getSerialNumber
Description copied from interface:DeviceInfoGet the device serial number.- Specified by:
getSerialNumberin interfaceDeviceInfo- Returns:
- the device serial number
-
getManufactureDate
Description copied from interface:DeviceInfoGet the device manufacture date.- Specified by:
getManufactureDatein interfaceDeviceInfo- Returns:
- the manufacture date
-
getDeviceAddress
Description copied from interface:DeviceInfoGet a deployment-specific location identifier, such as IP address or Modbus unit ID.- Specified by:
getDeviceAddressin interfaceDeviceInfo- Returns:
- the device address
-