Package org.osgi.service.dal.functions
Interface Meter
- All Superinterfaces:
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:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Represents the metering consumption flow.static final String
Represents the metering production flow.static final String
Specifies the current consumption or production property name.static final String
Specifies the total consumption or production property name.static final String
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
Modifier and TypeMethodDescriptionReturns the current metering info.getTotal()
Returns the total metering info.Methods inherited from interface org.osgi.service.dal.Function
getOperationMetadata, getPropertyMetadata, getServiceProperty, getServicePropertyKeys
-
Field Details
-
FLOW_IN
Represents the metering consumption flow. It can be used asSERVICE_FLOW
property value.- See Also:
-
FLOW_OUT
Represents the metering production flow. It can be used asSERVICE_FLOW
property value.- See Also:
-
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:
-
PROPERTY_CURRENT
Specifies the current consumption or production property name. The eventable property can be read withgetCurrent()
getter.- See Also:
-
PROPERTY_TOTAL
Specifies the total consumption or production property name. The eventable property can be read withgetTotal()
getter.- See Also:
-
-
Method Details
-
getCurrent
Returns the current metering info. It's a getter method forPROPERTY_CURRENT
property.- Returns:
- The current metering info.
- Throws:
IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.- See Also:
-
getTotal
Returns the total metering info. It's a getter method forPROPERTY_TOTAL
property.- Returns:
- The total metering info.
- Throws:
IllegalStateException
- If this function service object has already been unregistered.DeviceException
- If an operation error is available.- See Also:
-