Interface ZigBeeNode
- All Known Subinterfaces:
ZigBeeHost
Each physical device may contain up 240 logical devices which are represented
by the ZigBeeEndpoint
class.
Each logical device is identified by an EndPoint address, but shares:
- either the 64-bit 802.15.4 IEEE Address
- or the 16-bit ZigBee Network Address.
- "Consumers of this API must not implement this interface"
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
Constant value used as logical type value when the ZigBee device is a Coordinator.static final String
Key ofString
containing the device node network extended PAN ID.static final String
Property key for the mandatory node IEEE Address representing node MAC address.static final String
Property name for the device logical type.static final String
Property name for a manufacturer code that is allocated by the ZigBee Alliance, relating the manufacturer to the device.static final String
Property containing the ZigBee network PAN ID.static final String
ZigBee power source, that is, 3rd bit of "MAC Capabilities" in Node Descriptor.static final String
ZigBee receiver on when idle, that is, 4th bit of "MAC Capabilities" in Node Descriptor.static final short
Constant value used as logical type value when the ZigBee device is a Router.static final short
Constant value used as logical type value when the ZigBee device is an End Device. -
Method Summary
Modifier and TypeMethodDescriptionBroadcasts a given ZCL Frame to clusterclusterID
on all theZigBeeEndpoint
that are running on this node (endpoint broadcasting).Broadcasts a given ZCL Frame to clusterclusterID
on all theZigBeeEndpoint
that are running on this node (endpoint broadcasting).Retrieves the ZigBee node Complex Descriptor.Returns the array of the endpoints hosted by this node.Returns the network Extended PAN identifier (EPID).Returns the OSGi service PID of the ZigBee Host that is on the network of this node.Returns the ZigBee device node IEEE Address of this node.Retrieves the link quality information to the neighbor nodes.int
Returns the current network address (alias short-address) of this node.Retrieves the ZigBee node Node Descriptor.int
getPanId()
Returns the network Personal Area Network identifier (PAN ID).Retrieves the ZigBee node Power Descriptor.Retrieves the routing table information of the node.Returns the user description of this node.Sends theZDPFrame
to thisZigBeeNode
with the specified cluster id.Sends theZDPFrame
to thisZigBeeNode
with the specified cluster id.leave()
Requests this node to leave the ZigBee network.leave
(boolean rejoin, boolean removeChildren) Requests the device to leave the network.setUserDescription
(String userDescription) Sets the user description of this node.
-
Field Details
-
IEEE_ADDRESS
Property key for the mandatory node IEEE Address representing node MAC address. MAC Address is a 12-digit(48-bit) or 16-digit(64-bit) hexadecimal numbers.- See Also:
-
LOGICAL_TYPE
Property name for the device logical type. The property value is of typeShort
.- See Also:
-
MANUFACTURER_CODE
Property name for a manufacturer code that is allocated by the ZigBee Alliance, relating the manufacturer to the device. The property is of typeInteger
.- See Also:
-
PAN_ID
Property containing the ZigBee network PAN ID. The property is of typeInteger
.- See Also:
-
EXTENDED_PAN_ID
Key ofString
containing the device node network extended PAN ID. If the device type is "Coordinator", the extended pan id may be available only after the network is started. It means that internally the ZigBeeHost interface must update the service properties.This property is of type
BigInteger
- See Also:
-
POWER_SOURCE
ZigBee power source, that is, 3rd bit of "MAC Capabilities" in Node Descriptor. Set totrue
if the current power source is mains power, set tofalse
, otherwise.This property is of type
Boolean
.- See Also:
-
RECEIVER_ON_WHEN_IDLE
ZigBee receiver on when idle, that is, 4th bit of "MAC Capabilities" in Node Descriptor. Set totrue
if the device does not disable its receiver to conserve power during idle periods, set tofalse
otherwise.This property is of type
Boolean
.- See Also:
-
ZED
static final short ZEDConstant value used as logical type value when the ZigBee device is an End Device.- See Also:
-
COORDINATOR
static final short COORDINATORConstant value used as logical type value when the ZigBee device is a Coordinator.- See Also:
-
ROUTER
static final short ROUTERConstant value used as logical type value when the ZigBee device is a Router.- See Also:
-
-
Method Details
-
getIEEEAddress
BigInteger getIEEEAddress()Returns the ZigBee device node IEEE Address of this node.- Returns:
- the ZigBee device node IEEE Address of this node.
-
getNetworkAddress
int getNetworkAddress()Returns the current network address (alias short-address) of this node.- Returns:
- the current network address of this node.
-
getHostPid
String getHostPid()Returns the OSGi service PID of the ZigBee Host that is on the network of this node.- Returns:
- the OSGi service PID of the ZigBee Host that is on the network of this node.
-
getPanId
int getPanId()Returns the network Personal Area Network identifier (PAN ID).- Returns:
- the network Personal Area Network identifier (PAN ID).
-
getExtendedPanId
BigInteger getExtendedPanId()Returns the network Extended PAN identifier (EPID).- Returns:
- the network Extended PAN identifier (EPID).
-
getEndpoints
ZigBeeEndpoint[] getEndpoints()Returns the array of the endpoints hosted by this node.- Returns:
- the array of the endpoints hosted by this node, returns an empty array if this node does not host any endpoint.
-
getNodeDescriptor
Promise<ZigBeeNodeDescriptor> getNodeDescriptor()Retrieves the ZigBee node Node Descriptor. As described in Table 2.91 Fields of the Node_Desc_rsp Command of the ZigBee specification, a Node_Desc_rsp command can return with the following status codes:- Returns:
- A promise representing the completion of this asynchronous call.
It will be used in order to return the node descriptor
ZigBeeNodeDescriptor
. If the ZDP Node_Desc_rsp do not return success, the promise must fail with aZDPException
exception with the correct status code.
-
getPowerDescriptor
Promise<ZigBeePowerDescriptor> getPowerDescriptor()Retrieves the ZigBee node Power Descriptor. As described in Table 2.92 Fields of the Power_Desc_rsp Command of the ZigBee specification, a Power_Desc_rsp command can return with the following status codes:- Returns:
- A promise representing the completion of this asynchronous call.
It will be used in order to return the node power descriptor
ZigBeePowerDescriptor
. If the ZDP Power_Desc_rsp do not return success, the promise must fail with aZDPException
exception with the correct status code.
-
getComplexDescriptor
Promise<ZigBeeComplexDescriptor> getComplexDescriptor()Retrieves the ZigBee node Complex Descriptor.As described in Table 2.92 Fields of the Complex_Desc_rsp Command of the ZigBee specification, a Complex_Desc_rsp command can return with the following status codes:
- Returns:
- A promise representing the completion of this asynchronous call.
It will be used in order to return the complex descriptor
ZigBeeComplexDescriptor
. If the ZDP Complex_Desc_rsp do not return success, the promise must fail with aZDPException
exception with the correct status code.
-
getLinksQuality
Promise<Map<String,ZigBeeLinkQuality>> getLinksQuality()Retrieves the link quality information to the neighbor nodes.An implementation of this method may use the Mgmt_Lqi_req and Mgmt_Lqi_rsp messages to retrieve the Link Quality table (also known as NeighborTableList in the ZigBee Specification).
The method limit the Link Quality table to the
ZigBeeNode
service discovered.In case of failure, the target device may report error code
ZDPException.NOT_SUPPORTED
.- Returns:
- A promise representing the completion of this asynchronous call.
It will be resolved with the result of this operation. In case of
success the resolved value will be a
Map
containing the Service.PID asString
key of theZigBeeNode
service and the value theZigBeeLinkQuality
for that node. In case of errors the promise must fail with the correctZDPException
.
-
getRoutingTable
Promise<Map<String,ZigBeeRoute>> getRoutingTable()Retrieves the routing table information of the node. This routing table is also known as RoutingTableList in the ZigBee Specification.An implementation of this method may use the Mgmt_Rtg_req ZDP command to retrieve the Routing Table .
The target device may report a status code
ZDPException.NOT_SUPPORTED
in case of failure.- Returns:
- A promise representing the completion of this asynchronous call.
In case of success, the resolved value will be a
Map
containing the Service.PID asString
key of theZigBeeNode
service and the value theZigBeeRoute
for that node. In case of failure aZDPException
exception with the correct status code must be used to fail the promise.
-
leave
Requests this node to leave the ZigBee network.As described in Table 2.131 Fields of the Mgmt_Leave_rsp Command of the ZigBee specification, a Mgmt_Leave_rsp ZDP command may return the following status values:
ZDPException.SUCCESS
ZDPException.NOT_SUPPORTED
ZDPException.NOT_AUTHORIZED
- any status code returned from the NLMELEAVE.confirm primitive
- Returns:
- A promise representing the completion of this asynchronous call.
In case of success, the promise is resolved with a
null
value, otherwise with the correctZDPException
exception.
-
leave
Requests the device to leave the network.As described in Table 2.131 Fields of the Mgmt_Leave_rsp Command of the ZigBee specification, a Mgmt_Leave_rsp command could return the following status values:
ZDPException.SUCCESS
ZDPException.NOT_SUPPORTED
ZDPException.NOT_AUTHORIZED
- any status code returned from the NLMELEAVE.confirm primitive
- Parameters:
rejoin
-true
if the device being asked to leave from the current parent is requested to rejoin the network. Otherwise,false
.removeChildren
-true
if the device being asked to leave the network is also being asked to remove its child devices, if any. Otherwise,false
.- Returns:
- A promise representing the completion of this asynchronous call.
In case of success, the ZigBeeNode service must be unregistered,
first and then the promise may be resolved with a
null
value, otherwise with the correctZDPException
exception.
-
invoke
Sends theZDPFrame
to thisZigBeeNode
with the specified cluster id. This method expects a specific cluster in the response to the request.- Parameters:
clusterIdReq
- the cluster Id of theZDPFrame
that will be sent to the device.expectedClusterIdRsp
- the expected cluster Id of the response to theZDPFrame
sent.message
- theZDPFrame
containing the message.- Returns:
- A promise representing the completion of this asynchronous call.
In case of success the promise resolves with the response
ZDPFrame
.
-
invoke
Sends theZDPFrame
to thisZigBeeNode
with the specified cluster id. This method expects a specific cluster in the response to the request. This method considers that the 0x8000 + clusterIdReq is the clusterId expected from messaged received for the message sent by this request. -
broadcast
Broadcasts a given ZCL Frame to clusterclusterID
on all theZigBeeEndpoint
that are running on this node (endpoint broadcasting).- Parameters:
clusterID
- the cluster ID the broadcast message is directed.frame
- a ZCL Frame that contains the command that have to be broadcast to the specific cluster of all the endpoints running on the node.- Returns:
- a response stream instance that collects and allows a client to be asynchronously notified about the ZCLFrame responses sent back by the ZigBee nodes.
-
broadcast
Broadcasts a given ZCL Frame to clusterclusterID
on all theZigBeeEndpoint
that are running on this node (endpoint broadcasting). The source endpoint of the APS message sent, is set to the endpoint identifier of theexportedServicePID
service.- Parameters:
clusterID
- the cluster ID the broadcast message is directed.frame
- a ZCL Frame that contains the command that have to be broadcast to the specific cluster of all the endpoints running on the node.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 response stream instance that collects and allows the caller to be asynchronously notified about the ZCLFrame responses sent back by the ZigBee nodes.
-
getUserDescription
Returns the user description of this node. As described in Table 2.97 Fields of the User_Desc_rsp Command of the ZigBee specification, a User_Desc_rsp may return the following status:- Returns:
- A promise representing the completion of this asynchronous call.
It will be used in order to return the node user description
(String). In case of errors the promise will fail with a
ZDPException
exception containing the response status code value.
-
setUserDescription
Sets the user description of this node. As described in Table 2.137 ZDP Enumerations Description of the ZigBee specification, a Set_User_Desc_rsp request may return the following status:- Parameters:
userDescription
- the user description.- Returns:
- A promise representing the completion of this asynchronous call.
In case of success the promise returns a
null
value. In case of errors the promise must fail with aZDPException
exception containing the response status code value.
-