Event structures
These structures are used to contain events. Event details (type and associated data) are passed to the application in the structure ZPS_tsAfEvent
. Data structures for the individual event types are contained in the union ZPS_tuAfEventData
.
Enumerations for the event types are provided in the structure ZPS_teAfEventType. This structure and the associated events are detailed in Chapter 11, Event and Status Codes.
The structures are listed below.
ZPS_tsAfEvent
This structure 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 11.1.uEvent
is a structure containing the event data from the union of structures detailed in Section 8.2.2.2.
Parent topic:Event structures
ZPS_tuAfEventData
This structure is a union of the data structures for the individual events described in Section 8.2.2.3 through to Section 8.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;
Parent topic:Event structures
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 elementuDstAddress
(see the Table below.)uDstAddress
is the address of the destination node for the data packet (the type of address is specified using the elementu8DstAddrMode
above).u8DstEndpoint
is the number of the destination endpoint (in range 0-240).u8SrcAddrMode
indicates the type of source address specified through the elementuSrcAddress
(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 elementu8SrcAddrMode
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 inu16ProfileId
) 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 11.2.3 and Section 11.2.4.eSecurityStatus
indicates the type of security with which the packet was sent. It can be: 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.
Addressing modes
u8DstAddrMode |
Code |
Description |
---|---|---|
0x00 |
ZPS_E_ADDR_MODE_BOUND |
Bound endpoint |
0x01 |
ZPS_E_ADDR_MODE_GROUP |
16-bit Group address |
0x02 |
ZPS_E_ADDR_MODE_SHORT |
16-bit Network (Short) address |
0x03 |
ZPS_E_ADDR_MODE_IEEE |
64-bit IEEE/MAC address |
Parent topic:Event structures
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 toward 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 11.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 elementuDstAddr
(see Table) - 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 elementu8DstAddrMode
above).u8SequenceNum
is the sequence number of the request that initiated the data transfer.
Parent topic:Event structures
ZPS_tsAfDataAckEvent
This structure is used in the ZPS_EVENT_APS_DATA_ACK
event, which is generated when an end-to-end acknowledgment is received from the destination node during a data transfer in which an acknowledgment 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 11.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 elementu16DstAddr
(see Table) - 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 acknowledgment (the type of address is specified using the elementu8DstAddrMode
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 inu16ProfileId
) for which the data transfer was intended.
Parent topic:Event structures
ZPS_tsAfNwkFormationEvent
This structure is used in the event ZPS_EVENT_NWK_STARTED, which indicates whether the network has been started (on the Coordinator).
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 11.2.
Parent topic:Event structures
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;
bool_t bRejoin;
} ZPS_tsAfNwkJoinedEvent;
where:
u16Addr
is the 16-bit network address allocated to the joining node.bRejoin
indicates whether the join was a rejoin (TRUE) or a new association (FALSE).
Parent topic:Event structures
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;
bool_t bRejoin;
} ZPS_tsAfNwkJoinFailedEvent;
where:
u8Status
is one of the status codes from the lower stack layers, detailed in Section 11.2.bRejoin
indicates whether the join attempt was a rejoin (TRUE) or a new association (FALSE).
Parent topic:Event structures
ZPS_tsAfNwkDiscoveryEvent
This structure is used in the ZPS_EVENT_NWK_DISCOVERY_COMPLETE event, which reports the details of the networks detected in a network discovery initiated by a Router or End Device that needs to join a network.
The ZPS_tsAfNwkDiscoveryEvent
structure is detailed below.
typedef struct
{
uint32 u32UnscannedChannels;
uint8 eStatus;
uint8 u8NetworkCount;
uint8 u8SelectedNetwork;
ZPS_tsNwkNetworkDescr *psNwkDescriptors;
} ZPS_tsAfNwkDiscoveryEvent;
where:
u32UnscannedChannels
is a 32-bit bitmap representing the set of channels from the network discovery that had not yet been scanned when this event was generated. Bits 11 to 26 represent the 2400-MHz channels 11 to 26, where 1 indicates channel scanned and 0 indicates channel not yet scanned.estatus
is the status of the network discovery process, returned by the lower layers (see Section 11.2) - MAC_ENUM_SUCCESS, if the discovery was successfully completed.u8NetworkCount
is the number of networks that had been discovered when this event was generated.u8SelectedNetwork
is the index of the recommended network in the array of reported networks (see below).psNwkDescriptors
is a pointer to the network discovery table in the network NIB. The network discovery table contains an array of data structures, where each structure contains details of a discovered network. Each array element is a structure of the typeZPS_tsNwkNetworkDescr
, described in Section 8.2.3.1. The number of array elements is given byu8NetworkCount
, described above.
Parent topic:Event structures
ZPS_tsAfNwkJoinIndEvent
This structure is used in the event ZPS_EVENT_NWK_NEW_NODE_HAS_JOINED, which notifies a Router or the Coordinator 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 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.
a non-zero value represents TRUE.
Node capabilities bitmap
Bits |
Description |
---|---|
0 |
Coordinator capability: |
1 |
Device type: |
2 |
Power source: |
3 |
Receiver on when idle: |
4-5 |
Reserved |
6 |
Security capability: |
7 |
Allocate address: |
Parent topic:Event structures
ZPS_tsAfNwkLeaveIndEvent
This structure is used in the ZPS_EVENT_LEAVE_INDICATION event, which indicates that a neighboring 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 networku8Rejoin
indicates whether the leaving node was requested to attempt a subsequent rejoin of the network:zero represents FALSE
a non-zero value represents TRUE.
Parent topic:Event structures
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.
Parent topic:Event structures
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 11.2.
Parent topic:Event structures
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 {
uint16 u16DstAddress;
uint8 u8Status;
uint8 u8NwkStatus;
} ZPS_tsAfNwkRouteDiscoveryConfEvent;
where:
u16DstAddress
is the destination address for which the route discovery confirm event was generated.u8Status
is one of the status codes from the MAC layer, detailed in Section11.2.4.u8NwkStatus
is one of the status codes from the NWK layer, detailed in Section 11.2.3.
Parent topic:Event structures
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 11.2.
Parent topic:Event structures
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 is completed.
The ZPS_tsAfNwkEdScanConfEvent
structure is defined as:
typedef ZPS_tsNwkNlmeCfmEdScan ZPS_tsAfNwkEdScanConfEvent;
where ZPS_tsNwkNlmeCfmEdScan
is described in Section 8.2.3.2.
Parent topic:Event structures
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.
eError Enumerations
eError Enumeration |
Description |
---|---|
ZPS_ERROR_APDU_TOO_SMALL |
Allocated APDU instance is too small to accommodate received message. This error is detailed in the structure |
ZPS_ERROR_APDU_INSTANCES_EXHAUSTED |
The are no APDU instances available to accommodate the received message. This error is detailed in the structure |
ZPS_ERROR_NO_APDU_CONFIGURED |
No APDU has been configured to accommodate the received message. This error is detailed in the structure |
ZPS_ERROR_OS_MESSAGE_QUEUE_OVERRUN |
A message queue is full and can accept no more messages. This error is detailed in the structure |
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.u16DataSize
is the size of the received message, in bytes.hAPdu
is the handle of the local APDU pool from which the APDU instance comes.u8SrcEndpoint
is the number of the source endpoint of the message.u8DstEndpoint
is the number of the destination endpoint of the message.
Parent topic:ZPS_tsAfErrorEvent
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.
Parent topic:ZPS_tsAfErrorEvent
Parent topic:Event structures
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 elementu8DstAddrMode
above).u8DstAddrMode
indicates the type of address specified through the elementuDstAddr
(see Table 1).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).
Parent topic:Event structures
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 8.2.2.18\ (but for this event, the data in the structure relates to unbinding rather than binding).
Parent topic:Event structures
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.
Parent topic:Event structures
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 (0) indicates that the data packet was successfully transmitted to all bound endpoints
Failure (non-zero value) 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.
Parent topic:Event structures
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 typeZPS_tsInterPanAddress
(see Section8.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 elementu64SrcAddress
(see Table).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 elementu8SrcAddrMode
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 11.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.
Parent topic:Event structures
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 acknowledgment has been received from the first hop node (this acknowledgment 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 11.2.u8Handle
is a handle for internal use.
Parent topic:Event structures
ZPS_tsAfTCstatusEvent
This structure is used in the ZPS_EVENT_TC_STATUS event, which indicates whether negotiations to establish a link key with the Trust Centre have been successful and, if so, which key is the active key.
The ZPS_tsAfTCstatusEvent
structure is detailed below.
typedef struct
{
ZPS_tuTcStatusData uTcData;
uint8 u8Status;
}ZPS_tsAfTCstatusEvent;
where:
uTcData
is dependent onu8Status
(below) and is either a pointer to the link key descriptor in the case of success or the address of the Trust Centre node in the case of failure.ZPS_tuTcStatusData
is a union, detailed below.u8Status
indicates the results of the link key negotiations - one of:ZPS_E_SUCCESS (link key successfully established)
ZPS_APL_APS_E_SECURITY_FAIL (link key not established)
The ZPS_tuTcStatusData
structure is detailed below.
typedef union {
ZPS_tsAplApsKeyDescriptorEntry *pKeyDesc;
uint64 u64ExtendedAddress;
} PS_tuTcStatusData;
where:
pKeyDesc
is a pointer to the active link key, if successfully established, which is contained in the structure described in Section 8.2.3.6.u64ExtendedAddress
is the IEEE/MAC address of the Trust Centre node with which link key negotiations failed.
Parent topic:Event structures
ZPS_tsAfZdpEvent
This structure is used when a ZPS_EVENT_APS_DATA_INDICATION event is generated containing a response which is destined for the ZDO at endpoint 0. The application can extract the response data from the event using the function ZPS_bAplZdpUnpackResponse() and this structure is used to receive the extracted data.
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;
ZPS_tsAplZdpPowerDescRsp sPowerDescRsp;
ZPS_tsAplZdpSimpleDescRsp sSimpleDescRsp;
ZPS_tsAplZdpNwkAddrRsp sNwkAddrRsp;
ZPS_tsAplZdpIeeeAddrRsp sIeeeAddrRsp;
ZPS_tsAplZdpUserDescConf sUserDescConf;
ZPS_tsAplZdpSystemServerDiscoveryRsp sSystemServerDiscoveryRsp;
ZPS_tsAplZdpPowerDescStoreRsp sPowerDescStoreRsp;
ZPS_tsAplZdpUserDescRsp sUserDescRsp;
ZPS_tsAplZdpActiveEpRsp sActiveEpRsp;
ZPS_tsAplZdpMatchDescRsp sMatchDescRsp;
ZPS_tsAplZdpComplexDescRsp sComplexDescRsp;
ZPS_tsAplZdpFindNodeCacheRsp sFindNodeCacheRsp;
ZPS_tsAplZdpExtendedSimpleDescRsp sExtendedSimpleDescRsp;
ZPS_tsAplZdpExtendedActiveEpRsp sExtendedActiveEpRsp;
ZPS_tsAplZdpBindRegisterRsp sBindRegisterRsp;
ZPS_tsAplZdpBackupBindTableRsp sBackupBindTableRsp;
ZPS_tsAplZdpRecoverBindTableRsp sRecoverBindTableRsp;
ZPS_tsAplZdpRecoverSourceBindRsp sRecoverSourceBindRsp;
ZPS_tsAplZdpMgmtNwkDiscRsp sMgmtNwkDiscRsp;
ZPS_tsAplZdpMgmtLqiRsp sMgmtLqiRsp;
ZPS_tsAplZdpMgmtRtgRsp sRtgRsp;
ZPS_tsAplZdpMgmtBindRsp sMgmtBindRsp;
ZPS_tsAplZdpMgmtCacheRsp sMgmtCacheRsp;
ZPS_tsAplZdpMgmtNwkUpdateNotify sMgmtNwkUpdateNotify;
}uZdpData;
union {
ZPS_tsAplZdpBindingTableEntry asBindingTable[5];
ZPS_tsAplZdpNetworkDescr asNwkDescTable[5];
ZPS_tsAplZdpNtListEntry asNtList[2];
ZPS_tsAplDiscoveryCache aDiscCache[5];
uint16 au16Data[34];
uint8 au8Data[77];
uint64 au64Data[9];
}uLists;
}ZPS_tsAfZdpEvent;
where:
u8SequNumber
is the sequence number of the ZDP request/responseu16ClusterId
is the ID of the cluster to which the request/response relatesuZdpData
is a union of the different ZDP request/response types:sDeviceAnnce
is a structure of the typeZPS_tsAplZdpDeviceAnnceReq
, described in Section 9.2.2.3
sMgmtNwkUpdateReq
is a structure of the typeZPS_tsAplZdpMgmtNwkUpdateReq
, described in Section 9.2.2.41sPermitJoiningReq
is a structure of the typeZPS_tsAplZdpMgmtPermitJoiningReq
, described in Section 9.2.3.39sDiscoveryCacheRsp
is a structure of the typeZPS_tsAplZdpDiscoveryCacheRsp
, described in Section 9.2.3.14sDiscoveryStoreRsp
is a structure of the typeZPS_tsAplZdpDiscoveryStoreRsp
, described in Section 9.2.3.15sNodeDescStoreRsp
is a structure of the typeZPS_tsAplZdpNodeDescStoreRsp
, described in Section 9.2.3.16sActiveEpStoreRsp
is a structure of the typeZPS_tsAplZdpActiveEpStoreRsp
, described in Section 9.2.3.19sSimpleDescStoreRsp
is a structure of the typeZPS_tsAplZdpSimpleDescStoreRsp
, described in Section 9.2.3.18sRemoveNodeCacheRsp
is a structure of the typeZPS_tsAplZdpRemoveNodeCacheRsp
, described in Section 9.2.3.21sEndDeviceBindRsp
is a structure of the typeZPS_tsAplZdpEndDeviceBindRsp
, described in Section 9.2.3.22sBindRsp
is a structure of the typeZPS_tsAplZdpBindRsp
, described in Section 9.2.3.23sUnbindRsp
is a structure of the typeZPS_tsAplZdpUnbindRsp
, described in Section 9.2.3.24sReplaceDeviceRsp
is a structure of the typeZPS_tsAplZdpReplaceDeviceRsp
, described in Section 9.2.3.26sStoreBkupBindEntryRsp
is a structure of the typeZPS_tsAplZdpStoreBkupBindEntryRsp
, described in Section9.2.2.27sRemoveBkupBindEntryRsp
is a structure of the typeZPS_tsAplZdpRemoveBkupBindEntryRsp
, described in Section9.2.2.28sBackupSourceBindRsp
is a structure of the typeZPS_tsAplZdpBackupSourceBindRsp
, described in Section 9.2.3.31sMgmtLeaveRsp
is a structure of the typeZPS_tsAplZdpMgmtLeaveRsp
, described in Section 9.2.3.37sMgmtDirectJoinRsp
is a structure of the typeZPS_tsAplZdpMgmtDirectJoinRsp
, described in Section 9.2.3.38sPermitJoiningRsp
is a structure of the typeZPS_tsAplZdpMgmtPermitJoiningRsp
, described in Section 9.2.3.39sNodeDescRsp
is a structure of the typeZPS_tsAplZdpNodeDescRsp
, described in Section 8.2.3.3sPowerDescRsp
is a structure of the typeZPS_tsAplZdpPowerDescRsp
, described in Section 9.2.3.4sSimpleDescRsp
is a structure of the typeZPS_tsAplZdpSimpleDescRsp
, described in Section 9.2.3.5sNwkAddrRsp
is a structure of the typeZPS_tsAplZdpNwkAddrRsp
, described in Section 9.2.3.1sIeeeAddrRsp
is a structure of the typeZPS_tsAplZdpIeeeAddrRsp
, described in Section 9.2.3.2sUserDescConf
is a structure of the typeZPS_tsAplZdpUserDescConf
, described in Section 9.2.3.12sSystemServerDiscoveryRsp
is a structure of the typeZPS_tsAplZdpSystemServerDiscoveryRsp
, described in Section9.2.3.13sPowerDescStoreRsp
is a structure of the typeZPS_tsAplZdpPowerDescStoreRsp
, described in Section 9.2.3.17sUserDescRsp
is a structure of the typeZPS_tsAplZdpUserDescRsp
, described in Section 9.2.3.8sActiveEpRsp
is a structure of the typeZPS_tsAplZdpActiveEpRsp
, described in Section 9.2.3.10sMatchDescRsp
is a structure of the typeZPS_tsAplZdpMatchDescRsp
, described in Section 9.2.3.9sComplexDescRsp
is a structure of the typeZPS_tsAplZdpComplexDescRsp
, described in Section 9.2.3.7sFindNodeCacheRsp
is a structure of the typeZPS_tsAplZdpFindNodeCacheRsp
, described in Section 9.2.3.20sExtendedSimpleDescRsp
is a structure of the typeZPS_tsAplZdpExtendedSimpleDescRsp
, described in Section 9.2.3.6sExtendedActiveEpRsp
is a structure of the typeZPS_tsAplZdpExtendedActiveEpRsp
, described in Section 9.2.3.11sBindRegisterRsp
is a structure of the typeZPS_tsAplZdpBindRegisterRsp
, described in Section 9.2.3.25sBackupBindTableRsp
is a structure of the typeZPS_tsAplZdpBackupBindTableRsp
, described in Section 9.2.3.29sRecoverBindTableRsp
is a structure of the typeZPS_tsAplZdpRecoverBindTableRsp
, described in Section 9.2.3.30sRecoverSourceBindRsp
is a structure of the typeZPS_tsAplZdpRecoverSourceBindRsp
, described in Section 9.2.3.32sMgmtNwkDiscRsp
is a structure of the typeZPS_tsAplZdpMgmtNwkDiscRsp
, described in Section 9.2.3.33sMgmtLqiRsp
is a structure of the typeZPS_tsAplZdpMgmtLqiRsp
, described in Section 9.2.3.34sRtgRsp
is a structure of the typeZPS_tsAplZdpMgmtRtgRsp
, described in Section 9.2.3.35sMgmtBindRsp
is a structure of the typeZPS_tsAplZdpMgmtBindRsp
, described in Section 9.2.3.36sMgmtCacheRsp
is a structure of the typeZPS_tsAplZdpMgmtCacheRsp
, described in Section 9.2.3.40sMgmtNwkUpdateNotify
is a structure of the typeZPS_tsAplZdpMgmtNwkUpdateNotify
, described in Section 9.2.3.41uLists
is a union of the different arrays/tables which act as temporary storage for data elements used by the stack (and are therefore for internal use only)
Parent topic:Event structures
Parent topic:AF structures