ZigBeeHost is more than a ZigBeeNode.
It must be registered as a OSGi service.
Even if not specified explicitly in the javadoc, any method of this interface
must throw an IllegalArgumentException exception if a or one of the
passed arguments has a value not admitted by the method.
| Modifier and Type | Field and Description |
|---|---|
| public static final short | UNLIMITED_BROADCAST_RADIUS
Value constant to set an unlimited broadcast radius. |
| Modifier and Type | Method and Description |
|---|---|
| public ZCLCommandResponseStream | 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.The cluster ID this ZCL frame must be sent to. clusterID, ZCLFrame A ZCL Frame. frame)Redeclares org. Broadcasts a ZCL frame to the cluster ID of all the nodes of the ZigBee network. |
| public ZCLCommandResponseStream | 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.The cluster ID. clusterID, ZCLFrame A ZCL Frame. frame, String the source endpoint of the command request. In
targeted situations, the source endpoint is the valid service PID
of an exported endpoint. exportedServicePID)Redeclares org. Broadcasts a ZCL frame to the cluster ID of all the nodes of the ZigBee network. |
| public void | createGroupService(int
the address of the group to create. groupAddress)Creates a |
| public short | Returns: the current broadcast radius value.Returns the current broadcast radius value. |
| public int | |
| public int | Returns: the currently configured channel mask.Returns the currently configured channel mask. |
| public long | Returns: the current value set for the communication timeout expressed in milliseconds.Returns the current value set for the communication timeout. |
| public String | Returns: the current preconfigured link key.Returns the current preconfigured link key. |
| public int | Returns: the network security level, that is, 0 if security is disabled, an int code if enabled (see "Table 4.38 Security Levels Available to the NWK, and APS Layers" of the ZigBee specification").Returns the network security level. |
| public boolean | |
| public void | permitJoin(short
The time during which associations are permitted. duration)Indicates if a ZigBee device can join the network. |
| public Promise | Returns: A promise representing the completion of this asynchronous call. In case of success the promise will resolve withBoolean.TRUE otherwise the promise is failed with an exception.Forces a new network scan. |
| public void | setBroadcastRadius(short
- is the number of routers that the messages are
allowed to cross. Radius value is in the range from 0 to 0xff. broadcastRadius)Sets the broadcast radius value. |
| public void | |
| public void | setCommunicationTimeout(long
the number of milliseconds before firing a timeout
exception. timeout)Sets the timeout for the communication sent through this device. |
| public void | setExtendedPanId(BigInteger
The network Extended PAN identifier(EPID) extendedPanId)Sets the extendedPanId. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| UNLIMITED_BROADCAST_RADIUS | back to summary |
|---|---|
| public static final short UNLIMITED_BROADCAST_RADIUS Value constant to set an unlimited broadcast radius. | |
| broadcast | back to summary |
|---|---|
| public ZCLCommandResponseStream broadcast(int clusterID, ZCLFrame frame) Redeclares org. Broadcasts a ZCL frame to the cluster ID of all the nodes of the ZigBee
network. The
| |
| broadcast | back to summary |
|---|---|
| public ZCLCommandResponseStream broadcast(int clusterID, ZCLFrame frame, String exportedServicePID) Redeclares org. Broadcasts a ZCL frame to the cluster ID of all the nodes of the ZigBee
network. The passed
| |
| createGroupService | back to summary |
|---|---|
| public void createGroupService(int groupAddress) throws Exception Creates a
| |
| getBroadcastRadius | back to summary |
|---|---|
| public short getBroadcastRadius() Returns the current broadcast radius value.
| |
| getChannel | back to summary |
|---|---|
| public int getChannel() throws Exception Returns the current network channel.
| |
| getChannelMask | back to summary |
|---|---|
| public int getChannelMask() throws Exception Returns the currently configured channel mask.
| |
| getCommunicationTimeout | back to summary |
|---|---|
| public long getCommunicationTimeout() Returns the current value set for the communication timeout.
| |
| getPreconfiguredLinkKey | back to summary |
|---|---|
| public String getPreconfiguredLinkKey() throws Exception Returns the current preconfigured link key. | |
| getSecurityLevel | back to summary |
|---|---|
| public int getSecurityLevel() throws Exception Returns the network security level.
| |
| isStarted | back to summary |
|---|---|
| public boolean isStarted() Checks the host's start/stop state.
| |
| permitJoin | back to summary |
|---|---|
| public void permitJoin(short duration) throws Exception Indicates if a ZigBee device can join the network. Broadcasts a Mgmt_Permit_req to all routers and the coordinator. If the duration argument is not equal to zero or 0xFF, the argument is a number of seconds and joining is permitted until it counts down to zero, after which time, joining is not permitted. If the duration is set to zero, joining is not permitted. If set to 0xFF, joining is permitted indefinitely or until another Mgmt_Permit_Joining_req is received by the coordinator.
As described in "Table 2.133 Fields of the Mgmt_Permit_Joining_rsp
Command" of the ZigBee specification
1_053474r17ZB_TSC-ZigBee-Specification.pdf, a permitJoin request can have
the following status:
| |
| refreshNetwork | back to summary |
|---|---|
| public Promise Forces a new network scan. It checks that the ZigBeeNode services are still representing an available node on the network. It also updates the whole representation of all nodes (endpoints, clusters, descriptors, attributes). | |
| setBroadcastRadius | back to summary |
|---|---|
| public void setBroadcastRadius(short broadcastRadius) Sets the broadcast radius value. By default the
| |
| setChannelMask | back to summary |
|---|---|
| public void setChannelMask(int mask) throws IOException Sets a new configured channel mask.
As described in "Table 2.13 APSME-SET.confirm Parameters" of the ZigBee
specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, a set request
can have the following status:
| |
| setCommunicationTimeout | back to summary |
|---|---|
| public void setCommunicationTimeout(long timeout) Sets the timeout for the communication sent through this device.
| |
| setExtendedPanId | back to summary |
|---|---|
| public void setExtendedPanId(BigInteger extendedPanId) Sets the extendedPanId.
| |
| setLogicalType | back to summary |
|---|---|
| public void setLogicalType(short logicalNodeType) throws Exception Sets the host logical node type. ZigBee defines three different types of
node:
| |
| setPanId | back to summary |
|---|---|
| public void setPanId(int panId) Sets the panId.
| |
| start | back to summary |
|---|---|
| public void start() throws Exception Starts the host.
If the host is a
If the host is a The host status must be persistent, that is, if the host was started, then the host must starts again when the bundle restarts. In addition, the values of channel, pan id, extended pan id, and host PID must remain the same.
| |
| stop | back to summary |
|---|---|
| public void stop() throws Exception Stops the host.
| |
| updateNetworkChannel | back to summary |
|---|---|
| public void updateNetworkChannel(byte channel) throws IOException Updates the network channel. 802.15.4 and ZigBee divide the 2.4GHz band into 16 channels, numbered from 11 to 26. As described in "Table 2.4.3.3.9 Mgmt_NWK_Update_req" of the ZigBee specification 1_053474r17ZB_TSC-ZigBee-Specification.pdf, this request is sent as broadcast by the network manager with a ScanDuration to be set with the channel parameter.
| |