Descriptor structures
These structures are used to represent the following descriptors that contain information about the host node:
Node descriptor
Node Power descriptor
Simple descriptor
The structures are listed below.
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:
sBitFields
is a structure of the typeZPS_tsAplZdpNodeDescBitFields
(described below) containing various items of information about the node.
u16Value
is used for the union and should be set to 0x0000.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.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 ofu8MaxBufferSize
, 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 18 on page 389.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 indicated in the table below.
Bit |
Description |
---|---|
0 |
Set to 1 if Extended Active Endpoint List is available on the node, 0 otherwise. |
1 |
Set to 1 if Extended Simple Descriptor List is available on the node, 0 otherwise. |
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:
eFrequencyBand
is a 5-bit value representing the IEEE 802.15.4 radio- frequency band used by the node:0: 868-MHz band
2: 915-MHz band
3: 2400-MHz band
eApsFlags
is a 3-bit value containing flags that indicate the ZigBee APS capabilities of the node (not currently supported and should be set to 0).eReserved
is a 3-bit reserved value.bUserDescAvail
is a 1-bit value indicating whether a User descriptor is available for the node - 1 indicates available, 0 indicates unavailable.bComplexDescAvail
is a 1-bit value indicating whether a Complex descriptor is available for the node - 1 indicates available, 0 indicates unavailable.eLogicalType
is a 3-bit value indicating the ZigBee device of the node:0: Coordinator
1: Router
2: End Device
Parent topic:ZPS_tsAplZdpNodeDescriptor
Parent topic:Descriptor structures
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 typeZPS_tsAplZdpPowerDescBitFields
(described below) containing various items of information about the node’s 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 node’s 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 synchronized 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, for example, by pressing a button
All other values are reserved.
Parent topic:ZPS_tsAplZdpNodePowerDescriptor
Parent topic:Descriptor structures
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 (for Lighting & Occupancy devices, it is 0x0104).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 typeZPS_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 thepu16InClusterList
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 countu8InClusterCount
. 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 thepu16OutClusterList
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 countu8OutClusterCount
. 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.
Parent topic:ZPS_tsAplZdpSimpleDescType
Parent topic:Descriptor structures
Parent topic:ZDP structures