public final class BasicDeviceConfig extends BasicElementConfig<DeviceId>
Config.FieldPresence
GRID_X, GRID_Y, LATITUDE, LOC_TYPE, LONGITUDE, NAME, OWNER, RACK_ADDRESS, UI_TYPE, ZERO_THRESHOLD
ALLOWED
Constructor and Description |
---|
BasicDeviceConfig() |
Modifier and Type | Method and Description |
---|---|
DeviceKeyId |
deviceKeyId()
Returns the device key id.
|
BasicDeviceConfig |
deviceKeyId(DeviceKeyId deviceKeyId)
Sets the device key id.
|
java.lang.String |
driver()
Returns the device driver name.
|
BasicDeviceConfig |
driver(java.lang.String driverName)
Sets the driver name.
|
java.lang.String |
hwVersion()
Returns the device hardware version.
|
BasicDeviceConfig |
hwVersion(java.lang.String hwVersion)
Sets the device hardware version.
|
boolean |
isValid()
Indicates whether or not the backing JSON node contains valid data.
|
java.lang.String |
managementAddress()
Returns the device management ip (ip:port).
|
BasicDeviceConfig |
managementAddress(java.lang.String managementAddress)
Sets the device management ip (ip:port).
|
java.lang.String |
manufacturer()
Returns the device manufacturer.
|
BasicDeviceConfig |
manufacturer(java.lang.String manufacturerName)
Sets the device manufacturer.
|
java.lang.String |
serial()
Returns the device serial number.
|
BasicDeviceConfig |
serial(java.lang.String serial)
Sets the device serial number.
|
java.lang.String |
swVersion()
Returns the device software version.
|
BasicDeviceConfig |
swVersion(java.lang.String swVersion)
Sets the device software version.
|
Device.Type |
type()
Returns the device type.
|
BasicDeviceConfig |
type(Device.Type type)
Sets the device type.
|
geoCoordsSet, gridCoordsSet, gridX, gridX, gridY, gridY, latitude, latitude, locType, locType, longitude, longitude, name, name, owner, owner, rackAddress, rackAddress, uiType, uiType
isAllowed, isAllowed
apply, clear, get, get, get, get, get, get, getList, getList, hasField, hasField, hasFields, hasFields, hasOnlyFields, hasOnlyFields, init, isBoolean, isBoolean, isConnectPoint, isConnectPoint, isDecimal, isDecimal, isIntegralNumber, isIntegralNumber, isIpAddress, isIpAddress, isIpPrefix, isIpPrefix, isMacAddress, isMacAddress, isNumber, isNumber, isString, isString, isTpPort, isTpPort, isValidLength, key, node, setList, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subject, toString
public boolean isValid()
Config
Default implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid.
isValid
in class BasicElementConfig<DeviceId>
public Device.Type type()
public BasicDeviceConfig type(Device.Type type)
type
- device type overridepublic java.lang.String driver()
public BasicDeviceConfig driver(java.lang.String driverName)
driverName
- new driver name; null to clearpublic java.lang.String manufacturer()
public BasicDeviceConfig manufacturer(java.lang.String manufacturerName)
manufacturerName
- new manufacturer; null to clearpublic java.lang.String hwVersion()
public BasicDeviceConfig hwVersion(java.lang.String hwVersion)
hwVersion
- new hardware version; null to clearpublic java.lang.String swVersion()
public BasicDeviceConfig swVersion(java.lang.String swVersion)
swVersion
- new software version; null to clearpublic java.lang.String serial()
public BasicDeviceConfig serial(java.lang.String serial)
serial
- new serial number; null to clearpublic java.lang.String managementAddress()
public BasicDeviceConfig managementAddress(java.lang.String managementAddress)
managementAddress
- new device management address (ip:port); null to clearpublic DeviceKeyId deviceKeyId()
public BasicDeviceConfig deviceKeyId(DeviceKeyId deviceKeyId)
deviceKeyId
- the new device key id; null to clear