Zigbee PRO
Zigbee PRO
Zigbee PRO
User Guide
JN-UG-3048
Revision 2.4
19 December 2012
ZigBee PRO Stack
User Guide
Contents
About this Manual 13
Organisation 13
Conventions 14
Acronyms and Abbreviations 14
Related Documents 16
Trademarks 16
Chip Compatibility 16
2.4.2 Descriptors 40
2.4.3 Application Profiles 41
2.4.4 Attributes and Clusters 42
2.4.5 Discovery 43
2.4.6 ZigBee Device Objects (ZDO) 44
2.5 Network Routing 45
2.5.1 Message Addressing and Propagation 45
2.5.2 Route Discovery 46
2.5.3 Many-to-one Routing 47
2.6 Network Communications 48
2.6.1 Service Discovery 48
2.6.2 Binding 49
2.7 Detailed Architecture 51
2.7.1 Software Levels 52
ZPS_eAplZdpRecoverBindTableRequest 271
ZPS_eAplZdpBackupSourceBindRequest 273
ZPS_eAplZdpRecoverSourceBindRequest 275
8.1.4 Network Management Services Functions 277
ZPS_eAplZdpMgmtNwkDiscRequest 278
ZPS_eAplZdpMgmtLqiRequest 280
ZPS_eAplZdpMgmtRtgRequest 281
ZPS_eAplZdpMgmtBindRequest 282
ZPS_eAplZdpMgmtLeaveRequest 284
ZPS_eAplZdpMgmtDirectJoinRequest 286
ZPS_eAplZdpMgmtPermitJoiningRequest 288
ZPS_eAplZdpMgmtCacheRequest 290
ZPS_eAplZdpMgmtNwkUpdateRequest 292
8.2 ZDP Structures 294
8.2.1 Descriptor Structures 294
8.2.1.1 ZPS_tsAplZdpNodeDescriptor 294
8.2.1.2 ZPS_tsAplZdpNodePowerDescriptor 296
8.2.1.3 ZPS_tsAplZdpSimpleDescType 298
8.2.2 ZDP Request Structures 300
8.2.2.1 ZPS_tsAplZdpNwkAddrReq 301
8.2.2.2 ZPS_tsAplZdpIEEEAddrReq 302
8.2.2.3 ZPS_tsAplZdpDeviceAnnceReq 302
8.2.2.4 ZPS_tsAplZdpNodeDescReq 303
8.2.2.5 ZPS_tsAplZdpPowerDescReq 303
8.2.2.6 ZPS_tsAplZdpSimpleDescReq 303
8.2.2.7 ZPS_tsAplZdpExtendedSimpleDescReq 304
8.2.2.8 ZPS_tsAplZdpComplexDescReq 304
8.2.2.9 ZPS_tsAplZdpUserDescReq 304
8.2.2.10 ZPS_tsAplZdpMatchDescReq 305
8.2.2.11 ZPS_tsAplZdpActiveEpReq 305
8.2.2.12 ZPS_tsAplZdpExtendedActiveEpReq 306
8.2.2.13 ZPS_tsAplZdpUserDescSet 306
8.2.2.14 ZPS_tsAplZdpSystemServerDiscoveryReq 307
8.2.2.15 ZPS_tsAplZdpDiscoveryCacheReq 307
8.2.2.16 ZPS_tsAplZdpDiscoveryStoreReq 308
8.2.2.17 ZPS_tsAplZdpNodeDescStoreReq 309
8.2.2.18 ZPS_tsAplZdpPowerDescStoreReq 309
8.2.2.19 ZPS_tsAplZdpSimpleDescStoreReq 310
8.2.2.20 ZPS_tsAplZdpActiveEpStoreReq 310
8.2.2.21 ZPS_tsAplZdpFindNodeCacheReq 311
8.2.2.22 ZPS_tsAplZdpRemoveNodeCacheReq 311
8.2.2.23 ZPS_tsAplZdpEndDeviceBindReq 312
8.2.2.24 ZPS_tsAplZdpBindUnbindReq 313
8.2.2.25 ZPS_tsAplZdpBindRegisterReq 314
8.2.2.26 ZPS_tsAplZdpReplaceDeviceReq 314
8.2.2.27 ZPS_tsAplZdpStoreBkupBindEntryReq 315
8.2.2.28 ZPS_tsAplZdpRemoveBkupBindEntryReq 316
8.2.2.29 ZPS_tsAplZdpBackupBindTableReq 317
8.2.2.30 ZPS_tsAplZdpRecoverBindTableReq 319
8.2.2.31 ZPS_tsAplZdpBackupSourceBindReq 319
8.2.2.32 ZPS_tsAplZdpRecoverSourceBindReq 319
For more detailed information on the ZigBee PRO standard, refer to the ZigBee
Specification (05347), available from the ZigBee Alliance.
Organisation
This manual is divided into four parts:
Part I: Concept and Operational Information comprises five chapters:
Chapter 1 introduces the ZigBee PRO wireless network protocol.
Chapter 2 describes the architecture and features of ZigBee PRO.
Chapter 3 introduces the NXP ZigBee PRO stack software.
Chapter 4 provides an overview of the ZigBee PRO application
development environment and process.
Chapter 5 describes how to perform common wireless network operations
using the functions of the NXP ZigBee PRO APIs.
Part II: Reference Information comprises five chapters:
Chapter 6 details the functions and associated resouces of the ZigBee
Device Objects (ZDO) API.
Chapter 7 details the functions and associated resouces of the Application
Framework (AF) API.
Chapter 8 details the functions and associated resouces of the ZigBee
Device Profile (ZDP) API.
Chapter 9 details the stack events and the return/status codes used by the
ZigBee PRO APIs.
Chapter 10 details the ZigBee network parameters.
Part III: Configuration Information comprises two chapters:
Chapter 11 introduces the configuration tools that are required to set up a
ZigBee PRO application, including the ZPS Configuration Editor.
Chapter 12 describes how to use the ZPS Configuration Editor.
Part IV: Appendices contains four appendices that provide various ancillary
information, including a description of the handling of ZigBee PRO stack
events, a set of application design notes and a glossary of terms used in
ZigBee PRO networks.
Conventions
Files, folders, functions and parameter types are represented in bold type.
Function parameters are represented in italics type.
Code fragments are represented in the Courier New typeface.
Related Documents
JN-UG-3077 ZigBee Cluster Library User Guide
JN-UG-3075 JenOS User Guide
JN-UG-3059 ZigBee PRO Smart Energy API User Guide
JN-UG-3091 ZigBee Light Link User Guide
JN-UG-3066 JN514x Integrated Peripherals API User Guide
JN-UG-3087 JN516x Integrated Peripherals API User Guide
JN-UG-3064 SDK Installation and User Guide
JN-UG-3007 JN51xx Flash Programmer User Guide
JN-AN-1123 ZigBee PRO Application Template Application Note for JN5148
JN-AN-1122 ZigBee PRO Home Sensor Demo Application Note for JN5148
JN-AN-1184 ZigBee PRO Application Template Application Note for JN516x
JN-AN-1183 ZigBee PRO Home Sensor Demo Application Note for JN516x
05347 ZigBee Specification (from ZigBee Alliance)
075123 ZigBee Cluster Library Specification (from ZigBee Alliance)
Trademarks
All trademarks are the property of their respective owners.
Chip Compatibility
The software described in this manual can be used on the following NXP wireless
microcontrollers:
JN516x (currently only JN5168)
JN5148 (variants JN5148-001 and JN5148-Z01)
Where the described functionality is applicable to all the supported microcontrollers,
the device may be referred to in this manual as the JN51xx.
Part I:
Concept and Operational
Information
Controller/Timer
(Co-ordinator)
Air-conditioning thermostat
(Router)
Heating thermostat
(Router)
Fan control
(End Device)
Heater control
(End Device)
Compressor control
(End Device)
Co-ordinator
End Device
End Device
Router Router
End Device
Router
End Device
End Device
Router
Router
Router
End Device
Mesh networks and their constituent nodes are described in more detail in Section
2.2.2.
The 868- and 915-MHz bands offer certain advantages such as fewer users, less
interference, and less absorption and reflection, but the 2400-MHz band is far more
widely adopted for a number of reasons:
Worldwide availability for unlicensed use
Higher data rate (250 kbps) and more channels
Lower power (transmit/receive are on for shorter time due to higher data rate)
Band more commonly understood and accepted by the marketplace
Therefore, the ZigBee standard assumes operation in the 2400-MHz band, although
it is possible to implement ZigBee networks in the other IEEE 802.15.4 bands.
ZigBee includes measures to avoid interference between radio communications. One
is its ability to automatically select the best frequency channel at initialisation. It is also
possible to adapt to a changing RF environment by moving the network to another
channel, if the current channel proves problematic - this frequency agility is a core
feature of ZigBee PRO. Other measures are described in Section 1.7.
The range of a radio transmission is dependent on the operating environment - for
example, indoors or outdoors. Using an NXP JN51xx standard module fitted with an
external dipole antenna, a range of over 1 km can typically be achieved in an open
area, but inside a building this can be reduced due to absorption, reflection, diffraction
and standing wave effects caused by walls and other solid objects. A high-power
module (greater than 15 dBm output power) can achieve a range which is a factor of
five greater than that of a standard module. In addition, the range between devices can
be extended in a ZigBee network since the network topology (see Section 2.2.2) can
use intermediate nodes (Routers) as stepping stones when passing data to
destinations.
The above reliability measures allow a ZigBee network to operate even when there
are other ZigBee networks nearby operating in the same frequency band. Therefore,
adjacent ZigBee networks will not interfere with each other. In addition, ZigBee
networks can also operate in the neighbourhood of networks based on other
standards, such as Wi-Fi and Bluetooth, without any interference.
Key-based Encryption
A very high-security, 128-bit AES-based encryption system (built into the JN51xx
device as a hardware function) is applied to network communications, preventing
external agents from interpreting ZigBee network data.
This encryption is key-based. Normally, the same network key is used for all nodes
in the network. However, it is possible to use an individual link key between a given
pair of network nodes, allowing communications (possibly containing sensitive data)
between the two nodes to be private from other nodes in the same network.
Keys can be pre-configured in nodes in the factory, commissioned during system
installation or distributed around a working network from a central Trust Centre node.
A Trust Centre manages keys and security policies - for example, changing the
network key on all network nodes, issuing link keys for node pairs and restricting the
hours in which certain events or interactions can occur. Any node can be nominated
as the Trust Centre, but it is by default the Co-ordinator.
Frame Counters
The use of frame counters prevents sending the same message twice, and freshness
checking rejects any such repeated messages, preventing message replay attacks on
the network. An example of a replay attack would be someone recording the open
command for a garage door opener, and then replaying it to gain unauthorised entry
into the property.
Test service providers are authorised by the ZigBee Alliance to undertake testing and
certification. For details of authorised test houses, contact the ZigBee Alliance.
In addition, products using an NXP ZCP must also be checked against the radio
regulations of the country or countries where they are to be marketed (these checks
can often be performed by the same test house).
1.10 Profiles
For the purpose of interoperability (described in Section 1.9), the ZigBee Alliance has
introduced the concept of a device profile, which contains the essential properties of
a device for a particular application or market.
There are two classes of profile, the Stack Profile and the Application Profile,
described below.
Public Profiles
The profiles introduced by the ZigBee Alliance are public profiles, for use by
manufacturers implementing devices that need to work with devices from other
manufacturers. For example, to allow a switch from one vendor to work with the light
fitting (containing a load controller) from another vendor, both should implement the
appropriate devices specified in the HA profile. Products implemented to a public
profile will be tested and certified for conformance to that profile, in order to ensure that
a device implementing a function in the profile will operate with another suitable
device. The main advantage of public profiles is that products (e.g. a light-switch) from
multiple manufacturers will work together.
A public Application Profile is identified by a 16-bit number, allocated by the ZigBee
Alliance, giving the possibility of many thousands of profiles. Public profiles can only
be used on ZigBee Compliant Platforms based on either the ZigBee or ZigBee PRO
stack profile.
Application layer
Network layer
Physical layer
The basic layers of the ZigBee software stack are described below, from top to bottom:
Application layer: The Application layer contains the applications that run on
the network node. These give the device its functionality - essentially an
application converts input into digital data, and/or converts digital data into
output. A single node may run several applications - for example, an
environmental sensor may contain separate applications to measure
temperature, humidity and atmospheric pressure.
Network layer: The Network layer provides the ZigBee PRO functionality and
the applications interface to the IEEE 802.15.4 layers (see below). The layer is
concerned with network structure and multi-hop routing.
Data Link layer: The Data Link layer is provided by the IEEE 802.15.4
standard and is responsible for addressing - for outgoing data it determines
where the data is going, and for incoming data it determines where the data
has come from. It is also responsible for assembling data packets or frames to
be transmitted and disassembling received frames. In the IEEE 802.15.4
standard, the Data Link layer is referred to as IEEE 802.15.4 MAC (Media
Access Control) and the frames used are MAC frames.
Physical layer: The Physical layer is provided by the IEEE 802.15.4 standard
and is concerned with the interface to the physical transmission medium (radio,
in this case), exchanging data bits with this medium, as well as exchanging
data bits with the layer above (the Data Link layer). In the IEEE 802.15.4
standard, the Physical layer is referred to as IEEE 802.15.4 PHY.
For a more detailed view of the software architecture of ZigBee PRO, refer to Section
Section 2.7.
Co-ordinator
All ZigBee networks must have one (and only one) Co-ordinator.
At the network level, the Co-ordinator is mainly needed at system initialisation - it is
the first node to be started and performs the following initialisation tasks:
Selects the frequency channel to be used by the network (usually the one with
the least detected activity)
Starts the network
Allows child nodes to join the network through it
The Co-ordinator can additionally provide other services such as message routing and
security management. It may also provide services at the Application level. If any of
these additional services are used, the Co-ordinator must be able to provide them at
all times. However, if none of these additional services are used, the network will be
able to operate normally even if the Co-ordinator fails or is switched off.
Router
A ZigBee PRO network usually has at least one Router.
The main tasks of a Router are:
Relays messages from one node to another
Allows child nodes to join the network through it
Note that a Router cannot sleep, as it must always be available for routing.
End Device
The main tasks of an End Device at the network level are sending and receiving
messages. An End Device can only communicate directly with its parent, so all
messages to/from an End Device pass via its parent.
An End Device can be battery-powered and, when not transmitting or receiving, can
sleep in order to conserve power. Messages destined for a sleep-enabled End Device
are buffered by its parent for collection by the End Device once it is awake (also see
Section 2.2.2 below).
Note that End Devices cannot relay messages and cannot allow other nodes to
connect to the network through them - that is, they cannot have children.
Co-ordinator
End Device
End Device
Router Router
End Device
Router
End Device
End Device
Router
Router
Router
End Device
In the Mesh topology, a "route discovery" feature is provided which allows the network
to find the best available route for a message. Route discovery is described further in
Section 2.5.2.
Note that message propagation is handled by the network layer software and is
transparent to the application programs running on the nodes.
2.4.2 Descriptors
An application may need to obtain information about the nodes of the network in which
it runs, as described in Section 2.4.5. For this, it uses information stored in descriptors
in the nodes.
There are three mandatory descriptors and two optional descriptors stored in a node.
The mandatory descriptors are the Node, Node Power and Simple descriptors, while
the optional descriptors are called the Complex and User descriptors
For each node, there is only one Node and Node Power descriptor, but there is a
Simple descriptor for each endpoint. There may also be Complex and User
descriptors in the device.
The Node, Node Power and Simple descriptors are outlined below. For full details of
the descriptors, refer to Section 8.2.1.
Node Descriptor
The Node descriptor contains information on the capabilities of the node, including:
Type (End Device, Router or Co-ordinator)
Frequency band in use (868 MHz, 902 MHz or 2400 MHz)
IEEE 802.15.4 MAC capabilities - that is, whether:
the device can be a PAN Co-ordinator
the node implements a Full-Function or Reduced-Function IEEE 802.15.4
device
the device is mains powered
the device is capable of using MAC security
Simple Descriptor
The Simple descriptor for an application includes:
The endpoint on which the application communicates
The Application Profile that it implements
The Application Profile device identifier and version
Whether there are corresponding Complex and User descriptors
Lists of input and output clusters (see Section 2.4.1) that the application uses
and provides, respectively
Application A Application B
Commands sent from client to server
The input clusters and output clusters communicated via an endpoint are listed
(separately) in the endpoints Simple descriptor, which forms part of the Application
Profile (see Section 2.4.3).
For consistency and interoperability, the ZigBee Alliance have defined a number of
standard clusters for different functional areas. These are collected together in the
ZigBee Cluster Library (ZCL). Thus, developers can use standard clusters from the
ZCL in their Application Profiles. The ZCL is fully detailed in the ZigBee Cluster Library
Specification (075123) from the ZigBee Alliance.
2.4.5 Discovery
The ZigBee specification provides the facility for devices to find out about the
capabilities of other nodes in a network, such as their addresses, which types of
applications are running on them, their power source and sleep behaviour. This
information is stored in descriptors (see Section 2.4.5) on each node, and is used by
the enquiring node to adapt its behaviour to the requirements of the network.
Discovery is typically used when a node is being introduced into a user-configured
network, such as a domestic security or lighting control system. To integrate the
device into the network may require the user to start the integration process by
pressing a button or similar. The first task is to find out if there are any appropriate
devices with which the new node can communicate.
Device Discovery
Device discovery returns information about the addresses of a network node. The
retrieved information can be the IEEE/MAC address of the node with a given network
address, or the network address of a node with a given IEEE/MAC address. If the node
being interrogated is a Router or Co-ordinator, it may optionally supply the addresses
of all the devices that are associated with it, as well as its own address. In this way, it
is possible to discover all the devices in a network by requesting this information from
the Co-ordinator (network address 0x0000) and then using the list of addresses
corresponding to the children of the Co-ordinator to launch other queries about their
child nodes.
Service Discovery
Service discovery allows a node to request information from a remote node about the
remote node's capabilities. This information is stored in a number of descriptors (see
Section 2.4.2) on the remote node, and includes:
The device type and capabilities of the node
The power characteristics of the node
Information about each application running on the node
Optional information such as serial numbers
Other user-defined information - for example, easily understandable names
such as MtgRoomLight
Requests for these descriptors are made by a device during the discovery process
that is typically part of the device's configuration and integration into a ZigBee network.
Actual route
Node 2 Node 3
Routing allows the range of a network to be extended beyond the distances supported
by direct radio communication. Remote devices can join the network by connecting to
a Router.
The next hop address is determined using information stored in a Routing table on
the routing node (Router or Co-ordinator). An entry of this table contains information
for a remote node, including the network addresses of the remote node and of the next
routing node in the route to the remote node. Thus, when a message is received by a
routing node, it looks for the destination address in its Routing table and extracts next
hop address from this table to insert into the message. The message is then passed
on and propagation continues in this way until the target node is reached.
Note that if the message originates from an End Device, the message will always be
first passed to the source nodes parent before being passed on.
Concentrator
broadcasts a route
discovery request for
routes back to itself
"Concentrator" Node
In order to avoid the storage of return routes (from the concentrator) in the Routing
tables of intermediate nodes, the technique of source routing is used - the outward
route taken by a message to the concentrator is remembered by the concentrator and
embedded in the response message. In this case, the response message must carry
up to 30 addresses of the nodes along the return route (maximum number of hops
allowed is 30).
2.6.2 Binding
Once two nodes have been found to be compatible through Service Discovery (see
Section 2.6.1), they may be paired for communication purposes. For example, a light-
switch may be paired with a particular light, and we must ensure that this light-switch
only ever switches the light that it is intended to control. An easy way to pair nodes for
communication is provided by the binding mechanism.
Binding allows nodes to be paired in such a way that a certain type of output data from
one node is automatically routed to the paired node, without the need to specify the
destination address and endpoint every time. The two nodes must first be bound
together using the address and relevant endpoint number for each node - these can
be obtained through Service Discovery, described in Section 2.6.1. A binding has a
source node and a destination node, relating to the direction in which data will be sent
between the nodes (from source to destination). The details of a binding are stored as
an entry in a binding table, normally held on the source node of the binding or
sometimes on another nominated node.
In order to establish a binding, it must be requested in either of the following ways:
Binding request is submitted to the source node for the binding by either the
source node itself or a remote node (not one of the nodes to be bound).
Binding requests are submitted to the Co-ordinator by the source and
destination nodes for the binding (for example, by pressing a button on each
node to generate a binding request). The two binding requests must be
received within a certain timeout period.
During the binding process, the Binding table for the source node is updated or, if
necessary, created.
Binding occurs at the application level using clusters (described in Section 2.4.4). In
order for two applications to be bound, they must support the same cluster.
The binding between two applications is specified by:
The node address and endpoint number of the source of the binding
(e.g. a light-switch)
The node address and endpoint number of the destination of the binding
(e.g. the load controller for a light)
The cluster ID for the binding
One-to-one binding
One-to-many binding
...
Many-to-one binding
...
As an example of these bindings, consider a switch and load controller for lighting:
In the one-to-one case, a single switch controls a single light
In the one-to-many case, a single switch controls several lights
In the many-to-one case, several switches control a single light, such as a light
on a staircase, where there are switches at the top and bottom of the stairs,
either of which can be used to switch on the light
It is also possible to envisage many-to-many bindings where in the last scenario there
are several lights on the staircase, all of which are controlled by either switch.
The way bindings are configured depends on the type of network (described in Section
1.6), as follows:
Pre-configured system: Bindings are factory-configured and stored in the
application image.
Self-configuring system: Bindings are automatically created during network
installation using discovery software that finds compatible nodes/clusters.
Custom system: Bindings are created manually by the system integrator or
installation technician, who may use a graphical software tool to draw binding
lines between clusters on nodes.
plane
Security
ZDO
Service
The NWK layer has an associated database, called the NWK Information Base (NIB).
This contains attributes required in the management of the NWK layer.
Application
JenOS
RTOS
PDM
ZigBee PRO Stack Integrated
(see Figure 11 for details) Peripherals
PWRM
API
PDUM
DBG
The NXP ZigBee PRO software includes Application Programming Interfaces (APIs)
to facilitate simplified application development for wireless networks. These APIs
comprise C functions that can be incorporated directly in application code.
Two general categories of API are supplied:
ZigBee PRO APIs - see Section 3.1.1
JenOS APIs - see Section 3.1.2
In addition, the above figure shows the Integrated Peripherals API that can be used to
interact with the on-chip hardware peripherals of the JN51xx device. This API is
described in the JN514x Integrated Peripherals API User Guide (JN-UG-3066) and
the JN516x Integrated Peripherals API User Guide (JN-UG-3087).
All the above APIs are supplied in the ZigBee PRO Software Developers Kits (SDKs).
For more details on the SDKs, refer to Section 4.1.
Application layer
Application Framework (AF)
ZigBee
JenOS Device
Application ZDO API
APIs Objects
object
(ZDO)
JenOS
ZDP API AF API ZDO Management
Essential functionality, includ- ZDO API: Network formation RTOS API: Managing tasks
ing network formation and and local network management and ISRs (Interrupt Service
management ZDP API: Network discovery Routines)
and remote network manage-
ment
Basic data transfer AF API: Sending and receiving PDUM API: Assembling and
data messages disassembling data messages
Note that:
ZigBee PRO API function names are prefixed with ZPS (for ZigBee PRO
Stack function). The function names also incorporate Apl (for Application
function) and the acronym for the API to which the function belongs:
ZDO function names include Zdo (e.g. ZPS_eAplZdoPoll())
ZDP function names include Zdp (e.g. ZPS_eAplZdpBindRequest())
AF function names include Af (e.g. ZPS_eAplAfUnicastDataReq())
JenOS API function names are prefixed with the acronym for the JenOS
module to which the function belongs:
OS for RTOS functions
PDM for PDM functions
PWRM for PWRM functions
PDUM for PDUM functions
DBG for DBG functions
A similar naming convention is used in structures and enumerations.
The following lists provide an idea of the contents of the installers that are relevant to
ZigBee PRO application development:
SDK Libraries (JN-SW-4040, JN-SW-4062, JN-SW-4064):
ZigBee PRO and IEEE 802.15.4 stack software
ZigBee PRO APIs
JenOS APIs
SE or ZLL application profile software and APIs (not in JN-SW-4040)
ZPS and JenOS Configuration Editors (not in JN-SW-4040)
Integrated Peripherals API and Board API
SDK Toolchain (JN-SW-4041):
Eclipse IDE (Integrated Development Environment)
JN51xx compiler
JN51xx Flash programmer
Cygwin Command Line Interface (CLI)
You will develop your applications using the Eclipse platform, which provides an
Integrated Development Environment (IDE) for all stages of application development
and is supplied in the SDK Toolchain (JN-SW-4041). NXP-specific tools have been
devised for Eclipse, including configuration editors (see below), a compiler and a
linker. The Eclipse platform is described in the SDK Installation and User Guide
(JN-UG-3064).
Network and OS configuration editors are provided as Eclipse plug-ins:
ZPS Configuration Editor: This is used to set network parameters.
JenOS Configuration Editor: This is used to configure JenOS resources.
The above configuration editors are introduced in Chapter 11. These plug-ins are
provided in the SDKs for JN516x but are available separately for JN5148 - refer to the
SDK Installation and User Guide (JN-UG-3064).
Co-ordinator
Other Node
Network
Send and
receive data
Leave network
At initialisation, the same function calls are needed for all node types (although, once
started, the stack will perform initialisation tasks according to the specific node type,
as described in Section 5.1.1 and Section 5.1.2). These function calls are listed below,
in the required order:
1. OS_vStart() must first be called to start the JenOS RTOS.
2. PDUM_vInit() must be called to initialise the JenOS PDU Manager.
3. PWRM_vInit() to initialise the JenOS Power Manager in order to facilitiate
low-power modes such as sleep and doze.
4. PDM_vInit() to initialise the JenOS Persistent Data Manager in order to save
context and application data for retrieval after a power break.
5. ZPS_eAplAfInit() must be called to initialise the Application Framework.
6. ZPS_eAplZdoStartStack() must be called to start the ZigBee PRO stack.
Once the Co-ordinator (and therefore network) has started, the stack event
ZPS_EVENT_NWK_STARTED is generated on the device. If the Co-ordinator fails to
start, the stack event ZPS_EVENT_NWK_FAILED_TO_START is generated.
When a node joins the Co-ordinator, the stack event
ZPS_EVENT_NWK_NEW_NODE_HAS_JOINED is generated on the Co-ordinator.
Once the stack has been started using ZPS_eAplZdoStartStack(), a Router or End
Device works through the following process to join a network:
1. Searches for a network to join
As part of the ZPS_eAplZdoStartStack() function call, the device searches for
networks by listening for beacons from Routers and Co-ordinators of ZigBee
PRO networks in the neighbourhood. The radio channel for this search is pre-
configured via the ZPS Configuration Editor (see Section 12.2.3) in the same
way as for the Co-ordinator as either a fixed channel (in the range 11-26) or a
set of channels to scan. Thus, the device listens for beacons in the relevant
channel(s).
On completion of this search, the subsequent actions depend on the pre-set
value of the 64-bit Extended PAN ID (EPID), which is set via the advanced
device parameter APS Use Extended PAN ID in the ZPS Configuration Editor
(see Section 12.2.4):
If the pre-set EPID value is non-zero, this value identifies a specific
network to join (assuming the Co-ordinator has been pre-set with the same
EPID - see Section 5.1.1). Provided that a network with this EPID has
been discovered in the search, the device attempts to join this network as
described in Step 3 below (therefore bypassing Step 2).
If the pre-set EPID value is zero, the results of the search are reported in a
ZPS_EVENT_NWK_DISCOVERY_COMPLETE stack event, which
contains details of the networks discovered (see Section 5.2.1). The
device must then select a network to join, as described in Step 2 below.
2. Selects a network to join
On the basis of the results in ZPS_EVENT_NWK_DISCOVERY_COMPLETE,
the application must select a network which the device will attempt to join. The
search results contain a recommended network, selected as the first ZigBee
PRO network detected that is allowing nodes to join. The application is,
however, free to choose another network, where this choice may be based on
LQI value (detected signal strength).
Once a node has joined the network, each endpoint application on the node is next
likely to search for compatible endpoints on remote nodes with which it can
communicate, as described in Section 5.2.2.
If the node successfully joins the network (via the designated parent), the stack event
ZPS_EVENT_NWK_NEW_NODE_HAS_JOINED is generated on the parent node
and one of the following stack events is generated on the joined node:
ZPS_EVENT_NWK_JOINED_AS_ROUTER (if joined as a Router)
ZPS_EVENT_NWK_JOINED_AS_ENDDEVICE (if joined as an End Device)
These events contain the network address that the parent has allocated to the joined
node.
If the join request is unsuccessful, the ZPS_EVENT_NWK_FAILED_TO_JOIN event
is generated on the joining node.
Once the node has joined the pre-determined parent, the node is next likely to search
for compatible endpoints on remote nodes with which it can communicate, as
described in Section 5.2.2.
A receiving endpoint which satisfies the supplied criteria replies to the request with a
Match_Desc_rsp response which, when received, must be collected on the requesting
node using the RTOS function OS_eCollectMessage(). The requesting application
may bind to a compatible endpoint (see Section 5.4) and communicate with the
endpoint using binding or addressing (see Section 5.5).
An Address Map table can be maintained on a node, where each entry of this table
contains the pair of addresses for a remote node - the 64-bit IEEE/MAC address and
16-bit network address. The Address Map is automatically updated by the stack when
a Device_annce announcement is received from a remote node (described in the Note
above). However, you can also add an address-pair to this table using the function
ZPS_eAplZdoAddAddrMapEntry(). The Address Map must be properly maintained
if the application employs IEEE addresses to identify remote nodes. In addition, when
application-level security (see Section 5.7) is used in sending data from one node to
another, the Address Map on the sending node must contain an entry for the target
node.
Node Descriptor
The Node descriptor contains basic information about the node, such as its ZigBee
node type and the radio frequency bands supported. The following functions can be
used to obtain a Node descriptor:
ZPS_eAplAfGetNodeDescriptor() obtains the Node descriptor of the local
node. The result is stored in a structure of type
ZPS_tsAplAfNodeDescriptor.
ZPS_eAplZdpNodeDescRequest() requests the Node descriptor of a remote
node. The result is stored in a structure of type
ZPS_tsAplZdpNodeDescriptor.
Power Descriptor
The Node Power descriptor contains information about the nodes supported power
sources and present power source. The following functions can be used to obtain a
Power descriptor:
ZPS_eAplAfGetNodePowerDescriptor() obtains the Node Power descriptor
of the local node. The result is stored in a structure of type
ZPS_tsAplAfNodePowerDescriptor.
ZPS_eAplZdpPowerDescRequest() requests the Node Power descriptor of a
remote node. The result is stored in a structure of type
ZPS_tsAplZdpNodePowerDescriptor.
Note that elements of the Node Power descriptor can be set on the local node using
the ZPS Configuration Editor.
Simple Descriptor
There is a Simple descriptor for each endpoint on a node. The information in this
descriptor includes the ZigBee application profile supported by the endpoint as well as
details of its input and output clusters. The following functions can be used to obtain a
Simple descriptor:
ZPS_eAplAfGetSimpleDescriptor() obtains the Simple descriptor of a
particular endpoint on the local node. The result is stored in a structure of type
ZPS_tsAplAfSimpleDescriptor.
ZPS_eAplZdpSimpleDescRequest() requests the Simple descriptor of a
particular endpoint on a remote node. The result is stored in a structure of type
ZPS_tsAplZdpSimpleDescReq.
The returned Simple descriptor includes a list of input clusters and a list of output
clusters of the endpoint.
When requesting a Simple descriptor from a remote node, if the cluster lists are long,
the Simple descriptor may not fit into the APDU of the response. In this case, the
returned Simple descriptor will contain incomplete cluster lists, but the remainder of
the lists can be recovered using ZPS_eAplZdpExtendedSimpleDescRequest().
It is also possible to search for nodes on the basis of certain criteria in the Simple
descriptors of their endpoints - for example, search for endpoints which support a
particular ZigBee application profile, or which have a particular list of input clusters
and/or output clusters. Such a search can be performed using the function
ZPS_eAplZdpMatchDescRequest(). Use of this function is described in Section
5.2.2.
User Descriptor
The User descriptor is a user-defined character string, normally used to describe the
node (e.g. Thermostat). The maximum length of the character string is 16, by default.
A node need not have a User descriptor - if it has one, this must be indicated in the
Node descriptor. The following functions can be used to access a User descriptor:
ZPS_eAplZdpUserDescSetRequest() sets the User descriptor of a remote
node.
ZPS_eAplZdpUserDescRequest() requests the User descriptor of a remote
node. The result is stored in a structure of type ZPS_tsAplZdpUserDescReq.
The above functions can only be used to access the User descriptor of a
non-NXP device (which supports this descriptor), since the storage of a User
descriptor on an NXP JN51xx device is not supported.
Complex Descriptor
The Complex descriptor is an optional descriptor which contains device information
such as manufacturer, model and serial number. The function
ZPS_eAplZdpComplexDescRequest() allows the Complex descriptor of a remote
node to be requested. However, the NXP ZigBee PRO stack does not support the
functionality to produce a valid response and this function is provided only for
compatibility with non-NXP products that do support the relevant functionality.
Active Endpoints
An endpoint on the local node can be configured as enabled or disabled using the
function ZPS_eAplAfSetEndpointState(). An enabled endpoint is described as
active. The current state of a local endpoint can be obtained using the function
ZPS_eAplAfGetEndpointState().
It is also possible to configure whether a local endpoint will be included in the results
of network discovery operations, e.g. when ZPS_eAplZdpMatchDescRequest() is
called. The discoverable state of a local endpoint can be set using the function
ZPS_eAplAfSetEndpointDiscovery(), while this state can be obtained using the
function ZPS_eAplAfGetEndpointDiscovery().
A list of the active endpoints on a remote can be obtain using the function
ZPS_eAplZdpActiveEpRequest(). This functions submits an Active_EP_req request
to the target node, which replies with an Active_EP_rsp response. If the active
endpoint list is too long to fit into the APDU of the response, the returned list will be
incomplete. However, the remainder of the list can be recovered using the function
ZPS_eAplZdpExtendedActiveEpRequest(). Note that an endpoint is included in the
list only if it is active and discoverable.
Servers
A node can host one or more of the following servers in a ZigBee PRO network:
Primary Trust Centre
Backup Trust Centre
Primary Binding Table Cache
Backup Binding Table Cache
Primary Discovery Cache
Backup Discovery Cache
Network Manager
The function ZPS_eAplZdpSystemServerDiscoveryRequest() can be used to
discover the servers hosted by other nodes in the network. The function broadcasts a
System_Server_Discovery_req request to all nodes. A remote node replies with a
System_Server_Discovery_rsp response containing a bitmap indicating the servers
hosted by the node.
Functions are provided for storing the local nodes discovery information in another
nodes primary discovery cache (normally in the parent or another ascendant node).
First of all, ZPS_eAplZdpDiscoveryStoreRequest() must be called to allocate
memory space for this information in the remote nodes cache. This function sends a
Discovery_store_req request to the remote node, which replies with a
Discovery_store_rsp response. The local nodes information can then be stored in the
remote nodes primary discovery cache using the following functions (which all
operate on a request/response basis):
Node descriptor: Stored using ZPS_eAplZdpNodeDescStoreRequest()
Power descriptor: Stored using ZPS_eAplZdpPowerDescStoreRequest()
Simple descriptor: Stored using ZPS_eAplZdpSimpleDescStoreRequest()
Active endpoints list: Stored using ZPS_eAplZdpActiveEpStoreRequest()
A nodes information can be removed from a primary discovery cache using the
function ZPS_eAplZdpRemoveNodeCacheRequest(). This function can be called
on the local node to remove a third nodes information from the primary discovery
cache of a remote node.
5.4 Binding
For the purpose of data communication between applications running on different
nodes, it may be useful to bind the relevant source and destination endpoints. When
data is subsequently sent from the source endpoint, it is automatically routed to the
bound destination endpoint(s) without the need to specify a destination address. For
example, a binding could be created between the temperature sensor endpoint on a
thermostat node and the switch endpoint on a heating controller node. Details of a
binding are held in a Binding table on the source node. Binding is introduced more fully
in Section 2.6.2, where bindings are one-to-one, one-to-many or many-to-one.
This section describes setting up a Bind Request Server and how to bind together two
nodes, as well as how to unbind them. Access to the Binding tables is also described.
5.5.1.1 Unicast
A unicast is a data transmission to a single destination - in this case, a single endpoint.
The destination node for a unicast can be specified using the network address or the
IEEE/MAC address of the node:
ZPS_eAplAfUnicastDataReq() is used to send a data packet to an endpoint
on a node with a given network address.
ZPS_eAplAfUnicastIeeeDataReq() is used to send a data packet to an
endpoint on a node with a given IEEE/MAC address.
Neither of these functions provide any indication that the data packet has been
successfully delivered to its destination. However, equivalent functions are available
which request the destination node to provide an acknowledgement of data received
- these with acknowledgement functions are ZPS_eAplAfUnicastAckDataReq()
and ZPS_eAplAfUnicastIeeeAckDataReq(), requiring network and IEEE/MAC
addresses respectively. These functions request end-to-end acknowledgements
which, when received, generate ZPS_EVENT_APS_DATA_ACK events (note that the
next hop ZPS_EVENT_APS_DATA_CONFIRM events will also be generated). A
timeout of approximately 1600 ms is applied to the acknowledgements. If an
acknowledgement has not been received within the timeout period, the data is re-sent,
and up to 3 more re-tries can subsequently be performed before the data transfer is
abandoned completely (which occurs approximately 3 seconds after the initial send).
The unicast with acknowledgement functions, ZPS_eAplAfUnicastAckDataReq()
and ZPS_eAplAfUnicastIeeeAckDataReq(), also allow a large data packet to be
sent that may be fragmented into multiple messages during transmission. Application
design issues concerned with fragmented data transfers are outlined in Appendix B.1.
5.5.1.2 Broadcast
A broadcast is a data transmission to all network nodes, although it is possible to
select a subset of nodes. The following destinations are possible:
All nodes
All nodes for which receiver on when idle - these include the Co-ordinator,
Routers and non-sleeping End Devices
All Routers and the Co-ordinator
An End Device which is asleep will be unable to receive a data packet directly, so the
data is buffered by its parent for collection later. The End Device must explicitly
request this data, once awake. This method of receiving data is called data polling and
is described in Section 5.5.3.
Once a data packet has been collected from a message queue, the data can be
extracted from the APDU instance using the JenOS PDUM function
PDUM_u16APduInstanceReadNBO(). The APDU instance must then be released
using the JenOS function PDUM_eAPduFreeAPduInstance().
Note: End Devices that are not enabled for sleep can
receive messages directly and therefore do not need to
poll. An End Device is pre-configured as either sleeping
or non-sleeping via the End Device parameter Sleeping
in the ZPS Configuration Editor (see Section 12.2.2).
Data polling is performed using the function ZPS_eAplZdoPoll() in the End Device
application. This function requests the buffered data and should normally be called
immediately after waking from sleep. If the poll request is successfully sent to the
parent, a ZPS_EVENT_NWK_POLL_CONFIRM stack event will occur on the End
Device. The subsequent arrival of data from the parent is indicated by the stack event
ZPS_EVENT_AF_DATA_INDICATION. Any messages forwarded from the parent
should then be collected from the relevant message queue using the RTOS function
OS_eCollectMessage(), just as for normal data reception described in Section 5.5.2.
Application design issues concerned with transferring data to a sleeping End Device
are outlined in Appendix B.2.
number of nodes that will require the services of the Trust Centre must be set on the
nominated node using the network parameter Route Record Table Size in the ZPS
Configuration Editor (the default number is 4).
Security can be set up in the application code using the function
ZPS_vAplSecSetInitialSecurityState(), which must be called before
ZPS_eAplAfInit() and ZPS_eAplZdoStartStack() - see Section 5.1.
This network key does not need to be transported over-air and so is not exposed to
the risk of detection.
Part II:
Reference Information
ZPS_eAplZdoStartStack
ZPS_teStatus ZPS_eAplZdoStartStack(void);
Description
This function starts the ZigBee PRO stack. The steps taken depend on the node type:
If the device is the Co-ordinator, this function will start the network formation process.
If the device is a Router or End Device, this function will start the network discovery
process - that is, the device will search for a network to join.
When the stack starts, the 2400-MHz radio channel to be used by the device is
selected. The channels (in the range 11 to 26) available to the device should be
specified in advance using the ZPS Configuration Editor (see Chapter 12) and can
be either of the following:
A fixed channel
A set of channels for a channel scan:
If the device is the Co-ordinator, this is the set of channels that the device will
scan to find a suitable operating channel for the network.
If the device is a Router or End Device, this is the set of channels that the device
will scan to find a network to join.
If this function successfully initiates network formation or discovery,
ZPS_E_SUCCESS will be returned. Subsequent results from this process will then
be reported through stack events (see Section 9.1 for details of these events):
If the Co-ordinator successfully creates a network, the event
ZPS_EVENT_NWK_STARTED is generated. Otherwise, the event
ZPS_EVENT_NWK_FAILED_TO_START is generated.
When the network discovery process for a Router or End Device has completed, the
subsequent actions depend on the Extended PAN ID (EPID) that has been pre-set
using the ZPS Configuration Editor:
If a zero EPID value was pre-set, the stack event
ZPS_EVENT_NWK_DISCOVERY_COMPLETE is generated. This includes a list
of the detected networks and the index (in the list) of the recommended network to
join. You can then call ZPS_eAplZdoJoinNetwork() to join the desired network.
If a non-zero EPID value was pre-set, the device will automatically attempt to join
the network with this EPID, provided that such a network has been discovered.
Note that the permit joining setting of the potential parent will be ignored.
The maximum depth (number of levels below the Co-ordinator) of the network is 15.
Parameters
None
Returns
ZPS_E_SUCCESS (stack started and network formation/discovery begun)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoGetDeviceType
ZPS_teZdoDeviceType ZPS_eAplZdoGetDeviceType(void);
Description
This function can be used to obtain the ZigBee device type (Co-ordinator, Router or
End Device) of the local node.
Parameters
None
Returns
ZigBee device type, one of:
ZPS_ZDO_DEVICE_COORD (Co-ordinator)
ZPS_ZDO_DEVICE_ROUTER (Router)
ZPS_ZDO_DEVICE_ENDDEVICE (End Device)
ZPS_eAplZdoDiscoverNetworks
ZPS_teStatus ZPS_eAplZdoDiscoverNetworks(
uint32 u32ChannelMask);
Description
This function can be used by a Router or End Device to initiate a network discovery
- that is, to find a network to join.
A network discovery is performed when the stack is started using the function
ZPS_eAplZdoStartStack(). The function ZPS_eAplZdoDiscoverNetworks() can
be used to perform subsequent network discoveries (for example, if the initial search
did not yield any suitable networks).
As part of this function call, you must specify a value which indicates the 2400-MHz
radio channels (numbered 11 to 26) to be used in the network search. There are two
ways of setting this parameter:
A single value in the range 11 to 26 can be specified, indicating that the corresponding
channel (and no other) must be used - for example, 12 indicates use channel 12.
A 32-bit mask can be used to specify a set of channels that the device will scan to find
a network - each of bits 11 to 26 represents the corresponding radio channel, where the
channel will be included in the scan if the bit is set to 1 (and excluded if cleared to 0).
Therefore, the value 0x07FFF800 represents all channels.
Note that if an invalid value is specified for this parameter, the default value of
0x07FFF800 (all channels) will be used.
If this function successfully initiates a network discovery, ZPS_E_SUCCESS will be
returned. The network discovery results will then be reported through the event
ZPS_EVENT_NWK_DISCOVERY_COMPLETE (for details of this event, refer to
Section 7.2.2.9). This includes a list of the detected networks and the index (in the
list) of the recommended network to join. You should then call
ZPS_eAplZdoJoinNetwork() to join the desired network.
Parameters
u32ChannelMask Radio channel(s) for network discovery (see above)
Returns
ZPS_E_SUCCESS (network discovery started)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoJoinNetwork
ZPS_teStatus ZPS_eAplZdoJoinNetwork(
ZPS_tsNwkNetworkDescr *psNetworkDescr);
Description
This function can be used by a Router or End Device to send a request to join a
particular network, following a network discovery.
Parameters
*psNetworkDescr Pointer to network descriptor of network to join
Returns
ZPS_E_SUCCESS (join request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoRejoinNetwork
ZPS_teStatus ZPS_eAplZdoRejoinNetwork(void);
Description
This function can be used by an active Router or End Device to send a request to
rejoin its previous network. The function should be called if the application detects
that it has lost its connection to the network - this is indicated by an excessive number
of failed communications (for example, with many missing acknowledgements).
If the rejoin request is successfully sent, the function will return ZPS_E_SUCCESS
(note that this does not mean that device has rejoined the network). The result of the
rejoin request will then be reported through a stack event (see Section 9.1 for details
of these events):
If the device successfully rejoined the network as a Router, the event
ZPS_EVENT_NWK_JOINED_AS_ROUTER is generated.
If the device successfully rejoined the network as an End Device, the event
ZPS_EVENT_NWK_JOINED_AS_ENDDEVICE is generated.
If the rejoin request was unsuccessful, the event
ZPS_EVENT_NWK_FAILED_TO_JOIN is generated.
In the case of a successful rejoin, the node will retain its previously allocated 16-bit
network address.
Note that the permit joining status of the potential parent is ignored during a rejoin.
Parameters
None
Returns
ZPS_E_SUCCESS (rejoin request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoDirectJoinNetwork
ZPS_teStatus ZPS_eAplZdoDirectJoinNetwork(
uint64 u64Addr,
uint8 u8Capability);
Description
This function can be used on a Router and on the Co-ordinator to pre-determine the
child nodes that will directly join it. The function is called to register each child node
separately and the IEEE/MAC address of the child node must be specified.
The function adds the registered node to its Neighour table, and must be called only
when the parent node is fully up and running in the network. Since the child node has
not yet joined the network but is in the Neighbour table, it will be perceived by the
parent as having been orphaned. Therefore, when the child node attempts to join the
network, it must perform a rejoin as an orphan by calling the function
ZPS_eAplZdoOrphanRejoinNetwork().
Parameters
u64Addr IEEE/MAC address of child node to be registered
u8Capability A bitmap indicating the operational capabilities of the child
node - this bitmap is detailed in Table 8 on page 205
Returns
ZPS_E_SUCCESS
(child node successfully registered)
ZPS_APL_APS_E_ILLEGAL_REQUEST
(address 0x0, address 0xFFFFFFFFFFFFFFFF, own address, ZDO busy)
ZPS_NWK_ENUM_ALREADY_PRESENT
ZPS_NWK_ENUM_NEIGHBOR_TABLE_FULL
ZPS_eAplZdoOrphanRejoinNetwork
ZPS_teStatus ZPS_eAplZdoOrphanRejoinNetwork(void);
Description
This function can be used by an orphaned node to attempt to rejoin the network - the
orphaned node may be an End Device or a Router. The function should also be used
for a first-time join for which the parent has been pre-determined using the function
ZPS_eAplZdoDirectJoinNetwork().
The function starts the stack on the node. Therefore, when this function is used, there
is no need to explicitly start the stack using ZPS_eAplZdoStartStack().
If the rejoin request is successfully sent, the function will return ZPS_E_SUCCESS
(note that this does not mean that device has rejoined the network). The result of the
rejoin request will then be reported through a stack event (see Section 9.1 for details
of these events):
If the device successfully rejoined the network as a Router, the event
ZPS_EVENT_NWK_JOINED_AS_ROUTER is generated.
If the device successfully rejoined the network as an End Device, the event
ZPS_EVENT_NWK_JOINED_AS_ENDDEVICE is generated.
If the rejoin request was unsuccessful, the event
ZPS_EVENT_NWK_FAILED_TO_JOIN is generated.
In the case of a successful rejoin of a genuinely orphaned node, the node will retain
its previously allocated 16-bit network address.
Note that the permit joining status of the potential parent is ignored during a rejoin.
Parameters
None
Returns
ZPS_E_SUCCESS
(rejoin request successfully sent)
ZPS_APL_APS_E_ILLEGAL_REQUEST
(missing EPID, called from Co-ordinator, ZDO busy)
ZPS_eAplZdoPermitJoining
ZPS_teStatus ZPS_eAplZdoPermitJoining(
uint8 u8PermitDuration);
Description
This function can be used on a Router or the Co-ordinator to control whether new
child nodes are allowed to join it - that is, to set the nodes permit joining status. The
function can be used to enable joining permanently or for a fixed duration, or to
disable joining (permanently).
The specified parameter value determines the permit joining status, as follows:
0 Disables joining
1 - 254 Enables joining for specified time interval, in seconds
255 Enables joining permanently
For example, if the parameter is set to 60, joining will be enabled for the next 60
seconds and then automatically disabled.
Parameters
u8PermitDuration Time duration, in seconds, for which joining will be permitted
(see above)
Returns
ZPS_E_SUCCESS (permit joining status successfully set)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_u16AplZdoGetNetworkPanId
uint16 ZPS_u16AplZdoGetNetworkPanId(void);
Description
This function obtains the 16-bit PAN ID of the ZigBee network to which the local node
currently belongs.
Parameters
None
Returns
PAN ID of current network
ZPS_u64AplZdoGetNetworkExtendedPanId
uint64 ZPS_u64AplZdoGetNetworkExtendedPanId(void)
Description
This function obtains the 64-bit Extended PAN ID (EPID) of the ZigBee PRO network
to which the local node currently belongs.
Parameters
None
Returns
Extended PAN ID of current network
ZPS_u8AplZdoGetRadioChannel
uint8 ZPS_u8AplZdoGetRadioChannel(void);
Description
This function obtains the 2400-MHz band channel in which the local node is currently
operating. The channel is represented by an integer in the range 11 to 26.
Parameters
None
Returns
Radio channel number (in range 11-26)
ZPS_eAplZdoBind
ZPS_teStatus ZPS_eAplZdoBind(
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint16 u16DstAddr,
uint64 u64DstIeeeAddr,
uint8 u8DstEndpoint);
Description
This function requests a binding to be created between an endpoint on the local node
and an endpoint on a remote node. The source endpoint and cluster must be
specified, as well as the destination node and endpoint. The destination node is
specified using both its 64-bit IEEE (MAC) address and its 16-bit network address.
The binding is added to the binding table on the local node.
A binding to multiple remote endpoints (collected into a group) can be created using
the function ZPS_eAplZdoBindGroup().
Parameters
u16ClusterId Identifier of cluster on source node to be bound
u8SrcEndpoint Number of endpoint (1-240) on source node to be bound
u16DstAddr 16-bit network address of destination for binding
u64DstIeeeAddr 64-bit IEEE (MAC) address of destination for binding
u8DstEndpoint Number of endpoint on destination node to be bound
Returns
ZPS_E_SUCCESS (binding successfully created)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoUnbind
ZPS_teStatus ZPS_eAplZdoUnbind(
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint16 u16DstAddr,
uint64 u64DstIeeeAddr,
uint8 u8DstEndpoint);
Description
This function requests an existing binding to be removed between an endpoint on the
local node and an endpoint on a remote node, where this binding was created using
the function ZPS_eAplZdoBind(). The source endpoint and cluster must be
specified, as well as the destination node and endpoint. The destination node is
specified using both its 64-bit IEEE (MAC) address and its 16-bit network address.
The binding is removed from the binding table on the local node.
Parameters
u16ClusterId Identifier of bound cluster on source node
u8SrcEndpoint Number of bound endpoint (1-240) on source node
u16DstAddr 16-bit network address of destination for binding
u64DstIeeeAddr 64-bit IEEE (MAC) address of destination for binding
u8DstEndpoint Number of bound endpoint on destination node
Returns
ZPS_E_SUCCESS (binding successfully removed)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoBindGroup
ZPS_teStatus ZPS_eAplZdoBindGroup(
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint16 u16DstGrpAddr);
Description
This function requests a binding to be created between an endpoint on the local node
and multiple endpoints on remote nodes. The source endpoint and cluster must be
specified, as well as the destination nodes/endpoints for the binding, which must be
specified using a 16-bit group address, previously set up using
ZPS_eAplZdoGroupEndpointAdd().
The binding is added to the binding table on the local node.
Parameters
u16ClusterId Identifier of cluster on source node to be bound
u8SrcEndpoint Number of endpoint (1-240) on source node to be bound
u16DstGrpAddr 16-bit group address of destination group for binding
Returns
ZPS_E_SUCCESS (binding successfully created)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoUnbindGroup
ZPS_teStatus ZPS_eAplZdoUnbindGroup(
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint16 u16DstGrpAddr);
Description
This function requests an existing binding to be removed between an endpoint on the
local node and a group of endpoints on remote nodes, where this binding was
created using the function ZPS_eAplZdoBindGroup(). The source endpoint and
cluster must be specified, as well as the destination nodes/endpoints for the binding,
which must be specified using a 16-bit group address.
The binding is removed from the binding table on the local node.
Parameters
u16ClusterId Identifier of bound cluster on source node
u8SrcEndpoint Number of bound endpoint (1-240) on source node
u16DstGrpAddr 16-bit group address of bound destination group
Returns
ZPS_E_SUCCESS (binding successfully removed)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoPoll
ZPS_teStatus ZPS_eAplZdoPoll(void);
Description
This function can be used by an End Device to poll its parent for pending data.
Since an End Device is able to sleep, messages addressed to the End Device are
buffered by the parent for delivery when the child is ready. This function requests this
buffered data and should normally be called immediately after waking from sleep.
This function call will trigger a confirmation event,
ZPS_EVENT_NWK_POLL_CONFIRM, if the poll request is successfully sent to the
parent. The subsequent arrival of data from the parent is indicated by a
ZPS_EVENT_APS_DATA_INDICATION event. Any messages forwarded from the
parent should then be collected using the RTOS function OS_eCollectMessage().
Parameters
None
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoLeaveNetwork
ZPS_teStatus ZPS_eAplZdoLeaveNetwork(
uint64 u64Addr,
bool bRemoveChildren,
bool bRejoin);
Description
This function can be used to request a node to leave the network. The leaving node
can be a child of the requesting node or can be the requesting node itself (excluding
the Co-ordinator).
The node being asked to leave the network is specified by means of its IEEE (MAC)
address (or zero, if a node is requesting itself to leave the network). You must also:
Use the parameter bRemoveChildren to specify whether children of the leaving node
must leave their parent - if this is the case, the leaving node will automatically call
ZPS_eAplZdoLeaveNetwork() for each of its children. This parameter must always be
set to FALSE when the function is called on an End Device (as there are no children).
Use the parameter bRejoin to specify whether the leaving node must attempt to rejoin
the network (probably via another parent) immediately after leaving.
Parameters
u64Addr 64-bit IEEE (MAC) address of node to leave network
(zero value will cause requesting node to leave network)
bRemoveChildren Boolean value indicating whether children of leaving node
must leave their parent:
TRUE: Children to leave
FALSE: Children not to leave
bRejoin Boolean value indicating whether leaving node must attempt
to rejoin network immediately after leaving:
TRUE: Rejoin network immediately
FALSE: Do not rejoin network
Returns
ZPS_E_SUCCESS (removal of node successfully started)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
Description
This function controls the action of a Router node on receiving a leave request. It
has no effect on a Co-ordinator or End Device.
If called with bLeave set to TRUE, the Router will obey a leave request.
If called with bLeave set to FALSE, the Router will ignore leave request messages.
Parameters
pvNwk Pointer to NWK layer instance
bLeave Boolean value indicating whether the Router will leave the network when
requested or will ignore leave request messages:
TRUE - Obey leave request messages
FALSE - Ignore leave request messages
ZPS_teStatus ZPS_vAplSecSetInitialSecurityState(
ZPS_teZdoNwkKeyState eState,
uint8 *pu8Key,
uint8 u8KeySeqNum);
Description
This function is used to configure the initial state of ZigBee security on the local node.
This requires a security key to be specified that will be used in setting up network-
level security. Note that before using this function, security must be enabled on the
node via the device parameter Security Enabled in the ZPS Configuration Editor.
You must provide a pointer to a security key of one of the following types:
Default network key (only relevant to Trust Centre)
Pre-configured network key
Pre-configured link key
These keys are described in Section 5.7.1.
It is also possible to specify no network key. This option is required when the node is
in a network for which a default network key has been defined on the Trust Centre.
You must also specify the sequence number for a default or pre-configured network
key (this number is used to uniquely identify the key).
Parameters
eState The type of key specified, one of:
ZPS_ZDO_NO_NETWORK_KEY
ZPS_ZDO_PRECONFIGURED_NETWORK_KEY
ZPS_ZDO_DEFAULT_NETWORK_KEY
ZPS_ZDO_PRECONFIGURED_LINK_KEY
pu8Key Pointer to key
u8KeySeqNum Sequence number of specified network key
(parameter is ignored when specifying a link key)
Returns
ZPS_E_SUCCESS (security state successfully initialised)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_teStatus ZPS_vAplSecSetInitialSecurityState(
ZPS_teZdoNwkKeyState eState,
uint8 *pu8Key,
uint8 u8KeySeqNum
ZPS_teApsLinkKeyType eKeyType);
Description
This function is used to configure the initial state of ZigBee security on the local node.
This requires a security key to be specified that will be used in setting up network-
level security. Note that before using this function, security must be enabled on the
node via the device parameter Security Enabled in the ZPS Configuration Editor.
You must provide a pointer to a security key of one of the following types:
Default network key (only relevant to Trust Centre)
Pre-configured network key
Pre-configured link key
These keys are described in Section 5.7.1.
It is also possible to specify no network key. This option is required when the node is
in a network for which a default network key has been defined on the Trust Centre.
You must also specify the sequence number for a default or pre-configured network
key (this number is used to uniquely identify the key).
A ZigBee Light Link (ZLL) network supports both the ZLL and Home Automation (HA)
joining mechanisms. This function must therefore be called twice:
1. Register the HA global link key with the state
ZPS_ZDO_PRECONFIGURED_LINK_KEY and the type
ZPS_APS_GLOBAL_LINK_KEY.
2. Register the ZLL key (production or test) with the state ZPS_ZDO_ZLL_LINK_KEY
and the type ZPS_APS_GLOBAL_LINK_KEY.
Parameters
eState The state of the key, one of:
ZPS_ZDO_NO_NETWORK_KEY
ZPS_ZDO_PRECONFIGURED_NETWORK_KEY
ZPS_ZDO_DEFAULT_NETWORK_KEY
ZPS_ZDO_PRECONFIGURED_LINK_KEY
ZPS_ZDO_ZLL_LINK_KEY
pu8Key Pointer to key
Returns
ZPS_E_SUCCESS (security state successfully initialised)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoTransportNwkKey
ZPS_teStatus ZPS_eAplZdoTransportNwkKey(
uint8 u8DstAddrMode,
ZPS_tuAddress uDstAddress,
uint8 au8Key[ZPS_SEC_KEY_LENGTH],
uint8 u8KeySeqNum,
bool bUseParent,
uint64 u64ParentAddr);
Description
This function can be used on the Trust Centre to send the network key to one or
multiple nodes. On reaching the target node(s), the key is only stored but can be
subsequently designated the active network key using the function
ZPS_eAplZdoSwitchKeyReq().
The target node can be specified by means of its network address or IEEE/MAC
address. A broadcast to multiple nodes in the network can be achieved by specifying
a special network address or IEEE/MAC address - see Section 8.3.
If the destination is a single node, it is possible to send the key to the parent of the
destination node.
Note that this function will also reset the frame counter on the target node(s).
Parameters
u8DstAddrMode Type of destination address:
ZPS_E_ADDR_MODE_SHORT - 16-bit network address
ZPS_E_ADDR_MODE_IEEE - 64-bit IEEE/MAC address
All other values are reserved
uDstAddress Destination address (address type as specified through
u8DstAddrMode) - special broadcast addresses are detailed
in Section 8.3
au8Key[] Array containing the network key to be transported. This array
has a length equal to ZPS_SEC_KEY_LENGTH
u8KeySeqNum Sequence number of the specified key
bUseParent Indicates whether to send key to parent of target node:
TRUE - send to parent
FALSE - do not send to parent
u64ParentAddr 64-bit IEEE/MAC address of parent (if used)
Returns
ZPS_E_SUCCESS (key successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoSwitchKeyReq
ZPS_teStatus ZPS_eAplZdoSwitchKeyReq(
uint8 u8DstAddrMode,
ZPS_tuAddress uDstAddress,
uint8 u8KeySeqNum);
Description
This function can be used (normally by the Trust Centre) to request one or multiple
nodes to switch to a different active network key. The new network key is specified
using its unique sequence number and the key must have been pre-loaded into the
target node(s) using the function ZPS_eAplZdoTransportNwkKey() or
ZPS_eAplZdoRequestKeyReq().
The target node can be specified by means of its network address or IEEE/MAC
address. A broadcast to multiple nodes in the network can be achieved by specifying
a special network address or IEEE/MAC address - see Section 8.3.
Parameters
u8DstAddrMode Type of destination address:
ZPS_E_ADDR_MODE_SHORT - 16-bit network address
ZPS_E_ADDR_MODE_IEEE - 64-bit IEEE/MAC address
All other values are reserved
uDstAddress Destination address (address type as specified through
u8DstAddrMode) - special broadcast addresses are detailed
in Section 8.3
u8KeySeqNum Sequence number of new network key to adopt
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoRequestKeyReq
ZPS_teStatus ZPS_eAplZdoRequestKeyReq(
uint8 u8KeyType,
uint64 u64IeeePartnerAddr);
Description
This function can be used to request an application link key or network key from the
Trust Centre:
Application link key: This key will be used to encrypt/decrypt communications with
another partner node. The IEEE/MAC address of this partner node must be specified
as part of the function call. The Trust Centre will respond by sending the application link
key to both the local node and the partner node. When it arrives, this key will be
automatically saved by the stack and the event ZPS_EVENT_ZDO_LINK_KEY will be
generated once the link key has been installed and is ready to be used.
Network key: This key can be used to encrypt/decrypt communications with all
network nodes. The Trust Centre will respond by sending the network key to the
requesting node. When it arrives, the key will be automatically saved by the stack but
not implemented (the key can be activated from the Trust Centre using the function
ZPS_eAplZdoSwitchKeyReq()).
In the case of requesting a network key, the function parameter u64IeeePartnerAddr
is ignored.
Parameters
u8KeyType Type of key to request:
1 - network key
2 - application link key
All other values reserved
u64IeeePartnerAddr 64-bit IEEE/MAC address of partner node (for link key only)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_teStatus ZPS_eAplZdoAddReplaceLinkKey(
uint64 u64IeeeAddr,
uint8 au8Key[ZPS_SEC_KEY_LENGTH]);
Description
This function can be used to introduce or replace the application link key on the local
node, where this key will be used to encrypt and decrypt communications with the
specified partner node.
The function must be called on both the local node and the partner node. Note that
the Trust Centres record of the application link key for this pair of nodes remains
unchanged.
If the JenOS Persistent Data Manager (PDM) module is enabled, this function will
also save the application link key to external Non-Volatile Memory (normally Flash
memory). This allows the key to be automatically recovered during a subsequent
cold start (e.g. following a power failure). For information on application link key
recovery in a Smart Energy network, refer to the ZigBee PRO Smart Energy API User
Guide (JN-UG-3059).
Parameters
u64IeeeAddr 64-bit IEEE/MAC address of partner node for which the
specified link key is valid
au8Key[] Array containing the link key to be added/replaced. This array
has a length equal to ZPS_SEC_KEY_LENGTH
Returns
ZPS_E_SUCCESS (link key successfully installed)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_teStatus ZPS_eAplZdoAddReplaceLinkKey(
uint64 u64IeeeAddr,
uint8 au8Key[ZPS_SEC_KEY_LENGTH],
ZPS_teApsLinkKeyType eKeyType);
Description
This function can be used to introduce or replace the application link key on the local
node, where this key will be used to encrypt and decrypt communications with the
specified partner node.
The function must be called on both the local node and the partner node. Note that
the Trust Centres record of the application link key for this pair of nodes remains
unchanged.
If the JenOS Persistent Data Manager (PDM) module is enabled, this function will
also save the application link key to Non-Volatile Memory. This allows the key to be
automatically recovered during a subsequent cold start (e.g. following a power
failure). For information on application link key recovery in a Smart Energy network,
refer to the ZigBee PRO Smart Energy API User Guide (JN-UG-3059).
Parameters
u64IeeeAddr 64-bit IEEE/MAC address of partner node for which the
specified link key is valid
au8Key[] Array containing the link key to be added/replaced. This array
has a length equal to ZPS_SEC_KEY_LENGTH
eKeyType The type of the key, one of:
ZPS_APS_UNIQUE_LINK_KEY
ZPS_APS_GLOBAL_LINK_KEY
Returns
ZPS_E_SUCCESS (link key successfully installed)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoRemoveLinkKey
ZPS_teStatus ZPS_eAplZdoRemoveLinkKey(
uint64 u64IeeeAddr);
Description
This function can be used to remove the current application link key that is used to
encrypt and decrypt communications between the local node and the specified
partner node.
The function must be called on both the local node and the partner node. Note that
the Trust Centres record of the application link key for this pair of nodes remains
unchanged.
In the absence of an application link key, communications between these nodes will
subsequently be secured using the network key.
Parameters
u64IeeeAddr 64-bit IEEE/MAC address of partner node for which the link
key is to be removed
Returns
ZPS_E_SUCCESS (link key successfully removed)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoRemoveDeviceReq
ZPS_teStatus ZPS_eAplZdoRemoveDeviceReq(
uint64 u64ParentAddr,
uint64 u64ChildAddr);
Description
This function can be used (normally by the Co-ordinator/Trust Centre) to request
another node (such as a Router) to remove one of its children from the network (for
example, if the child node does not satisfy security requirements).
In the case of a JN516x device, the Router receiving this request will ignore the
request unless it has originated from the Trust Centre or is a request to remove itself.
If the request was sent without APS layer encryption, the device will ignore the
request. If APS layer security is not in use, the alternative function
ZPS_eAplZdoLeaveNetwork() should be used.
Parameters
u64ParentAddr 64-bit IEEE/MAC address of parent to be instructed
u64ChildAddr 64-bit IEEE/MAC address of child node to be removed
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoSetDevicePermission
void ZPS_eAplZdoSetDevicePermission(
ZPS_teDevicePermissions u8DevicePermissions);
Description
This function can be used on any device to set the permissions for certain requests
from other nodes. The possible settings are:
Allow all requests from all other nodes (ALL_PERMITED)
Do not allow join requests from all other nodes (JOIN_DISALLOWED)
Do not allow data requests from all other nodes (DATA_REQUEST_DISALLOWED)
The function is particularly useful in disabling the generation of APS (end-to-end)
acknowledgements, using DATA_REQUEST_DISALLOWED - for example, in a
Smart Energy application it is necessary to disable APS acknowdgements during the
key establishment process when the (local) node joins a network.
Parameters
u8DevicePermissions Bitmap of permissions to be set, constructed using the
following enumerations:
ZPS_DEVICE_PERMISSIONS_ALL_PERMITED
ZPS_DEVICE_PERMISSIONS_JOIN_DISALLOWED
ZPS_DEVICE_PERMISSIONS_DATA_REQUEST_DISALLOWED
Returns
ZPS_E_SUCCESS (permissions successfully set)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_bAplZdoTrustCenterSetDevicePermissions
ZPS_teStatus
ZPS_bAplZdoTrustCenterSetDevicePermissions(
uint64 u64DeviceAddr,
ZPS_teTCDevicePermissions u8DevicePermissions);
Description
This function can be used by the Trust Centre to set the permissions for certain
requests from a particular node. The possible settings are:
Allow all requests from the specified node (ALL_PERMITED)
Do not allow join requests from the specified node (JOIN_DISALLOWED)
Do not allow data requests from the specified node (DATA_REQUEST_DISALLOWED)
Parameters
u64DeviceAddr 64-bit IEEE/MAC address of node for which permissions are
to be set
u8DevicePermissions Bitmap of permissions to be set, constructed using the
following enumerations:
ZPS_TRUST_CENTER_ALL_PERMITED
ZPS_TRUST_CENTER_JOIN_DISALLOWED
ZPS_TRUST_CENTER_DATA_REQUEST_DISALLOWED
Returns
ZPS_E_SUCCESS (permissions successfully set)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_bAplZdoTrustCenterGetDevicePermissions
ZPS_teStatus
ZPS_bAplZdoTrustCenterGetDevicePermissions(
uint64 u64DeviceAddr,
ZPS_teTCDevicePermissions *pu8DevicePermissions);
Description
This function can be used by the Trust Centre to obtain its own permissions for
certain requests from a particular node. The possible settings are:
Allow all requests from the specified node
Do not allow join requests from the specified node
Do not allow data requests from the specified node
Parameters
u64DeviceAddr 64-bit IEEE/MAC address of node for which permissions
are to be obtained
pu8DevicePermissions Pointer to bitmap containing permissions obtained, where:
0 indicates all requests allowed
1 indicates join requests disallowed
2 indicates data requests disallowed
3 indicates data and join requests disallowed
Higher bits are reserved for future use
Returns
ZPS_E_SUCCESS (permissions successfully obtained)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_bAplZdoTrustCenterRemoveDevice
ZPS_teStatus ZPS_bAplZdoTrustCenterRemoveDevice(
uint64 u64DeviceAddr);
Description
This function can be used by the Trust Centre to delete a node in its information base.
Parameters
u64DeviceAddr 64-bit IEEE/MAC address of node to be removed from list
Returns
ZPS_E_SUCCESS (node successfully removed from list)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_vTCSetCallback
Description
This function can be used to register a user-defined callback function on the Trust
Centre, where this callback function allows the application to decide whether to
permit a node to join that may or may not be known to the Trust Centre application.
The prototype of the user-defined callback function is:
bool fTransportKeyDecider(uint64 u64DeviceAddress);
where u64DeviceAddress is the IEEE/MAC address of the relevant node. To disallow
the node from joining the network, the callback function should return FALSE.
If the callback function is not registered or returns TRUE, the Trust Centre will send
the network key in a transport key command to the node, either:
encrypted with the nodes pre-configured link key, if this key is known to the Trust
Centre, or
encrypted with the Trust Centres default pre-configured link key otherwise (in this
case, the joining node will only be able to decrypt the transport key command and
complete the join if it also has the Trust Centres default pre-configured link key)
Registration of this callback function may be useful in controlling rejoins. A node can
initially join a network using its pre-configured link key (which is also known by the
Trust Centre), but this key may subsequently be replaced on the Trust Centre by an
application link key (shared only by the node and the Trust Centre). If the node later
leaves the network and loses its context data (including the application link key), it
may attempt to rejoin the network using its pre-configured link key again. The
callback function can allow the application to decide whether to permit such a rejoin.
If the rejoin is to be allowed, the callback function must replace the stored application
link key with the pre-configured link key on the Trust Centre before returning TRUE.
Parameters
pCallbackFn Pointer to user-defined callback function
Returns
None
ZPS_u16AplZdoGetNwkAddr
uint16 ZPS_u16AplZdoGetNwkAddr(void);
Description
This function obtains the 16-bit network address of the local node.
Parameters
None
Returns
16-bit network address obtained
ZPS_u64AplZdoGetIeeeAddr
uint64 ZPS_u64AplZdoGetIeeeAddr(void);
Description
This function obtains the 64-bit IEEE (MAC) address of the local node.
Parameters
None
Returns
64-bit IEEE/MAC address obtained
ZPS_eAplZdoAddAddrMapEntry
ZPS_teStatus ZPS_eAplZdoAddAddrMapEntry(
uint16 u16NwkAddr,
uint64 u64ExtAddr);
Description
This function can be used to add the addresses of a remote node to the local Address
Map table - each entry in this table stores the 16-bit network address and 64-bit IEEE
(MAC) address of a remote node.
Parameters
u16NwkAddr 16-bit network address of node to be added
u64ExtAddr 64-bit IEEE/MAC address of node to be added
Returns
ZPS_E_SUCCESS (addresses successfully added to table)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_u16AplZdoLookupAddr
Description
This function can be used to search the local Address Map table for the 16-bit
network address of the node with a given 64-bit IEEE (MAC) address.
Parameters
u64ExtAddr 64-bit IEEE/MAC address of node to be search for
Returns
16-bit network address obtained
ZPS_u64AplZdoLookupIeeeAddr
uint64 ZPS_u64AplZdoLookupIeeeAddr(
uint16 u16NwkAddr);
Description
This function can be used to search the local Address Map table for the 64-bit IEEE
(MAC) address of the node with a given 16-bit network address.
Parameters
u16NwkAddr 16-bit network address of node to be search for
Returns
64-bit IEEE/MAC address obtained
void ZPS_vSetOverrideLocalMacAddress(
uint64 *pu64Address);
Description
This function can be used to over-ride the 64-bit IEEE (MAC) address of a JN516x
device, where this address is stored locally in the index sector of Flash memory.
Parameters
pu64Address Pointer to the 64-bit IEEE MAC address
ZPS_eAplZdoGroupEndpointAdd
ZPS_teStatus ZPS_eAplZdoGroupEndpointAdd(
uint16 u16GroupAddr,
uint8 u8DstEndpoint);
Description
This function requests that the specified endpoint (on the local node) is added to the
group with the specified group address. This means that this endpoint will become
one of the destinations for messages sent to the given group address.
To form a group comprising endpoints from different nodes, it is necessary to call this
function for each endpoint individually, on the endpoints local node.
An endpoint can belong to more than one group.
Information on the endpoints in a group can be obtained from the Group Address
table in the AIB (which can be accessed using the function ZPS_psAplAibGetAib()).
Parameters
u16GroupAddr 16-bit group address
u8DstEndpoint Number of destination endpoint (1-240) on local node
Returns
ZPS_E_SUCCESS (endpoint successfully added to group)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoGroupEndpointRemove
ZPS_teStatus ZPS_eAplZdoGroupEndpointRemove(
uint16 u16GroupAddr,
uint8 u8DstEndpoint);
Description
This function requests that the specified endpoint (on the local node) is removed from
the group with the specified group address.
If you wish to remove an endpoint from all groups to which it belongs, use the function
ZPS_eAplZdoGroupAllEndpointRemove().
Information on the endpoints in a group can be obtained from the Group Address
table in the AIB (which can be accessed using the function
ZPS_psAplAibGetAib()).
Parameters
u16GroupAddr 16-bit group address
u8DstEndpoint Number of destination endpoint (1-240) on local node
Returns
ZPS_E_SUCCESS (endpoint successfully removed from group)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoGroupAllEndpointRemove
ZPS_teStatus ZPS_eAplZdoGroupAllEndpointRemove(
uint8 u8DstEndpoint);
Description
This function requests that the specified endpoint (on the local node) is removed from
all groups to which it currently belongs.
Information on the endpoints in a group can be obtained from the Group Address
table in the AIB (which can be accessed using the function
ZPS_psAplAibGetAib()).
Parameters
u8DstEndpoint Number of destination endpoint (1-240) on local node
Returns
ZPS_E_SUCCESS (endpoint successfully removed from all groups)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoRouteRequest
ZPS_teStatus ZPS_eAplZdoRouteRequest(
uint16 u16DstAddr,
uint8 u8Radius);
Description
This function requests the discovery of a route to the specified remote node (and that
this route is added to the Routing tables in the relevant Router nodes).
Parameters
u16DstAddr 16-bit network address of destination node
u8Radius Maximum number of hops permitted to destination node
(zero value specifies that default maximum is to be used)
Returns
ZPS_E_SUCCESS (route discovery request successfully initiated)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdoManyToOneRouteRequest
ZPS_teStatus ZPS_eAplZdoManyToOneRouteRequest(
bool bCacheRoute,
uint8 u8Radius);
Description
This function requests a many-to-one route discovery and should be called on a
node that will act as a concentrator in the network (that is, a node with which many
other nodes will need to communicate).
As a result of this function call, a route discovery message is broadcast across the
network and Routing table entries (for routes back to the concentrator) are stored in
the Router nodes.
The maximum number of hops to be taken by a route discovery message in this
broadcast must be specified. There is also an option to store the discovered routes
in a Route Record Table on the concentrator (for return communications).
Parameters
bCacheRoute Indicates whether to store routes in Route Record Table:
TRUE - store routes
FALSE - do not store routes
u8Radius Maximum number of hops of route discovery message
(zero value specifies that default maximum is to be used)
Returns
ZPS_E_SUCCESS (many-to-one route discovery successfully initiated)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_pvAplZdoGetAplHandle
void *ZPS_pvAplZdoGetAplHandle(void);
Description
This function obtains a handle for the Application layer instance.
Parameters
None
Returns
Pointer to Application layer instance
ZPS_pvAplZdoGetMacHandle
void *ZPS_pvAplZdoGetMacHandle(void);
Description
This function obtains a handle for the IEEE 802.15.4 MAC layer instance.
Parameters
None
Returns
Pointer to MAC layer instance
ZPS_pvAplZdoGetNwkHandle
void *ZPS_pvAplZdoGetNwkHandle(void);
Description
This function obtains a handle for the ZigBee NWK layer instance.
Parameters
None
Returns
Pointer to NWK layer instance
ZPS_psNwkNibGetHandle
Description
This function obtains a handle for the NIB (Network Information Base) corresponding
to the specified NWK layer instance.
The function should be called after ZPS_pvAplZdoGetNwkHandle(), which is used
to obtain a pointer to the NWK layer instance.
The NIB is detailed in the ZigBee Specification (05347) from the ZigBee Alliance.
This function is not strictly a ZDO function.
Parameters
pvNwk Pointer to NWK layer instance
Returns
Pointer to NIB structure
Example
void *pvNwk; = ZPS_pvAplZdoGetNwkHandle();
ZPS_tsNwkNib *pNib = ZPS_psNwkNibGetHandle(pvNwk);
ZPS_psAplAibGetAib
ZPS_tsAplAib *ZPS_psAplAibGetAib(void);
Description
This function obtains a pointer to the AIB (Application Information Base) structure for
the application.
Parameters
None
Returns
Pointer to AIB structure
ZPS_psAplZdoGetNib
ZPS_tsNwkNib *ZPS_psAplZdoGetNib(void);
Description
This function obtains a pointer to the NIB (Network Information Base) structure.
The NIB is detailed in the ZigBee Specification (05347) from the ZigBee Alliance.
Parameters
None
Returns
Pointer to NIB structure
ZPS_u64NwkNibGetEpid
Description
This function can be used to obtain the Extended PAN ID (EPID) from a local NIB
(Network Information Base).
The handle of the NWK layer instance that contains the relevant NIB must be
specified. This handle can be obtained using ZPS_pvAplZdoGetNwkHandle().
Parameters
pNibHandle Pointer to NWK layer instance that contains the NIB
Returns
64-bit Extended PAN ID from NIB
ZPS_eAplZdoRegisterZdoFilterCallback
ZPS_teStatus ZPS_eAplZdoRegisterZdoFilterCallback(
void *fnptr);
Description
This function can be used to register a user-defined callback function which handles
messages received for an unsupported cluster which resides on the ZDO endpoint
(0), such as the cluster for an optional descriptor (e.g. user descriptor).
The prototype of the user-defined callback function is:
bool fn(uint16 clusterid);
where clusterid is the ID of the cluster that the function handles.
Normally, a message arriving for an unsupported ZDO cluster is not handled and the
stack automatically returns an unsupported message to the originating node. If this
function is used to register a callback function for an unsupported ZDO cluster then
on receiving a message for the cluster, the stack will invoke the callback function.
The stack will not respond with an unsupported message provided that the callback
function returns TRUE, otherwise the normal stack behaviour will continue.
The callback function allows the received message to be passed to the application
for servicing.
Parameters
fnptr Pointer to user-defined callback function
Returns
ZPS_E_SUCCESS (callback function successfully registered)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
Enumeration Description
Enumeration Description
ZPS_ZDO_DEVICE_COORD Co-ordinator
ZPS_ZDO_DEVICE_ROUTER Router
Enumeration Description
Enumeration Description
ZPS_eAplAfInit
ZPS_teStatus ZPS_eAplAfInit(void);
Description
This function initialises the Application Framework and must be the first network
function called in your application code. The function will first request a reset of the
Network (NWK) layer of the ZigBee PRO stack. It will then initialise certain network
parameters with values that have been pre-configured using the ZPS Configuration
Editor (see Chapter 12). These parameters include the node type and the Extended
PAN ID of the network.
Note: This function also resets the IEEE 802.15.4 MAC and
PHY levels of the stack. Therefore, if any customised MAC or
PHY settings are required, these must be made after this
function has been called (such settings could be made with
the 802.15.4 Stack API and/or the JN51xx Integrated
Peripherals API, which are supplied in the ZigBee PRO SDK).
The device will be started as the pre-configured node type. If this is a Co-ordinator,
the Extended PAN ID of the node is set to the pre-configured value. Note that if a
zero value has been specified, the Co-ordinator will use its own IEEE/MAC address
for the Extended PAN ID.
Parameters
None
Returns
ZPS_E_SUCCESS (AF successfully initialised)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAibSetApsUseExtendedPanId
ZPS_teStatus ZPS_eAplAibSetApsUseExtendedPanId(
uint64 u64UseExtPanId);
Description
This function can be used to create an application record of the Extended PAN ID
(EPID) of the network to which the local device belongs.
The only use of this function for a Co-ordinator is described in Section 5.1.1.
The function should only be called on a Router or End Device in the manner described
in Section 5.1.2.
Parameters
u64UseExtPanId Extended PAN ID of network to which device belongs
Returns
ZPS_E_SUCCESS (Extended PAN ID record successfully created)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfUnicastDataReq
ZPS_teStatus ZPS_eAplAfUnicastDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint8 u8DstEndpoint,
uint16 u16DestAddr,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to a remote node (unicast), using the
remote nodes network address. You must specify the local endpoint and output
cluster from which the data originates (the cluster must be in the Simple descriptor
for the endpoint), as well as the network address of the remote node and the
destination endpoint on the node.
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, this
function call will fail (and return ZPS_E_ADSU_TOO_LONG). To send large APDUs,
use the function ZPS_eAplAfUnicastAckDataReq(), which automatically
implements data fragmentation (if required).
Once the sent data has reached the first hop node in the route to its destination, a
ZPS_EVENT_APS_DATA_CONFIRM event will be generated on the local node.
If data is sent using this function to a destination for which a route has not already
been established, the data will not be sent and a route discovery will be performed
instead. In this case, the function will return ZPS_NWK_ENUM_ROUTE_ERROR
and must later be re-called to send the data (see Note under Unicast on page 82).
Security (encryption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
u8DstEndpoint Destination endpoint number (1-240) on remote node
u16DstAddr Network address of destination node
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfUnicastIeeeDataReq
ZPS_teStatus ZPS_eAplAfUnicastIeeeDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint8 u8DstEndpoint,
uint64 u64DestAddr,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to a remote node (unicast), using the
remote nodes IEEE (MAC) address. You must specify the local endpoint and output
cluster from which the data originates (the cluster must be in the Simple descriptor
for the endpoint), as well as the IEEE address of the remote node and the destination
endpoint on the node.
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, this
function call will fail (and return ZPS_E_ADSU_TOO_LONG). To send large APDUs,
use the function ZPS_eAplAfUnicastIeeeAckDataReq(), which automatically
implements data fragmentation (if required).
Once the sent data has reached the first hop node in the route to its destination, a
ZPS_EVENT_APS_DATA_CONFIRM event will be generated on the local node.
If data is sent using this function to a destination for which a route has not already
been established, the data will not be sent and a route discovery will be performed
instead. In this case, the function will return ZPS_NWK_ENUM_ROUTE_ERROR
and must later be re-called to send the data (see Note under Unicast on page 82).
Security (encryption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
u8DstEndpoint Destination endpoint number (1-240) on remote node
u64DestAddr IEEE (MAC) address of destination node
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfUnicastAckDataReq
ZPS_teStatus ZPS_eAplAfUnicastAckDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint8 u8DstEndpoint,
uint16 u16DestAddr,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to a remote node (unicast), using the
remote nodes network address, and requires an acknowledgement to be returned
by the remote node once the data reaches its destination. You must specify the local
endpoint and output cluster from which the data originates (the cluster must be in the
Simple descriptor for the endpoint), as well as the network address of the remote
node and the destination endpoint on the node.
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, the
APDU will be broken up into fragments (NPDUs) for transmission, provided that
fragmentation has been enabled by setting the ZigBee network parameter Maximum
Number of Transmitted Simultaneous Fragmented Messages to a non-zero value.
If data is sent using this function to a destination for which a route has not already
been established, the data will not be sent and a route discovery will be performed
instead. In this case, the function will return ZPS_NWK_ENUM_ROUTE_ERROR
and must later be re-called to send the data (see Note under Unicast on page 82).
Once the sent data has reached the first hop node in the route to its destination, a
ZPS_EVENT_APS_DATA_CONFIRM event will be generated on the local node.
Then, once an acknowledgement has been received from the destination node, a
ZPS_EVENT_APS_DATA_ACK will be generated on the sending node.
Security (encyption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
u8DstEndpoint Destination endpoint number (1-240) on remote node
u16DstAddr Network address of destination node
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfUnicastIeeeAckDataReq
ZPS_teStatus ZPS_eAplAfUnicastIeeeAckDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint8 u8DstEndpoint,
uint64 u64DestAddr,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to a remote node (unicast), using the
remote nodes IEEE (MAC) address, and requires an acknowledgement to be
returned by the remote node once the data reaches its destination. You must specify
the local endpoint and output cluster from which the data originates (the cluster must
be in the Simple descriptor for the endpoint), as well as the IEEE address of the
remote node and the destination endpoint on the node.
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, the
APDU will be broken up into fragments (NPDUs) for transmission, provided that
fragmentation has been enabled by setting the ZigBee network parameter Maximum
Number of Transmitted Simultaneous Fragmented Messages to a non-zero value.
If data is sent using this function to a destination for which a route has not already
been established, the data will not be sent and a route discovery will be performed
instead. In this case, the function will return ZPS_NWK_ENUM_ROUTE_ERROR
and must later be re-called to send the data (see Note under Unicast on page 82).
Once the sent data has reached the first hop node in the route to its destination, a
ZPS_EVENT_APS_DATA_CONFIRM event will be generated on the local node.
Then, once an acknowledgement has been received from the destination node, a
ZPS_EVENT_APS_DATA_ACK will be generated on the sending node.
Security (encyption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
u8DstEndpoint Destination endpoint number (1-240) on remote node
u64DestAddr IEEE (MAC) address of destination node
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfGroupDataReq
ZPS_teStatus ZPS_eAplAfGroupDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint16 u16DstGroupAddr,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to a group of endpoints located on one
or more nodes (group multicast). You must specify the local endpoint and output
cluster from which the data originates (the cluster must be in the Simple descriptor
for the endpoint) as well as the group address of the group of destination endpoints.
A group is set up using the function ZPS_eAplZdoGroupEndpointAdd(). The data
is actually broadcast to all network nodes and each recipient node assesses whether
it has endpoints in the specified group.
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, this
function call will fail (and return ZPS_E_ADSU_TOO_LONG).
Once the data has been transmitted, a ZPS_EVENT_APS_DATA_CONFIRM event
will be generated on the local node.
Security (encyption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
u16DstGroupAddr Group address of destination endpoints
eSecurityMode Security mode for data transfer, one of:
ZPS_E_APL_AF_UNSECURE
(no security enabled)
ZPS_E_APL_AF_SECURE_NWK
(Network-level security using network key)
ZPS_E_APL_AF_WILD_PROFILE
(JN516x only. May be combined with above flags using OR
operator. Sends the message using the wild card profile
(0xFFFF) instead of the profile in the associated Simple
descriptor)
u8Radius Maximum number of hops permitted to destination node
(zero value specifies that default maximum is to be used)
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfBroadcastDataReq
ZPS_teStatus ZPS_eAplAfBroadcastDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
uint8 u8DstEndpoint,
ZPS_teAplAfBroadcastMode eBroadcastMode,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to all network nodes that conform to the
specified broadcast mode. You must specify the local endpoint and output cluster
from which the data originates (the cluster must be in the Simple descriptor for the
endpoint), as well as the destination endpoint(s) on the remote nodes.
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, this
function call will fail (and return ZPS_E_ADSU_TOO_LONG).
Following this function call, the APDU may be broadcast up to four times by the
source node (in addition, the APDU may be subsequently re-broadcast up to four
times by each intermediate routing node). If the transmission is successful, the event
ZPS_EVENT_APS_DATA_CONFIRM will be generated on the local node.
Security (encyption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
u8DstEndpoint Destination endpoint number (1-240) on remote node, or 255
for all endpoints on node
eBroadcastMode Type of broadcast, one of:
ZPS_E_BROADCAST_ALL
(all nodes)
ZPS_E_BROADCAST_ALL RX_ON
(all nodes with radio receiver permanently enabled)
ZPS_E_BROADCAST_ZC_ZR
(all Routers and Co-ordinator)
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfBoundDataReq
ZPS_teStatus ZPS_eAplAfBoundDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to all nodes/endpoints to which the
source node/endpoint has been previously bound (using the binding functions,
described in Section 8.1.3). You must specify the local endpoint and output cluster
from which the data originates (the cluster must be in the Simple descriptor for the
endpoint).
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, this
function call will fail (and return ZPS_E_ADSU_TOO_LONG).
Once the sent data has reached the first hop node in the route to its destination(s), a
ZPS_EVENT_BIND_REQUEST_SERVER event will be generated on the local
node. This event reports the status of the bound transmission, including the number
of bound endpoints for which the transmission has failed.
Security (encyption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
eSecurityMode Security mode for data transfer:
ZPS_E_APL_AF_UNSECURE
(no security enabled)
ZPS_E_APL_AF_SECURE
(Application-level security using link key and network key)
ZPS_E_APL_AF_SECURE_NWK
(Network-level security using network key)
ZPS_E_APL_AF_SECURE | ZPS_E_APL_AF_EXT_NONCE
(JN516x only. Application-level security using link key and
network key with the extended NONCE included in the frame)
ZPS_E_APL_AF_WILD_PROFILE
(JN516x only. May be combined with above flags using OR
operator. Sends the message using the wild card profile
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfBoundAckDataReq
ZPS_teStatus ZPS_eAplAfBoundAckDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint8 u8SrcEndpoint,
ZPS_teAplAfSecurityMode eSecurityMode,
uint8 u8Radius,
uint8 *pu8SeqNum);
Description
This function submits a request to send data to all nodes/endpoints to which the
source node/endpoint has been previously bound (using the binding functions,
described in Section 8.1.3) and requires an acknowledgement to be returned by the
remote node(s) once the data reaches its destination(s). You must specify the local
endpoint and output cluster from which the data originates (the cluster must be in the
Simple descriptor for the endpoint).
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the network, the
APDU will be broken up into fragments (NPDUs) for transmission, provided that
fragmentation has been enabled by setting the ZigBee network parameter Maximum
Number of Transmitted Simultaneous Fragmented Messages to a non-zero value.
Once the sent data has reached its final destination node(s), a
ZPS_EVENT_BIND_REQUEST_SERVER event will be generated on the local
node. This event reports the status of the bound transmission, including the number
of bound endpoints for which the transmission has failed.
Security (encyption/decryption) can be applied to the APDU, where this security can
be implemented at the Application layer or the network (ZigBee) layer, or both.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of relevant output cluster on source endpoint
u8SrcEndpoint Source endpoint number (1-240) on local node
eSecurityMode Security mode for data transfer:
ZPS_E_APL_AF_UNSECURE
(no security enabled)
ZPS_E_APL_AF_SECURE
(Application-level security using link key and network key)
ZPS_E_APL_AF_SECURE_NWK
(Network-level security using network key)
ZPS_E_APL_AF_SECURE | ZPS_E_APL_AF_EXT_NONCE
(JN516x only. Application-level security using link key and
network key with the extended NONCE included in the frame)
ZPS_E_APL_AF_WILD_PROFILE
(JN516x only. May be combined with above flags using OR
operator. Sends the message using the wild card profile
(0xFFFF) instead of the profile in the associated Simple
descriptor)
u8Radius Maximum number of hops permitted to destination node
(zero value specifies that default maximum is to be used)
*pu8SeqNum Pointer to location to receive sequence number assigned to
data transfer request. If not required, set to NULL.
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfInterPanDataReq
ZPS_teStatus ZPS_eAplAfInterPanDataReq(
PDUM_thAPduInstance hAPduInst,
uint16 u16ClusterId,
uint16 u16ProfileId,
ZPS_tsInterPanAddress *psDstAddr,
uint8 u8Handle);
Description
This function submits a request to send data to one or more nodes in another ZigBee
PRO network - that is, to implement an inter-PAN transmission. The destination for
the data is specified in a structure (detailed in Section 7.2.3.3) which contains:
PAN ID of destination network (a broadcast to all reachable ZigBee PRO networks can
also be configured)
Address of destination node (this can be an IEEE/MAC or network address for a single
node, a group address for multiple nodes or a broadcast address for all nodes)
The data is sent in an Application Protocol Data Unit (APDU) instance, which can be
allocated using the PDUM function PDUM_hAPduAllocateAPduInstance() and
then written to using PDUM_u16APduInstanceWriteNBO().
If the APDU size is larger than the maximum packet size allowed on the local
network, this function call will fail (and return ZPS_E_ADSU_TOO_LONG).
Once the sent data has reached the first hop node in the route to its destination, a
ZPS_EVENT_APS_INTERPAN_DATA_CONFIRM event will be generated on the
local node (in the case of a broadcast or group multicast, this event is simply
generated once the data has been sent from the local node).
Security (encyption/decryption) cannot be applied to inter-PAN transmissions.
Parameters
hAPduInst Handle of APDU instance to be sent
u16ClusterId Identifier of cluster for which data is intended at destination
(must be a cluster of the application profile specified below)
u16ProfileId Identifier of application profile for which data is intended at
destination
psDstAddr Pointer to stucture containing destination PAN ID and address
(see Section 7.2.3.3)
u8Handle Handle for internal use (set to any value)
Returns
ZPS_E_SUCCESS
ZPS_APL_APS_E_ILLEGAL_REQUEST
MAC return codes, listed and described in Section 9.2.4
ZPS_vAplAfSetEndpointState
ZPS_teStatus ZPS_eAplAfSetEndpointState(
uint8 u8Endpoint,
bool bEnabled);
Description
This function puts the specified endpoint on the local node into the specified state
(enabled or disabled).
Parameters
u8Endpoint Endpoint number (on local node)
bEnabled State in which to put endpoint, one of:
TRUE: enable endpoint
FALSE: disable endpoint
Returns
ZPS_E_SUCCESS (endpoint state successfully set)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfGetEndpointState
ZPS_teStatus ZPS_eAplAfGetEndpointState(
uint8 u8Endpoint,
bool *pbEnabled);
Description
This function obtains the current state (enabled or disabled) of the specified endpoint
on the local node.
Parameters
u8Endpoint Endpoint number (on local node)
*pbEnabled Pointer to location to receive endpoint state. The returned
state is one of:
TRUE: endpoint enabled
FALSE: endpoint disabled
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfSetEndpointDiscovery
ZPS_teStatus ZPS_eAplAfSetEndpointDiscovery(
uint8 u8Endpoint,
uint16 u16ClusterId,
bool bOutput,
bool bDiscoverable);
Description
This function sets the discoverable state of the specified cluster of the specified
endpoint on the local node - that is, whether the cluster/endpoint will be included in
device discoveries initiated on the network.
If the cluster/endpoint is discoverable, it will appear in the Simple descriptor of the
local node and will also be included in match results requested using the function
ZPS_eAplZdpMatchDescRequest().
The initial discoverable state of the cluster/endpoint is pre-set using the ZPS
Configuration Editor (see Chapter 12).
Parameters
u8Endpoint Endpoint number (on local node)
u16ClusterId Cluster ID
bOutput Type of cluster (output or input), one of:
TRUE: Output cluster
FALSE: Input cluster
bDiscoverable Discoverable state to set, one of:
TRUE: Discoverable
FALSE: Not discoverable
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfGetEndpointDiscovery
ZPS_teStatus ZPS_eAplAfGetEndpointDiscovery(
uint8 u8Endpoint,
uint16 u16ClusterId,
bool bOutput,
bool_t *pbDiscoverable);
Description
This function obtains the discoverable state of the specified cluster of the specified
endpoint on the local node - that is, whether the cluster/endpoint will be included in
device discoveries initiated on the network.
If the cluster/endpoint is discoverable, it will appear in the Simple descriptor of the
local node and will also be included in match results requested using the function
ZPS_eAplZdpMatchDescRequest().
The initial discoverable state of the cluster/endpoint is pre-set using the ZPS
Configuration Editor (see Chapter 12). The state can subsequently be changed at
run-time using the function ZPS_eAplAfSetEndpointDiscovery().
Parameters
u8Endpoint Endpoint number (on local node)
u16ClusterId Cluster ID
bOutput Type of cluster (output or input), one of:
TRUE: Output cluster
FALSE: Input cluster
*pbDiscoverable Pointer to location to receive discoverable state, which will be
one of:
TRUE: Discoverable
FALSE: Not discoverable
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfGetNodeDescriptor
ZPS_teStatus ZPS_eAplAfGetNodeDescriptor(
ZPS_tsAplAfNodeDescriptor *psDesc);
Description
This function copies the Node descriptor (for the local node) from the context area of
the stack to the specified structure (the descriptor is returned through the functions
parameter).
Parameters
*psDesc Pointer to structure (see Section 7.2.1.1) to receive Node
descriptor
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_teStatus ZPS_eAplAfSetNodePowerDescriptor(
ZPS_tsAplAfNodePowerDescriptor *psDesc);
Description
This function copies the specified Node Power descriptor (for the local node) to the
context area of the stack.
Parameters
*psDesc Pointer to structure (see Section 7.2.1.2) containing Node
Power descriptor to be copied
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfGetNodePowerDescriptor
ZPS_teStatus ZPS_eAplAfGetNodePowerDescriptor(
ZPS_tsAplAfNodePowerDescriptor *psDesc);
Description
This function copies the Node Power descriptor (for the local node) from the context
area of the stack to the specified structure (the descriptor is returned through the
functions parameter).
Parameters
*psDesc Pointer to structure (see Section 7.2.1.2) to receive Node
Power descriptor
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplAfGetSimpleDescriptor
ZPS_teStatus ZPS_eAplAfGetSimpleDescriptor(
uint8 u8Endpoint,
ZPS_tsAplAfSimpleDescriptor *psDesc);
Description
This function copies the Simple descriptor for the specified endpoint (on the local
node) from the context area of the stack to the specified structure (the descriptor is
returned through the functions parameter).
Parameters
*psDesc Pointer to structure (see Section 7.2.1.3) to receive Simple
descriptor
Returns
ZPS_E_SUCCESS
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
7.2 AF Structures
This section describes the structures of the Application Framework (AF) API.
These include the following categories of structure:
Descriptor structures - see Section 7.2.1
Event structures - see Section 7.2.2
Other structures - see Section 7.2.3
7.2.1.1 ZPS_tsAplAfNodeDescriptor
The AF Node descriptor structure ZPS_tsAplAfNodeDescriptor is shown below.
typedef struct {
uint32 : 8; /* padding */
uint32 eLogicalType : 3;
uint32 bComplexDescAvail : 1;
uint32 bUserDescAvail : 1;
uint32 eReserved : 3; /* reserved */
uint32 eFrequencyBand : 5;
uint32 eApsFlags : 3;
uint32 u8MacFlags : 8;
uint16 u16ManufacturerCode;
uint8 u8MaxBufferSize;
uint16 u16MaxRxSize;
uint16 u16ServerMask;
uint16 u16MaxTxSize;
uint8 u8DescriptorCapability;
} ZPS_tsAplAfNodeDescriptor;
where:
eLogicalType contains 3 bits (bits 0-2) indicating the ZigBee device type of
the node, as follows:
000: Co-ordinator
001: Router
010: End Device
bComplexDescAvail is set to 1 if there is a Complex descriptor available for
node.
bUserDescAvail is set to 1 if there is a User descriptor available for node.
eReserved is reserved.
eFrequencyBand contains 5 bits detailing the frequency bands supported by
the node, as follows (a bit is set to 1 if the corresponding band is supported):
Bit 0: 868-868.6 MHz
Bit 2: 902-928 MHz
Bit 3: 2400-2483.5 MHz
Bits 1 and 4 are reserved
eApsFlags is not currently supported and set to zero.
eMacFlags contains 8 bits (bits 0-7) indicating the node capabilities, as
required by the IEEE 802.15.4 MAC sub-layer. These node capability flags are
described in Table 8 on page 205.
u16ManufacturerCode contains 16 bits (bits 0-15) indicating the
manufacturer code for the node, where this code is allocated to the
manufacturer by the ZigBee Alliance.
u8MaxBufferSize is the maximum size, in bytes, of an NPDU (Network
Protocol Data Unit).
u16MaxRxSize is the maximum size, in bytes, of an APDU (Application
Protocol Data Unit). This value can be greater than the value of
u8MaxBufferSize, due to the fragmentation of an APDU into NPDUs.
u16ServerMask contains 8 bits (bits 0-7) indicating the server status of the
node. This server mask is detailed in Table 10 on page 307.
u16MaxTxSize is the maximum size, in bytes, of the ASDU (Application Sub-
layer Data Unit) in which a message can be sent (the message may actually be
transmitted in smaller fragments)
u8DescriptorCapability contains 8 bits (bits 0-7) indicating the properties
of the node that can be used by other nodes in network discovery, as follows:
Bit Description
2-7 Reserved
7.2.1.2 ZPS_tsAplAfNodePowerDescriptor
The AF Node Power descriptor structure ZPS_tsAplAfNodePowerDescriptor is
shown below.
typedef struct {
uint32 eCurrentPowerMode : 4;
uint32 eAvailablePowerSources : 4;
uint32 eCurrentPowerSource : 4;
uint32 eCurrentPowerSourceLevel : 4;
} ZPS_tsAplAfNodePowerDescriptor;
where:
eCurrentPowerMode contains 4 bits (bits 0-3) indicating the power mode
currently used by the node, as follows:
0000: Receiver configured according to Receiver on when idle MAC flag
in the Node Descriptor (see Section 7.2.1.1)
0001: Receiver switched on periodically
0010: Receiver switched on when stimulated, e.g. by pressing a button
All other values are reserved
eAvailablePowerSources contains 4 bits (bits 0-3) indicating the available
power sources for the node, as follows (a bit is set to 1 if the corresponding
power source is available):
Bit 0: Permanent mains supply
Bit 1: Rechargeable battery
Bit 2: Disposable battery
Bit 4: Reserved
eCurrentPowerSource contains 4 bits (bits 0-3) indicating the current power
source for the node, as detailed for the element above (the bit corresponding to
the current power source is set to 1, all other bits are set to 0).
eCurrentPowerSourceLevel contains 4 bits (bit 0-3) indicating the current
level of charge of the nodes power source (mainly useful for batteries), as
follows:
0000: Critically low
0100: Approximately 33%
1000: Approximately 66%
1100: Approximately 100% (near fully charged)
7.2.1.3 ZPS_tsAplAfSimpleDescriptor
The AF Simple descriptor structure ZPS_tsAplAfSimpleDescriptor is shown below.
typedef struct {
uint16 u16ApplicationProfileId;
uint16 u16DeviceId;
uint8 u8DeviceVersion;
uint8 u8Endpoint;
uint8 u8InClusterCount;
uint8 u8OutClusterCount;
uint16 *pu16InClusterList;
uint16 *pu16OutClusterList;
} ZPS_tsAplAfSimpleDescriptor;
where:
u16ApplicationProfileId is the 16-bit identifier of the ZigBee application
profile supported by the endpoint. This must be an application profile identifier
issued by the ZigBee Alliance.
u16DeviceId is the 16-bit identifier of the ZigBee device description
supported by the endpoint. This must be a device description identifier issued
by the ZigBee Alliance.
u8DeviceVersion contains 4 bits (bits 0-3) representing the version of the
supported device description (default is 0000, unless set to another value
according to the application profile used).
u8Endpoint is the number, in the range 1-240, of the endpoint to which the
Simple descriptor corresponds.
u8InClusterCount is an 8-bit count of the number of input clusters,
supported on the endpoint, that will appear in the list pointed to by the
pu16InClusterList element.
u8OutClusterCount is an 8-bit count of the number of output clusters,
supported on the endpoint, that will appear in the pu16OutClusterList
element.
*pu16InClusterList is a pointer to the list of input clusters supported by
the endpoint (for use during the service discovery and binding procedures).
This is a sequence of 16-bit values, representing the cluster numbers (in the
range 1-240), where the number of values is equal to count
u8InClusterCount. If this count is zero, the pointer can be set to NULL.
*pu16OutClusterList is a pointer to the list of output clusters supported by
the endpoint (for use during the service discovery and binding procedures).
This is a sequence of 16-bit values, representing the cluster numbers (in the
range 1-240), where the number of values is equal to count
u8OutClusterCount. If this count is zero, the pointer can be set to NULL.
The structures are listed below, along with their page references.
Structure Page
ZPS_tsAfEvent 197
ZPS_tuAfEventData 197
ZPS_tsAfDataIndEvent 198
ZPS_tsAfDataConfEvent 199
ZPS_tsAfDataAckEvent 200
ZPS_tsAfNwkFormationEvent 201
ZPS_tsAfNwkJoinedEvent 201
ZPS_tsAfNwkJoinFailedEvent 201
ZPS_tsAfNwkDiscoveryEvent (JN5148 only) 202
ZPS_tsAfNwkDiscoveryEvent (JN516x only) 203
ZPS_tsAfNwkJoinIndEvent 204
ZPS_tsAfNwkLeaveIndEvent 205
ZPS_tsAfNwkLeaveConfEvent 206
ZPS_tsAfNwkStatusIndEvent 206
ZPS_tsAfNwkRouteDiscoveryConfEvent 207
ZPS_tsAfPollConfEvent 207
ZPS_tsAfNwkEdScanConfEvent 207
ZPS_tsAfErrorEvent 208
ZPS_tsAfZdoBindEvent 210
ZPS_tsAfZdoUnbindEvent 211
ZPS_tsAfZdoLinkKeyEvent 211
ZPS_tsAfBindRequestServerEvent 211
ZPS_tsAfInterPanDataIndEvent 212
ZPS_tsAfInterPanDataConfEvent 213
ZPS_tsAfZdpEvent 213
7.2.2.1 ZPS_tsAfEvent
This stucture contains the details of an event.
The ZPS_tsAfEvent structure is detailed below.
typedef struct {
ZPS_teAfEventType eType;
ZPS_tuAfEventData uEvent;
} ZPS_tsAfEvent;
where
eType indicates the event type, using the enumerations listed and described in
Section 9.1
uEvent is a structure containing the event data from the union of structures
detailed in Section 7.2.2.2
7.2.2.2 ZPS_tuAfEventData
This structure is a union of the data structures for the individual events described in
Section 7.2.2.3 through to Section 7.2.2.25.
The ZPS_tuAfEventData structure is detailed below.
typedef union
{
ZPS_tsAfDataIndEvent sApsDataIndEvent;
ZPS_tsAfDataConfEvent sApsDataConfirmEvent;
ZPS_tsAfDataAckEvent sApsDataAckEvent;
ZPS_tsAfNwkFormationEvent sNwkFormationEvent;
ZPS_tsAfNwkJoinedEvent sNwkJoinedEvent;
ZPS_tsAfNwkJoinFailedEvent sNwkJoinFailedEvent;
ZPS_tsAfNwkDiscoveryEvent sNwkDiscoveryEvent;
ZPS_tsAfNwkJoinIndEvent sNwkJoinIndicationEvent;
ZPS_tsAfNwkLeaveIndEvent sNwkLeaveIndicationEvent;
ZPS_tsAfNwkLeaveConfEvent sNwkLeaveConfirmEvent;
ZPS_tsAfNwkStatusIndEvent sNwkStatusIndicationEvent;
ZPS_tsAfNwkRouteDiscoveryConfEvent sNwkRouteDiscoveryConfirmEvent;
ZPS_tsAfPollConfEvent sNwkPollConfirmEvent;
ZPS_tsAfNwkEdScanConfEvent sNwkEdScanConfirmEvent;
ZPS_tsAfErrorEvent sAfErrorEvent;
ZPS_tsAfZdoBindEvent sZdoBindEvent;
ZPS_tsAfZdoUnbindEvent sZdoUnbindEvent;
ZPS_tsAfZdoLinkKeyEvent sZdoLinkKeyEvent;
ZPS_tsAfBindRequestServerEvent sBindRequestServerEvent;
ZPS_tsAfInterPanDataIndEvent sApsInterPanDataIndEvent;
ZPS_tsAfInterPanDataConfEvent sApsInterPanDataConfirmEvent;
ZPS_tsAfZdpEvent sApsZdpEvent;
} ZPS_tuAfEventData;
7.2.2.3 ZPS_tsAfDataIndEvent
This structure is used in the ZPS_EVENT_APS_DATA_INDICATION event, which
indicates the arrival of data on the local node.
The ZPS_tsAfDataIndEvent structure is detailed below.
typedef struct
{
uint8 u8DstAddrMode;
ZPS_tuAddress uDstAddress;
uint8 u8DstEndpoint;
uint8 u8SrcAddrMode;
ZPS_tuAddress uSrcAddress;
uint8 u8SrcEndpoint;
uint16 u16ProfileId;
uint16 u16ClusterId;
PDUM_thAPduInstance hAPduInst;
uint8 eStatus;
uint8 eSecurityStatus;
uint8 u8LinkQuality;
uint32 u32RxTime;
} ZPS_tsAfDataIndEvent;
where:
u8DstAddrMode indicates the type of destination address specified through the
element uDstAddress (see Table 7 below)
uDstAddress is the address of the destination node for the data packet (the
type of address is specified using the element u8DstAddrMode above)
u8DstEndpoint is the number of the destination endpoint (in range 1-240)
u8SrcAddrMode indicates the type of source address specified through the
element uSrcAddress (below) - this can be a 64-bit MAC/IEEE address or a
16-bit network address
uSrcAddress is the address of the source node for the data packet (the type of
address is specified using the element u8SrcAddrMode above)
u8SrcEndpoint is the number of the source endpoint (in range 1-240)
u16ProfileId is the identifier of the ZigBee device profile of the device which
can interpret the data
u16ClusterId is the identifier of the cluster (which belongs to the device profile
specified in u16ProfileId) which is capable of interpreting the data
hAPduInst is the handle of the APDU which contains the data
eStatus is one of the status codes from the NWK layer or MAC layer, detailed
in Section 9.2.3 and Section 9.2.4
eSecurityStatus indicates the type of security with which the packet was sent
- unsecured (0xAF), secured with network key (0xAC) or secured with link key
(0xAB)
u8LinkQuality is a measure of the signal strength of the radio link over which
the data packet was sent (for the last hop)
u32RxTime is reserved for future use.
7.2.2.4 ZPS_tsAfDataConfEvent
This structure is used in the ZPS_EVENT_APS_DATA_CONFIRM event, which
confirms that a data packet sent by the local node has been successfully passed down
the stack to the MAC layer and has made its first hop towards its destination (an
acknowledgment has been received from the next hop node).
The ZPS_tsAfDataConfEvent structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8SrcEndpoint;
uint8 u8DstEndpoint;
uint8 u8DstAddrMode;
ZPS_tuAddress uDstAddr;
uint8 u8SequenceNum;
} ZPS_tsAfDataConfEvent;
where:
u8Status is one of the status codes from the lower stack layers, detailed in
Section 9.2.
u8SrcEndpoint is the number of the (local) source endpoint for the data
transfer (in range 1-240)
u8DstEndpoint is the number of the destination endpoint for the data transfer
(in range 1-240)
u8DstAddrMode indicates the type of destination address specified through the
element uDstAddr (see Table 7 on page 199) - only values 0x02 (group
address) and 0x03 (network address) are valid in this structure
uDstAddr is the address of the destination node for the data packet (the type of
address is specified using the element u8DstAddrMode above)
u8SequenceNum is the sequence number of the request that initiated the data
transfer
7.2.2.5 ZPS_tsAfDataAckEvent
This structure is used in the ZPS_EVENT_APS_DATA_ACK event, which is
generated when an end-to-end acknowledgement is received from the destination
node during a data transfer in which an acknowledgement was requested.
typedef struct {
uint8 u8Status;
uint8 u8SrcEndpoint;
uint8 u8DstEndpoint;
uint8 u8DstAddrMode;
uint16 u16DstAddr;
uint8 u8SequenceNum;
uint16 u16ProfileId;
uint16 u16ClusterId;
} ZPS_tsAfDataAckEvent;
where:
u8Status is one of the status codes from the lower stack layers, detailed in
Section 9.2
u8SrcEndpoint is the number of the (local) source endpoint for the data
transfer (in range 1-240)
u8DstEndpoint is the number of the destination endpoint for the data transfer
(in range 1-240)
u8DstAddrMode indicates the type of destination address specified through the
element u16DstAddr (see Table 7 on page 199) - only values 0x01 (group
address) and 0x02 (network address) are valid in this structure
u16DstAddr is the 16-bit address of the destination node for the data transfer
and therefore of the node that sent the acknowledgement (the type of address
is specified using the element u8DstAddrMode above)
u8SequenceNum is the sequence number of the request that initiated the data
transfer
u16ProfileId is the identifier of the ZigBee device profile of the device for
which the data transfer was intended
u16ClusterId is the identifier of the cluster (which belongs to the device profile
specified in u16ProfileId) for which the data transfer was intended
7.2.2.6 ZPS_tsAfNwkFormationEvent
This structure is used in the event ZPS_EVENT_NWK_STARTED, which indicates
whether the network has been started (on the Co-ordinator).
The ZPS_tsAfNwkFormationEvent structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAfNwkFormationEvent;
where is one of the status codes from the lower stack layers, detailed in Section 9.2.
7.2.2.7 ZPS_tsAfNwkJoinedEvent
This structure is used in the events ZPS_EVENT_NWK_JOINED_AS_ROUTER and
ZPS_EVENT_NWK_JOINED_AS_ENDDEVICE, which confirm that the local device
(Router or End Device) has successfully joined a network.
The ZPS_tsAfNwkJoinedEvent structure reports the network address that the
parent has assigned to the new node and is detailed below.
typedef struct
{
uint16 u16Addr;
} ZPS_tsAfNwkJoinedEvent;
where u16Addr is the 16-bit network address allocated to the joining node.
7.2.2.8 ZPS_tsAfNwkJoinFailedEvent
This structure is used in the event ZPS_EVENT_NWK_FAILED_TO_JOIN, which
indicates that the local device has failed to join a network.
The ZPS_tsAfNwkJoinFailedEvent structure is detailed below.
typedef struct
{
uint8 u8Status;
} ZPS_tsAfNwkJoinFailedEvent;
where u8Status is one of the status codes from the lower stack layers, detailed in
Section 9.2.
7.2.2.11 ZPS_tsAfNwkJoinIndEvent
This structure is used in the event ZPS_EVENT_NWK_NEW_NODE_HAS_JOINED,
which notifies a Router or the Co-ordinator that a new child node has joined the
network.
The ZPS_tsAfNwkJoinIndEvent structure contains information about the new
node and is detailed below.
typedef struct
{
uint64 u64ExtAddr;
uint16 u16NwkAddr;
uint8 u8Capability;
uint8 u8Rejoin;
uint8 u8SecureRejoin;
} ZPS_tsAfNwkJoinIndEvent;
where:
u64ExtAddr is the 64-bit IEEE (MAC) address of the joining node
u16NwkAddr is the 16-bit network address assigned to the joining node
u8Capability is a bitmap indicating the operational capabilities of the joining
node. This bitmap is detailed in Table 8 below
u8Rejoin indicates the method used to join the network:
0x00 if joined through association
0x01 if joined directly or used orphaning
0x02 if was network rejoin
u8SecureRejoin indicates whether the join was performed in a secure manner
- zero represents FALSE and a non-zero value represents TRUE
Bits Description
0 Co-ordinator capability:
1: Node able to act as Co-ordinator
0: Node not able to act as Co-ordinator
1 Device type:
1: Full-Function Device (FFD)
0: Reduced-Function Device (RFD)
An FFD can act as any node type while an RFD cannot act
as the network Co-ordinator.
2 Power source:
1: Node is mains-powered
0: Node is not mains-powered
4-5 Reserved
6 Security capability:
1: High security
0: Standard security
7 Allocate address:
1: Network address should be allocated to node
0: Network address need not be allocated to node
7.2.2.12 ZPS_tsAfNwkLeaveIndEvent
This structure is used in the ZPS_EVENT_LEAVE_INDICATION event, which
indicates that a neighbouring node has left the network or a remote node has
requested the local node to leave.
The ZPS_tsAfNwkLeaveIndEvent structure is detailed below.
typedef struct {
uint64 u64ExtAddr;
uint8 u8Rejoin;
} ZPS_tsAfNwkLeaveIndEvent;
where:
u64ExtAddr is the 64-bit IEEE (MAC) address of the node that has left the
network, or is zero if the local node has been requested to leave the network
u8Rejoin indicates whether the leaving node was requested to attempt a
subsequent rejoin of the network - zero represents FALSE and a non-zero
value represents TRUE
7.2.2.13 ZPS_tsAfNwkLeaveConfEvent
This structure is used in the event ZPS_EVENT_NWK_LEAVE_CONFIRM, which
reports the results of a node leave request issued by the local node.
The ZPS_tsAfNwkLeaveConfEvent structure is detailed below.
typedef struct {
uint64 u64ExtAddr;
uint8 eStatus;
} ZPS_tsAfNwkLeaveConfEvent;
where:
u64ExtAddr is the 64-bit IEEE (MAC) address of the leaving node. This value
is zero if the local node itself is leaving
eStatus is the leave status returned by the lower layers -
ZPS_NWK_ENUM_SUCCESS, if the leave request has been successful
7.2.2.14 ZPS_tsAfNwkStatusIndEvent
This structure is used in the ZPS_EVENT_NWK_STATUS_INDICATION event, which
reports status information from the NWK layer of the stack.
The ZPS_tsAfNwkStatusIndEvent structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint8 u8Status;
} ZPS_tsAfNwkStatusIndEvent;
where:
u16NwkAddr is the 16-bit network address of the node associated with the
event
u8Status is one of the status codes from the lower stack layers, detailed in
Section 9.2.
7.2.2.15 ZPS_tsAfNwkRouteDiscoveryConfEvent
This structure is used in the ZPS_EVENT_NWK_ROUTE_DISCOVERY_CONFIRM
event, which confirms that a route discovery has been performed.
The ZPS_tsAfNwkRouteDiscoveryConfEvent structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8NwkStatus;
} ZPS_tsAfNwkRouteDiscoveryConfEvent;
where:
u8Status is one of the status codes from the MAC layer, detailed in Section
9.2.4
u8NwkStatus is one of the status codes from the NWK layer, detailed in
Section 9.2.3
7.2.2.16 ZPS_tsAfPollConfEvent
This structure is used in the ZPS_EVENT_NWK_POLL_CONFIRM event, which
reports the completion of a poll request sent from the (local) End Device to its parent.
The ZPS_tsAfPollConfEvent structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAfPollConfEvent;
where u8Status is one of the status codes from the lower stack layers, detailed in
Section 9.2.
7.2.2.17 ZPS_tsAfNwkEdScanConfEvent
This structure is used in the ZPS_EVENT_NWK_ED_SCAN event, which indicates
that an energy detect scan in the 2.4-GHz radio band has completed.
The ZPS_tsAfNwkEdScanConfEvent structure is defined as:
typedef ZPS_tsNwkNlmeCfmEdScan ZPS_tsAfNwkEdScanConfEvent;
where ZPS_tsNwkNlmeCfmEdScan is described in Section 7.2.3.2.
7.2.2.18 ZPS_tsAfErrorEvent
This structure is used in the ZPS_EVENT_ERROR event, which reports error
situations concerning the storage of received messages in APDU instances.
The ZPS_tsAfErrorEvent structure is detailed below.
typedef struct {
enum {
ZPS_ERROR_APDU_TOO_SMALL,
ZPS_ERROR_APDU_INSTANCES_EXHAUSTED,
ZPS_ERROR_NO_APDU_CONFIGURED,
ZPS_ERROR_OS_MESSAGE_QUEUE_OVERRUN
} eError;
union {
struct {
uint16 u16ProfileId;
uint16 u16ClusterId;
uint16 u16SrcAddr;
uint16 u16DataSize;
PDUM_thAPdu hAPdu;
uint8 u8SrcEndpoint;
uint8 u8DstEndpoint;
}sAfErrorApdu;
struct {
OS_thMessage hMessage;
} sAfErrorOsMessageOverrun;
} uErrorData;
} ZPS_tsAfErrorEvent;
The member enumerations and structures of the above structure are detailed below.
eError Enumerations
The error enumerations which are part of the ZPS_tsAfErrorEvent structure are
listed and described below.
sAfErrorApdu
This structure is used in the following errors:
ZPS_ERROR_APDU_TOO_SMALL, which reports that the allocated APDU
instance is too small to store a received message
ZPS_ERROR_APDU_INSTANCES_EXHAUSTED, which reports that there
are no allocated APDU instances left to store a received message
ZPS_ERROR_NO_APDU_CONFIGURED, which reports that no APDU has
been configured to store the received message
The sAfErrorApdu structure is detailed below.
struct {
uint16 u16ProfileId;
uint16 u16ClusterId;
uint16 u16SrcAddr;
uint16 u16DataSize;
PDUM_thAPdu hAPdu;
uint8 u8SrcEndpoint;
uint8 u8DstEndpoint;
}sAfErrorApdu;
where:
u16ProfileId is the identifier of the ZigBee application profile associated
with the source and destination endpoints for the message
u16ClusterId is the identifier of the cluster associated with the source and
destination endpoints for the message
u16SrcAddr is the 16-bit network address of the source node of the message
sAfErrorOsMessageOverrun
This structure is used in the ZPS_ERROR_OS_MESSAGE_QUEUE_OVERRUN
error, which indicates that a message queue is full and can accept no more messages.
The sAfErrorOsMessageOverrun structure is detailed below.
struct {
OS_thMessage hMessage;
} sAfErrorOsMessageOverrun;
where hMessage is the handle of the message type for the queue which is full.
7.2.2.19 ZPS_tsAfZdoBindEvent
This structure is used in the ZPS_EVENT_ZDO_BIND event, which indicates that the
local node has been successfully bound to one or more remote nodes.
The ZPS_tsAfZdoBindEvent structure is detailed below.
typedef struct {
ZPS_tuAddress uDstAddr;
uint8 u8DstAddrMode;
uint8 u8SrcEp;
uint8 u8DstEp;
} ZPS_tsAfZdoBindEvent;
where
uDstAddr is the address of the remote node for the binding (the type of
address is specified using the element u8DstAddrMode above)
u8DstAddrMode indicates the type of address specified through the element
uDstAddr (see Table 7 on page 199)
u8SrcEp is the number of the source endpoint for the binding (in range 1-240)
u8DstEp is the number of the destination endpoint for the binding
(in range 1-240)
7.2.2.20 ZPS_tsAfZdoUnbindEvent
This structure is used in the ZPS_EVENT_ZDO_UNBIND event, which indicates that
the local node has been successfully unbound from one or more remote nodes.
The ZPS_tsAfZdoUnbindEvent structure is defined as:
typedef ZPS_tsAfZdoBindEvent ZPS_tsAfZdoUnbindEvent;
where ZPS_tsAfZdoBindEvent is described in Section 7.2.2.19 (but for this event,
the data in the structure relates to unbinding rather than binding).
7.2.2.21 ZPS_tsAfZdoLinkKeyEvent
This structure is used in the ZPS_EVENT_ZDO_LINK_KEY event, which indicates
that a new application link key has been received and installed, and is ready for use.
The ZPS_tsAfZdoLinkKeyEvent structure is defined as:
typedef struct {
uint64 u64IeeeLinkAddr;
} ZPS_tsAfZdoLinkKeyEvent;
where u64IeeeLinkAddr is the IEEE/MAC address of the remote device with which
the installed link key is valid.
7.2.2.22 ZPS_tsAfBindRequestServerEvent
This structure is used in the ZPS_EVENT_BIND_REQUEST_SERVER event, which
reports the status of a data transmission sent from the (local) node to a set of bound
endpoints.
The ZPS_tsAfBindRequestServerEvent structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8SrcEndpoint;
uint32 u32FailureCount;
} ZPS_tsAfBindRequestServerEvent;
where:
u8Status is the overall status of the bound data transmission:
Success (1 or higher) indicates that the data packet was successfully
transmitted to all bound endpoints
Failure (0) indicates that the data packet was not successfully sent to at
least one bound endpoint (see u32FailureCount below)
u8SrcEndpoint is the number of the local endpoint from which the data
packet was sent
u32FailureCount is the number of bound endpoints for which the
transmission failed
7.2.2.23 ZPS_tsAfInterPanDataIndEvent
This structure is used in the ZPS_EVENT_APS_INTERPAN_DATA_INDICATION
event, which indicates that an inter-PAN data packet has arrived.
The ZPS_tsAfInterPanDataIndEvent structure is detailed below.
typedef struct
{
ZPS_tsInterPanAddress sDstAddr;
uint8 u8SrcAddrMode;
uint16 u16SrcPan;
uint64 u64SrcAddress;
uint16 u16ProfileId;
uint16 u16ClusterId;
PDUM_thAPduInstance hAPduInst;
uint8 eStatus;
uint8 u8DstEndpoint;
uint8 u8LinkQuality;
} ZPS_tsAfInterPanDataIndEvent;
where
sDstAddr is a structure of the type ZPS_tsInterPanAddress (see Section
7.2.3.3) which contains the PAN ID and address for the destination node(s) of
the inter-PAN data packet
u8SrcAddrMode indicates the type of address specified through the element
u64SrcAddress (see Table 7 on page 199)
u16SrcPan is the PAN ID of the network from which the data packet originates
u64SrcAddress is the address of the node which sent the data packet (the
type of address is specified using the element u8SrcAddrMode above)
u16ProfileId is the identifier of the application profile for which the data
packet is intended
u16ClusterId is the identifier of the cluster for which the data packet is
intended
hAPduInst is the handle of the APDU instance for the data packet
eStatus is one of the status codes from the lower stack layers, detailed in
Section 9.2
u8DstEndpoint is the number of the destination endpoint for the data packet
(in range 1-240)
u8LinkQuality is an LQI value indicating the perceived strength of the radio
signal which carried the received data packet
7.2.2.24 ZPS_tsAfInterPanDataConfEvent
This structure is used in the ZPS_EVENT_APS_INTERPAN_DATA_CONFIRM
event, which indicates that an inter-PAN communication has been sent by the local
node and an acknowledgement has been received from the first hop node (this
acknowledgement is not generated in the case of a broadcast).
The ZPS_tsAfInterPanDataConfEvent structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8Handle;
} ZPS_tsAfInterPanDataConfEvent;
where
u8Status is one of the status codes from the lower stack layers, detailed in
Section 9.2.
u8Handle is a handle for internal use
7.2.2.25 ZPS_tsAfZdpEvent
This structure is used in the ZPS_EVENT_APS_ZDP_REQUEST_RESPONSE
event, which indicates that a ZDP request or response has been received and
contains the data from the request/response packet.
The ZPS_tsAfZdpEvent structure is detailed below.
typedef struct {
uint8 u8SequNumber;
uint16 u16ClusterId;
union {
ZPS_tsAplZdpDeviceAnnceReq sDeviceAnnce;
ZPS_tsAplZdpMgmtNwkUpdateReq sMgmtNwkUpdateReq;
ZPS_tsAplZdpMgmtPermitJoiningReq sPermitJoiningReq;
ZPS_tsAplZdpDiscoveryCacheRsp sDiscoveryCacheRsp;
ZPS_tsAplZdpDiscoveryStoreRsp sDiscoveryStoreRsp;
ZPS_tsAplZdpNodeDescStoreRsp sNodeDescStoreRsp;
ZPS_tsAplZdpActiveEpStoreRsp sActiveEpStoreRsp;
ZPS_tsAplZdpSimpleDescStoreRsp sSimpleDescStoreRsp;
ZPS_tsAplZdpRemoveNodeCacheRsp sRemoveNodeCacheRsp;
ZPS_tsAplZdpEndDeviceBindRsp sEndDeviceBindRsp;
ZPS_tsAplZdpBindRsp sBindRsp;
ZPS_tsAplZdpUnbindRsp sUnbindRsp;
ZPS_tsAplZdpReplaceDeviceRsp sReplaceDeviceRsp;
ZPS_tsAplZdpStoreBkupBindEntryRsp sStoreBkupBindEntryRsp;
ZPS_tsAplZdpRemoveBkupBindEntryRsp sRemoveBkupBindEntryRsp;
ZPS_tsAplZdpBackupSourceBindRsp sBackupSourceBindRsp;
ZPS_tsAplZdpMgmtLeaveRsp sMgmtLeaveRsp;
ZPS_tsAplZdpMgmtDirectJoinRsp sMgmtDirectJoinRsp;
ZPS_tsAplZdpMgmtPermitJoiningRsp sPermitJoiningRsp;
ZPS_tsAplZdpNodeDescRsp sNodeDescRsp;
7.2.3.1 ZPS_tsNwkNetworkDescr
This structure is used in an array element in the structure
ZPS_tsAfNwkDiscoveryEvent, which is created as part of the
ZPS_EVENT_NWK_DISCOVERY_COMPLETE event which reports the networks
detected during a network discovery (see Section 7.2.2.9).
The ZPS_tsNwkNetworkDescr structure contains information on a detected
network and is detailed below.
typedef struct
{
uint64 u64ExtPanId;
uint8 u8LogicalChan;
uint8 u8StackProfile;
uint8 u8ZigBeeVersion;
uint8 u8PermitJoining;
uint8 u8RouterCapacity;
uint8 u8EndDeviceCapacity;
} ZPS_tsNwkNetworkDescr;
where:
u64ExtPanId is the Extended PAN ID of the discovered network
u8LogicalChan is the 2400-MHz channel on which the network was found
u8StackProfile is the Stack Profile of the discovered network
(0 - manufacturer-specific, 1 - ZigBee, 2 - ZigBee PRO, other values reserved)
and is fixed at 2 for the NXP stack
u8ZigBeeVersion is the ZigBee version of the discovered network
u8PermitJoining indicates the number of detected nodes with permit joining
enabled (and therefore allowing nodes to join the network through them)
u8RouterCapacity indicates the number of detected nodes that are allowing
Routers to join the network through them
u8EndDeviceCapacity indicates the number of detected nodes that are
allowing End Devices to join the network through them
7.2.3.2 ZPS_tsNwkNlmeCfmEdScan
This structure is used by the structure ZPS_tsAfNwkEdScanConfEvent, which is
created as part of the ZPS_EVENT_NWK_ED_SCAN event which reports the results
of an energy detect scan in the 2.4-GHz radio band.
The ZPS_tsNwkNlmeCfmEdScant structure is detailed below.
typedef struct
{
uint8 u8Status;
uint8 u8ResultListSize;
uint8 au8EnergyDetect[ZPS_NWK_MAX_ED_RESULTS];
} ZPS_tsNwkNlmeCfmEdScan;
where
u8Status is one of the status codes from the lower stack layers, detailed in
Section 9.2.
u8ResultListSize is the number of entries in the results list (see below)
au8EnergyDetect[] is an array containing the list of results of the energy scan
(8-bit values representing the detected energy levels in the channels) - there is
one array element for each channel scanned, where element 0 is for the first
channel scanned, element 1 is for the second channel scanned, etc.
7.2.3.3 ZPS_tsInterPanAddress
This structure is used to specify the destination for an inter-PAN transmission.
The ZPS_tsInterPanAddress structure is detailed below.
typedef struct
{
enum {
ZPS_E_AM_INTERPAN_GROUP = 0x01,
ZPS_E_AM_INTERPAN_SHORT,
ZPS_E_AM_INTERPAN_IEEE
}eMode;
uint16 u16PanId;
ZPS_tuAddress uAddress;
} ZPS_tsInterPanAddress;
where:
eMode is used to specify the type of destination address that will be used in the
field uAddress below - one of the following enumerations must be specified:
ZPS_E_AM_INTERPAN_GROUP indicates that a 16-bit group address
will be used to specify multiple target nodes in the destination network (the
group address must be valid in the destination network)
Common Parameters
All the ZDP API functions are concerned with sending out a request and all use a
similar set of parameters. These parameters are described below, but more specific
information is provided as part of the function descriptions:
hAPdu: This is the unique handle of the APDU (Application Protocol Data Unit)
instance for the request to be sent (see below).
uDstAddr: This is the IEEE address or network address of the node to which
the request will be sent (the parameter bExtAddr must be set according to the
type of address used). For a broadcast, uDstAddr must be set to a special
address, as described in Section 8.3.
bExtAddr: This is a Boolean indicating the type of address specified in the
parameter uDstAddr as a 64-bit IEEE address (TRUE) or 16-bit network
address (FALSE).
pu8SeqNumber: This is a pointer to the sequence number for the request -
each request must have a unique sequence number to help determine the
order in which requests were sent. On sending a request, the function
automatically increments the sequence number for the next request.
u16ProfileId: This is the identifier of the ZigBee application profile being used.
psZdpNwkAddrReq: This is a pointer to a structure representing the request.
The structure used is dependent on the specific function. The different request
structures are detailed in Section 8.2.2.
ZPS_eAplZdpNwkAddrRequest
ZPS_teStatus ZPS_eAplZdpNwkAddrRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpNwkAddrReq *psZdpNwkAddrReq);
Description
This function requests the 16-bit network address of the node with a particular 64-bit
IEEE (MAC) address. The function sends out an NWK_addr_req request, which can
be either unicast or broadcast, as follows:
Unicast to another node, specified through uDstAddr, that will know the required
network address (this may be the parent of the node of interest or the Co-ordinator)
Broadcast to the network, in which case uDstAddr must be set to the special network
address 0xFFFF (see Section 8.3)
The IEEE address of the node of interest must be specified in the request,
represented by the structure below (detailed further in Section 8.2.2.1).
typedef struct {
uint64 u64IeeeAddr;
uint8 u8RequestType;
uint8 u8StartIndex;
} ZPS_tsAplZdpNwkAddrReq;
The required network address will be received in an NWK_addr_resp response,
which should be collected using the RTOS function OS_eCollectMessage() and
stored in a structure of type ZPS_tsAplZdpNwkAddrRsp (detailed in Section
8.2.3.1). Note that this response can optionally contain the network addresses of the
responding nodes neighbours (this option is selected as part of the request through
u8RequestType).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpNwkAddrReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpIEEEAddrRequest
ZPS_teStatus ZPS_eAplZdpIeeeAddrRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpIeeeAddrReq *psZdpIeeeAddrReq);
Description
This function requests the 64-bit IEEE (MAC) address of the node with a particular
16-bit network address. The function sends an IEEE_addr_req request to the
relevant node, specified through uDstAddr.
The network address of the node of interest must also be specified in the request,
represented by the structure below (detailed further in Section 8.2.2.2).
typedef struct {
uint16 u16NwkAddrOfInterest;
uint8 u8RequestType;
uint8 u8StartIndex;
} ZPS_tsAplZdpIeeeAddrReq;
The required IEEE address will be received in an IEEE_addr_resp response, which
should be collected using the RTOS function OS_eCollectMessage() and stored in
a structure of type ZPS_tsAplZdpIeeeAddrRsp (detailed in Section 8.2.3.2). Note
that this response can optionally contain the IEEE addresses of the responding
nodes neighbours (this option is selected as part of the request through
u8RequestType).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Network address of destination node of request
(bExtAddr must be set to FALSE - see below)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpIeeeAddrReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpDeviceAnnceRequest
ZPS_teStatus ZPS_eAplZdpDeviceAnnceRequest(
PDUM_thAPduInstance hAPduInst,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpDeviceAnnceReq *psZdpDeviceAnnceReq);
Description
This function is used to notify other nodes that the local node has joined or rejoined
the network. The function broadcasts a Device_annce announcement to the network
and is normally automatically called by the ZDO when the local node joins or rejoins
the network.
The IEEE (MAC) and allocated network addresses as well as the capabilities of the
sending node must be specified in the announcement, represented by the structure
below (detailed further in Section 8.2.2.3).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8Capability;
} ZPS_tsAplZdpDeviceAnnceReq;
On receiving this announcement, a network node will update any information it holds
that relates to the supplied IEEE and network addresses:
If it already holds the supplied IEEE address, it will update the corresponding network
address with the supplied one (if necessary).
If it already holds the supplied network address but with a different corresponding IEEE
address, the latter will be marked as not having a valid corresponding network address.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
*pu8SeqNumber Pointer to sequence number of announcement
*psZdpDeviceAnnceReq Pointer to announcement (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpNodeDescRequest
ZPS_teStatus ZPS_eAplZdpNodeDescRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpNodeDescReq *psZdpNodeDescReq);
Description
This function requests the Node descriptor of the node with a particular network
address. The function sends a Node_Desc_req request either to the relevant node
or to another node that may hold the required information in its primary discovery
cache.
The network address of the node of interest must be specified in the request, which
is represented by the structure below (further detailed in Section 8.2.2.4).
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpNodeDescReq;
The required Node descriptor will be received in a Node_Desc_rsp response, which
should be collected using the RTOS function OS_eCollectMessage() and stored in
a structure of type ZPS_tsAplZdpNodeDescRsp (detailed in Section 8.2.3.3).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpNodeDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpPowerDescRequest
ZPS_teStatus ZPS_eAplZdpPowerDescRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpPowerDescReq *psZdpPowerDescReq);
Description
This function requests the Power descriptor of the node with a particular network
address. The function sends a Power_Desc_req request either to the relevant node
or to another node that may hold the required information in its primary discovery
cache.
The network address of the node of interest must be specified in the request, which
is represented by the structure below (further detailed in Section 8.2.2.5).
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpPowerDescReq;
The required Power descriptor will be received in a Power_Desc_rsp response,
which should be collected using the RTOS function OS_eCollectMessage() and
stored in a structure of type ZPS_tsAplZdpPowerDescRsp (detailed in Section
8.2.3.4).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpPowerDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpSimpleDescRequest
ZPS_teStatus ZPS_eAplZdpSimpleDescRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpSimpleDescReq *psZdpSimpleDescReq);
Description
This function requests the Simple descriptor for a specific endpoint on the node with
a particular network address. The function sends a Simple_Desc_req request either
to the relevant node or to another node that may hold the required information in its
primary discovery cache.
The network address of the node of interest and the relevant endpoint on the node
must be specified in the request, which is represented by the structure below (further
detailed in Section 8.2.2.6).
typedef struct {
uint16 u16NwkAddrOfInterest;
uint8 u8EndPoint;
} ZPS_tsAplZdpSimpleDescReq;
The required Simple descriptor will be received in a Simple_Desc_rsp response,
which should be collected using the RTOS function OS_eCollectMessage() and
stored in a structure of type ZPS_tsAplZdpSimpleDescRsp (detailed in Section
8.2.3.5).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpSimpleDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpExtendedSimpleDescRequest
ZPS_teStatus ZPS_eAplZdpExtendedSimpleDescRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpExtendedSimpleDescReq
*psZdpExtendedSimpleDescReq);
Description
This function requests a cluster list for a specific endpoint on the node with a
particular network address. The function should be called if the endpoint has more
input or output clusters than could be included in the response to
ZPS_eAplZdpSimpleDescRequest(). The function sends an
Extended_Simple_Desc_req request either to the relevant node or to another node
that may hold the required information in its primary discovery cache.
The network address of the node of interest and the relevant endpoint on the node
must be specified in the request, which is represented by the structure below (further
detailed in Section 8.2.2.7).
typedef struct {
uint16 u16NwkAddr;
uint8 u8EndPoint;
uint8 u8StartIndex;
} ZPS_tsAplZdpExtendedSimpleDescReq;
This structure allows you to specify the first input/output cluster of interest in the
endpoints input and output cluster lists. Thus, this should normally be the cluster
after the last one reported following a call to ZPS_eAplZdpSimpleDescRequest().
The required cluster information will be received in a Extended_Simple_Desc_rsp
response, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpExtendedSimpleDescRsp (detailed in Section 8.2.3.6).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpExtendedSimpleDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpComplexDescRequest
ZPS_teStatus ZPS_eAplZdpComplexDescRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpComplexDescReq *psZdpComplexDescReq);
Description
This function requests the Complex descriptor of the node with a particular network
address. The function sends a Complex_Desc_req request either to the relevant
node or to another node that may hold the required information in its primary
discovery cache.
The network address of the node of interest must be specified in the request, which
is represented by the structure below (further detailed in Section 8.2.2.8).
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpComplexDescReq;
The required Complex descriptor will be received in a Complex_Desc_rsp response,
which should be collected using the RTOS function OS_eCollectMessage() and
stored in a structure of type ZPS_tsAplZdpComplexDescRsp (detailed in Section
8.2.3.7).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpComplexDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpUserDescRequest
ZPS_teStatus ZPS_eAplZdpUserDescRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpUserDescReq *psZdpUserDescReq);
Description
This function requests the User descriptor of the node with a particular network
address. The function sends a User_Desc_req request either to the relevant node or
to another node that may hold the required information in its primary discovery cache.
The network address of the node of interest must be specified in the request, which
is represented by the structure below (further detailed in Section 8.2.2.9).
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpUserDescReq;
The required User descriptor will be received in a User_Desc_rsp response, which
should be collected using the RTOS function OS_eCollectMessage() and stored in
a structure of type ZPS_tsAplZdpUserDescRsp (detailed in Section 8.2.3.8).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpUserDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMatchDescRequest
ZPS_teStatus ZPS_eAplZdpMatchDescRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMatchDescReq *psZdpMatchDescReq);
Description
This function requests responses from network nodes with endpoints that match
specified criteria in their Simple descriptors. More specifically, these criteria include:
application profile, number of input clusters, number of output clusters, list of input
clusters, list of output clusters. The function sends out a Match_Desc_req command,
as a broadcast to all network nodes, or as a unicast to either a specific node of
interest or another node that may hold the required information in its primary
discovery cache. On the JN516x device, the wild card profile (0xFFFF) can be used
to match any profile ID.
The request is represented by the structure below (further detailed in Section
8.2.2.10).
typedef struct {
uint16 u16NwkAddrOfInterest;
uint16 u16ProfileId;
/* rest of message is variable length */
uint8 u8NumInClusters;
uint16* pu16InClusterList;
uint8 u8NumOutClusters;
uint16* pu16OutClusterList;
} ZPS_tsAplZdpMatchDescReq;
A node with matching endpoint criteria will respond with a Match_Desc_rsp
response, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpMatchDescRsp (detailed in Section 8.2.3.9).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMatchDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpActiveEpRequest
ZPS_teStatus ZPS_eAplZdpActiveEpRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpActiveEpReq *psZdpActiveEpReq);
Description
This function requests a list of the active endpoints on a remote node. The function
sends an Active_EP_req request either to the relevant node or to another node that
may hold the required information in its primary discovery cache.
The network address of the node of interest must be specified in the request, which
is represented by the structure below (further detailed in Section 8.2.2.11).
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpActiveEpReq;
The endpoint list will be received in an Active_EP_rsp response, which should be
collected using the RTOS function OS_eCollectMessage() and stored in a structure
of type ZPS_tsAplZdpActiveEpRsp (detailed in Section 8.2.3.10).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpActiveEpReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpExtendedActiveEpRequest
ZPS_teStatus ZPS_eAplZdpExtendedActiveEpRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpExtendedActiveEpReq
*psZdpExtendedActiveEpReq);
Description
This function requests a list of the active endpoints on a remote node. The function
should be called if the node has more active endpoints than could be included in a
response to ZPS_eAplZdpActiveEpRequest(). The function sends an
Extended_Active_EP_req request either to the relevant node or to another node that
may hold the required information in its primary discovery cache.
The network address of the node of interest must be specified in the request, which
is represented by the structure below (further detailed in Section 8.2.2.12).
typedef struct {
uint16 u16NwkAddr;
uint8 u8StartIndex;
} ZPS_tsAplZdpExtendedActiveEpReq;
This structure allows you to specify the first endpoint of interest for the request.
The endpoint list will be received in an Extended_Active_EP_rsp response, which
should be collected using the RTOS function OS_eCollectMessage() and stored in
a structure of type ZPS_tsAplZdpExtendedActiveEpRsp (detailed in Section
8.2.3.11).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpActiveEpReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpUserDescSetRequest
ZPS_teStatus ZPS_eAplZdpUserDescSetRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpUserDescSet *psZdpUserDescSetReq);
Description
This function can be used to configure the User descriptor on a remote node. The
function sends a User_Desc_set request either to the remote node or to another
node that may hold the relevant User descriptor in its primary discovery cache.
The network address of the node of interest as well as the required modifications
must be specified in the request, which is represented by the structure below (further
detailed in Section 8.2.2.13).
typedef struct {
uint16 u16NwkAddrOfInterest;
uint8 u8Length;
char szUserDescriptor[ZPS_ZDP_LENGTH_OF_USER_DESC];
} ZPS_tsAplZdpUserDescSet;
If the specified User descriptor was successfully modified, a User_Desc_conf
response will be received. This response should be collected by the application task
using the RTOS function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpUserDescConf (detailed in Section 8.2.3.12).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpUserDescSetReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpSystemServerDiscoveryRequest
ZPS_teStatus ZPS_eAplZdpSystemServerDiscoveryRequest(
PDUM_thAPduInstance hAPduInst,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpSystemServerDiscoveryReq
*psZdpSystemServerDiscoveryReq);
Description
This function can be used to request information on the available servers hosted by
remote nodes (Primary or Backup Trust Centre, Primary or Backup Binding Table
Cache, Primary or Backup Discovery Cache, Network Manager). The function
broadcasts a System_Server_Discovery_req request to all network nodes.
The required servers must be specified by means of a bitmask in the request, which
is represented by the structure below (further detailed in Section 8.2.2.14).
typedef struct {
uint16 u16ServerMask;
} ZPS_tsAplZdpSystemServerDiscoveryReq;
A remote node will reply with a System_Server_Discovery_rsp response, indicating
which of the requested servers are implemented. This response should be collected
using the RTOS function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpSystemServerDiscoveryRsp (detailed in Section 8.2.3.13).
Parameters
hAPduInst Handle of APDU instance in which request
will be sent
*pu8SeqNumber Pointer to sequence number of request
*psZdpSystemServerDiscoveryReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpDiscoveryCacheRequest
ZPS_teStatus ZPS_eAplZdpDiscoveryCacheRequest(
PDUM_thAPduInstance hAPduInst,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpDiscoveryCacheReq
*psZdpDiscoveryCacheReq);
Description
This function is used to discover which nodes in the network have a primary
discovery cache - that is, a bank of information about other nodes in the network. The
function broadcasts a Discovery_Cache_req request to the network.
The request includes the network and IEEE addresses of the sending device, and is
represented by the structure below (further detailed in Section 8.2.2.15).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
} ZPS_tsAplZdpDiscoveryCacheReq;
A node with a primary discovery cache replies with a Discovery_Cache_rsp
response, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpDiscoveryCacheRsp (detailed in Section 8.2.3.14).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
*pu8SeqNumber Pointer to sequence number of request
*psZdpDiscoveryCacheReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpDiscoveryStoreRequest
ZPS_teStatus ZPS_eAplZdpDiscoveryStoreRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpDiscoveryStoreReq
*psZdpDiscoveryStoreReq);
Description
This function can be called on an End Device to request a remote node to reserve
memory space to store the local nodes discovery information. To do this, the
remote node must contain a primary discovery cache. The discovery information
includes the local nodes IEEE address, network address, Node descriptor, Power
descriptor, Simple descriptor and number of active endpoints. The function sends a
Discovery_store_req request to the remote node.
This request includes the network and IEEE addresses of the sending node as well
as the amount of storage space (in bytes) needed to store the information. The
request is represented by the structure below (further detailed in Section 8.2.2.16).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8NodeDescSize;
uint8 u8PowerDescSize;
uint8 u8ActiveEpSize;
uint8 u8SimpleDescCount;
/* Rest of message is variable length */
uint8* pu8SimpleDescSizeList;
} ZPS_tsAplZdpDiscoveryStoreReq;
On receiving this request, the remote node will first check whether it has a primary
discovery cache. If this is the case, it will check whether it has storage space in the
cache for the new discovery information. If the space is available, it will be reserved
until the information is later uploaded from the local node.
The node replies with a Discovery_store_rsp response, which should be collected
using the RTOS function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpDiscoveryStoreRsp (detailed in Section 8.2.3.15).
Parameters
hAPduInst, Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpDiscoveryStoreReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpNodeDescStoreRequest
ZPS_teStatus ZPS_eAplZdpNodeDescStoreRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpNodeDescStoreReq
*psZdpNodeDescStoreReq);
Description
This function can be called on an End Device to upload the local nodes Node
descriptor for storage in the primary discovery cache on a remote node. The function
sends a Node_Desc_store_req command to the remote node.
This request includes the network and IEEE addresses of the sending node as well
as the Node descriptor to store. The request is represented by the structure below
(further detailed in Section 8.2.2.17).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
/* Rest of message is variable length */
ZPS_tsAplZdpNodeDescriptor sNodeDescriptor;
} ZPS_tsAplZdpNodeDescStoreReq;
On receiving the request, the remote node will first check whether it has a primary
discovery cache. If this is the case, it will check whether it has previously reserved
storage space in its cache for the local node. If it has, it will store the Node descriptor
in its cache.
The node replies with a Node_Desc_store_rsp response, which should be collected
using the RTOS function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpNodeDescStoreRsp (detailed in Section 8.2.3.16).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpNodeDescStoreReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpPowerDescStoreRequest
ZPS_teStatus ZPS_eAplZdpPowerDescStoreRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpPowerDescStoreReq
*psZdpPowerDescStoreReq);
Description
This function can be called on an End Device to upload the local nodes Power
descriptor for storage in the primary discovery cache on a remote node. The function
sends a Power_Desc_store_req request to the remote node.
This request includes the network and IEEE addresses of the sending node as well
as the Power descriptor to store. The request is represented by the structure below
(further detailed in Section 8.2.2.18).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
/* Rest of message is variable length */
ZPS_tsAplZdpNodePowerDescriptor sPowerDescriptor;
} ZPS_tsAplZdpPowerDescStoreReq;
On receiving the request, the remote node will first check whether it has a primary
discovery cache. If this is the case, it will check whether it has previously reserved
storage space in its cache for the local node. If it has, it will store the Power descriptor
in its cache.
The node replies with a Power_Desc_store_rsp response, which should be collected
using the RTOS function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpPowerDescStoreRsp (detailed in Section 8.2.3.17).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpPowerDescStoreReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpSimpleDescStoreRequest
ZPS_teStatus ZPS_eAplZdpSimpleDescStoreRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpSimpleDescStoreReq
*psZdpSimpleDescStoreReq);
Description
This function can be called on an End Device to upload a Simple descriptor from the
local node for storage in the primary discovery cache on the specified remote node.
The Simple descriptor for each endpoint on the local node must be uploaded
separately using this function. The function sends a Simple_Desc_store_req request
to the remote node.
This request includes the network and IEEE addresses of the sending node as well
as the Simple descriptor to store. The request is represented by the structure below
(further detailed in Section 8.2.2.19).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8Length;
/* Rest of message is variable length */
ZPS_tsAplZdpSimpleDescType sSimpleDescriptor;
} ZPS_tsAplZdpSimpleDescStoreReq;
On receiving the request, the remote node will first check whether it has a primary
discovery cache. If this is the case, it will check whether it has previously reserved
storage space in its cache for the local node. If it has, it will store the Simple
descriptor in its cache.
The node replies with a Simple_Desc_store_rsp response, which should be collected
using the RTOS function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpSimpleDescStoreRsp (detailed in Section 8.2.3.18).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpSimpleDescStoreReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpActiveEpStoreRequest
ZPS_teStatus ZPS_eAplZdpActiveEpStoreRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpActiveEpStoreReq
*psZdpActiveEpStoreReq);
Description
This function can be called on an End Device to upload a list of its active endpoints
for storage in the primary discovery cache on a remote node. The function sends an
Active_EP_store_req command to the remote node.
This request includes the network and IEEE addresses of the sending node as well
as the list of active endpoints to store. The request is represented by the structure
below (further detailed in Section 8.2.2.20).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8ActiveEPCount;
/* Rest of message is variable length */
uint8* pu8ActiveEpList;
} ZPS_tsAplZdpActiveEpStoreReq;
On receiving the request, the remote node will first check whether it has a primary
discovery cache. If this is the case, it will check whether it has previously reserved
storage space in its cache for the local node. If it has, it will store the list of active
endpoints in its cache.
The node replies with an Active_EP_store_rsp response, which should be collected
using the RTOS function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpActiveEpStoreRsp (detailed in Section 8.2.3.19).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpActiveEpStoreReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpFindNodeCacheRequest
ZPS_teStatus ZPS_eAplZdpFindNodeCacheRequest(
PDUM_thAPduInstance hAPduInst,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpFindNodeCacheReq
*psZdpFindNodeCacheReq);
Description
This function can be used to search for nodes in the network that hold discovery
information about a particular node. The function broadcasts a
Find_node_cache_req request to the network.
This request includes the network and IEEE addresses of the node of interest. The
request is represented by the structure below (further detailed in Section 8.2.2.21).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
} ZPS_tsAplZdpFindNodeCacheReq;
On receiving the request, a remote node will first check whether it has a primary
discovery cache, or is the specified node itself. If either is the case, it will check
whether it holds the required information and, if this is the case, will reply with a
Find_node_cache_rsp response. This response should be collected using the RTOS
function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpFindNodeCacheRsp (detailed in Section 8.2.3.20).
Only nodes that hold the required information will respond.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
*pu8SeqNumber Pointer to sequence number of request
*psZdpFindNodeCacheReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpRemoveNodeCacheRequest
ZPS_teStatus ZPS_eAplZdpRemoveNodeCacheRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpRemoveNodeCacheReq
*psZdpRemoveNodeCacheReq);
Description
This function requests a Primary Discovery Cache node to remove from its cache all
discovery information relating to a particular End Device. The function sends a
Remove_node_cache_req request to the Primary Discovery Cache node.
The effect of a successful request is to remove the relevant discovery information
and free the corresponding storage space in the cache previously reserved by
ZPS_eAplZdpDiscoveryStoreRequest() (which may have been called from
another node in the network).
This request includes the network and IEEE addresses of the End Device whose
discovery information is to be removed. The request is represented by the structure
below (further detailed in Section 8.2.2.22).
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
} ZPS_tsAplZdpRemoveNodeCacheReq;
On receiving the request, the remote node will first check whether it has a primary
discovery cache. If this is the case, it will check whether it has previously received
and implemented a Discovery_store_req request for the specified End Device,
resulting from a call to ZPS_eAplZdpDiscoveryStoreRequest(). If it has, it will
delete the relevant data and unreserve the corresponding part of the cache.
The node replies with a Remove_node_cache_rsp response, which should be
collected using the RTOS function OS_eCollectMessage() and stored in a structure
of type ZPS_tsAplZdpRemoveNodeCacheRsp (detailed in Section 8.2.3.21).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpRemoveNodeCacheReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpEndDeviceBindRequest
ZPS_teStatus ZPS_eAplZdpEndDeviceBindRequest(
PDUM_thAPduInstance hAPduInst,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpEndDeviceBindReq
*psZdpEndDeviceBindReq);
Description
This function sends a binding request to the Co-ordinator in order to bind an endpoint
on the local node to an endpoint on a remote node (these nodes can be End Devices
or Routers). The function should normally be invoked as the result of a user action
on the local node, such as pressing a button. The function sends an
End_Device_Bind_req request to the Co-ordinator.
This request includes details of the source node, endpoint and clusters. The request
is represented by the structure below (further detailed in Section 8.2.2.23).
typedef struct {
uint16 u16BindingTarget;
uint64 u64SrcIeeeAddress;
uint8 u8SrcEndpoint;
uint16 u16ProfileId;
/* Rest of message is variable length */
uint8 u8NumInClusters;
uint16 *pu16InClusterList;
uint8 u8NumOutClusters;
uint16 *pu16OutClusterList;
} ZPS_tsAplZdpEndDeviceBindReq;
On receiving the request, the Co-ordinator waits (for a pre-defined timeout period) for
another binding request, from a different node, so that it can pair the requests and
bind the endpoints. In order to bind the endpoints, their application profile IDs must
match, and they must have compatible clusters in their input and output cluster lists.
The Co-ordinator replies to a binding request with an End_Device_Bind_rsp
response, which should be collected on the requesting node using the RTOS
function OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpEndDeviceBindRsp (detailed in Section 8.2.3.22).
The stack will automatically update the Binding tables on the two End Devices
(following further bind requests from the Co-ordinator) and an
ZPS_EVENT_ZDO_BIND event will be generated on the End Devices to signal
these updates.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
*pu8SeqNumber Pointer to sequence number of request
*psZdpEndDeviceBindReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpBindUnbindRequest
ZPS_teStatus ZPS_eAplZdpBindUnbindRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
bool bBindReq,
ZPS_tsAplZdpBindUnbindReq *psZdpBindReq);
Description
This function sends a binding or unbinding request (as specified) to a remote node
which hosts a binding table. The function requests a modification of the binding table
in order to bind or unbind two endpoints of nodes in the network. The nodes to be
bound/unbound may be different from the node sending the request and the node
receiving the request. The latter must be either a node with a primary binding table
cache or the source node for the binding. This function could typically be used in a
commissioning application to configure bindings between nodes during system set-
up.
The function sends a Bind_req or Unbind_req request to the remote node which
hosts the binding table to be modified. This request includes details of the source
node and endpoint, and the target node and endpoint for the binding. The request is
represented by the structure below (further detailed in Section 8.2.2.24).
typedef struct {
uint64 u64SrcAddress;
uint8 u8SrcEndpoint;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
} uAddressField;
} ZPS_tsAplZdpBindUnbindReq;
On receiving the request, the remote node adds or removes the relevant entry in its
binding table and locally generates the event ZPS_EVENT_ZDO_BIND or
ZPS_EVENT_ZDO_UNBIND, as appropriate, to signal the relevant update.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
bBindReq Bind or unbind request:
TRUE: bind
FALSE: unbind
*psZdpBindReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpBindRegisterRequest
ZPS_teStatus ZPS_eAplZdpBindRegisterRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpBindRegisterReq *psZdpBindRegisterReq);
Description
This function informs a remote node with a primary binding table cache that the local
node will hold its own binding table entries (and therefore the remote node does not
need to hold these entries). The function sends a Bind_Register_req request to the
remote node.
The IEEE address of the local node must be specified in the request, which is
represented by the structure below (further detailed in Section 8.2.2.25).
typedef struct {
uint64 u64NodeAddress;
} ZPS_tsAplZdpBindRegisterReq;
The remote node will reply with a Bind_Register_rsp response, which should be
collected using the RTOS function OS_eCollectMessage() and stored in a structure
of type ZPS_tsAplZdpBindRegisterRsp (detailed in Section 8.2.3.25). This
response contains any information stored about the binding on the remote.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpPowerDescReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpReplaceDeviceRequest
ZPS_teStatus ZPS_eAplZdpReplaceDeviceRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpReplaceDeviceReq *psZdpReplaceDeviceReq);
Description
This function requests a remote node with a primary binding table cache to modify
binding table entries with new data - more specifically, binding table entries can be
modified by replacing an IEEE address and/or associated endpoint number. This
function could typically be used in a commissioning application to modify bindings
between nodes. The function sends a Replace_Device_req request to the remote
node.
This request must include the old IEEE address and its replacement, as well as the
corresponding endpoint number and its replacement (if any). The request is
represented by the structure below (further detailed in Section 8.2.2.26).
typedef struct {
uint64 u64OldAddress;
uint8 u8OldEndPoint;
uint64 u64NewAddress;
uint8 u8NewEndPoint;
} ZPS_tsAplZdpReplaceDeviceReq;
On receiving this request, the remote node will search its binding table for entries
containing the old IEEE address and old endpoint number from the request - this pair
of values may make up the source or destination data of the binding table entry.
These values will be replaced by the new IEEE address and endpoint number from
the request. Note that if the endpoint number in the request is zero, only the address
will be included in the search and replace (the endpoint number in the modified
binding table entries will be left unchanged).
The remote node will check whether a node affected by a binding table change holds
a table of its own source bindings (see ZPS_eAplZdpBindRegisterRequest()) and,
if so, automatically requests an update of this table. The remote node will also
request an update of the back-up of the primary binding table cache, if one exists.
The remote node will reply with a Replace_Device_rsp response, which should be
collected using the RTOS function OS_eCollectMessage() and stored in a structure
of type ZPS_tsAplZdpReplaceDeviceRsp (detailed in Section 8.2.3.26).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpReplaceDeviceReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpStoreBkupBindEntryRequest
ZPS_teStatus ZPS_eAplZdpStoreBkupBindEntryRequest(
PDUM_thAPdu hAPdu,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
uint16 u16ProfileId,
ZPS_tsAplZdpStoreBkupBindEntryReq
*psZdpStoreBkupBindEntryReq);
Description
This function requests that a back-up of an entry in the local primary binding table
cache is performed on a remote node. The destination node of the request must hold
the corresponding back-up binding table cache. The back-up operation is normally
required when a new entry has been added to the primary binding table cache.
Note: This function is provided in the NXP ZDP API for the
reason of interoperability with nodes running non-NXP ZigBee
PRO stacks that support the generated request. On receiving
a request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must include the binding table entry to be backed up. The request is
represented by the structure below (further detailed in Section 8.2.2.27).
typedef struct {
uint64 u64SrcAddress;
uint8 u8SrcEndPoint;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
};
} ZPS_tsAplZdpStoreBkupBindEntryReq;
On receiving the request, the remote node adds the specified binding table entry to
its back-up binding table cache, if possible.
Parameters
hAPdu Handle of APDU in which request will be sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
u16ProfileId Application profile ID
*psZdpStoreBkupBindEntryReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpRemoveBkupBindEntryRequest
ZPS_teStatus ZPS_eAplZdpRemoveBkupBindEntryRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpRemoveBkupBindEntryReq
*psZdpRemoveBkupBindEntryReq);
Description
This function requests the removal of an entry in the back-up binding table cache on
a remote node. The function must be called from the node with the corresponding
primary binding table cache. The removal of a back-up entry is normally required
when an entry in the primary binding table cache has been removed.
Note: This function is provided in the NXP ZDP API for the
reason of interoperability with nodes running non-NXP ZigBee
PRO stacks that support the generated request. On receiving
a request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must include the binding table entry to be removed. The request is
represented by the structure below (further detailed in Section 8.2.2.28).
typedef struct {
uint64 u64SrcAddress;
uint8 u8SrcEndPoint;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
};
} ZPS_tsAplZdpRemoveBkupBindEntryReq;
On receiving the request, the remote node removes the specified binding table entry
from its back-up binding table cache, if possible.
Parameters
hAPduInst Handle of APDU instance in which request will
be sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpRemoveBkupBindEntryReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpBackupBindTableRequest
ZPS_teStatus ZPS_eAplZdpBackupBindTableRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpBackupBindTableReq
*psZdpBackupBindTableReq);
Description
This function requests that a back-up of the locally held primary binding table cache
is performed on a remote node - the whole or part of the table can be backed up. The
destination node of the request must hold the corresponding back-up binding table
cache. The latter must already exist and be associated with the cache on the local
node through a previous discovery.
Note: This function is provided in the NXP ZDP API for the
reason of interoperability with nodes running non-NXP ZigBee
PRO stacks that support the generated request. On receiving
a request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must include the binding table entries to be backed up. The request is
represented by the structure below (further detailed in Section 8.2.2.29).
typedef struct {
uint16 u16BindingTableEntries;
uint16 u16StartIndex;
uint16 u16BindingTableListCount;
/* Rest of message is variable length */
ZPS_tsAplZdpBindingTable sBindingTable;
} ZPS_tsAplZdpBackupBindTableReq;
On receiving the request, the remote node saves the new binding table, if possible,
overwriting existing entries. If the new table is longer than the previous one, as many
extra entries as possible will be saved.
The remote node replies with a Backup_Bind_Table_rsp response, which should be
collected using the RTOS function OS_eCollectMessage() and stored in a structure
of type ZPS_tsAplZdpBackupBindTableRsp (detailed in Section 8.2.3.29).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpBackupBindTableReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpRecoverBindTableRequest
ZPS_teStatus ZPS_eAplZdpRecoverBindTableRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpRecoverBindTableReq
*psZdpRecoverBindTableReq);
Description
This function requests that a back-up of the locally held primary binding table cache
is recovered from a remote node. The destination node of the request must hold the
back-up binding table cache which is associated with the primary cache on the local
node.
Note: This function is provided in the NXP ZDP API for the
reason of interoperability with nodes running non-NXP ZigBee
PRO stacks that support the generated request. On receiving
a request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must indicate the starting index in the binding table for the recovery. The
request is represented by the structure below (further detailed in Section 8.2.2.30).
typedef struct {
uint16 u16StartIndex;
} ZPS_tsAplZdpRecoverBindTableReq;
The remote node replies with a Recover_Bind_Table_rsp response containing the
required binding table entries, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpRecoverBindTableRsp (detailed in Section 8.2.3.30). As many
binding entries as possible are included in this response. If the returned binding table
is incomplete, this is indicated in the response and this function must be called again,
with the appropriate starting index, to recover the rest of the table.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpRecoverBindTableReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpBackupSourceBindRequest
ZPS_teStatus ZPS_eAplZdpBackupSourceBindRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpBackupSourceBindReq
*psZdpBackupSourceBindReq);
Description
This function requests that a back-up of the locally held source binding table is
performed on a remote node. This source binding table contains entries only relevant
to the local node. The function must be called from a node with a primary binding
table cache and the destination node of the request must hold the corresponding
back-up binding table cache.
Note: This function is provided in the NXP ZDP API for the
reason of interoperability with nodes running non-NXP ZigBee
PRO stacks that support the generated request. On receiving
a request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must include the source binding table entries to be backed up. The
request is represented by the structure below (further detailed in Section 8.2.2.31).
typedef struct {
uint16 u16SourceTableEntries;
uint16 u16StartIndex;
uint16 u16SourceTableListCount;
/* Rest of message is variable length */
uint64* pu64SourceAddress;
} ZPS_tsAplZdpBackupSourceBindReq;
On receiving the request, the remote node saves the new source binding table, if
possible, overwriting existing entries. If the new table is longer than the previous one,
as many extra entries as possible will be saved.
The remote node replies with a Backup_Source_Bind_rsp response, which should
be collected using the RTOS function OS_eCollectMessage() and stored in a
structure of type ZPS_tsAplZdpBackupSourceBindRsp (detailed in Section
8.2.3.31).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpBackupSourceBindReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpRecoverSourceBindRequest
ZPS_teStatus ZPS_eAplZdpRecoverSourceBindRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpRecoverSourceBindReq
*psZdpRecoverSourceBindReq);
Description
This function requests that a back-up of the locally held source binding table is
recovered from a remote node. The function must be called from a node with a
primary binding table cache and the destination node of the request must hold the
corresponding back-up binding table cache.
Note: This function is provided in the NXP ZDP API for the
reason of interoperability with nodes running non-NXP ZigBee
PRO stacks that support the generated request. On receiving
a request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must indicate the starting index in the binding table for the recovery. The
request is represented by the structure below (further detailed in Section 8.2.2.32).
typedef struct {
uint16 u16StartIndex;
} ZPS_tsAplZdpRecoverSourceBindReq;
The remote node replies with a Recover_Source_Bind_rsp response containing the
required binding table entries, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpRecoverSourceBindRsp (detailed in Section 8.2.3.32). As many
binding entries as possible are included in this response. If the returned binding table
is incomplete, this is indicated in the response and this function must be called again,
with the appropriate starting index, to recover the rest of the table.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpRecoverSourceBindReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtNwkDiscRequest
ZPS_teStatus ZPS_eAplZdpMgmtNwkDiscRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtNwkDiscReq
*psZdpMgmtNwkDiscReq);
Description
This function requests a remote node to perform a channel scan in order to discover
any other wireless networks that are operating in the neighbourhood.
Note: This function is provided in the ZDP API for the reason
of interoperability with nodes running non-NXP ZigBee PRO
stacks that support the generated request. On receiving a
request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must specify the requirements for the scan: channels to scan, duration
of scan, starting channel. The request is represented by the structure below (further
detailed in Section 8.2.2.33).
typedef struct {
uint32 u32ScanChannels;
uint8 u8ScanDuration;
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtNwkDiscReq;
The remote node replies with a Mgmt_NWK_Disc_rsp response containing the scan
results, which should be collected using the RTOS function OS_eCollectMessage()
and stored in a structure of type ZPS_tsAplZdpMgmtNwkDiscRsp (detailed in
Section 8.2.3.33).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtNwkDiscReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtLqiRequest
ZPS_teStatus ZPS_eAplZdpMgmtLqiRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtLqiReq *psZdpMgmtLqiReq);
Description
This function requests a remote node to provide a list of neighbouring nodes, from its
Neighbour table, including LQI (link quality) values for radio transmissions from each
of these nodes. The destination node of this request must be a Router or the Co-
ordinator.
This request must specify the index of the first node in the Neighbour table to report.
The request is represented by the structure below (further detailed in Section
8.2.2.34).
typedef struct {
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtLqiReq;
The remote node replies with a Mgmt_Lqi_rsp response containing the required
information, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpMgmtLqiRsp (detailed in Section 8.2.3.34).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtLqiReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtRtgRequest
ZPS_teStatus ZPS_eAplZdpMgmtRtgRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtRtgReq *psZdpMgmtRtgReq);
Description
This function requests a remote node to provide the contents of its Routing table. The
destination node of this request must be a Router or the Co-ordinator.
This request must specify the index of the first entry in the Routing table to report.
The request is represented by the structure below (further detailed in Section
8.2.2.35).
typedef struct {
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtRtgReq;
The remote node replies with a Mgmt_Rtg_rsp response containing the required
information, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpMgmtRtgRsp (detailed in Section 8.2.3.35).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtRtgReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtBindRequest
ZPS_teStatus ZPS_eAplZdpMgmtBindRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtBindReq *psZdpMgmtBindReq);
Description
This function requests a remote node to provide the contents of its Binding table. The
destination node of this request must be a Router or the Co-ordinator.
Note: This function is provided in the ZDP API for the reason
of interoperability with nodes running non-NXP ZigBee PRO
stacks that support the generated request. On receiving a
request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
This request must specify the index of the first entry in the Binding table to report.
The request is represented by the structure below (further detailed in Section
8.2.2.36).
typedef struct {
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtBindReq;
The remote node replies with a Mgmt_Bind_rsp response containing the required
information, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpMgmtBindRsp (detailed in Section 8.2.3.36).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtBindReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtLeaveRequest
ZPS_teStatus ZPS_eAplZdpMgmtLeaveRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtLeaveReq *psZdpMgmtLeaveReq);
Description
This function requests a remote node to leave the network. The request also
indicates whether the children of the leaving node should also be requested to leave
and whether the leaving node(s) should subsequently attempt to rejoin the network.
Note: This function is provided in the ZDP API for the reason
of interoperability with nodes running non-NXP ZigBee PRO
stacks that support the generated request. On receiving a
request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
The IEEE address of the node to leave the network must be included in the request,
as well as flags indicating the children and rejoin choices (see above). The request
is represented by the structure below (further detailed in Section 8.2.2.37).
typedef struct {
uint64 u64DeviceAddress;
uint8 u8Flags;
} ZPS_tsAplZdpMgmtLeaveReq;
The remote node replies with a Mgmt_Leave_rsp response, which should be
collected using the RTOS function OS_eCollectMessage() and stored in a structure
of type ZPS_tsAplZdpMgmtLeaveRsp (detailed in Section 8.2.3.37).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtLeaveReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtDirectJoinRequest
ZPS_teStatus ZPS_eAplZdpMgmtDirectJoinRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtDirectJoinReq
*psZdpMgmtDirectJoinReq);
Description
This function requests a remote node to allow a particular device (identified through
its IEEE address) to join the network as a child of the node. Thus, joining should be
enabled on the remote node just for the nominated device. The destination node of
this request must be a Router or the Co-ordinator.
Note: This function is provided in the ZDP API for the reason
of interoperability with nodes running non-NXP ZigBee PRO
stacks that support the generated request. On receiving a
request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
The IEEE address of the nominated device as well as its capabilities must be
included in the request. The request is represented by the structure below (further
detailed in Section 8.2.2.38).
typedef struct {
uint64 u64DeviceAddress;
uint8 u8Capability;
} ZPS_tsAplZdpMgmtDirectJoinReq;
The remote node replies with a Mgmt_Direct_Join_req response, which should be
collected using the RTOS function OS_eCollectMessage() and stored in a structure
of type ZPS_tsAplZdpMgmtDirectJoinRsp (detailed in Section 8.2.3.38).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtDirectJoinReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtPermitJoiningRequest
ZPS_teStatus ZPS_eAplZdpMgmtPermitJoiningRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtPermitJoiningReq
*psZdpMgmtPermitJoiningReq);
Description
This function requests a remote node to enable or disable joining for a specified
amount of time. The destination node of this request must be a Router or the Co-
ordinator. The request can be unicast to a particular node or broadcast to all routing
nodes (for which the destination address must be set to the 16-bit network address
0xFFFC).
Note: This function is provided in the ZDP API for the reason
of interoperability with nodes running non-NXP ZigBee PRO
stacks that support the generated request. On receiving a
request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
The duration of the enable or disable joining state must be specified in the request.
The request is represented by the structure below (further detailed in Section
8.2.2.39).
typedef struct {
uint8 u8PermitDuration;
bool_t bTcSignificance;
} ZPS_tsAplZdpMgmtPermitJoiningReq;
If the request was unicast, the remote node replies with a Mgmt_Permit_Joining_rsp
response, which should be collected using the RTOS function
OS_eCollectMessage() and stored in a structure of type
ZPS_tsAplZdpMgmtPermitJoiningRsp (detailed in Section 8.2.3.39).
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtPermitJoiningReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtCacheRequest
ZPS_teStatus ZPS_eAplZdpMgmtCacheRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtCacheReq *psZdpMgmtCacheReq);
Description
This function requests a remote node to provide a list of the End Devices registered
in its primary discovery cache. Therefore, the destination node must contain a
primary discovery cache.
Note: This function is provided in the ZDP API for the reason
of interoperability with nodes running non-NXP ZigBee PRO
stacks that support the generated request. On receiving a
request from this function, the NXP ZigBee PRO stack will
return the status ZPS_ZDP_NOT_SUPPORTED.
Parameters
hAPduInst Handle of APDU in which request will be sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtCacheReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
ZPS_eAplZdpMgmtNwkUpdateRequest
ZPS_teStatus ZPS_eAplZdpMgmtNwkUpdateRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpMgmtNwkUpdateReq
*psZdpMgmtNwkUpdateReq);
Description
This function requests an update of network parameters related to radio
communication. The request can specify any of the following:
update the radio channel mask (for scans) and the 16-bit network address of the
network manager (node nominated to manage radio-band operation of network)
change the radio channel used
scan radio channels and report the results
The request can be broadcast or unicast to nodes with radio receivers that are
configured to remain on during idle periods.
The request is represented by the structure below (further detailed in Section
8.2.2.41).
typedef struct {
uint32 u32ScanChannels;
uint8 u8ScanDuration;
uint8 u8ScanCount;
uint8 u8NwkUpdateId;
uint16 u16NwkManagerAddr;
} ZPS_tsAplZdpMgmtNwkUpdateReq;
The specific action to be taken as a result of this request is indicated through the
element u8ScanDuration, as described in the table below.
u8ScanDuration Action
0x06-0xFD Reserved
0xFF Update the stored radio channel mask with that speci-
fied through u32ScanChannels (but do not scan).
Valid for broadcasts only.
Parameters
hAPduInst Handle of APDU instance in which request will be
sent
uDstAddr Address of destination node of request
(can be 16- or 64-bit, as specified by bExtAddr)
bExtAddr Type of destination address:
TRUE: 64-bit IEEE (MAC) address
FALSE: 16-bit network address
*pu8SeqNumber Pointer to sequence number of request
*psZdpMgmtNwkUpdateReq Pointer to request (see above)
Returns
ZPS_E_SUCCESS (request successfully sent)
APS return codes, listed and described in Section 9.2.2
NWK return codes, listed and described in Section 9.2.3
MAC return codes, listed and described in Section 9.2.4
8.2.1.1 ZPS_tsAplZdpNodeDescriptor
The ZDP Node descriptor structure ZPS_tsAplZdpNodeDescriptor is shown below.
typedef struct {
union
{
ZPS_tsAplZdpNodeDescBitFields sBitFields;
uint16 u16Value;
} uBitUnion;
uint8 u8MacFlags;
uint16 u16ManufacturerCode;
uint8 u8MaxBufferSize;
uint16 u16MaxRxSize;
uint16 u16ServerMask;
uint16 u16MaxTxSize;
uint8 u8DescriptorCapability;
} ZPS_tsAplZdpNodeDescriptor;
where:
Bit Description
2-7 Reserved
ZPS_tsAplZdpNodeDescBitFields
The ZPS_tsAplZdpNodeDescBitFields structure is used by the sBitFields
element in the Node descriptor structure (see above), and is shown below:
typedef struct {
unsigned eFrequencyBand : 5;
unsigned eApsFlags : 3;
unsigned eReserved : 3; /* reserved */
unsigned bUserDescAvail : 1;
unsigned bComplexDescAvail : 1;
unsigned eLogicalType : 3;
}ZPS_tsAplZdpNodeDescBitFields;
where:
8.2.1.2 ZPS_tsAplZdpNodePowerDescriptor
The ZDP Node Power descriptor structure ZPS_tsAplZdpNodePowerDescriptor is
shown below.
typedef struct {
union
{
ZPS_tsAplZdpPowerDescBitFields sBitFields;
uint16 u16Value;
}uBitUnion;
} ZPS_tsAplZdpNodePowerDescriptor;
where:
sBitFields is a structure of type ZPS_tsAplZdpPowerDescBitFields
(described below) containing various items of information about the nodes
power.
u16value is used for the union and should be set to 0x0000.
ZPS_tsAplZdpPowerDescBitFields
The ZPS_tsAplZdpPowerDescBitFields structure is used by the sBitFields
element in the Node Power descriptor structure (see above), and is shown below:
typedef struct {
unsigned eCurrentPowerSourceLevel : 4;
unsigned eCurrentPowerSource : 4;
unsigned eAvailablePowerSource : 4;
unsigned eCurrentPowerMode : 4;
}ZPS_tsAplZdpPowerDescBitFields;
where:
eCurrentPowerSourceLevel is a 4-bit value roughly indicating the level of
charge of the nodes power source (mainly useful for batteries), as follows:
0000: Critically low
0100: Approximately 33%
1000: Approximately 66%
1100: Approximately 100% (near fully charged)
eCurrentPowerSource is a 4-bit value indicating the current power source for
the node, as detailed below (the bit corresponding to the current power source
is set to 1, all other bits are set to 0):
Bit 0: Permanent mains supply
Bit 1: Rechargeable battery
Bit 2: Disposable battery
Bit 4: Reserved
eAvailablePowerSource is a 4-bit value indicating the available power
sources for the node, as detailed above (a bit is set to 1 if the corresponding
power source is available).
eCurrentPowerMode is a 4-bit value indicating the power mode currently
used by the node, as follows:
0000: Receiver synchronised with the receiver on when idle subfield of
the Node descriptor
0001: Receiver switched on periodically, as defined by the Node Power
descriptor
0010: Receiver switched on when stimulated, e.g. by pressing a button
All other values are reserved
8.2.1.3 ZPS_tsAplZdpSimpleDescType
The ZDP Simple descriptor structure ZPS_tsAplZdpSimpleDescType is shown below.
typedef struct {
uint8 u8Endpoint;
uint16 u16ApplicationProfileId;
uint16 u16DeviceId;
union
{
ZPS_tsAplZdpSimpleDescBitFields sBitFields;
uint8 u8Value;
}uBitUnion;
uint8 u8InClusterCount;
uint16* pu16InClusterList;
uint8 u8OutClusterCount;
uint16* pu16OutClusterList;
}ZPS_tsAplZdpSimpleDescType;
where:
u8Endpoint is the number, in the range 1-240, of the endpoint to which the
Simple descriptor corresponds.
u16ApplicationProfileId is the 16-bit identifier of the ZigBee application
profile supported by the endpoint. This must be an application profile identifier
issued by the ZigBee Alliance.
u16DeviceId is the 16-bit identifier of the ZigBee device description
supported by the endpoint. This must be a device description identifier issued
by the ZigBee Alliance.
sBitFields is a structure of type ZPS_tsAplZdpSimpleDescBitFields
(described below) containing information about the endpoint.
u8Value is used for the union and must be set to 0x00.
u8InClusterCount is an 8-bit count of the number of input clusters,
supported on the endpoint, that will appear in the list pointed to by the
pu16InClusterList element.
*pu16InClusterList is a pointer to the list of input clusters supported by
the endpoint (for use during the service discovery and binding procedures).
This is a sequence of 16-bit values, representing the cluster numbers (in the
range 1-240), where the number of values is equal to count
u8InClusterCount. If this count is zero, the pointer can be set to NULL.
u8OutClusterCount is an 8-bit count of the number of output clusters,
supported on the endpoint, that will appear in the pu16OutClusterList
element.
*pu16OutClusterList is a pointer to the list of output clusters supported by
the endpoint (for use during the service discovery and binding procedures).
This is a sequence of 16-bit values, representing the cluster numbers (in the
range 1-240), where the number of values is equal to count
u8OutClusterCount. If this count is zero, the pointer can be set to NULL.
ZPS_tsAplZdpSimpleDescBitFields
The ZPS_tsAplZdpSimpleDescBitFields structure is used by the sBitFields
element in the Simple descriptor structure (see above), and is shown below:
typedef struct
{
unsigned eDeviceVersion :4;
unsigned eReserved :4;
}ZPS_tsAplZdpSimpleDescBitFields;
where:
eDeviceVersion is a 4-bit value identifying the version of the device
description supported by the endpoint.
eReserved is a 4-bit reserved value.
8.2.2.1 ZPS_tsAplZdpNwkAddrReq
This structure is used by the function ZPS_eAplZdpNwkAddrRequest(). It
represents a request for the network address of the node with a given IEEE address.
The ZPS_tsAplZdpNwkAddrReq structure is detailed below.
typedef struct {
uint64 u64IeeeAddr;
uint8 u8RequestType;
uint8 u8StartIndex;
} ZPS_tsAplZdpNwkAddrReq;
where:
u64IeeeAddr is the IEEE address of the node of interest
u8RequestType is the type of response required:
0x00: Single device response, which will contain only the network address
of the target node
0x01: Extended response, which will also include the network addresses
of neighbouring nodes
All other values are reserved
u8StartIndex is the Neighbour table index of the first neighbouring node to be
included in the response, if an extended response has been selected
8.2.2.2 ZPS_tsAplZdpIEEEAddrReq
This structure is used by the function ZPS_eAplZdpIEEEAddrRequest(). It
represents a request for the IEEE address of a node with a given network address.
The ZPS_tsAplZdpIEEEAddrReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
uint8 u8RequestType;
uint8 u8StartIndex;
} ZPS_tsAplZdpIEEEAddrReq;
where:
u16NwkAddrOfInterest is the network address of the node of interest
u8RequestType is the type of response required:
0x00: Single device response, which will contain only the IEEE address of
the target node
0x01: Extended response, which will also include the IEEE addresses of
neighbouring nodes
All other values are reserved
u8StartIndex is the Neighbour table index of the first neighbouring node to be
included in the response, if an extended response has been selected
8.2.2.3 ZPS_tsAplZdpDeviceAnnceReq
This structure is used by the function ZPS_eAplZdpDeviceAnnceRequest(). It
represents an announcement that the sending node has joined or rejoined the
network.
The ZPS_tsAplZdpDeviceAnnceReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8Capability;
} ZPS_tsAplZdpDeviceAnnceReq;
where:
u16NwkAddr is the network address of the sending node
u64IeeeAddr is the IEEE address of the sending node
u8Capability is a bitmap representing the capabilities of the sending node.
This bitmap is detailed in Table 8 on page 205
8.2.2.4 ZPS_tsAplZdpNodeDescReq
This structure is used by the function ZPS_eAplZdpNodeDescRequest(). It
represents a request for the Node descriptor of the node with a given network address.
The ZPS_tsAplZdpNodeDescReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpNodeDescReq;
where u16NwkAddrOfInterest is the network address of the node of interest.
8.2.2.5 ZPS_tsAplZdpPowerDescReq
This structure is used by the function ZPS_eAplZdpPowerDescRequest(). It
represents a request for the Power descriptor of the node with a given network
address.
The ZPS_tsAplZdpPowerDescReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpPowerDescReq;
where u16NwkAddrOfInterest is the network address of the node of interest.
8.2.2.6 ZPS_tsAplZdpSimpleDescReq
This structure is used by the function ZPS_eAplZdpSimpleDescRequest(). It
represents a request for the Simple descriptor of an endpoint on the node with a given
network address.
The ZPS_tsAplZdpSimpleDescReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
uint8 u8EndPoint;
} ZPS_tsAplZdpSimpleDescReq;
where:
u16NwkAddrOfInterest is the network address of the node of interest
u8EndPoint is the number of the relevant endpoint on the node (1-240)
8.2.2.7 ZPS_tsAplZdpExtendedSimpleDescReq
This structure is used by the ZPS_eAplZdpExtendedSimpleDescRequest()
function. It represents a request for the Simple descriptor of an endpoint on the node
with a given network address. This request is required when the endpoint has more
input/output clusters than the usual ZPS_eAplZdpSimpleDescRequest() function
can deal with.
The ZPS_tsAplZdpExtendedSimpleDescReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint8 u8EndPoint;
uint8 u8StartIndex;
} ZPS_tsAplZdpExtendedSimpleDescReq;
where:
u16NwkAddrOfInterest is the network address of the node of interest
u8EndPoint is the number of the relevant endpoint on the node (1-240)
u8StartIndex is the index of the first cluster of interest in the input and output
cluster lists for the endpoint (this and subsequent clusters will be reported in the
response)
8.2.2.8 ZPS_tsAplZdpComplexDescReq
This structure is used by the function ZPS_eAplZdpComplexDescRequest(). It
represents a request for the Complex descriptor of the node with a given network
address.
The ZPS_tsAplZdpComplexDescReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpComplexDescReq;
where u16NwkAddrOfInterest is the network address of the node of interest.
8.2.2.9 ZPS_tsAplZdpUserDescReq
This structure is used by the function ZPS_eAplZdpUserDescRequest(). It
represents a request for the User descriptor of the node with a given network address.
The ZPS_tsAplZdpUserDescReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpUserDescReq;
where u16NwkAddrOfInterest is the network address of the node of interest.
8.2.2.10 ZPS_tsAplZdpMatchDescReq
This structure is used by the function ZPS_eAplZdpMatchDescRequest(). It
represents a request for nodes with endpoints that match certain criteria in their
Simple descriptors.
The ZPS_tsAplZdpMatchDescReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
uint16 u16ProfileId;
/* rest of message is variable length */
uint8 u8NumInClusters;
uint16* pu16InClusterList;
uint8 u8NumOutClusters;
uint16* pu16OutClusterList;
} ZPS_tsAplZdpMatchDescReq;
where:
u16NwkAddrOfInterest is the network address of the node of interest
u16ProfileId is the identifier of the ZigBee application profile used
u8NumInClusters is the number of input clusters to be matched
pu16InClusterList is a pointer to the list of input clusters to be matched -
this is a variable-length list of input cluster IDs, two bytes for each cluster
u8NumOutClusters is the number of output clusters to be matched
pu16OutClusterList is a pointer to the list of output clusters to be matched -
this is a variable-length list of output cluster IDs, two bytes for each cluster
8.2.2.11 ZPS_tsAplZdpActiveEpReq
This structure is used by the function ZPS_eAplZdpActiveEpRequest(). It
represents a request for a list of the active endpoints on the node with a given network
address.
The ZPS_tsAplZdpActiveEpReq structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpActiveEpReq;
where u16NwkAddrOfInterest is the network address of the node of interest.
8.2.2.12 ZPS_tsAplZdpExtendedActiveEpReq
This structure is used by the function ZPS_eAplZdpExtendedActiveEpRequest(). It
represents a request for a list of the active endpoints on the node with a given network
address. This request is required when the node has more active endpoints than the
usual ZPS_eAplZdpActiveEpRequest() function can deal with.
The ZPS_tsAplZdpExtendedActiveEpReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint8 u8StartIndex;
} ZPS_tsAplZdpExtendedActiveEpReq;
where:
u16NwkAddr is the network address of the node of interest
u8StartIndex is the index of the first endpoint of interest in the list of active
endpoints (this and subsequent endpoints will be reported in the response)
8.2.2.13 ZPS_tsAplZdpUserDescSet
This structure is used by the function ZPS_eAplZdpUserDescSetRequest(). It
represents a request used to configure the User descriptor on a remote node.
The ZPS_tsAplZdpUserDescSet structure is detailed below.
typedef struct {
uint16 u16NwkAddrOfInterest;
uint8 u8Length;
char szUserDescriptor[ZPS_ZDP_LENGTH_OF_USER_DESC];
} ZPS_tsAplZdpUserDescSet;
where:
u16NwkAddrOfInterest is the network address of the node of interest
u8Length is the length of the User descriptor
szUserDescriptor is the new User descriptor for the remote node as a
character array.
8.2.2.14 ZPS_tsAplZdpSystemServerDiscoveryReq
This structure is used by the ZPS_eAplZdpSystemServerDiscoveryRequest()
function. It represents a request for information on the available services of a remote
node.
The ZPS_tsAplZdpSystemServerDiscoveryReq structure is detailed below.
typedef struct {
uint16 u16ServerMask;
} ZPS_tsAplZdpSystemServerDiscoveryReq;
where u16ServerMask is a bitmask representing the required services (1 for
required, 0 for not required). This bitmask is detailed in the table below.
Bit Service
6 Network Manager
7-15 Reserved
8.2.2.15 ZPS_tsAplZdpDiscoveryCacheReq
This structure is used by the function ZPS_eAplZdpDiscoveryCacheRequest(). It
represents a request to find the nodes in the network which have a primary discovery
cache.
The ZPS_tsAplZdpDiscoveryCacheReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
} ZPS_tsAplZdpDiscoveryCacheReq;
where:
u16NwkAddr is the network address of the sending node
u64IeeeAddr is the IEEE address of the sending node
8.2.2.16 ZPS_tsAplZdpDiscoveryStoreReq
This structure is used by the function ZPS_eAplZdpDiscoveryStoreRequest(). It
represents a request to a remote node to reserve memory space to store the local
nodes discovery information.
The ZPS_tsAplZdpDiscoveryStoreReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8NodeDescSize;
uint8 u8PowerDescSize;
uint8 u8ActiveEpSize;
uint8 u8SimpleDescCount;
/* Rest of message is variable length */
uint8* pu8SimpleDescSizeList;
} ZPS_tsAplZdpDiscoveryStoreReq;
where:
u16NwkAddr is the network address of the sending node
u64IeeeAddr is the IEEE address of the sending node
u8NodeDescSize is the size of the Node descriptor to store
u8PowerDescSize is the size of the Power descriptor to store
u8ActiveEpSize is the size of the list of active endpoints to store
u8SimpleDescCount is the number of Simple descriptors to store
pu8SimpleDescSizeList is a pointer to a list of sizes of the Simple descriptors
8.2.2.17 ZPS_tsAplZdpNodeDescStoreReq
This structure is used by the function ZPS_eAplZdpNodeDescStoreRequest(). It
represents a request to a remote node to store the Node descriptor of the local node.
The ZPS_tsAplZdpNodeDescStoreReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
/* Rest of message is variable length */
ZPS_tsAplZdpNodeDescriptor sNodeDescriptor;
} ZPS_tsAplZdpNodeDescStoreReq;
where:
u16NwkAddr is the network address of the sending node
u64IeeeAddr is the IEEE address of the sending node
sNodeDescriptor is a pointer to the Node descriptor to store (this is itself a
structure of the type ZPS_tsAplZdpNodeDescriptor, detailed in Section
8.2.1.1)
8.2.2.18 ZPS_tsAplZdpPowerDescStoreReq
This structure is used by the function ZPS_eAplZdpPowerDescStoreRequest(). It
represents a request to a remote node to store the Power descriptor of the local node.
The ZPS_tsAplZdpPowerDescStoreReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
/* Rest of message is variable length */
ZPS_tsAplZdpNodePowerDescriptor sPowerDescriptor;
} ZPS_tsAplZdpPowerDescStoreReq;
where:
u16NwkAddr is the network address of the sending node
u64IeeeAddr is the IEEE address of the sending node
sPowerDescriptor is a pointer to the Power descriptor to store (this is itself a
structure of the type ZPS_tsAplZdpNodePowerDescriptor, detailed in Section
8.2.1.2)
8.2.2.19 ZPS_tsAplZdpSimpleDescStoreReq
This structure is used by the function ZPS_eAplZdpSimpleDescStoreRequest(). It
represents a request to a remote node to store the Simple descriptor of one of the local
nodes endpoints.
The ZPS_tsAplZdpSimpleDescStoreReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8Length;
/* Rest of message is variable length */
ZPS_tsAplZdpSimpleDescType sSimpleDescriptor;
} ZPS_tsAplZdpSimpleDescStoreReq;
where:
u16NwkAddr is the network address of the sending node
u64IeeeAddr is the IEEE address of the sending node
u8Length is the length of the Simple descriptor to store
sSimpleDescriptor is a pointer to the Simple descriptor to store (this is itself a
structure of the type ZPS_tsAplZdpSimpleDescType, detailed in Section
8.2.1.3)
8.2.2.20 ZPS_tsAplZdpActiveEpStoreReq
This structure is used by the function ZPS_eAplZdpActiveEpStoreRequest(). It
represents a request to a remote node to store the list of active endpoints of the local
node.
The ZPS_tsAplZdpActiveEpStoreReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
uint8 u8ActiveEPCount;
/* Rest of message is variable length */
uint8* pu8ActiveEpList;
} ZPS_tsAplZdpActiveEpStoreReq;
where:
u16NwkAddr is the network address of the sending node
u64IeeeAddr is the IEEE address of the sending node
u8ActiveEPCount is the number of active endpoints in the list to store
pu8ActiveEpList is a pointer to the list of active endpoints to store
8.2.2.21 ZPS_tsAplZdpFindNodeCacheReq
This structure is used by the function ZPS_eAplZdpActiveEpStoreRequest(). It
represents a request to search for nodes in the network that hold discovery
information about a particular node.
The ZPS_tsAplZdpFindNodeCacheReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
} ZPS_tsAplZdpFindNodeCacheReq;
where:
u16NwkAddr is the network address of the node of interest
u64IeeeAddr is the IEEE address of the node of interest
8.2.2.22 ZPS_tsAplZdpRemoveNodeCacheReq
This structure is used by the function ZPS_eAplZdpActiveEpStoreRequest(). It
represents a request to a remote node to remove from its Primary Discovery Cache
all discovery information relating to a particular End Device.
The ZPS_tsAplZdpRemoveNodeCacheReq structure is detailed below.
typedef struct {
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
} ZPS_tsAplZdpRemoveNodeCacheReq;
where:
u16NwkAddr is the network address of the End Device of interest
u64IeeeAddr is the IEEE address of the End Device of interest
8.2.2.23 ZPS_tsAplZdpEndDeviceBindReq
This structure is used by the function ZPS_eAplZdpEndDeviceBindRequest(). It
represents a request to the Co-ordinator to bind an endpoint on the local node to an
endpoint on a remote node (the Co-ordinator must match two such binding requests,
from the local node and remote node).
The ZPS_tsAplZdpEndDeviceBindReq structure is detailed below.
typedef struct {
uint16 u16BindingTarget;
uint64 u64SrcIeeeAddress;
uint8 u8SrcEndpoint;
uint16 u16ProfileId;
/* Rest of message is variable length */
uint8 u8NumInClusters;
uint16 *pu16InClusterList;
uint8 u8NumOutClusters;
uint16 *pu16OutClusterList;
} ZPS_tsAplZdpEndDeviceBindReq;
where:
u16BindingTarget is the network address of the node to hold the binding
(either a node with primary binding table cache or the local node)
u64SrcIeeeAddress is the IEEE address of the local node
u8SrcEndpoint is the number of the local endpoint to be bound (1-240)
u16ProfileId is the application profile ID to be matched for the binding
u8NumInClusters is the number of input clusters of the local endpoint
(available for matching with output clusters of remote node to be bound)
pu16InClusterList is a pointer to the input cluster list of the local endpoint
(containing clusters for matching with output clusters of remote node)
u8NumOutClusters is the number of output clusters of the local endpoint
(available for matching with input clusters of remote node to be bound)
pu16OutClusterList is a pointer to the output cluster list of the local endpoint
(containing clusters for matching with input clusters of remote node)
8.2.2.24 ZPS_tsAplZdpBindUnbindReq
This structure is used by the function ZPS_eAplZdpBindUnbindRequest(). It
represents a request for a modification of the Binding table on the target node, in order
to either bind or unbind two nodes in the network.
The ZPS_tsAplZdpBindUnbindReq structure is detailed below.
typedef struct {
uint64 u64SrcAddress;
uint8 u8SrcEndpoint;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
} uAddressField;
} ZPS_tsAplZdpBindUnbindReq;
where:
u64SrcAddress is the IEEE address of the source node for the binding
u8SrcEndpoint is the number of the source endpoint for the binding (1-240)
u16ClusterId is the ID of the cluster (on the local endpoint) for the binding
u8DstAddrMode is the destination addressing mode (see Table 11 below):
ZPS_E_ADDR_MODE_SHORT: network address
(u8DstEndPoint is unspecified)
ZPS_E_ADDR_MODE_IEEE: IEEE address
(u8DstEndPoint is specified)
All other values are reserved
u16DstAddress or u64DstAddress is the address of the destination node for
the binding:
network address u16DstAddress if u8DstAddrMode is set to
ZPS_E_ADDR_MODE_SHORT
IEEE address u64DstAddress if 8DstAddrMode is set to
ZPS_E_ADDR_MODE_IEEE
u8DstEndPoint is the number of the destination endpoint for the binding
(1-240) - not required if u8DstAddrMode set to ZPS_E_ADDR_MODE_SHORT
(network address)
8.2.2.25 ZPS_tsAplZdpBindRegisterReq
This structure is used by the function ZPS_eAplZdpBindRegisterRequest(). It
represents a request to inform a remote node with a primary binding table cache that
the local node will hold its own Binding table entries.
The ZPS_tsAplZdpBindRegisterReq structure is detailed below.
typedef struct {
uint64 u64NodeAddress;
} ZPS_tsAplZdpBindRegisterReq;
where u64NodeAddress is the IEEE address of the local node.
8.2.2.26 ZPS_tsAplZdpReplaceDeviceReq
This structure is used by the function ZPS_eAplZdpReplaceDeviceRequest(). It
represents a request to a remote node (with a primary binding table cache) to modify
its binding table entries by replacing an IEEE address and/or associated endpoint
number.
The ZPS_tsAplZdpReplaceDeviceReq structure is detailed below.
typedef struct {
uint64 u64OldAddress;
uint8 u8OldEndPoint;
uint64 u64NewAddress;
uint8 u8NewEndPoint;
} ZPS_tsAplZdpReplaceDeviceReq;
where:
u64OldAddress is the IEEE address to be replaced
u8OldEndPoint is the endpoint number to be replaced
(0-240, where 0 indicates that the endpoint number is not to be replaced)
u64NewAddress is the replacement IEEE address
u8NewEndPoint is the replacement endpoint number (1-240)
8.2.2.27 ZPS_tsAplZdpStoreBkupBindEntryReq
This structure is used by the function ZPS_eAplZdpStoreBkupBindEntryRequest().
It represents a request to a remote node to save a back-up of an entry from the local
primary binding table cache.
The ZPS_tsAplZdpStoreBkupBindEntryReq structure is detailed below.
typedef struct {
uint64 u64SrcAddress;
uint8 u8SrcEndPoint;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
};
} ZPS_tsAplZdpStoreBkupBindEntryReq;
where:
u64SrcAddress is the IEEE address of the source node for the binding entry
u8SrcEndpoint is the number of the source endpoint for the binding (1-240)
u16ClusterId is the ID of the cluster (on the local endpoint) for the binding
u8DstAddrMode is the destination addressing mode for remaining elements
(see Table 12 below)
u16DstAddress is the address of the destination node for the binding
(address type according to setting of u8DstAddrMode)
u8DstEndPoint is the number of the destination endpoint for the binding
(1-240)
8.2.2.28 ZPS_tsAplZdpRemoveBkupBindEntryReq
This structure is used by the ZPS_eAplZdpRemoveBkupBindEntryRequest()
function. It represents a request to a remote node to remove the back-up of an entry
from the local primary binding table cache.
The ZPS_tsAplZdpRemoveBkupBindEntryReq structure is detailed below.
typedef struct {
uint64 u64SrcAddress;
uint8 u8SrcEndPoint;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
};
} ZPS_tsAplZdpRemoveBkupBindEntryReq;
where:
u64SrcAddress is the IEEE address of the source node for the binding entry
u8SrcEndpoint is the number of the source endpoint for the binding (1-240)
u16ClusterId is the ID of the cluster (on the local endpoint) for the binding
u8DstAddrMode is the destination addressing mode for remaining elements
(see Table 13 below)
u16DstAddress is the address the destination node for the binding
(address type according to setting of u8DstAddrMode)
u8DstEndPoint is the number of the destination endpoint for the binding
(1-240)
8.2.2.29 ZPS_tsAplZdpBackupBindTableReq
This structure is used by the function ZPS_eAplZdpBackupBindTableRequest(). It
represents a request to a remote node to save a back-up of the local primary binding
table cache (whole or in part).
The ZPS_tsAplZdpBackupBindTableReq structure is detailed below.
typedef struct {
uint16 u16BindingTableEntries;
uint16 u16StartIndex;
uint16 u16BindingTableListCount;
/* Rest of message is variable length */
ZPS_tsAplZdpBindingTable sBindingTable;
} ZPS_tsAplZdpBackupBindTableReq;
where:
u16BindingTableEntries is the total number of entries in the primary binding
table cache
u16StartIndex is the binding table index of the first entry to be backed up
u16BindingTableListCount is the number of binding table entries in the list to
be backed up (sBindingTable)
sBindingTable is a pointer to the list of binding table entries to be backed up.
Each list item is of the type ZPS_tsAplZdpBindingTable detailed below
ZPS_tsAplZdpBindingTable
typedef struct
{
uint64 u64SourceAddress;
ZPS_tsAplZdpBindingTableEntry* psBindingTableEntryForSpSrcAddr;
}ZPS_tsAplZdpBindingTable;
where:
u64SourceAddress is the IEEE source address for the binding table entry
psBindingTableEntryForSpSrcAddr is the binding table entry. This is of the
type ZPS_tsAplZdpBindingTableEntry detailed below
ZPS_tsAplZdpBindingTableEntry
typedef struct
{
uint16 u16ClusterId;
uint8 u8SourceEndpoint;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
};
}ZPS_tsAplZdpBindingTableEntry;
where:
u16ClusterId is the ID of the cluster (on the local endpoint) for the binding
u8SrcEndpoint is the number of the source endpoint for the binding (1-240)
u8DstAddrMode is the destination addressing mode for remaining elements
(see Table 14 below)
u16DstAddress is the address the destination node for the binding
(address type according to setting of u8DstAddrMode)
u8DstEndPoint is the number of the destination endpoint for the binding
(1-240)
8.2.2.30 ZPS_tsAplZdpRecoverBindTableReq
This structure is used by the function ZPS_eAplZdpRecoverBindTableRequest(). It
represents a request to a remote node to recover a back-up of the local primary
binding table cache.
The ZPS_tsAplZdpRecoverBindTableReq structure is detailed below.
typedef struct {
uint16 u16StartIndex;
} ZPS_tsAplZdpRecoverBindTableReq;
where u16StartIndex is the binding table index of the first entry to be recovered.
8.2.2.31 ZPS_tsAplZdpBackupSourceBindReq
This structure is used by the function ZPS_eAplZdpBackupSourceBindRequest().
It represents a request to a remote node to save a back-up of the local nodes source
binding table (whole or in part).
The ZPS_tsAplZdpBackupSourceBindReq structure is detailed below.
typedef struct {
uint16 u16SourceTableEntries;
uint16 u16StartIndex;
uint16 u16SourceTableListCount;
/* Rest of message is variable length */
uint64* pu64SourceAddress;
} ZPS_tsAplZdpBackupSourceBindReq;
where:
u16SourceTableEntries is the total number of entries in the source binding
table
u16StartIndex is the binding table index of the first entry to be backed up
u16SourceTableListCount is the number of binding table entries in the list to
be backed up (pu64SourceAddress)
pu64SourceAddress is a pointer to the list of IEEE source addresses
corresponding to the binding table entries to be backed up
8.2.2.32 ZPS_tsAplZdpRecoverSourceBindReq
This structure is used by the function ZPS_eAplZdpRecoverSourceBindRequest().
It represents a request to a remote node to recover the back-up of the local nodes
source binding table (whole or in part).
The ZPS_tsAplZdpRecoverSourceBindReq structure is detailed below.
typedef struct {
uint16 u16StartIndex;
} ZPS_tsAplZdpRecoverSourceBindReq;
where u16StartIndex is the binding table index of the first entry to be recovered.
8.2.2.33 ZPS_tsAplZdpMgmtNwkDiscReq
This structure is used by the function ZPS_eAplZdpMgmtNwkDiscRequest(). It
represents a request to a remote node to discover any other wireless networks that
are operating in the neighbourhood.
The ZPS_tsAplZdpMgmtNwkDiscReq structure is detailed below.
typedef struct {
uint32 u32ScanChannels;
uint8 u8ScanDuration;
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtNwkDiscReq;
where:
u32ScanChannels is a bitmask of the radio channels to scan
(1 means scan, 0 means do not scan):
Bits 0 to 26 respectively represent channels 0 to 26 (only bits 11 to 26 are
relevant to the 2400-MHz band)
Bits 27 to 31 are reserved
u8ScanDuration is a value in the range 0x00 to 0x0E that determines the time
spent scanning each channel - this time is proportional to 2u8ScanDuration+1
u8StartIndex is the index of the first result from the results list to include in the
response to this request
8.2.2.34 ZPS_tsAplZdpMgmtLqiReq
This structure is used by the function ZPS_eAplZdpMgmtLqiRequest(). It represents
a request to a remote node to provide a list of neighbouring nodes, from its Neighbour
table, including a radio signal strength (LQI) value for each of these nodes.
The ZPS_tsAplZdpMgmtLqiReq structure is detailed below.
typedef struct {
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtLqiReq;
where u8StartIndex is the Neighbour table index of the first entry to be included in
the response to this request.
8.2.2.35 ZPS_tsAplZdpMgmtRtgReq
This structure is used by the function ZPS_eAplZdpMgmtRtgRequest(). It
represents a request to a remote node to provide the contents of its Routing table.
The ZPS_tsAplZdpMgmtRtgReq structure is detailed below.
typedef struct {
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtRtgReq;
where u8StartIndex is the Routing table index of the first entry to be included in the
response to this request.
8.2.2.36 ZPS_tsAplZdpMgmtBindReq
This structure is used by the function ZPS_eAplZdpMgmtBindRequest(). It
represents a request to a remote node to provide the contents of its Binding table.
The ZPS_tsAplZdpMgmtBindReq structure is detailed below.
typedef struct {
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtBindReq;
where u8StartIndex is the Binding table index of the first entry to be included in the
response to this request.
8.2.2.37 ZPS_tsAplZdpMgmtLeaveReq
This structure is used by the function ZPS_eAplZdpMgmtLeaveRequest(). It
requests a remote node to leave the network.
The ZPS_tsAplZdpMgmtLeaveReq structure is detailed below.
typedef struct {
uint64 u64DeviceAddress;
uint8 u8Flags;
} ZPS_tsAplZdpMgmtLeaveReq;
where:
u64DeviceAddress is the IEEE address of the device being asked to leave the
network
u8Flags is an 8-bit bitmap containing the following flags:
Rejoin flag (bit 0): Set to 1 if the node requested to leave the network
should immediately try to rejoin the network, otherwise set to 0.
Remove Children flag (bit 1): Set to 1 if the node requested to leave the
network should also request its own children (if any) to leave the network,
otherwise set to 0.
Reserved (bits 7-2)
8.2.2.38 ZPS_tsAplZdpMgmtDirectJoinReq
This structure is used by the function ZPS_eAplZdpMgmtDirectJoinRequest(). It
requests a remote node to allow a particular device to join it (and therefore the
network).
The ZPS_tsAplZdpMgmtDirectJoinReq structure is detailed below.
typedef struct {
uint64 u64DeviceAddress;
uint8 u8Capability;
} ZPS_tsAplZdpMgmtDirectJoinReq;
where:
u64DeviceAddress is the IEEE address of the device to be allowed to join
u8Capability is a bitmask of the operating capabilities of the device to be
allowed to join. This bitmask is detailed in Table 8 on page 205
8.2.2.39 ZPS_tsAplZdpMgmtPermitJoiningReq
This structure is used by the function ZPS_eAplZdpMgmtPermitJoiningRequest().
It requests a remote node (Router or Co-ordinator) to enable or disable joining for a
specified amount of time.
The ZPS_tsAplZdpMgmtPermitJoiningReq structure is detailed below.
typedef struct {
uint8 u8PermitDuration;
bool_t bTcSignificance;
} ZPS_tsAplZdpMgmtPermitJoiningReq;
where:
u8PermitDuration is the time period, in seconds, during which joining will be
allowed (0x00 means that joining is enabled or disabled with no time limit)
bTcSignificance determines whether the remote device is a Trust Centre:
TRUE: A Trust Centre
FALSE: Not a Trust Centre
8.2.2.40 ZPS_tsAplZdpMgmtCacheReq
This structure is used by the function ZPS_eAplZdpMgmtCacheRequest(). It
requests a remote node to provide a list of the End Devices registered in its primary
discovery cache.
The ZPS_tsAplZdpMgmtCacheReq structure is detailed below.
typedef struct {
uint8 u8StartIndex;
} ZPS_tsAplZdpMgmtCacheReq;
where u8StartIndex is the discovery cache index of the first entry to be included in
the response to this request.
8.2.2.41 ZPS_tsAplZdpMgmtNwkUpdateReq
This structure is used by the function ZPS_eAplZdpMgmtNwkUpdateRequest(). It
requests an update of network parameters related to radio communication and may
optionally initiate an energy scan in the 2400-MHz band.
The ZPS_tsAplZdpMgmtNwkUpdateReq structure is detailed below.
typedef struct {
uint32 u32ScanChannels;
uint8 u8ScanDuration;
uint8 u8ScanCount;
uint8 u8NwkUpdateId;
uint16 u16NwkManagerAddr;
} ZPS_tsAplZdpMgmtNwkUpdateReq;
where:
u32ScanChannels is a bitmask of the radio channels to be scanned
(1 means scan, 0 means do not scan):
Bits 0 to 26 respectively represent channels 0 to 26 (only bits 11 to 26 are
relevant to the 2400-MHz band)
Bits 27 to 31 are reserved
u8ScanDuration is a key value used to determine the action to be taken, as
follows:
0x00-0x05: Indicates that an energy scan is required and determines the
time to be spent scanning each channel - this time is proportional to
2u8ScanDuration+1. The set of channels to scan is specified through
u32ScanChannels and the maximum number of scans is equal to the
value of u8ScanCount. Valid for unicasts only
0x06-0xFD: Reserved
0xFE: Indicates that radio channel is to be changed to single channel
specified through u32ScanChannels and that network manager address to
be set to that specified through u16NwkManagerAddr. Valid for broadcasts
only
0xFF: Indicates that stored radio channel mask to be updated with that
specified through u32ScanChannels (but scan not required). Valid for
broadcasts only.
u8ScanCount is the number of energy scans to be conducted and reported.
Valid only if a scan has been enabled through u8ScanDuration (0x00-0x05)
u8NwkUpdateId is a value set by the Network Channel Manager before the
request is sent. Valid only if u8ScanDuration set to 0xFE or 0xFF
u16NwkManagerAddr is the 16-bit network address of the Network Manager
(node nominated to manage radio-band operation of network). Valid only if
u8ScanDuration set to 0xFF
ZPS_tsAplZdpRecoverBindTableRsp 343
ZPS_tsAplZdpBackupSourceBindRsp 343
ZPS_tsAplZdpRecoverSourceBindRsp 344
Network Management Services Response Structures
ZPS_tsAplZdpMgmtNwkDiscRsp 345
ZPS_tsAplZdpMgmtLqiRsp 346
ZPS_tsAplZdpMgmtRtgRsp 348
ZPS_tsAplZdpMgmtBindRsp 350
ZPS_tsAplZdpMgmtLeaveRsp 350
ZPS_tsAplZdpMgmtDirectJoinRsp 351
ZPS_tsAplZdpMgmtPermitJoiningRsp 351
ZPS_tsAplZdpMgmtCacheRsp 352
ZPS_tsAplZdpMgmtNwkUpdateNotify 353
8.2.3.1 ZPS_tsAplZdpNwkAddrRsp
This structure is used to store NWK_addr_rsp message data - a response to a call to
the function ZPS_eAplZdpNwkAddrRequest(). This response contains the network
address of the node with a given IEEE address.
The ZPS_tsAplZdpNwkAddrRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint64 u64IeeeAddrRemoteDev;
uint16 u16NwkAddrRemoteDev;
uint8 u8NumAssocDev;
uint8 u8StartIndex;
/* Rest of the message is variable Length */
uint16* pNwkAddrAssocDevList;
} ZPS_tsAplZdpNwkAddrRsp;
where:
u8Status is the return status for ZPS_eAplZdpNwkAddrRequest()
u64IeeeAddrRemoteDev is the IEEE address of the remote node that sent the
response (this is the IEEE address specified in the original request)
u16NwkAddrRemoteDev is the network address of the remote node that sent the
response (this is the network address that was requested)
u8NumAssocDev is the number of neighbouring nodes for which network
addresses are also being reported (in the remainder of the structure)
u8StartIndex is the index in the remote nodes Neighbour table of the first
entry to be included in this report. This element should be ignored if the
element u8NumAssocDev is 0.
pNwkAddrAssocDevList is a pointer to a list of 16-bit network addresses of the
remote nodes neighbours (this is a variable-length list with four bytes per
node). This element should be ignored if the element u8NumAssocDev is 0.
8.2.3.2 ZPS_tsAplZdpIeeeAddrRsp
This structure is used to store IEEE_addr_rsp message data - a response to a call to
the function ZPS_eAplZdpIeeeAddrRequest(). This response contains the IEEE
address of the node with a given network address.
The ZPS_tsAplZdpIeeeAddrRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint64 u64IeeeAddrRemoteDev;
uint16 u16NwkAddrRemoteDev;
uint8 u8NumAssocDev;
uint8 u8StartIndex;
/* Rest of the message is variable Length */
uint16* pNwkAddrAssocDevList;
} ZPS_tsAplZdpIeeeAddrRsp;
where:
u8Status is the return status for ZPS_eAplZdpIeeeAddrRequest()
u64IeeeAddrRemoteDev is the IEEE address of the remote node that sent the
response (this is the IEEE address that was requested)
u16NwkAddrRemoteDev is the network address of the remote node that sent the
response (this is the network address specified in the original request)
u8NumAssocDev is the number of neighbouring nodes for which network
addresses are also being reported (in the remainder of the structure)
u8StartIndex is the index in the remote nodes Neighbour table of the first
entry to be included in this report. This element should be ignored if the
element u8NumAssocDev is 0.
pNwkAddrAssocDevList is a pointer to a list of 16-bit network addresses of the
remote nodes neighbours (this is a variable-length list with four bytes per
node). This element should be ignored if the element u8NumAssocDev is 0.
8.2.3.3 ZPS_tsAplZdpNodeDescRsp
This structure is used to store Node_Desc_rsp message data - a response to a call to
the function ZPS_eAplZdpNodeDescRequest(). This response contains the Node
descriptor of the node with a given network address.
The ZPS_tsAplZdpNodeDescRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
/* Rest of the message is variable length */
ZPS_tsAplZdpNodeDescriptor tsNodeDescriptor;
} ZPS_tsAplZdpNodeDescRsp;
where:
u8Status is the return status for ZPS_eAplZdpNodeDescRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
tsNodeDescriptor is the returned Node descriptor, a structure of type
ZPS_tsAplZdpNodeDescriptor (detailed in Section 8.2.1.1). This is only
included if u8Status reports success
8.2.3.4 ZPS_tsAplZdpPowerDescRsp
This structure is used to store Power_Desc_rsp message data - a response to a call
to the function ZPS_eAplZdpPowerDescRequest(). This response contains the
Power descriptor of the node with a given network address.
The ZPS_tsAplZdpPowerDescRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
/* Rest of the message is variable length */
ZPS_tsAplZdpNodePowerDescriptor sPowerDescriptor;
} ZPS_tsAplZdpPowerDescRsp;
where:
u8Status is the return status for ZPS_eAplZdpPowerDescRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
sPowerDescriptor is the returned Power descriptor, a structure of type
ZPS_tsAplZdpNodePowerDescriptor (detailed in Section 8.2.1.2). This is only
included if u8Status reports success
8.2.3.5 ZPS_tsAplZdpSimpleDescRsp
This structure is used to store Simple_Desc_rsp message data - a response to a call
to the function ZPS_eAplZdpSimpleDescRequest(). This response contains the
Simple descriptor of a given endpoint on the node with a given network address.
The ZPS_tsAplZdpSimpleDescRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
uint8 u8Length;
/* Rest of the message is variable length */
ZPS_tsAplZdpSimpleDescType sSimpleDescriptor;
} ZPS_tsAplZdpSimpleDescRsp;
where:
u8Status is the return status for ZPS_eAplZdpSimpleDescRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
u8Length is the length of the returned Simple descriptor, in bytes (depends on
the number of clusters supported by the endpoint)
sSimpleDescriptor is the returned Simple descriptor, a structure of type
ZPS_tsAplZdpSimpleDescType (detailed in Section 8.2.1.3). This is only
included if u8Status reports success
8.2.3.6 ZPS_tsAplZdpExtendedSimpleDescRsp
This structure is used to store Extended_Simple_Desc_rsp message data - a
response to a call to the function ZPS_eAplZdpExtendedSimpleDescRequest().
This response contains a cluster list (combined input and output) for a given endpoint
on the node with a given network address.
The ZPS_tsAplZdpExtendedSimpleDescRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddr;
uint8 u8EndPoint;
uint8 u8AppInputClusterCount;
uint8 u8AppOutputClusterCount;
uint8 u8StartIndex;
/* Rest of the message is variable length */
uint16* pAppClusterList;
} ZPS_tsAplZdpExtendedSimpleDescRsp;
where:
u8Status is the return status for
ZPS_eAplZdpExtendedSimpleDescRequest()
u16NwkAddr is the network address of the remote node that sent the response
(this is the network address that was specified in the request)
u8EndPoint is the number of the endpoint for which the response was sent
(this is the endpoint number that was specified in the request)
u8AppInputClusterCount is the total number of input clusters in the
endpoints complete input cluster list
u8AppOutputClusterCount is the total number of output clusters in the
endpoints complete output cluster list
u8StartIndex is the index, in the endpoints complete input or output cluster
list, of the first cluster reported in this response
pAppClusterList is a pointer to the reported cluster list, input clusters first
then output clusters. This is only included if u8Status reports success
8.2.3.7 ZPS_tsAplZdpComplexDescRsp
This structure is used to store Complex_Desc_rsp message data - a response to a call
to the function ZPS_eAplZdpComplexDescRequest(). This response contains the
Complex descriptor of the node with a given network address.
The ZPS_tsAplZdpComplexDescRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
uint8 u8Length;
/* Rest of the message is variable Length */
ZPS_tsAplZdpComplexDescElement sComplexDescriptor;
} ZPS_tsAplZdpComplexDescRsp;
where:
u8Status is the return status for ZPS_eAplZdpComplexDescRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
u8Length is the length of the returned Complex descriptor, in bytes
sComplexDescriptor is the returned Complex descriptor, a structure of type
ZPS_tsAplZdpComplexDescRsp (described below). This is only included if
u8Status reports success
ZPS_tsAplZdpComplexDescElement
typedef struct {
uint8 u8XMLTag;
uint8 u8FieldCount;
uint8 *pu8Data;
} ZPS_tsAplZdpComplexDescElement;
where:
u8XMLTag is the XML tag for the current field
u8FieldCount is the number of fields in the Complex descriptor
*pu8Data is a pointer to the data of the current field
8.2.3.8 ZPS_tsAplZdpUserDescRsp
This structure is used to store User_Desc_rsp message data - a response to a call to
the function ZPS_eAplZdpUserDescRequest(). This response contains the User
descriptor of the node with a given network address.
The ZPS_tsAplZdpUserDescRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
uint8 u8Length;
/* Rest of the message is variable Length */
char szUserDescriptor[ZPS_ZDP_LENGTH_OF_USER_DESC];
} ZPS_tsAplZdpUserDescRsp;
where:
u8Status is the return status for ZPS_eAplZdpUserDescRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
u8Length is the length of the returned User descriptor, in bytes (maximum: 16)
szUserDescriptor is the returned User descriptor as a character array. This is
only included if u8Status reports success
8.2.3.9 ZPS_tsAplZdpMatchDescRsp
This structure is used to store Match_Desc_rsp message data - a response to a call
to the function ZPS_eAplZdpMatchDescRequest(). This response contains details
of the endpoints on the remote node that matched the criteria specified in the original
request.
The ZPS_tsAplZdpMatchDescRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
uint8 u8MatchLength;
/* Rest of message is variable length */
uint8* u8MatchList;
} ZPS_tsAplZdpMatchDescRsp;
where:
u8Status is the return status for ZPS_eAplZdpMatchDescRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
u8MatchLength is the length of the list of matched endpoints, in bytes
u8MatchList is a pointer to the list of matched endpoints, where each endpoint
is represented by an 8-bit value (in the range 1-240)
8.2.3.10 ZPS_tsAplZdpActiveEpRsp
This structure is used to store Active_EP_rsp message data - a response to a call to
the function ZPS_eAplZdpActiveEpRequest(). This response contains a list of the
active endpoints on a given network node.
The ZPS_tsAplZdpActiveEpRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
uint8 u8ActiveEpCount;
/* Rest of the message is variable */
uint8* pActiveEpList;
} ZPS_tsAplZdpActiveEpRsp;
where:
u8Status is the return status for ZPS_eAplZdpActiveEpRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
u8ActiveEpCount is the number of active endpoints on the node
pActiveEpList is a pointer to the list of active endpoints, where each endpoint
is represented by an 8-bit value (in the range 1-240).
8.2.3.11 ZPS_tsAplZdpExtendedActiveEpRsp
This structure is used to store Extended_Active_EP_rsp message data - a response
to a call to the function ZPS_eAplZdpExtendedActiveEpRequest(). This response
contains a list of the active endpoints on the node with a given network address.
The ZPS_tsAplZdpExtendedActiveEpRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddr;
uint8 u8ActiveEpCount;
uint8 u8StartIndex;
/* Rest of the message is variable Length */
uint8* pActiveEpList;
} ZPS_tsAplZdpExtendedActiveEpRsp;
where:
u8Status is the return status for ZPS_eAplZdpExtendedActiveEpRequest()
16NwkAddr is the network address of the remote node that sent the response
(this is the network address that was specified in the request)
u8ActiveEpCount is the total number of active endpoints on the node
u8StartIndex is the index, in the nodes list of active endpoints, of the first
endpoint reported in this response
pActiveEpList is a pointer to the reported list of active endpoints (starting with
the endpoint with index u8StartIndex).
8.2.3.12 ZPS_tsAplZdpUserDescConf
This structure is used to store User_Desc_conf message data - a response to a call
to the function ZPS_eAplZdpUserDescSetRequest(). This response contains a
confirmation of the requested configuration of the User descriptor on a given network
node.
The ZPS_tsAplZdpUserDescConf structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpUserDescConf;
where:
u8Status is the return status for ZPS_eAplZdpUserDescSetRequest()
u16NwkAddrOfInterest is the network address of the remote node that sent
the response (this is the network address that was specified in the request)
8.2.3.13 ZPS_tsAplZdpSystemServerDiscoveryRsp
This structure is used to store System_Server_Discovery_rsp message data - a
response to a call to the function ZPS_eAplZdpSystemServerDiscoveryRequest().
This response indicates which of the requested services are supported by a given
network node.
The ZPS_tsAplZdpSystemServerDiscoveryRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16ServerMask;
} ZPS_tsAplZdpSystemServerDiscoveryRsp;
where:
u8Status is the return status for the function
ZPS_eAplZdpSystemServerDiscoveryRequest()
u16ServerMask is the returned bitmask that summarises the requested
services supported by the node (1 for supported, 0 for not supported or not
requested). This bitmask is detailed in the table below.
Bit Service
6 Network Manager
7-15 Reserved
8.2.3.14 ZPS_tsAplZdpDiscoveryCacheRsp
This structure is used to store Discovery_Cache_rsp message data - a response to a
call to the function ZPS_eAplZdpDiscoveryCacheRequest(). This response
indicates that the sending node has a primary discovery cache.
The ZPS_tsAplZdpDiscoveryCacheRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpDiscoveryCacheRsp;
where u8Status is the return status for ZPS_eAplZdpDiscoveryCacheRequest().
8.2.3.15 ZPS_tsAplZdpDiscoveryStoreRsp
This structure is used to store Discovery_Store_rsp message data - a response to a
call to the function ZPS_eAplZdpDiscoveryStoreRequest(). This response indicates
whether the sending node has successfully reserved space in its primary discovery
cache.
The ZPS_tsAplZdpDiscoveryStoreRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpDiscoveryStoreRsp;
where u8Status is the return status for ZPS_eAplZdpDiscoveryStoreRequest().
8.2.3.16 ZPS_tsAplZdpNodeDescStoreRsp
This structure is used to store Node_Desc_store_rsp message data - a response to a
call to the function ZPS_eAplZdpNodeDescStoreRequest(). This response
indicates whether the sending node has successfully stored the received Node
descriptor in its primary discovery cache.
The ZPS_tsAplZdpNodeDescStoreRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpNodeDescStoreRsp;
where u8Status is the return status for ZPS_eAplZdpNodeDescStoreRequest().
8.2.3.17 ZPS_tsAplZdpPowerDescStoreRsp
This structure is used to store Power_Desc_store_rsp message data - a response to
a call to the function ZPS_eAplZdpPowerDescStoreRequest(). This response
indicates whether the sending node has successfully stored the received Power
descriptor in its primary discovery cache.
The ZPS_tsAplZdpPowerDescStoreRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint64 u64IeeeAddr;
/* Rest of message is variable length */
ZPS_tsAplZdpNodePowerDescriptor sPowerDescriptor;
} ZPS_tsAplZdpPowerDescStoreRsp;
where:
u8Status is the return status for ZPS_eAplZdpPowerDescStoreRequest().
u64IeeeAddr is the IEEE/MAC address of the device whose Power descriptor
has been stored in the primary discovery cache.
sPowerDescriptor is the Power descriptor stored (see Section 8.2.1.1).
8.2.3.18 ZPS_tsAplZdpSimpleDescStoreRsp
This structure is used to store Power_Desc_store_rsp message data - a response to
a call to the function ZPS_eAplZdpSimpleDescStoreRequest(). This response
indicates whether the sending node has successfully stored the received Simple
descriptor in its primary discovery cache.
The ZPS_tsAplZdpSimpleDescStoreRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpSimpleDescStoreRsp;
where u8Status is the return status for ZPS_eAplZdpSimpleDescStoreRequest().
8.2.3.19 ZPS_tsAplZdpActiveEpStoreRsp
This structure is used to store Active_EP_store_rsp message data - a response to a
call to the function ZPS_eAplZdpActiveEpStoreRequest(). This response indicates
whether the sending node has successfully stored the received list of active endpoints
in its primary discovery cache.
The ZPS_tsAplZdpActiveEpStoreRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpActiveEpStoreRsp;
where u8Status is the return status for ZPS_eAplZdpActiveEpStoreRequest().
8.2.3.20 ZPS_tsAplZdpFindNodeCacheRsp
This structure is used to store Find_node_cache_rsp message data - a response to a
call to the function ZPS_eAplZdpFindNodeCacheRequest(). This response
indicates that the sending node holds discovery information about a given network
node in its primary discovery cache.
The ZPS_tsAplZdpFindNodeCacheRsp structure is detailed below.
typedef struct {
uint16 u16CacheNwkAddr;
uint16 u16NwkAddr;
uint64 u64IeeeAddr;
} ZPS_tsAplZdpFindNodeCacheRsp;
where:
u16CacheNwkAddr is the network address of the remote node that sent the
response
u16NwkAddr is the network address of the node of interest (this is the network
address that was specified in the request)
u64IeeeAddr is the IEEE address of the node of interest (this is the IEEE
address that was specified in the request)
8.2.3.21 ZPS_tsAplZdpRemoveNodeCacheRsp
This structure is used to store Remove_node_cache_rsp message data - a response
to a call to the function ZPS_eAplZdpRemoveNodeCacheRequest(). This response
indicates whether the sending node has successfully removed from its primary
discovery cache all discovery information relating to a given End Device node.
The ZPS_tsAplZdpRemoveNodeCacheRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpRemoveNodeCacheRsp;
where u8Status is the return status for the function
ZPS_eAplZdpRemoveNodeCacheRequest().
8.2.3.22 ZPS_tsAplZdpEndDeviceBindRsp
This structure is used to store End_Device_Bind_rsp message data - a response to a
call to the function ZPS_eAplZdpEndDeviceBindRequest(). This response is issued
by the Co-ordinator to indicate the status of an End Device binding request.
The ZPS_tsAplZdpEndDeviceBindRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpEndDeviceBindRsp;
where u8Status is the return status for ZPS_eAplZdpEndDeviceBindRequest().
8.2.3.23 ZPS_tsAplZdpBindRsp
This structure is used to store Bind_rsp message data - a response to a call to the
function ZPS_eAplZdpBindRequest(). This response indicates the status of a
binding request (a request to modify of a binding table).
The ZPS_tsAplZdpBindRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpBindRsp;
where u8Status is the return status for ZPS_eAplZdpBindRequest().
8.2.3.24 ZPS_tsAplZdpUnbindRsp
This structure is used to store Unbind_rsp message data - a response to a call to the
function ZPS_eAplZdpUnbindRequest(). This response indicates the status of an
unbinding request (a request to modify of a binding table).
The ZPS_tsAplZdpUnbindRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpUnbindRsp;
where u8Status is the return status for ZPS_eAplZdpUnbindRequest().
8.2.3.25 ZPS_tsAplZdpBindRegisterRsp
This structure is used to store Bind_Register_rsp message data - a response to a call
to the function ZPS_eAplZdpBindRegisterRequest(). This response contains
binding information held on the responding node concerning the requesting node.
The ZPS_tsAplZdpBindRegisterRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16BindingTableEntries;
uint16 u16BindingTableListCount;
/* Rest of the message is variable Length */
ZPS_tsAplZdpBindingTable sBindingTableList;
} ZPS_tsAplZdpBindRegisterRsp;
where:
u8Status is the return status for ZPS_eAplZdpBindRegisterRequest()
u16BindingTableEntries is the total number of binding table entries
concerning the requesting node held on the responding node
u16BindingTableListCount is the number of binding table entries concerning
the requesting node contained in this response
sBindingTableList is a pointer to the first item in the list of reported binding
table entries. A list item is of type ZPS_tsAplZdpBindingTable detailed below
ZPS_tsAplZdpBindingTable
typedef struct
{
uint64 u64SourceAddress;
ZPS_tsAplZdpBindingTableEntry* psBindingTableEntryForSpSrcAddr;
}ZPS_tsAplZdpBindingTable;
where:
u64SourceAddress is the IEEE address of the node to which the binding table
entry relates
psBindingTableEntryForSpSrcAddr is a pointer to the relevant binding table
information. This information is contained in a structure of type
ZPS_tsAplZdpBindingTableEntry detailed below
ZPS_tsAplZdpBindingTableEntry
typedef struct
{
uint8 u8SourceEndpoint;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
union {
struct {
uint16 u16DstAddress;
} sShort;
struct {
uint64 u64DstAddress;
uint8 u8DstEndPoint;
} sExtended;
};
}ZPS_tsAplZdpBindingTableEntry;
where:
u8SourceEndpoint is the number of the bound endpoint (1-240) on the source
node of the binding
u16ClusterId is the ID of the cluster involved in the binding, on the source
node of the binding
u8DstAddrMode is the addressing mode used in the rest of the structure (see
Table 16 below)
u16DstAddress is the network address of the destination node of the binding
(this is only application if u8DstAddrMode is set to 0x03)
u64DstAddress is the IEEE address of the destination node of the binding
(this is only application if u8DstAddrMode is set to 0x04)
u8DstEndPoint is the number of the bound endpoint (1-240) on the destination
node of the binding
8.2.3.26 ZPS_tsAplZdpReplaceDeviceRsp
This structure is used to store Replace_Device_rsp message data - a response to a
call to the function ZPS_eAplZdpReplaceDeviceRequest(). This response indicates
the status of the replace request.
The ZPS_tsAplZdpReplaceDeviceRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpReplaceDeviceRsp;
where u8Status is the return status for ZPS_eAplZdpReplaceDeviceRequest().
8.2.3.27 ZPS_tsAplZdpStoreBkupBindEntryRsp
This structure is used to store Store_Bkup_Bind_Entry_rsp message data - a
response to a call to the function ZPS_eAplZdpStoreBkupBindEntryRequest().
This response indicates the status of the back-up request.
The ZPS_tsAplZdpStoreBkupBindEntryRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpStoreBkupBindEntryRsp;
where u8Status is the return status for the function
ZPS_eAplZdpStoreBkupBindEntryRequest().
8.2.3.28 ZPS_tsAplZdpRemoveBkupBindEntryRsp
This structure is used to store Remove_Bkup_Bind_Entry_rsp message data - a
response to a call to the function ZPS_eAplZdpRemoveBkupBindEntryRequest().
This response indicates the status of the remove request.
The ZPS_tsAplZdpRemoveBkupBindEntryRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpRemoveBkupBindEntryRsp;
where u8Status is the return status for the function
ZPS_eAplZdpRemoveBkupBindEntryRequest().
8.2.3.29 ZPS_tsAplZdpBackupBindTableRsp
This structure is used to store Backup_Bind_Table_rsp message data - a response to
a call to the function ZPS_eAplZdpBackupBindTableRequest(). This response
indicates the status of the back-up request.
The ZPS_tsAplZdpBackupBindTableRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16EntryCount;
} ZPS_tsAplZdpBackupBindTableRsp;
where:
u8Status is the return status for ZPS_eAplZdpBackupBindTableRequest()
u16EntryCount is the number of binding table entries that have been backed
up
8.2.3.30 ZPS_tsAplZdpRecoverBindTableRsp
This structure is used to store Recover_Bind_Table_rsp message data - a response
to a call to the function ZPS_eAplZdpRecoverBindTableRequest(). This response
indicates the status of the recover request and contains the recovered binding table
entries.
The ZPS_tsAplZdpRecoverBindTableRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16StartIndex;
uint16 u16BindingTableEntries;
uint16 u16BindingTableListCount;
/* Rest of the message is variable length */
ZPS_tsAplZdpBindingTable sBindingTableList;
} ZPS_tsAplZdpRecoverBindTableRsp;
where:
u8Status is the return status for ZPS_eAplZdpRecoverBindTableRequest()
u16StartIndex is the binding table index of the first entry in the set of
recovered binding table entries (sBindingTableList)
u16BindingTableEntries is the total number of entries in the back-up binding
table cache
u16BindingTableListCount is the number of entries in the set of recovered
binding table entries (sBindingTableList)
sBindingTableList is a pointer to the first item in the list of recovered binding
table entries. A list item is of type ZPS_tsAplZdpBindingTable, detailed in
Section 8.2.3.25
8.2.3.31 ZPS_tsAplZdpBackupSourceBindRsp
This structure is used to store Backup_Source_Bind_rsp message data - a response
to a call to the function ZPS_eAplZdpBackupSourceBindRequest(). This response
indicates the status of the back-up request.
The ZPS_tsAplZdpBackupSourceBindRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpBackupSourceBindRsp;
where u8Status is the return status for the function
ZPS_eAplZdpBackupSourceBindRequest().
8.2.3.32 ZPS_tsAplZdpRecoverSourceBindRsp
This structure is used to store Recover_Source_Bind_rsp message data - a response
to a call to the function ZPS_eAplZdpRecoverSourceBindRequest(). This response
indicates the status of the recover request and contains the recovered binding table
entries.
The ZPS_tsAplZdpRecoverSourceBindRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16StartIndex;
uint16 u16SourceTableEntries;
uint16 u16SourceTableListCount;
/* Rest of the message is variable length */
uint64* pu64SourceTableList;
} ZPS_tsAplZdpRecoverSourceBindRsp;
where:
u8Status is the return status for the function
ZPS_eAplZdpRecoverSourceBindRequest()
u16StartIndex is the binding table index of the first entry in the set of
recovered binding table entries (pu64SourceTableList)
u16SourceTableEntries is the total number of source binding table entries in
the back-up binding table cache
u16SourceTableListCount is the number of entries in the set of recovered
binding table entries (pu64SourceTableList)
pu64SourceTableList is a pointer to the first item in the list of recovered
binding table entries
8.2.3.33 ZPS_tsAplZdpMgmtNwkDiscRsp
This structure is used to store Mgmt_NWK_Disc_rsp message data - a response to a
call to the function ZPS_eAplZdpMgmtNwkDiscRequest(). This response reports
the networks discovered in a network discovery (all the networks or a subset).
The ZPS_tsAplZdpMgmtNwkDiscRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8NetworkCount;
uint8 u8StartIndex;
uint8 u8NetworkListCount;
/* Rest of the message is variable length */
ZPS_tsAplZdpNetworkDescr* psNetworkDescrList;
} ZPS_tsAplZdpMgmtNwkDiscRsp;
where:
u8Status is the return status for ZPS_eAplZdpMgmtNwkDiscRequest()
u8NetworkCount is the total number of networks discovered
u8StartIndex is the index, in the complete list of discovered networks, of the
first network reported in this response (through psNetworkDescrList)
u8NetworkListCount is the number of discovered networks reported in this
response (through psNetworkDescrList)
psNetworkDescrList is a pointer to the first entry in a list of network
descriptors for the discovered networks. Each entry is of the type
ZPS_tsAplZdpNetworkDescr detailed below
ZPS_tsAplZdpNetworkDescr
typedef struct
{
uint64 u64ExtPanId;
uint8 u8LogicalChan;
uint8 u8StackProfile;
uint8 u8ZigBeeVersion;
uint8 u8PermitJoining;
uint8 u8RouterCapacity;
uint8 u8EndDeviceCapacity;
} ZPS_tsAplZdpNetworkDescr;
where:
u64ExtPanId is the 64-bit extended PAN ID of the discovered network
u8LogicalChan is the radio channel in which the discovered network operates
(value in range 0 to 26, but only channels 11 to 26 relevant to 2400-MHz band)
u8StackProfile is the 4-bit identifier of the ZigBee stack profile used by the
discovered network (0 - manufacturer-specific, 1 - ZigBee, 2 - ZigBee PRO,
other values reserved) and is fixed at 2 for the NXP stack
8.2.3.34 ZPS_tsAplZdpMgmtLqiRsp
This structure is used to store Mgmt_Lqi_rsp message data - a response to a call to
the function ZPS_eAplZdpMgmtLqiRequest(). This response reports a list of
neighbouring nodes along with their LQI (link quality) values.
The ZPS_tsAplZdpMgmtLqiRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8NeighborTableEntries;
uint8 u8StartIndex;
uint8 u8NeighborTableListCount;
/* Rest of the message is variable length */
ZPS_tsAplZdpDiscNtEntry* pNetworkTableList;
} ZPS_tsAplZdpMgmtLqiRsp;
where:
u8Status is the return status for ZPS_eAplZdpMgmtLqiRequest()
u8NeighborTableEntries is the total number of Neighbour table entries on
the remote node
u8StartIndex is the Neighbour table index of the first entry reported in this
response (through pNetworkTableList)
u8NetworkListCount is the number of Neighbour table entries reported in this
response (through pNetworkTableList)
pNetworkTableList is a pointer to the first entry in the list of reported
Neighbour table entries. Each entry is of the type ZPS_tsAplZdpDiscNtEntry
detailed below
ZPS_tsAplZdpDiscNtEntry
typedef struct
{
uint64 u64ExtPanId;
uint64 u64ExtendedAddress;
uint16 u16NwkAddr;
uint8 u8LinkQuality;
uint8 u8Depth;
union
{
struct
{
unsigned u2DeviceType:2;
unsigned u2RxOnWhenIdle:2;
unsigned u2Relationship:3;
unsigned u1Reserved1:1;
unsigned u2PermitJoining:2;
unsigned u6Reserved2:6;
} ;
uint8 au8Field[2];
} uAncAttrs;
} ZPS_tsAplZdpDiscNtEntry;
where:
u64ExtPanId is the 64-bit extended PAN ID of the network
u64ExtendedAddress is the IEEE address of the neighbouring node
u16NwkAddr is the network address of the neighbouring node
u8LinkQuality is the estimated LQI (link quality) value for radio transmissions
from the neighbouring node
u8Depth is the tree depth of the neighbouring node (where the Co-ordinator is
at depth zero)
u2DeviceType:2 is a 2-bit value representing the ZigBee device type of the
neighbouring node:
0: Co-ordinator
1: Router
2: End Device
3: Unknown
u2RxOnWhenIdle:2 is a 2-bit value indicating whether the neighbouring
nodes receiver is enable during idle periods:
0: Receiver off when idle (sleeping device)
1: Receiver on when idle (non-sleeping device)
2: Unknown
8.2.3.35 ZPS_tsAplZdpMgmtRtgRsp
This structure is used to store Mgmt_Rtg_rsp message data - a response to a call to
the function ZPS_eAplZdpMgmtRtgRequest(). This response reports the contents of
the remote nodes Routing table
The ZPS_tsAplZdpMgmtRtgRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8RoutingTableEntries;
uint8 u8StartIndex;
uint8 u8RoutingTableCount;
/* Rest of the message is variable length */
ZPS_tsAplZdpRtEntry* pRoutingTableList;
} ZPS_tsAplZdpMgmtRtgRsp;
where:
u8Status is the return status for ZPS_eAplZdpMgmtRtgRequest()
u8RoutingTableEntries is the total number of Routing table entries on the
remote node
u8StartIndex is the Routing table index of the first entry reported in this
response (through pRoutingTableList)
u8RoutingTableCount is the number of Routing table entries reported in this
response (through pRoutingTableList)
pRoutingTableList is a pointer to the first entry in the list of reported Routing
table entries. Each entry is of the type ZPS_tsAplZdpRtEntry detailed below
ZPS_tsAplZdpRtEntry
typedef struct
{
uint16 u16NwkDstAddr; /**< Destination Network address */
uint16 u16NwkNxtHopAddr; /**< Next hop Network address */
union
{
struct
{
unsigned u3Status:3;
unsigned u1MemConst:1;
unsigned u1ManyToOne:1;
unsigned u1RouteRecordReqd:1;
unsigned u1Reserved:2;
} bfBitfields;
uint8 u8Field;
} uAncAttrs;
} ZPS_tsAplZdpRtEntry;
where:
u16NwkDstAddr is the destination network address of the route
u16NwkNxtHopAddr is the next hop network address of the route
u3Status:3 is the 3-bit status for the route:
000 = ACTIVE
001 = DISCOVERY_UNDERWAY
010 = DISCOVERY_FAILED
011 = INACTIVE
100 = VALIDATION_UNDERWAY
101-111 = Reserved
u1MemConst:1 is a bit indicating whether the device is a memory-constrained
concentrator
u1ManyToOne:1 is a bit indicating whether the destination node is a
concentrator that issued a many-to-one request
u1RouteRecordReqd:1 is a bit indicating whether a route record command
frame should be sent to the destination before the next data packet
u1Reserved:2 are reserved bits
u8Field contains the full set of flags of the bfBitfields sub-structure, with
u3Status:3 occupying the most significant bits and u1Reserved:2
occupying the least significant bits (for a big-endian device)
8.2.3.36 ZPS_tsAplZdpMgmtBindRsp
This structure is used to store Mgmt_Bind_rsp message data - a response to a call to
the function ZPS_eAplZdpMgmtBindRequest(). This response reports the contents
of the remote nodes Binding table.
The ZPS_tsAplZdpMgmtBindRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint16 u16BindingTableEntries;
uint16 u16StartIndex;
uint16 u16BindingTableListCount;
/* Rest of the message is variable length */
ZPS_tsAplZdpBindingTable sBindingTableList;
} ZPS_tsAplZdpMgmtBindRsp;
where:
u8Status is the return status for ZPS_eAplZdpMgmtBindRequest()
u16BindingTableEntries is the total number of Binding table entries on the
remote node
u8StartIndex is the Binding table index of the first entry reported in this
response (through sBindingTableList)
u16BindingTableListCount is the number of Binding table entries reported in
this response (through sBindingTableList)
sBindingTableList is a pointer to the first entry in the list of reported Binding
table entries. Each entry is of the type ZPS_tsAplZdpBindingTable, detailed
in Section 8.2.2.29
8.2.3.37 ZPS_tsAplZdpMgmtLeaveRsp
This structure is used to store Mgmt_Leave_rsp message data - a response to a call
to the function ZPS_eAplZdpMgmtLeaveRequest(). This response is issued by a
remote node that has been requested to leave the network.
The ZPS_tsAplZdpMgmtLeaveRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpMgmtLeaveRsp;
where u8Status is the return status for ZPS_eAplZdpMgmtLeaveRequest().
8.2.3.38 ZPS_tsAplZdpMgmtDirectJoinRsp
This structure is used to store Mgmt_Direct_Join_rsp message data - a response to a
call to the function ZPS_eAplZdpMgmtDirectJoinRequest(). This response is
issued by a remote node (Router or Co-ordinator) that has been requested to allow a
particular device to join the network as a child of the node.
The ZPS_tsAplZdpMgmtDirectJoinRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpMgmtDirectJoinRsp;
where u8Status is the return status for ZPS_eAplZdpMgmtDirectJoinRequest().
8.2.3.39 ZPS_tsAplZdpMgmtPermitJoiningRsp
This structure is used to store Mgmt_Permit_Joining_rsp message data - a response
to a call to the function ZPS_eAplZdpMgmtPermitJoiningRequest(). This response
is issued by a remote node (Router or Co-ordinator) that has been requested to enable
or disable joining for a specified amount of time. The response is only sent if the
original request was unicast (and not if it was broadcast).
The ZPS_tsAplZdpMgmtPermitJoiningRsp structure is detailed below.
typedef struct {
uint8 u8Status;
} ZPS_tsAplZdpMgmtPermitJoiningRsp;
where u8Status is the return status for the function
ZPS_eAplZdpMgmtPermitJoiningRequest().
8.2.3.40 ZPS_tsAplZdpMgmtCacheRsp
This structure is used to store Mgmt_Cache_rsp message data - a response to a call
to the function ZPS_eAplZdpMgmtCacheRequest(). This response reports a list of
the End Devices registered in the nodes primary discovery cache.
The ZPS_tsAplZdpMgmtCacheRsp structure is detailed below.
typedef struct {
uint8 u8Status;
uint8 u8DiscoveryCacheEntries;
uint8 u8StartIndex;
uint8 u8DiscoveryCacheListCount;
/* Rest of the message is variable length */
ZPS_tsAplDiscoveryCache* pDiscoveryCacheList;
} ZPS_tsAplZdpMgmtCacheRsp;
where:
u8Status is the return status for ZPS_eAplZdpMgmtCacheRequest()
u8DiscoveryCacheEntries is the total number of discovery cache entries on
the remote node
u8StartIndex is the discovery cache index of the first entry reported in this
response (through pDiscoveryCacheList)
u8DiscoveryCacheListCount is the number of discovery cache entries
reported in this response (through pDiscoveryCacheList)
pRoutingTableList is a pointer to the first entry in the list of reported
discovery cache entries. Each entry is of the type ZPS_tsAplDiscoveryCache
detailed below
ZPS_tsAplDiscoveryCache
typedef struct {
uint64 u64ExtendedAddress;
uint16 u16NwkAddress;
} ZPS_tsAplDiscoveryCache;
where:
u64ExtendedAddress is the IEEE address of the End Device
u16NwkAddress is the network address of the End Device
8.2.3.41 ZPS_tsAplZdpMgmtNwkUpdateNotify
This structure is used to store Mgmt_NWK_Update_notify message data - a
notification which can be sent in response to a call to the function
ZPS_eAplZdpMgmtNwkUpdateRequest(). This notification reports the results of an
energy scan on the wireless network radio channels.
The ZPS_tsAplZdpMgmtNwkUpdateNotify structure is detailed below.
typedef struct {
uint8 u8Status;
uint32 u32ScannedChannels;
uint16 u16TotalTransmissions;
uint16 u16TransmissionFailures;
uint8 u8ScannedChannelListCount;
/* Rest of the message is variable Length */
uint8* u8EnergyValuesList;
} ZPS_tsAplZdpMgmtNwkUpdateNotify;
where:
u8Status is the return status for ZPS_eAplZdpMgmtNwkUpdateRequest()
u32ScannedChannels is a bitmask of the set of scanned radio channels
(1 means scanned, 0 means not scanned):
Bits 0 to 26 respectively represent channels 0 to 26 (only bits 11 to 26 are
relevant to the 2400-MHz band)
Bits 27 to 31 are reserved
u16TotalTransmissions is the total number of transmissions (from other
networks) detected during the scan
u16TransmissionFailures is the number of failed transmissions detected
during the scan
u8ScannedChannelListCount is the number of energy-level measurements
(one per scanned channel) reported in this notification (through
u8EnergyValuesList)
u8EnergyValuesList is a pointer to the first in the set of reported energy-level
measurements (the value 0xFF indicates there is too much interference on the
channel)
9.1 Events
The events that can be generated by the ZigBee PRO stack are enumerated in the
structure ZPS_teAfEventType (from the AF API), shown below.
typedef enum {
ZPS_EVENT_NONE,
ZPS_EVENT_APS_DATA_INDICATION,
ZPS_EVENT_APS_DATA_CONFIRM,
ZPS_EVENT_APS_DATA_ACK,
ZPS_EVENT_NWK_STARTED,
ZPS_EVENT_NWK_JOINED_AS_ROUTER,
ZPS_EVENT_NWK_JOINED_AS_ENDDEVICE,
ZPS_EVENT_NWK_FAILED_TO_START,
ZPS_EVENT_NWK_FAILED_TO_JOIN,
ZPS_EVENT_NWK_NEW_NODE_HAS_JOINED,
ZPS_EVENT_NWK_DISCOVERY_COMPLETE,
ZPS_EVENT_NWK_LEAVE_INDICATION,
ZPS_EVENT_NWK_LEAVE_CONFIRM,
ZPS_EVENT_NWK_STATUS_INDICATION,
ZPS_EVENT_NWK_ROUTE_DISCOVERY_CONFIRM,
ZPS_EVENT_NWK_POLL_CONFIRM,
ZPS_EVENT_NWK_ED_SCAN,
ZPS_EVENT_ZDO_BIND,
ZPS_EVENT_ZDO_UNBIND,
ZPS_EVENT_ZDO_LINK_KEY,
ZPS_EVENT_BIND_REQUEST_SERVER
ZPS_EVENT_ERROR,
ZPS_EVENT_APS_INTERPAN_DATA_INDICATION,
ZPS_EVENT_APS_INTERPAN_DATA_CONFIRM,
ZPS_EVENT_APS_ZDP_REQUEST_RESPONSE,
} ZPS_teAfEventType;
ZPS_EVENT_APS_DATA_INDICATION Indicates that data has arrived on the local node. The
event provides information about the data packet
through the structure ZPS_tsAfDataIndEvent - see
Section 7.2.2.3.
ZPS_APL_ZDP_E_DEVICE_NOT_FOUND 0x81 The requested device did not exist on a device following
a child descriptor request to a parent.
ZPS_APL_ZDP_E_NO_MATCH 0x86 The End Device bind request was unsuccessful due to a
failure to match any suitable clusters.
ZPS_APL_ZDP_E_NO_ENTRY 0x88 The unbind request was unsuccessful due to the Co-
ordinator or source device not having an entry in its
binding table to unbind.
ZPS_APL_ZDP_E_INSUFFICIENT_SPACE 0x8A The device does not have storage space to support the
requested operation.
ZPS_APL_ZDP_E_NOT_PERMITTED 0x8B The device is not in the proper state to support the
requested operation.
ZPS_APL_ZDP_E_TABLE_FULL 0x8C The device does not have table space to support the
operation.
Default Extended Pan ID The default Extended PAN ID (EPID) when add- 0 64 bits
ing new devices to the wireless network. The
extended PAN ID is the globally unique 64-bit
identifier for the network. This identifier is used to
avoid PAN ID conflicts between distinct networks
and must be unique among the networks overlap-
ping in a given area. If the value is zero on the
Co-ordinator, the device will use its own IEEE/
MAC address as the EPID. A zero value on a
Router/End Device means that the device will not
look for a particular EPID when joining a network.
Note that this value is the default EPID used
when adding devices in the ZPS Configuration
Editor. The actual EPID used for an individual
device can be set via the parameter APS Use
Extended PAN ID see Section 10.7.
Default Security Enabled The default setting for Security Enabled when true true / false
adding new devices to the wireless network.
Maximum Number of Nodes The maximum number of nodes for the wireless 20
network. This setting controls the size of tables
when adding new devices to the network to
ensure adequate resources are available for cor-
rect operation a network of the specified size.
The rest of the network parameters are detailed in the sections that follow, according
to their area of application.
Cluster Id The cluster number. These are defined in public pro- 16 bits
files by ZigBee Alliance or can be manufacturer spe-
cific.
This is a reference to an enumeration of clusters
within a specific application profile or collection of
application profiles. The cluster identifier is a 16-bit
number unique within the scope of each application
profile and identifies a specific cluster. Conventions
may be established across application profiles for
common definitions of cluster identifiers whereby
each application profile defines a set of cluster identi-
fiers identically. Cluster identifiers are designated as
inputs or outputs in the simple descriptor for use in
creating a binding table.
Name Textual name for the cluster. This is used as a prefix Valid C identifier
for generated macro definitions in zps_gen.h.
Permit Joining Time Default number of seconds for which 255 0-255
permit joining is enabled.
255 means permanently on
0 means permanently off
Security Enabled Specifies whether the Co-ordinator will true true / false
secure communication with other
devices in the network.
Initial Security Key The initial key that will be used when Default
security is enabled. These are selected Network Key
from the keys available on the Trust
Centre.
Name Textual name for the node. Used as a pre- Valid C identifier
fix when generating macro definitions in
zps_gen.h.
Permit Joining Time Default number of seconds for which per- 255 0-255
mit joining is enabled.
255 means permanently on
0 means permanently off
Security Enabled Specifies whether the Router will secure true true / false
communication with other devices in the
network.
Initial Security Key The initial key that will be used when secu- Default
rity is enabled. These are selected from the Network Key
keys available on the Trust Centre.
Name Textual name for the node. Used as a prefix Valid C identifier
when generating macro definitions in
zps_gen.h.
Security Enabled Specifies whether the End Device will true true / false
secure communication with other devices in
the network.
Initial Security Key The initial key that will be used when secu- Default
rity is enabled. These are selected from the Network Key
keys available on the Trust Centre.
Sleeping Indicates whether the device will turn its false true / false
receiver off and enter a low-power mode.
The End Devices parent will buffer any
incoming data until the device returns to its
normal operating state and issues a poll
request.
Number of Poll Failures This parameter controls the number of con- 5 0 will disable this
Before Rejoin secutive poll failures from when the device behaviour
returns to its normal operating state before
attempting to find a new parent by initiating
a network rejoin.
AF Parameters
Default Event RTOS Mes- The default RTOS message that will APP_msgZps Valid C identifier
sage Name receive events from the stack if no other Events
message has been configured.
AIB Parameters
APS Designated Coordinator Indicates that on start-up the node true for true / false
(read only) should assume the Co-ordinator role Co-ordinator
within the network. false for
Routers / End
Devices
APS Use Extended Indicates the Extended PAN ID (EPID) Default 64 bits
PAN ID that the device will use. This is the glo- Extended
bally unique 64-bit identifier for the net- PAN ID
work. This identifier is used to avoid
PAN ID conflicts between distinct net-
works and must be unique among the
networks overlapping in a given area. If
the value is zero on the Co-ordinator,
the device will use its own IEEE/MAC
address as the EPID. A zero value on a
Router/End Device means that the
device will not look for a particular EPID
when joining a network.
APS Max Window Size APS fragmented data window size. 8 1-8
Fragmentation is a way of sending mes-
sages (APDUs) longer than the payload
of a single NPDU. The ASDU is seg-
mented and split across a number of
NPDUs, then reassembled at the desti-
nation. APS Max Window Size defines
how many fragments are sent before an
acknowledgement is expected. For
example, if APS Max Window Size is
set to 4 and a message is split into 16
fragments, then an acknowledgement is
expected after sending fragments 1-4.
Sending of fragments 5-8 does not
commence until this acknowledgement
is received.
APS Use Insecure Join Controls action when a secured network true true / false
rejoin fails. If true, a join using the MAC
layer association procedure is per-
formed when a secure rejoin fails.
APS Duplicate Table Size The size of the APS layer duplicate 8 1 or higher
rejection table. This removes duplicated
APS packets.
APS Persistence Time Time, in milliseconds, for which the 100 1-255
resources associated with an incoming
fragmented message will be retained
after the complete message has been
received.
Inter PAN True if inter PAN functionality is ena- false true or false
bled, see Section 5.5.1.5
Active Neighbour Table Size Size of the active Neighbour table. Each 20 1 or higher
routing node (Co-ordinator or Router)
has a Neighbour table which must be
large enough to accommodate entries
for the nodes immediate children, for its
own parent and, in a Mesh network, for
all peer Routers with which the node
has direct radio communication.
Address Map Table Size Size of the address map, which maps 20 1 or higher
64-bit IEEE addresses to 16-bit network
(short) addresses. Should be set to the
number of nodes in the network.
Route Discovery Table Size Size of the Route Discovery table. This 16 1 or higher
table is used by the node to store tem-
porary information used during route
discovery. Route Discovery table entries
last only as long as the duration of a sin-
gle route discovery operation.
Route Record Table Size Size of the Route Record table. Each 4 1 or higher
route record contains the destination
network address, a count of the number
of relay nodes to reach the destination,
and a list of the network addresses of
the relay nodes.
Routing Table Size Size of the Routing table. This table 16 1 or higher
stores the information required for the
node to participate in the routing of
message packets. Each table entry con-
tains the destination address, the status
of the route, various flags and the net-
work address of the next hop on the
way to the destination. A Routing table
entry is made when a new route is initi-
ated by the node or routed via the node.
The entry is stored in the Routing table
and is read whenever that route is used;
the entry is only deleted if the route is
no longer valid. A node is said to have
routing capacity if there are free entries
in the routing table.
Active Neighbour Table Size Size of the active Neighbour table. Set 20 1
to one (for the parent).
Address Map Table Size Size of the address map, which maps 20 1 or higher
64-bit IEEE addresses to 16-bit network
(short) addresses. Should be set to the
number of nodes that the End Device
application needs to communicate with
plus one (for the parent).
Input Cluster
Specifies that the endpoint will receive the specified cluster.
Parameter Name Description Default Value Range
Discoverable Defines whether the input cluster will be true true / false
present in the endpoints simple descrip-
tor which is used for service discovery.
Output Cluster
Specifies that the endpoint will transmit the specified cluster.
Parameter Name Description Default Value Range
Discoverable Defines whether the input cluster will be true true / false
present in the endpoints Simple
descriptor which is used for service dis-
covery.
APDU
Specifies a buffer to contain instances of a cluster.
Parameter Name Description Default Value Range
10.7.5 RF Channels
Specifies the default RF channels that the device will operate on. If not present, the
default will be all channels.
Parameter Name Description Default Value Range
Channel x Control for channel x setting to true true for x=15, true / false
(x=11-26) includes the channel in energy scan. By false for all
default, only channel 15 is included. other values
Complex Descriptor Availa- Complex descriptors are not supported. false false
ble Not editable.
User Descriptor Available Indicates whether a user descriptor is false true / false
present. Not editable.
Allocate Address Indicates whether the device will allo- true / false
cate short (network) addresses or not.
Not editable.
Alternate PAN Coordinator Indicates whether the device will act as true / false
an alternative PAN Co-ordinator. Not
editable.
Rx On When Idle Indicates whether the device has its true / false
receiver enabled while the device is
idle. Not editable.
Security Indicates whether the device uses high false true / false
or standard security. Only standard
security is supported. Not editable.
Miscellaneous parameters
Frequency Band Frequency band of radio. Only 2.4 GHz 2.4 GHz 2.4 GHz
is supported by JN51xx hardware. Not
editable.
Maximum buffer size The maximum buffer size. Not editable. 127
Backup binding table cache Indicates if the node can act as a back- false true / false
up binding table cache. Not supported
and not editable.
Backup discovery cache Indicates if the node can act as a back- false true / false
up discovery cache. Not supported and
not editable.
Backup trust center Indicates if the node can act as a back- false true / false
up trust centre. Not supported and not
editable.
Network manager Indicates if the node can act as a net- false true / false
work manager. Not editable.
Primary binding table cache Indicates if the node can act as a pri- false true / false
mary binding table cache. Not sup-
ported and not editable.
Primary discovery cache Indicates if the node can act as a pri- false true / false
mary discovery cache. Not supported
and not editable.
Primary trust center Indicates if the node can act as a trust false true / false
center. Not editable.
Miscellaneous parameters
Default power mode The default power mode of the device. Synchronised Synchronised with
with RxOn- RxOnWhenIdle / Peri-
WhenIdle odic / Constant Power
Default power source The default power source of the device. Constant / Constant
rechargeable /
disposable
Preconfigured Key
Specifies a pre-configured link key for the Key Descriptor Table.
Parameter Name Description Default Value Range
IEEE address The IEEE address to use with the key. 64 bit
Device Table Size The size of the Trust Centre's device Maximum 1 or higher
table. Number of
Nodes setting
from the
ZigBee PRO
Wireless
Network
Default Server
Mandatory. Replies to any unimplemented server requests.
Parameter Name Description Default Value Range
ZDO Client
Mandatory. Processes ZDO client messages.
Parameter Name Description Default Value Range
Active Ep Server
Mandatory. Processes active endpoint requests.
Parameter Name Description Default Value Range
Part III:
Configuration Information
user_app.c
Eclipse
user_app.h
ZPS
Configuration zps_gen.c
XML
Editor zps_gen.h
File
generation pdum_gen.c
XML
by Compiler
JenOS pdum_gen.h
command
Configuration line utilities
Editor os_gen.c
XML os_gen.h
os_irq.s Application
(unlinked)
ZigBee
Linker
Libraries
user_app.bin
Entries that sit at the same level in the tree are termed siblings, while an entry that
sits under another entry in the tree (a sub-entry) is termed a child.
The top level of the tree shows the Extended PAN ID. The next level shows the
following siblings:
Entries for the ZigBee application profiles used in the network
Entry for the Co-ordinator
Entries for the Routers
Entries for the End Devices
The information under each of these entries is described below.
Profile
An application profile has a numeric ID and a name. The Profile entry contains child
entries for the clusters supported by the profile - each cluster is identified by a numeric
ID and a name.
Co-ordinator
The Co-ordinator entry contains a name and a number of associated parameters,
mainly related to the APS and NWK layers of the ZigBee PRO stack.
The child entries for the Co-ordinator are shown above and include the following:
Endpoint entries, one for each endpoint on the Co-ordinator, with each endpoint
having child entries specifying the input and output clusters used (note that
each input cluster must be paired with an APDU)
PDU Manager, with child entries specifying the APDUs used
Channel Mask, specifying the 2.4-GHz band channels to scan when creating
the network
Node Descriptor for the Co-ordinator
Node Power Descriptor for the Co-ordinator
Router
Each Router entry contains a name and a number of associated parameters, mainly
related to the APS and NWK layers of the ZigBee PRO stack. The child entries for a
Router include the following:
Endpoint entries, one for each endpoint on the Router, with each endpoint
having child entries specifying input and output clusters used (note that each
input cluster must be paired with an APDU)
PDU Manager, with child entries specifying the APDUs used
Channel Mask, specifying the 2.4-GHz band channels to scan when attempting
to join a network
Node Descriptor for the Router
Node Power Descriptor for the Router
End Device
Each End Device entry contains a name and a number of associated parameters,
mainly related to the APS and NWK layers of the ZigBee PRO stack. The child entries
for an End Device include the following:
Endpoint entries, one for each endpoint on the End Device, with each endpoint
having child entries specifying the input and output clusters used (note that
each input cluster must be paired with an APDU)
PDU Manager, with child entries specifying the APDUs used
Channel Mask, specifying the 2.4-GHz band channels to scan when attempting
to join a network
Node Descriptor for the End Device
Node Power Descriptor for the End Device
Using the wizard shown in the screenshot above, you can start to create a new ZigBee
PRO configuration.
Step 2 Click on your project to select it as the parent folder. In the File name field, enter a
name for the configuration file (keep the extension .zpscfg) and then click Finish.
A new configuration (with the default set of parameters) will open in the editor, as
shown below.
To add a profile
Step 1 Right-click on ZigBee PRO Wireless Network and select New Child > Profile from
the drop-down menu. This inserts a profile with no child elements.
Step 2 Edit the properties in the Properties tab to set Name and Id for the new profile.
To add an APDU
At least one APDU is required before an endpoint can send or receive data. The same
APDU can be used to send and receive data, or different APDUs can be set up for
send and receive - this allows control of buffering and memory resources, and is the
decision of the application designer.
Step 1 Right-click on PDU Manager and select New Child > APDU from the drop-down
menu.
Step 2 Edit the properties in the Properties tab to set Name, Instances (number of) and
Size (of each instance - this should be set to the size of the largest APDU to be
received).
Step 5 Repeat Step 1 to Step 4 for Routers and End Devices, as required.
Step 3 Edit the relevant parameters in the Properties tab of the lower pane.
Step 4 Save your settings.
Part IV:
Appendices
C. Glossary
Term Description
Address A numeric value that is used to identify a network node. In ZigBee, the
devices 64-bit IEEE/MAC address or 16-bit network address is used.
AIB APS Information Base: A database for the Application Support (APS) layer
of the ZigBee stack, containing attributes concerned with system security.
APDU Application Protocol Data Unit: Part of a wireless network message that is
handled by the application and contains user data.
Application Profile A collection of device descriptors that characterise an application for a par-
ticular market sector. An application profile can be public or private. A pub-
lic profile is identified by a 16-bit number, assigned by the ZigBee Alliance.
Channel A narrow frequency range within the designated radio band - for example,
the IEEE 802.15.4 2400-MHz band is divided into 16 channels. A wireless
network operates in a single channel which is determined at network initial-
isation.
Child A node which is connected directly to a parent node and for which the par-
ent node provides routing functionality. A child can be an End Device or
Router. Also see Parent.
Cluster A collection of attributes and commands associated with the endpoint for
an application. The commands are used to communicate or modify
attribute values. A cluster has input and output sides - an output cluster
issues a command which is received and acted on by an input cluster.
Context Data Data which reflects the current state of the node. The context data must be
preserved during sleep (of an End Device).
Co-ordinator The node through which a network is started, initialised and formed - the
Co-ordinator acts as the seed from which the network grows, as it is joined
by other nodes. The Co-ordinator also usually provides a routing function.
All networks must have one and only one Co-ordinator.
End Device A node which has no networking role (such as routing) and is only con-
cerned with data input/output/processing. As such, an End Device cannot
be a parent but can sleep to conserve power.
Term Description
Extended PAN ID A 64-bit identifier for a ZigBee PRO network that is assigned when the net-
(EPID) work is started. A value can be pre-set or, alternatively, the IEEE/MAC
address of the Co-ordinator can be used as the EPID.
IEEE 802.15.4 A standard network protocol that is used as the lowest level of the ZigBee
software stack. Among other functionality, it provides the physical interface
to the networks transmission medium (radio).
IEEE/MAC Address A unique 64-bit address that is allocated to a device at the time of manufac-
ture and is retained by the device for its lifetime. No two devices in the
world can have the same IEEE/MAC address.
Joining The process by which a device becomes a node of a network. The device
transmits a joining request. If this is received and accepted by a parent
node (Co-ordinator or Router), the device becomes a child of the parent.
Note that the parent must have permit joining enabled.
Mesh Network A wireless network topology in which all routing nodes (Routers and the
Co-ordinator) can communicate directly with each other, provided that they
are within radio range. This allows optimal and flexible routing, with alterna-
tive routes if the most direct route is not available.
Network Address A 16-bit address that is allocated to a ZigBee node when it joins a network.
The Co-ordinator always has the network address 0x0000. In IEEE
802.15.4 terminology, it is called the short address.
Node Power A set of information about a nodes current and potential power supply.
Descriptor
NPDU Network Protocol Data Unit: The transmitted form of a wireless network
message (incorporates APDU and header/footer information from stack).
PAN ID Personal Area Network Identifier: This is a 16-bit value that uniquely identi-
fies the network - all neighbouring networks must have different PAN IDs.
Parent A node which allows other nodes (children) to join the network through it
and provides a routing function for these child nodes. A parent can be a
Router or the Co-ordinator. Also see Child.
Routing The ability of a node to pass messages from one node to another, acting as
a stepping stone from the source node to the target node. Routing function-
ality is provided by Routers and the Co-ordinator. Routing is handled by the
network level software and is transparent to the application on the node.
Term Description
Sleep Mode An operating state of a node in which the device consumes minimal power.
During sleep, the only activity of the node may be to time the sleep duration
to determine when to wake up and resume normal operation. Only End
Devices can sleep.
Stack The hierarchical set of software layers used to operate a system. The high-
level user application is at the top of the stack and the low-level interface to
the transmission medium is at the bottom of the stack.
Stack Profile The set of features implemented from the ZigBee specification - that is, all
the mandatory features together with a subset of the optional features. The
ZigBee Alliance define two Stack Profiles for use with public Application
Profiles - ZigBee and ZigBee PRO.
ZigBee Certified An end-product that uses ZigBee Compliant Platforms and public Applica-
Product tion Profiles, and which has been tested for ZigBee compliance and subse-
quently authorised to carry the ZigBee Alliance logo.
ZigBee Compliant A component (such as a module) that has been tested for ZigBee compli-
Platform ance and authorised to be used as a building block for a ZigBee end-prod-
uct.
ZigBee Device A special application which resides in the Application Layer on all nodes
Objects (ZDO) and performs various standard tasks (e.g. device discovery, binding). The
ZDO communicates via endpoint 0.
Revision History
1.1 03-Dec-2009 Information added on use of new security, addressing and routing
functions. Application design notes added to appendices. Other
minor updates also made.
2.1 20-Sept-2011 Temporary internal version: Direct join and inter-PAN features added.
AF and ZDO API structures re-worked and re-organised.
ZPS_tsAfZdpEvent structure added. Other minor corrections/
updates also made.
2.2 23-May-2012 Minor updates/corrections made (and changes from v2.1 included)
2.3 03-Sept-2012 Minor updates/corrections made and the following functions added:
ZPS_eAplAibSetApsUseExtendedPanId()
ZPS_eAplZdoRegisterZdoFilterCallback()
ZPS_vTCSetCallback()
Important Notice
Limited warranty and liability - Information in this document is believed to be accurate and reliable. However, NXP
Semiconductors does not give any representations or warranties, expressed or implied, as to the accuracy or
completeness of such information and shall have no liability for the consequences of use of such information. NXP
Semiconductors takes no responsibility for the content in this document if provided by an information source outside
of NXP Semiconductors.
In no event shall NXP Semiconductors be liable for any indirect, incidental, punitive, special or consequential damages
(including - without limitation - lost profits, lost savings, business interruption, costs related to the removal or
replacement of any products or rework charges) whether or not such damages are based on tort (including
negligence), warranty, breach of contract or any other legal theory.
Notwithstanding any damages that customer might incur for any reason whatsoever, NXP Semiconductors' aggregate
and cumulative liability towards customer for the products described herein shall be limited in accordance with the
Terms and conditions of commercial sale of NXP Semiconductors.
Right to make changes - NXP Semiconductors reserves the right to make changes to information published in this
document, including without limitation specifications and product descriptions, at any time and without notice. This
document supersedes and replaces all information supplied prior to the publication hereof.
Suitability for use - NXP Semiconductors products are not designed, authorized or warranted to be suitable for use
in life support, life-critical or safety-critical systems or equipment, nor in applications where failure or malfunction of an
NXP Semiconductors product can reasonably be expected to result in personal injury, death or severe property or
environmental damage. NXP Semiconductors and its suppliers accept no liability for inclusion and/or use of NXP
Semiconductors products in such equipment or applications and therefore such inclusion and/or use is at the
customer's own risk.
Applications - Applications that are described herein for any of these products are for illustrative purposes only. NXP
Semiconductors makes no representation or warranty that such applications will be suitable for the specified use
without further testing or modification.
Customers are responsible for the design and operation of their applications and products using NXP Semiconductors
products, and NXP Semiconductors accepts no liability for any assistance with applications or customer product
design. It is customer's sole responsibility to determine whether the NXP Semiconductors product is suitable and fit
for the customer's applications and products planned, as well as for the planned application and use of customer's
third party customer(s). Customers should provide appropriate design and operating safeguards to minimize the risks
associated with their applications and products.
NXP Semiconductors does not accept any liability related to any default, damage, costs or problem which is based on
any weakness or default in the customer's applications or products, or the application or use by customer's third party
customer(s). Customer is responsible for doing all necessary testing for the customer's applications and products
using NXP Semiconductors products in order to avoid a default of the applications and the products or of the
application or use by customer's third party customer(s). NXP does not accept any liability in this respect.
Export control - This document as well as the item(s) described herein may be subject to export control regulations.
Export might require a prior authorization from competent authorities.
For the contact details of your local NXP office or distributor, refer to:
www.nxp.com/jennic