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_tsAplZdpNodeDescriptoris 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:

  • sBitFieldsis a structure of the type ZPS_tsAplZdpNodeDescBitFields

(described below) containing various items of information about the node.

  • u16Valueis used for the union and should be set to 0x0000.

  • eMacFlagscontains 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.

  • u16ManufacturerCodecontains 16 bits (bits 0-15) indicating the manufacturer code for the node, where this code is allocated to the manufacturer by the ZigBee Alliance.

  • u8MaxBufferSizeis the maximum size, in bytes, of an NPDU (Network Protocol Data Unit).

  • u16MaxRxSizeis 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.

  • u16ServerMaskcontains 8 bits (bits 0-7) indicating the server status of the node. This server mask is detailed in Table 18 on page 389.

  • u16MaxTxSizeis 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)

  • u8DescriptorCapabilitycontains 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_tsAplZdpNodeDescBitFieldsstructure 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:

  • eFrequencyBandis 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

  • eApsFlagsis a 3-bit value containing flags that indicate the ZigBee APS capabilities of the node (not currently supported and should be set to 0).

  • eReservedis a 3-bit reserved value.

  • bUserDescAvailis a 1-bit value indicating whether a User descriptor is available for the node - 1 indicates available, 0 indicates unavailable.

  • bComplexDescAvailis a 1-bit value indicating whether a Complex descriptor is available for the node - 1 indicates available, 0 indicates unavailable.

  • eLogicalTypeis 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_tsAplZdpNodePowerDescriptoris shown below.

typedef struct {
    union
    {
            ZPS_tsAplZdpPowerDescBitFields sBitFields;
            uint16 u16Value;
    }uBitUnion;
} ZPS_tsAplZdpNodePowerDescriptor;

where:

  • sBitFieldsis a structure of type ZPS_tsAplZdpPowerDescBitFields(described below) containing various items of information about the node’s power.

  • u16valueis used for the union and should be set to 0x0000.

ZPS_tsAplZdpPowerDescBitFields

The ZPS_tsAplZdpPowerDescBitFieldsstructure 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:

  • eCurrentPowerSourceLevelis 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)

  • eCurrentPowerSourceis 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

  • eAvailablePowerSourceis 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).

  • eCurrentPowerModeis 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_tsAplZdpSimpleDescTypeis 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:

  • u8Endpointis the number, in the range 1-240, of the endpoint to which the Simple descriptor corresponds.

  • u16ApplicationProfileIdis 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).

  • u16DeviceIdis 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.

  • sBitFieldsis a structure of type ZPS_tsAplZdpSimpleDescBitFields (described below) containing information about the endpoint.

  • u8Valueis used for the union and must be set to 0x00.

  • u8InClusterCountis an 8-bit count of the number of input clusters, supported on the endpoint, that will appear in the list pointed to by the pu16InClusterListelement.

  • *pu16InClusterListis 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.

  • u8OutClusterCountis an 8-bit count of the number of output clusters, supported on the endpoint, that will appear in the pu16OutClusterListelement.

  • *pu16OutClusterListis 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_tsAplZdpSimpleDescBitFieldsstructure 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:

  • eDeviceVersionis a 4-bit value identifying the version of the device description supported by the endpoint.

  • eReservedis a 4-bit reserved value.

Parent topic:ZPS_tsAplZdpSimpleDescType

Parent topic:Descriptor structures

Parent topic:ZDP structures