Interface ZigBeeEndpoint
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant used by all ZigBee devices indicating the device category.static final String
Property containing the application device identifier.static final String
Property containing the application device version.static final String
Property containing the EndPoint ID of the device.static final String
Property containing theZigBeeHost
's pid.static final String
Property containing a list of input clusters.static final String
Property containing a list of output clusters.static final String
Property containing the application profile identifier also contained in the ZigBee Simple Descriptor.static final String
Property used to mark if a ZigBeeEndPoint service is an exported one or not. -
Method Summary
Modifier and TypeMethodDescriptionAdds the following entry in the Binding Table of the device:getBoundEndPoints
(int clusterId) Returns bound endpoints (identified by their service PIDs) on a specific cluster ID.getClientCluster
(int clientClusterId) Returns the client cluster identified by the cluster identifier.Returns an array of client (output) clusters.short
getId()
Returns the identifier of this endpoint, that is the Endpoint ID.Returns the IEEE Address of the node containing this endpoint.getServerCluster
(int serverClusterId) Returns the server (input) cluster identified by the given identifier.Returns an array of server (input) clusters.Returns the simple descriptor of this endpoint.void
Notifies that the base driver is unable to export this endpoint.Removes the following entry in the Binding Table of the device if it exists:
-
Field Details
-
ENDPOINT_ID
Property containing the EndPoint ID of the device. This property is of typeShort
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.
- See Also:
-
PROFILE_ID
Property containing the application profile identifier also contained in the ZigBee Simple Descriptor. This property is of typeInteger
.It is mandatory service property for this service.
- See Also:
-
HOST_PID
Property containing theZigBeeHost
's pid. This property is of typeString
.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.
- See Also:
-
DEVICE_ID
Property containing the application device identifier. This identifier is also contained in the ZigBee Simple Descriptor. This property is of typeInteger
.It is mandatory property for this service.
- See Also:
-
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 typeByte
.It is mandatory property for this service.
- See Also:
-
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.
- See Also:
-
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.
- See Also:
-
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.- See Also:
-
DEVICE_CATEGORY
Constant used by all ZigBee devices indicating the device category. It is a mandatory service property for this service.- See Also:
-
-
Method Details
-
getId
short getId()Returns the identifier of this endpoint, that is the Endpoint ID.- Returns:
- the identifier of this endpoint, value ranges from 1 to 240.
-
getNodeAddress
BigInteger getNodeAddress()Returns the IEEE Address of the node containing this endpoint.- Returns:
- the IEEE Address of the node containing this endpoint.
-
getSimpleDescriptor
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
orZDPException.NO_DESCRIPTOR
.- Returns:
- A promise representing the completion of this asynchronous call.
Promise.getValue()
returns the node simple descriptorZigBeeSimpleDescriptor
in case of success andPromise.getFailure()
returns the adequateZDPException
otherwise.
-
getServerClusters
ZCLCluster[] getServerClusters()Returns an array of server (input) clusters.- Returns:
- an array of server (input) clusters, returns an empty array if it does not provide any server cluster.
-
getServerCluster
Returns the server (input) cluster identified by the given identifier.- Parameters:
serverClusterId
- The server(input) cluster identifier.- Returns:
- the server (input) cluster identified by the given identifier, or null if the given id is not listed in the simple descriptor.
- Throws:
IllegalArgumentException
- If the passed argument is outside the range [0, 0xffff].
-
getClientClusters
ZCLCluster[] getClientClusters()Returns an array of client (output) clusters.- Returns:
- an array of client (output) clusters, returns an empty array if does not provides any clients clusters.
-
getClientCluster
Returns the client cluster identified by the cluster identifier.- Parameters:
clientClusterId
- The client(output) cluster identifier.- Returns:
- the client(output) cluster identified by the cluster identifier, or null if the given id is not listed in the simple descriptor.
- Throws:
IllegalArgumentException
- If the passed argument is outside the range [0, 0xffff].
-
bind
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
- the PID of the endpoint to bind toclusterId
- the cluster identifier to bind to- Returns:
- A promise representing the completion of this asynchronous call.
Promise.getFailure()
returns null if the cluster has been successfully bound. The adequateZigBeeEndpoint
is returned otherwise.
-
unbind
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
- The pid of the service to unbind.clusterId
- The cluster identifier to unbind.- Returns:
- A promise representing the completion of this asynchronous call.
Promise.getFailure()
returns null if the cluster has been successfully bound. The adequateAPSException
is returned otherwise.
-
notExported
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
- A deviceZigBeeException
the occurred exception.
-
getBoundEndPoints
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 (seeAPSException
).- Parameters:
clusterId
- the cluster identifier of the targeted bindings.- 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 adequateAPSException
is returned byPromise.getFailure()
otherwise.
-