Interface ZigBeeGroup


public interface ZigBeeGroup
This interface represents a ZigBee Group.
"Consumers of this API must not implement this interface"
  • Field Details

    • ID

      static final String ID
      Key of the String containing 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

      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 representing the service PID of the ZigBeeEndpoint to 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 adequate ZigBeeException is returned otherwise.
    • leaveGroup

      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 representing the service PID of the ZigBeeEndpoint to 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 adequate ZigBeeException is returned otherwise.
    • groupcast

      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 - a cluster identifier.
      frame - a command frame sequence.
      Returns:
      a ZCLCommandResponseStream to collect every ZCL frame one after the other in case of multiple responses.
    • groupcast

      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 - 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 ZCLCommandResponseStream to collect every ZCL frame one after the other in case of multiple responses.