public interface PropertyMetadata
ACCESS
metadata key. Function properties can be accessed in three ways. Any
combinations between them are possible:
ACCESS_READABLE
- available for all properties, which can be read.
Function must provide a getter method for an access to the property value.ACCESS_WRITABLE
- available for all properties, which can be
modified. Function must provide a setter method for a modification of the
property value.ACCESS_EVENTABLE
- available for all properties, which can report
the property value. FunctionEvent
s are sent on property change.Function
,
PropertyMetadata
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS
Metadata key, which value represents the access to the function property.
|
static int |
ACCESS_EVENTABLE
Marks the eventable function properties.
|
static int |
ACCESS_READABLE
Marks the readable function properties.
|
static int |
ACCESS_WRITABLE
Marks the writable function properties.
|
static String |
DESCRIPTION
Metadata key, which value represents the property description.
|
static String |
UNITS
Metadata key, which value represents the property supported units.
|
Modifier and Type | Method and Description |
---|---|
FunctionData[] |
getEnumValues(String unit)
Returns the property possible values according to the specified unit.
|
FunctionData |
getMaxValue(String unit)
Returns the property maximum value according to the specified unit.
|
Map<String,?> |
getMetadata(String unit)
Returns metadata about the function property or operation parameter.
|
FunctionData |
getMinValue(String unit)
Returns the property minimum value according to the specified unit.
|
FunctionData |
getStep(String unit)
Returns the difference between two values in series.
|
static final int ACCESS_READABLE
ACCESS
. The readable access mandates function to
provide a property getter method.Function
,
Constant Field Valuesstatic final int ACCESS_WRITABLE
ACCESS
. The writable access mandates function to
provide a property setter methods.Function
,
Constant Field Valuesstatic final int ACCESS_EVENTABLE
ACCESS
.Function
,
Constant Field Valuesstatic final String ACCESS
Integer
type. The bitmap can be
any combination of:
For example, value Integer(3)
means that the property is readable
and writable, but not eventable.
The property access is available only for function properties and it's missing for the operation parameters.
static final String DESCRIPTION
java.lang.String
.static final String UNITS
java.lang.String[]
. The array first
element at index 0
represents the default unit. Each unit must
follow those rules:
°
).W/(m² sr)
.SIUnits
interface.Map<String,?> getMetadata(String unit)
java.util.Map
result must be of
java.lang.String
type. Possible keys:
DESCRIPTION
- doesn't depend on the given unit.ACCESS
- available only for function property and missing
for function operation parameters. It doesn't depend on the given unit.UNITS
- doesn't depend on the given unit.unit
- The unit to align the metadata if it's applicable. It can be
null, which means that the default unit will be used.null
if no such metadata is
available.FunctionData getStep(String unit)
unit
- The unit to align the step, can be null
.null
if no
step is supported.IllegalArgumentException
- If the unit is not supported.FunctionData[] getEnumValues(String unit)
null
, the values set is aligned to the default unit.
If there is no such set of supported values, null
is returned.
The values must be sorted in increasing order.unit
- The unit to align the supported values, can be null
.null
if no such values are supported. The values must be
sorted in increasing order.IllegalArgumentException
- If the unit is not supported.FunctionData getMinValue(String unit)
null
, the minimum value is aligned to the default
unit. If there is no minimum value, null
is returned.unit
- The unit to align the minimum value, can be null
.null
if no minimum value is supported.IllegalArgumentException
- If the unit is not supported.FunctionData getMaxValue(String unit)
null
, the maximum value is aligned to the default
unit. If there is no maximum value, null
is returned.unit
- The unit to align the maximum value, can be null
.null
if no maximum value is supported.IllegalArgumentException
- If the unit is not supported.Copyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0