Package org.osgi.service.zigbee
Interface ZCLAttribute
- All Superinterfaces:
ZCLAttributeInfo
This interface represents a ZCLAttribute.
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.
-
Field Summary
-
Method Summary
Methods inherited from interface org.osgi.service.zigbee.ZCLAttributeInfo
getDataType, getId, getManufacturerCode, isManufacturerSpecific
-
Field Details
-
ID
Property key for the optional attribute id of a ZigBee Event Listener.- See Also:
-
-
Method Details
-
getValue
Gets the current value of the attribute.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
, orZCLException.INVALID_VALUE
.- Returns:
- A promise representing the completion of this asynchronous call.
The response object returned by
Promise.getValue()
is the requested attribute value in the relevant Java data type (seeZCLAttributeInfo.getDataType()
method andZCLDataTypeDescription.getJavaDataType()
) or inbyte[]
ifZCLAttributeInfo.getDataType()
returns null. The response object is null if anZCLException.UNSUPPORTED_ATTRIBUTE
orZCLException.INVALID_VALUE
error occurs and the adequate ZCLException is returned byPromise.getFailure()
.
-
setValue
Sets the current value of the attribute.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
, orZDPException.NOT_AUTHORIZED
.- Parameters:
value
- the Java value to set.- Returns:
- A promise representing the completion of this asynchronous call.
Promise.getFailure()
returns null if the attribute value has been successfully written. The adequate ZigBeeException is returned otherwise.
-