Package org.osgi.service.dal.functions
Interface MultiLevelControl
- All Superinterfaces:
Function
MultiLevelControl
function provides multi-level control support. The
eventable function level is accessible with getData()
getter and
setData(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:
-
Field Summary
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
Modifier and TypeMethodDescriptiongetData()
ReturnsMultiLevelControl
level.void
setData
(BigDecimal level, String unit) SetsMultiLevelControl
level according to the specified unit.Methods inherited from interface org.osgi.service.dal.Function
getOperationMetadata, getPropertyMetadata, getServiceProperty, getServicePropertyKeys
-
Field Details
-
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:
-
-
Method Details
-
getData
ReturnsMultiLevelControl
level. It's a getter method forPROPERTY_DATA
property.- Returns:
MultiLevelControl
level.- Throws:
IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.- See Also:
-
setData
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:
IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.IllegalArgumentException
- If there is an invalid argument.
-