Top Description Fields Methods
org.osgi.service.zigbee

public Interface ZigBeeEndpoint

Imports
java.math.BigInteger, java.util.List, org.osgi.service.zigbee.descriptors.ZigBeeSimpleDescriptor, org.osgi.util.promise.Promise

This interface represents a ZigBee EndPoint. A ZigBeeEndpoint must be registered as a OSGi service with ZigBeeNode.IEEE_ADDRESS, and ZigBeeEndpoint.ENDPOINT_ID properties.
Author
$Id: 9f84b0b443451f467e2e117a4c86aa64fb5c747b $

Field Summary

Modifier and TypeField and Description
public static final String
DEVICE_CATEGORY

Constant used by all ZigBee devices indicating the device category.

public static final String
DEVICE_ID

Property containing the application device identifier.

public static final String
DEVICE_VERSION

Property containing the application device version.

public static final String
ENDPOINT_ID

Property containing the EndPoint ID of the device.

public static final String
HOST_PID

Property containing the ZigBeeHost's pid.

public static final String
INPUT_CLUSTERS

Property containing a list of input clusters.

public static final String
OUTPUT_CLUSTERS

Property containing a list of output clusters.

public static final String
PROFILE_ID

Property containing the application profile identifier also contained in the ZigBee Simple Descriptor.

public static final String
ZIGBEE_EXPORT

Property used to mark if a ZigBeeEndPoint service is an exported one or not.

Method Summary

Modifier and TypeMethod and Description
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 ZigBeeEndpoint is returned otherwise.
bind
(String
the PID of the endpoint to bind to
servicePid
,
int
the cluster identifier to bind to
clusterId
)

Adds the following entry in the Binding Table of the device:

this.getNodeAddress(), this.getId(), clusterId, device.getNodeAddress(), device.getId()

As described in "Table 2.7 APSME-BIND.confirm Parameters" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, a binding request can have the following results: APSException#SUCCESS, APSException#ILLEGAL_REQUEST, APSException#TABLE_FULL, APSException#NOT_SUPPORTED.

public Promise<List<String>>

Returns:

A promise representing the completion of this asynchronous call. Promise#getValue() returns a List of the bound endpoint service PIDs if the command is successful. The response object is null and the adequate APSException is returned by Promise#getFailure() otherwise.
getBoundEndPoints
(int
the cluster identifier of the targeted bindings.
clusterId
)

Returns bound endpoints (identified by their service PIDs) on a specific cluster ID. It is implemented on the base driver with Mgmt_Bind_req command.

public ZCLCluster

Returns:

the client(output) cluster identified by the cluster identifier, or null if the given id is not listed in the simple descriptor.
getClientCluster
(int
The client(output) cluster identifier.
clientClusterId
)

Returns the client cluster identified by the cluster identifier.

public ZCLCluster[]

Returns:

an array of client (output) clusters, returns an empty array if does not provides any clients clusters.
getClientClusters
()

Returns an array of client (output) clusters.

public short

Returns:

the identifier of this endpoint, value ranges from 1 to 240.
getId
()

Returns the identifier of this endpoint, that is the Endpoint ID.

public BigInteger

Returns:

the IEEE Address of the node containing this endpoint.
getNodeAddress
()

Returns the IEEE Address of the node containing this endpoint.

public ZCLCluster

Returns:

the server (input) cluster identified by the given identifier, or null if the given id is not listed in the simple descriptor.
getServerCluster
(int
The server(input) cluster identifier.
serverClusterId
)

Returns the server (input) cluster identified by the given identifier.

public ZCLCluster[]

Returns:

an array of server (input) clusters, returns an empty array if it does not provide any server cluster.
getServerClusters
()

Returns an array of server (input) clusters.

public Promise<ZigBeeSimpleDescriptor>

Returns:

A promise representing the completion of this asynchronous call. Promise#getValue() returns the node simple descriptor ZigBeeSimpleDescriptor in case of success and Promise#getFailure() returns the adequate ZDPException otherwise.
getSimpleDescriptor
()

Returns the simple descriptor of this endpoint.

public void
notExported(ZigBeeException
A device ZigBeeException the occurred exception.
e
)

Notifies that the base driver is unable to export this endpoint.

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 APSException is returned otherwise.
unbind
(String
The pid of the service to unbind.
servicePid
,
int
The cluster identifier to unbind.
clusterId
)

Removes the following entry in the Binding Table of the device if it exists:

this.getNodeAddress(), this.getId(), clusterId, device.getNodeAddress(), device.getId()

As described in "Table 2.9 APSME-UNBIND.confirm Parameters" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, an unbind request can have the following results: APSException#SUCCESS, APSException#ILLEGAL_REQUEST, APSException#INVALID_BINDING.

Field Detail

DEVICE_CATEGORYback to summary
public static final String DEVICE_CATEGORY

Constant used by all ZigBee devices indicating the device category. It is a mandatory service property for this service.

DEVICE_IDback to summary
public static final String DEVICE_ID

Property containing the application device identifier. This identifier is also contained in the ZigBee Simple Descriptor. This property is of type Integer.

It is mandatory property for this service.

DEVICE_VERSIONback to summary
public static final String DEVICE_VERSION

Property containing the application device version. The application device version is also contained in the ZigBee endpoint Simple Descriptor. This property is of type Byte.

It is mandatory property for this service.

ENDPOINT_IDback to summary
public static final String ENDPOINT_ID

Property containing the EndPoint ID of the device. This property is of type Short and its value must be in the range allowed by the ZigBee specifications for Zigbee endpoints identifiers.

It is mandatory service property for ZigBeeEndpoint services.

HOST_PIDback to summary
public static final String HOST_PID

Property containing the ZigBeeHost's pid. This property is of type String.

The ZigBee local host identifier is intended to uniquely identify the ZigBee local host, since there could be many hosts on the same platform.

All the endpoints that belong to a specific network MUST specify the value of the associated host pid. It is mandatory for imported endpoints, optional for exported endpoints.

INPUT_CLUSTERSback to summary
public static final String INPUT_CLUSTERS

Property containing a list of input clusters. This list is contained also in the ZigBee Simple Descriptor returned by the ZigBeeEndpoint service. This property is of type int[].

It is mandatory service property for this service.

OUTPUT_CLUSTERSback to summary
public static final String OUTPUT_CLUSTERS

Property containing a list of output clusters. This list is contained also in the ZigBee Simple Descriptor of the ZigBeeEndpoint service. This property is of type int[].

It is a mandatory service property for this service.

PROFILE_IDback to summary
public static final String PROFILE_ID

Property containing the application profile identifier also contained in the ZigBee Simple Descriptor. This property is of type Integer.

It is mandatory service property for this service.

ZIGBEE_EXPORTback to summary
public static final String ZIGBEE_EXPORT

Property used to mark if a ZigBeeEndPoint service is an exported one or not. Imported endpoints do not have this property set. This service property requires no specific values.

Method Detail

bindback to summary
public Promise<Void> bind(String servicePid, int clusterId)

Adds the following entry in the Binding Table of the device:

this.getNodeAddress(), this.getId(), clusterId, device.getNodeAddress(), device.getId()

As described in "Table 2.7 APSME-BIND.confirm Parameters" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, a binding request can have the following results: APSException#SUCCESS, APSException#ILLEGAL_REQUEST, APSException#TABLE_FULL, APSException#NOT_SUPPORTED.

Parameters
servicePid:String

the PID of the endpoint to bind to

clusterId:int

the cluster identifier to bind to

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 ZigBeeEndpoint is returned otherwise.

getBoundEndPointsback to summary
public Promise<List<String>> getBoundEndPoints(int clusterId)

Returns bound endpoints (identified by their service PIDs) on a specific cluster ID. It is implemented on the base driver with Mgmt_Bind_req command. It is implemented without a command request in local endpoints.

As described in "Table 2.129 Fields of the Mgmt_Bind_rsp Command" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, a Mgmt_Bind_rsp command can have the following status: APSException#NOT_SUPPORTED or any status code returned from the APSME-GET.confirm primitive (see APSException).

Parameters
clusterId:int

the cluster identifier of the targeted bindings.

Returns:Promise<List<String>>

A promise representing the completion of this asynchronous call. Promise#getValue() returns a List of the bound endpoint service PIDs if the command is successful. The response object is null and the adequate APSException is returned by Promise#getFailure() otherwise.

getClientClusterback to summary
public ZCLCluster getClientCluster(int clientClusterId)

Returns the client cluster identified by the cluster identifier.

Parameters
clientClusterId:int

The client(output) cluster identifier.

Returns:ZCLCluster

the client(output) cluster identified by the cluster identifier, or null if the given id is not listed in the simple descriptor.

Exceptions
IllegalArgumentException:
If the passed argument is outside the range [0, 0xffff].
getClientClustersback to summary
public ZCLCluster[] getClientClusters()

Returns an array of client (output) clusters.

Returns:ZCLCluster[]

an array of client (output) clusters, returns an empty array if does not provides any clients clusters.

getIdback to summary
public short getId()

Returns the identifier of this endpoint, that is the Endpoint ID.

Returns:short

the identifier of this endpoint, value ranges from 1 to 240.

getNodeAddressback to summary
public BigInteger getNodeAddress()

Returns the IEEE Address of the node containing this endpoint.

Returns:BigInteger

the IEEE Address of the node containing this endpoint.

getServerClusterback to summary
public ZCLCluster getServerCluster(int serverClusterId)

Returns the server (input) cluster identified by the given identifier.

Parameters
serverClusterId:int

The server(input) cluster identifier.

Returns:ZCLCluster

the server (input) cluster identified by the given identifier, or null if the given id is not listed in the simple descriptor.

Exceptions
IllegalArgumentException:
If the passed argument is outside the range [0, 0xffff].
getServerClustersback to summary
public ZCLCluster[] getServerClusters()

Returns an array of server (input) clusters.

Returns:ZCLCluster[]

an array of server (input) clusters, returns an empty array if it does not provide any server cluster.

getSimpleDescriptorback to summary
public Promise<ZigBeeSimpleDescriptor> getSimpleDescriptor()

Returns the simple descriptor of this endpoint. As described in "Table 2.93 Fields of the Simple_Desc_rsp Command" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, a simple_decr request can have the following status: ZDPException#SUCCESS, ZDPException#INVALID_EP, ZDPException#NOT_ACTIVE, ZDPException#DEVICE_NOT_FOUND, ZDPException#INV_REQUESTTYPE or ZDPException#NO_DESCRIPTOR.

Returns:Promise<ZigBeeSimpleDescriptor>

A promise representing the completion of this asynchronous call. Promise#getValue() returns the node simple descriptor ZigBeeSimpleDescriptor in case of success and Promise#getFailure() returns the adequate ZDPException otherwise.

notExportedback to summary
public void notExported(ZigBeeException e)

Notifies that the base driver is unable to export this endpoint. This method is called by the base driver and used to give details about issues preventing the export of an endpoint.

Parameters
e:ZigBeeException

A device ZigBeeException the occurred exception.

unbindback to summary
public Promise<Void> unbind(String servicePid, int clusterId)

Removes the following entry in the Binding Table of the device if it exists:

this.getNodeAddress(), this.getId(), clusterId, device.getNodeAddress(), device.getId()

As described in "Table 2.9 APSME-UNBIND.confirm Parameters" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, an unbind request can have the following results: APSException#SUCCESS, APSException#ILLEGAL_REQUEST, APSException#INVALID_BINDING.

Parameters
servicePid:String

The pid of the service to unbind.

clusterId:int

The cluster identifier to unbind.

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 APSException is returned otherwise.