Package org.osgi.service.zigbee
Interface ZCLAttribute
-
- All Superinterfaces:
ZCLAttributeInfo
public interface ZCLAttribute extends 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()andsetValue(Object)methods.- Author:
- $Id: ebc39b6d25313428b34a37d4bcb39b89ad3ad657 $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringIDProperty key for the optional attribute id of a ZigBee Event Listener.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Promise<java.lang.Object>getValue()Gets the current value of the attribute.Promise<java.lang.Void>setValue(java.lang.Object value)Sets the current value of the attribute.-
Methods inherited from interface org.osgi.service.zigbee.ZCLAttributeInfo
getDataType, getId, getManufacturerCode, isManufacturerSpecific
-
-
-
-
Field Detail
-
ID
static final java.lang.String ID
Property key for the optional attribute id of a ZigBee Event Listener.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValue
Promise<java.lang.Object> 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_ATTRIBUTEorZCLException.INVALID_VALUEerror occurs and the adequate ZCLException is returned byPromise.getFailure().
-
setValue
Promise<java.lang.Void> setValue(java.lang.Object value)
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.
-
-