Package org.osgi.service.zigbee
Interface ZigBeeGroup
public interface ZigBeeGroup
This interface represents a ZigBee Group.
- "Consumers of this API must not implement this interface"
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintReturns the 16-bit group address.Sends a ZCL frame to the group represented by this service.Sends a ZCL frame to the ZigBee group represented by this service.Requests an endpoint to join this group.leaveGroup(String pid) Requests an endpoint to leave this group.
-
Field Details
-
ID
Key of theStringcontaining the Group Address of the device.It is a mandatory property for this service.
- See Also:
-
-
Method Details
-
getGroupAddress
int getGroupAddress()Returns the 16-bit group address.- Returns:
- the 16-bit group address.
-
joinGroup
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_PARAMETERorAPSException.TABLE_FULL. When the joining is performed remotely on an importedZigBeeEndpoint, 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 (seeZCLException).- Parameters:
pid-Stringrepresenting the service PID of theZigBeeEndpointto add to this Group.- Returns:
- A promise representing the completion of this asynchronous call.
Promise.getFailure()returns null if the cluster has been successfully bound. The adequateZigBeeExceptionis returned otherwise.
-
leaveGroup
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_GROUPorAPSException.INVALID_PARAMETER. When the command is invoked remotely on an importedZigBeeEndpoint, 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 (seeZCLException).- Parameters:
pid-Stringrepresenting the service PID of theZigBeeEndpointto remove from this Group.- Returns:
- A promise representing the completion of this asynchronous call.
Promise.getFailure()returns null if the cluster has been successfully bound. The adequateZigBeeExceptionis returned otherwise.
-
groupcast
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- a cluster identifier.frame- a command frame sequence.- Returns:
- a
ZCLCommandResponseStreamto collect every ZCL frame one after the other in case of multiple responses.
-
groupcast
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- a cluster identifier.frame- a command frame sequence.exportedServicePID- : the source endpoint of the command request. In targeted situations, the source endpoint is the valid service PID of an exported endpoint.- Returns:
- a
ZCLCommandResponseStreamto collect every ZCL frame one after the other in case of multiple responses.
-