Top Description Fields Methods
org.osgi.service.zigbee

public Interface ZCLAttribute

extends ZCLAttributeInfo
Imports
org.osgi.service.zigbee.descriptions.ZCLDataTypeDescription, org.osgi.util.promise.Promise

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.

Author
$Id: ebc39b6d25313428b34a37d4bcb39b89ad3ad657 $

Field Summary

Modifier and TypeField and Description
public static final String
ID

Hides org.osgi.service.zigbee.ZCLAttributeInfo.ID.

Property key for the optional attribute id of a ZigBee Event Listener.

Method Summary

Modifier and TypeMethod and Description
public Promise<Object>

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 (see getDataType() method and ZCLDataTypeDescription#getJavaDataType()) or in byte[] if 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() .
getValue
()

Gets the current value of the attribute.

public Promise<Void>

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.
setValue
(Object
the Java value to set.
value
)

Sets the current value of the attribute.

Inherited from org.osgi.service.zigbee.ZCLAttributeInfo:
getDataTypegetIdgetManufacturerCodeisManufacturerSpecific

Field Detail

IDback to summary
public static final String ID

Hides org.osgi.service.zigbee.ZCLAttributeInfo.ID.

Property key for the optional attribute id of a ZigBee Event Listener.

Method Detail

getValueback to summary
public Promise<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, or ZCLException#INVALID_VALUE.

Returns:Promise<Object>

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 (see getDataType() method and ZCLDataTypeDescription#getJavaDataType()) or in byte[] if 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() .

setValueback to summary
public Promise<Void> setValue(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, or ZDPException#NOT_AUTHORIZED.

Parameters
value:Object

the Java value to set.

Returns:Promise<Void>

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.