public interface ZCLAttribute extends ZCLAttributeInfo
Its extends ZCLAttributeInfo to add methods to read and write the ZCL
attribute from and to the ZigBee node with respectively the
getValue()
and setValue(Object)
methods.
Modifier and Type | Field and Description |
---|---|
static String |
ID
Property key for the optional attribute id of a ZigBee Event Listener.
|
Modifier and Type | Method and Description |
---|---|
Promise<Object> |
getValue()
Gets the current value of the attribute.
|
Promise<Void> |
setValue(Object value)
Sets the current value of the attribute.
|
getDataType, getId, getManufacturerCode, isManufacturerSpecific
static final String ID
Promise<Object> getValue()
As described in section 2.4.1.3 Effect on Receipt of the ZCL
specification, a Read attributes command can have the following
status: ZCLException.SUCCESS
,
ZCLException.UNSUPPORTED_ATTRIBUTE
, or
ZCLException.INVALID_VALUE
.
Promise.getValue()
is the
requested attribute value in the relevant Java data type (see
ZCLAttributeInfo.getDataType()
method and
ZCLDataTypeDescription.getJavaDataType()
) or in
byte[]
if ZCLAttributeInfo.getDataType()
returns null. The
response object is null if an
ZCLException.UNSUPPORTED_ATTRIBUTE
or
ZCLException.INVALID_VALUE
error occurs and the adequate
ZCLException is returned by Promise.getFailure()
.Promise<Void> setValue(Object value)
As described in section 2.4.3.3 Effect on Receipt of the ZCL
specification, a Write attributes command may return the
following status: ZCLException.SUCCESS
,
ZCLException.UNSUPPORTED_ATTRIBUTE
,
ZCLException.INVALID_DATA_TYPE
, ZCLException.READ_ONLY
,
ZCLException.INVALID_VALUE
, or
ZDPException.NOT_AUTHORIZED
.
value
- the Java value to set.Promise.getFailure()
returns null if the attribute value
has been successfully written. The adequate ZigBeeException is
returned otherwise.Copyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0