Package org.osgi.service.dal.functions
Interface Meter
-
- All Superinterfaces:
Function
public interface Meter extends Function
Meter
function can measure metering information. The function provides these properties:PROPERTY_CURRENT
- eventable property accessible withgetCurrent()
getter;PROPERTY_TOTAL
- eventable property accessible withgetTotal()
getter.
The sensor type can be:
Types.PRESSURE
Types.GAS
Types.POWER
Types.WATER
Types.HEAT
Types.COLD
- other type defined in
Types
- custom - vendor specific type
- See Also:
LevelData
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FLOW_IN
Represents the metering consumption flow.static java.lang.String
FLOW_OUT
Represents the metering production flow.static java.lang.String
PROPERTY_CURRENT
Specifies the current consumption or production property name.static java.lang.String
PROPERTY_TOTAL
Specifies the total consumption or production property name.static java.lang.String
SERVICE_FLOW
The service property value contains the metering flow.-
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
getCurrent()
Returns the current metering info.LevelData
getTotal()
Returns the total metering info.-
Methods inherited from interface org.osgi.service.dal.Function
getOperationMetadata, getPropertyMetadata, getServiceProperty, getServicePropertyKeys
-
-
-
-
Field Detail
-
FLOW_IN
static final java.lang.String FLOW_IN
Represents the metering consumption flow. It can be used asSERVICE_FLOW
property value.- See Also:
- Constant Field Values
-
FLOW_OUT
static final java.lang.String FLOW_OUT
Represents the metering production flow. It can be used asSERVICE_FLOW
property value.- See Also:
- Constant Field Values
-
SERVICE_FLOW
static final java.lang.String SERVICE_FLOW
The service property value contains the metering flow. It's an optional property and available only if it's supported by the meter. The value type isjava.lang.String
. Possible property values:- See Also:
- Constant Field Values
-
PROPERTY_CURRENT
static final java.lang.String PROPERTY_CURRENT
Specifies the current consumption or production property name. The eventable property can be read withgetCurrent()
getter.- See Also:
- Constant Field Values
-
PROPERTY_TOTAL
static final java.lang.String PROPERTY_TOTAL
Specifies the total consumption or production property name. The eventable property can be read withgetTotal()
getter.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCurrent
LevelData getCurrent() throws DeviceException
Returns the current metering info. It's a getter method forPROPERTY_CURRENT
property.- Returns:
- The current metering info.
- Throws:
java.lang.IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.- See Also:
LevelData
-
getTotal
LevelData getTotal() throws DeviceException
Returns the total metering info. It's a getter method forPROPERTY_TOTAL
property.- Returns:
- The total metering info.
- Throws:
java.lang.IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.- See Also:
LevelData
-
-