Package org.osgi.service.dal.functions
Interface MultiLevelControl
-
- All Superinterfaces:
Function
public interface MultiLevelControl extends Function
MultiLevelControl
function provides multi-level control support. The eventable function level is accessible withgetData()
getter andsetData(BigDecimal, String)
setter.The control type can be:
Types.LIGHT
Types.TEMPERATURE
Types.FLOW
Types.PRESSURE
Types.HUMIDITY
Types.GAS
Types.SMOKE
Types.DOOR
Types.WINDOW
Types.LIQUID
Types.POWER
Types.NOISINESS
- other type defined in
Types
- custom - vendor specific type
- See Also:
LevelData
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_DATA
Specifies the level property name.-
Fields inherited from interface org.osgi.service.dal.Function
SERVICE_DESCRIPTION, SERVICE_DEVICE_UID, SERVICE_OPERATION_NAMES, SERVICE_PROPERTY_NAMES, SERVICE_REFERENCE_UIDS, SERVICE_TYPE, SERVICE_UID, SERVICE_VERSION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LevelData
getData()
ReturnsMultiLevelControl
level.void
setData(java.math.BigDecimal level, java.lang.String unit)
SetsMultiLevelControl
level according to the specified unit.-
Methods inherited from interface org.osgi.service.dal.Function
getOperationMetadata, getPropertyMetadata, getServiceProperty, getServicePropertyKeys
-
-
-
-
Field Detail
-
PROPERTY_DATA
static final java.lang.String PROPERTY_DATA
Specifies the level property name. The eventable property can be read withgetData()
getter and can be set withsetData(BigDecimal, String)
setters.- See Also:
- Constant Field Values
-
-
Method Detail
-
getData
LevelData getData() throws DeviceException
ReturnsMultiLevelControl
level. It's a getter method forPROPERTY_DATA
property.- Returns:
MultiLevelControl
level.- Throws:
java.lang.IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.- See Also:
LevelData
-
setData
void setData(java.math.BigDecimal level, java.lang.String unit) throws DeviceException
SetsMultiLevelControl
level according to the specified unit. It's a setter method forPROPERTY_DATA
property.- Parameters:
level
- The new control level.unit
- The level unit.- Throws:
java.lang.IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.java.lang.IllegalArgumentException
- If there is an invalid argument.
-
-