Top Description Fields Methods
org.osgi.service.zigbee

public Interface ZigBeeGroup

Imports
org.osgi.util.promise.Promise

This interface represents a ZigBee Group.
Author
$Id: b7a86ef850d024bc378cb4bd9d69a62231a16618 $

Field Summary

Modifier and TypeField and Description
public static final String
ID

Key of the String containing the Group Address of the device.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the 16-bit group address.
getGroupAddress
()

Returns the 16-bit group address.

public ZCLCommandResponseStream

Returns:

a ZCLCommandResponseStream to collect every ZCL frame one after the other in case of multiple responses.
groupcast
(int
a cluster identifier.
clusterId
,
ZCLFrame
a command frame sequence.
frame
)

Sends a ZCL frame to the group represented by this service.

public ZCLCommandResponseStream

Returns:

a ZCLCommandResponseStream to collect every ZCL frame one after the other in case of multiple responses.
groupcast
(int
a cluster identifier.
clusterId
,
ZCLFrame
a command frame sequence.
frame
,
String
: the source endpoint of the command request. In targeted situations, the source endpoint is the valid service PID of an exported endpoint.
exportedServicePID
)

Sends a ZCL frame to the ZigBee group represented by this service.

public Promise<Void>

Returns:

A promise representing the completion of this asynchronous call. Promise#getFailure() returns null if the cluster has been successfully bound. The adequate ZigBeeException is returned otherwise.
joinGroup
(String
String representing the service PID of the ZigBeeEndpoint to add to this Group.
pid
)

Requests an endpoint to join this group.

public Promise<Void>

Returns:

A promise representing the completion of this asynchronous call. Promise#getFailure() returns null if the cluster has been successfully bound. The adequate ZigBeeException is returned otherwise.
leaveGroup
(String
String representing the service PID of the ZigBeeEndpoint to remove from this Group.
pid
)

Requests an endpoint to leave this group.

Field Detail

IDback to summary
public static final String ID

Key of the String containing the Group Address of the device.

It is a mandatory property for this service.

Method Detail

getGroupAddressback to summary
public int getGroupAddress()

Returns the 16-bit group address.

Returns:int

the 16-bit group address.

groupcastback to summary
public ZCLCommandResponseStream groupcast(int clusterId, ZCLFrame frame)

Sends a ZCL frame to the group represented by this service. The returned stream will provide the invocation response(s) in an asynchronous way.

The source endpoint is not specified in this method call. To send the appropriate message on the network, the base driver must generate a source endpoint. The latter must not correspond to any exported endpoint.

Parameters
clusterId:int

a cluster identifier.

frame:ZCLFrame

a command frame sequence.

Returns:ZCLCommandResponseStream

a ZCLCommandResponseStream to collect every ZCL frame one after the other in case of multiple responses.

groupcastback to summary
public ZCLCommandResponseStream groupcast(int clusterId, ZCLFrame frame, String exportedServicePID)

Sends a ZCL frame to the ZigBee group represented by this service. The returned stream will provide the invocation response(s) in an asynchronous way.

This method is to be used by applications when the targeted device has to distinguish between source endpoints of the message. For instance, alarms cluster (see 3.11 Alarms Cluster in [ZCL]) generated events are differently interpreted if they come from the oven or from the intrusion alert system.

Parameters
clusterId:int

a cluster identifier.

frame:ZCLFrame

a command frame sequence.

exportedServicePID:String

: the source endpoint of the command request. In targeted situations, the source endpoint is the valid service PID of an exported endpoint.

Returns:ZCLCommandResponseStream

a ZCLCommandResponseStream to collect every ZCL frame one after the other in case of multiple responses.

joinGroupback to summary
public Promise<Void> joinGroup(String pid)

Requests an endpoint to join this group. This method may be invoked on exported and imported endpoints. In the former case, the ZigBee Base Driver should rely on the APSME-ADD-GROUP API defined by the ZigBee Specification, or it will use the proper commands of the Groups cluster of the ZigBee Specification Library. As described in "Table 2.15 APSME-ADD-GROUP.confirm Parameters" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, an add_group request can have the following status: APSException#SUCCESS, APSException#INVALID_PARAMETER or APSException#TABLE_FULL. When the joining is performed remotely on an imported ZigBeeEndpoint, it may also fail because the command is not supported by the remote endpoint, or because the remote device cannot perform the operation at the moment (see ZCLException).

Parameters
pid:String

String representing the service PID of the ZigBeeEndpoint to add to this Group.

Returns:Promise<Void>

A promise representing the completion of this asynchronous call. Promise#getFailure() returns null if the cluster has been successfully bound. The adequate ZigBeeException is returned otherwise.

leaveGroupback to summary
public Promise<Void> leaveGroup(String pid)

Requests an endpoint to leave this group. This method may be invoked on exported and imported endpoints. In the former case, the ZigBee Base Driver should rely on the APSME-REMOVE-GROUP API defined by the ZigBee Specification, or it will use the proper commands of the Groups cluster of the ZigBee Specification Library. As described in "Table 2.17 APSME-REMOVE-GROUP.confirm Parameters" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, a remove_group request can have the following status: APSException#SUCCESS, APSException#INVALID_GROUP or APSException#INVALID_PARAMETER. When the command is invoked remotely on an imported ZigBeeEndpoint, it may also fail because the command is not supported by the remote endpoint, or because the remote device cannot perform the operation at the moment (see ZCLException).

Parameters
pid:String

String representing the service PID of the ZigBeeEndpoint to remove from this Group.

Returns:Promise<Void>

A promise representing the completion of this asynchronous call. Promise#getFailure() returns null if the cluster has been successfully bound. The adequate ZigBeeException is returned otherwise.