public abstract class DeviceItem extends Object implements Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes it children.
|
List<Capability> |
getCapabilities()
List of capabilities
|
Capability |
getCapability(long id)
Returns the capability with the given id or null if not found.
|
Long |
getCapabilityCurrentValueAsLong(long id)
Returns the current value as long of the capability with the given id or null if it does not exist
|
String |
getCapabilityCurrentValueAsString(long id)
Returns the current value as string of the capability with the given id or null if it does not exist
|
Object |
getCapabilityValue(long capId) |
Long |
getCapabilityValueAsLong(long id)
Returns the new value if it has been set otherwise the current value.
|
String |
getCapabilityValueAsString(long id)
Returns the new value if it has been set otherwise the current value.
|
abstract String |
getDescription()
Description (optional)
|
abstract String |
getId()
ID of device or functional unit
|
abstract String |
getName()
Name (optional)
|
boolean |
isCapabilityDirty() |
abstract List<Capability> |
refreshCapabilities()
Refresh capabilities from the device.
|
void |
setCapabilityDirty(boolean capabilityDirty) |
void |
setCapabilityValue(long capId,
Object value) |
public abstract String getId()
public abstract String getName()
public abstract String getDescription()
public abstract List<Capability> refreshCapabilities() throws ScanException
ScanException
public List<Capability> getCapabilities()
public Capability getCapability(long id)
id
- search idpublic String getCapabilityCurrentValueAsString(long id)
id
- capability idpublic Long getCapabilityCurrentValueAsLong(long id)
id
- capability idpublic String getCapabilityValueAsString(long id)
id
- capability idpublic Long getCapabilityValueAsLong(long id)
id
- capability idpublic Object getCapabilityValue(long capId)
public void setCapabilityValue(long capId, Object value)
public boolean isCapabilityDirty()
public void setCapabilityDirty(boolean capabilityDirty)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2014 LAB Asprise. All Rights Reserved.