Structures
BDB_tsBdbEvent
The following structure contains ZigBee Base Device event information that is passed to the APP_vBdbCallback() callback function (see Events).
typedef struct
{
BDB_teBdbEventTypee EventType;
BDB_tuBdbEventData uEventData;
}BDB_tsBdbEvent;
where:
eEventType
is an enumeration indicating the event type - for the possible enumerations, refer to Section 2.9.uEventData
is a union structure containing the event information (if any) - for a description of this structure, refer to Section 2.7.2.
Parent topic:Structures
BDB_tuBdbEventData
The following structure is a union containing the data for a ZigBee Base Device event.
typedef union
{
BDB_tsZpsAfEvent sZpsAfEvent;
BDB_tsFindAndBindEvent *psFindAndBindEvent;
}BDB_tuBdbEventData
where:
sZpsAfEvent
is a structure containing the data for a stack event, indicated by the event type BDB_EVENT_ZPSAF - for a description of this structure, refer to Section 2.7.3.psFindAndBindEvent
is a pointer to a structure containing the data for a ‘Finding and Binding’ event (see Section 2.9) - for a description of this structure, refer to Section 2.7.4.
Parent topic:Structures
BDB_tsZpsAfEvent
The following structure contains the data for a ZigBee stack event (see the BDB_EVENT_ZPSAF event in Section 2.9).
typedef struct
{
uint8 u8EndPoint;
ZPS_tsAfEvent sStackEvent;
}BDB_tsZpsAfEvent;
where:
u8EndPoint
is the number of the endpoint on which the event occurred.sStackEvent
is a ZPS structure containing the stack event type and data - this structure is detailed in the ZigBee 3.0 Stack User Guide (JNUG3130).
Parent topic:Structures
BDB_tsFindAndBindEvent
The following structure contains the data for a ‘Finding and Binding’ event (see Section 2.9), which is passed to the application during the Finding and Binding process on the initiator.
typedef struct{
uint8 u8InitiatorEp;
uint8 u8TargetEp;
uint16 u16TargetAddress;
uint16 u16ProfileId;
uint16 u16DeviceId;
uint8 u8DeviceVersion;
union {
uint16 u16ClusterId;
uint16 u16GroupId;
}uEvent;
ZPS_tsAfZdpEvent *psAfZdpEvent;
bool bAllowBindOrGroup;
bool bGroupCast;
}BDB_tsFindAndBindEvent;
where:
u8InitiatorEp
is the number of the endpoint involved in the binding/grouping on the initiator node.u8TargetEp
is the number of the endpoint involved in the binding/grouping on the target node.u16TargetAddress
is the 16-bit network address of the target node.u16ProfileId
is the identifier of the ZigBee application profile supported by the two nodes (for Lighting & Occupancy devices, this is 0x0104)u16DeviceId
is the 16-bit identifier of the ZigBee device type supported by the target endpoints. This must be a device type identifier issued by the ZigBee Alliance.u8DeviceVersion
contains 4 bits (bits 0-3) representing the version of the supported device description on the target node (the default is 0000, unless set to another value according to the application profile used).uEvent
is a union of the following two fields:u16ClusterId
is the identifier of the cluster involved in the binding.u16GroupId
is the address of the group to which the target endpoint is assigned.
psAfZdpEvent
is a pointer to a ZPS_tsAfZdpEvent structure containing the generated Finding and Binding event - this ZPS structure is detailed in the ZigBee 3.0 Stack User Guide (JNUG3130). The event can be any of the following (detailed in Section 2.9):BDB_EVENT_FB_HANDLE_SIMPLE_DESC_RESP_OF_TARGET
BDB_EVENT_FB_CHECK_BEFORE_BINDING_CLUSTER_FOR_TARGET
BDB_EVENT_FB_CLUSTER_BIND_CREATED_FOR_TARGET
BDB_EVENT_FB_BIND_CREATED_FOR_TARGET
BDB_EVENT_FB_GROUP_ADDED_TO_TARGET
BDB_EVENT_FB_ERR_BINDING_FAILED
BDB_EVENT_FB_ERR_BINDING_TABLE_FULL
BDB_EVENT_FB_ERR_GROUPING_FAILED
BDB_EVENT_FB_NO_QUERY_RESPONSE
BDB_EVENT_FB_TIMEOUT
bAllowBindOrGroup
is a Boolean flag that indicates whether the relevant cluster is permitted to participate in a binding or grouping. The default value is TRUE (permitted) but if the application must exclude the cluster (and block the binding/grouping) then it should set this field to FALSE.bGroupCast
is a Boolean flag that indicates whether an ‘Add Group If Identifying’ command should be broadcast to all the identifying targets (TRUE) or an ‘Add Group’ request should be individually unicast to all the identifying targets. The default value is TRUE.
Parent topic:Structures
BDB_tsOobWriteDataToCommission
The following structure contains the data values used to initialize a node at the start of out-of-band commissioning of the node.
typedef struct{
uint64 u64PanId;
uint64 u64TrustCenterAddress;
uint8* pu8NwkKey;
uint8* pu8InstallCode;
uint16 u16PanId;
uint16 u16ShortAddress;
bool_t bRejoin;
uint8 u8ActiveKeySqNum;
uint8 u8DeviceType;
uint8 u8RxOnWhenIdle;
uint8 u8Channel;
uint8 u8NwkUpdateId;
}BDB_tsOobWriteDataToCommission;
where:
u64PanId
is the Extended PAN ID of the network to be joined.u64TrustCenterAddress
is the IEEE/MAC address of the Trust Centre in the centralized network to be joined.pu8NwkKey
is a pointer to the network key.pu8InstallCode
is a pointer to an initial link key derived from an install code (see Section 2.3.1).u16PanId
is the PAN ID of the network to be joined.u16ShortAddress
is the network address assigned to the node.bRejoin
is the ‘rejoin flag’ which indicates whether the node should attempt to rejoin the network if it leaves (TRUE: rejoin, FALSE: do not rejoin).u8ActiveKeySqNum
is the key sequence number associated with the active network key.u8DeviceType
is a value indicating the type of ZigBee node:0: Coordinator
1: Router
2: End Device All other values are reserved.
u8RxOnWhenIdle
is a value indicating whether the receiver of the node is enabled during idle periods:0: Receiver off when idle (sleeping device)
1: Receiver on when idle (non-sleeping device) All other values are reserved.
u8Channel
is the radio channel number on which the network operates.u8NwkUpdateId
is a unique byte value which is incremented when the network parameters are updated (and is therefore used to determine whether a receiving node has missed an update).
Parent topic:Structures
BDB_tsOobReadDataToAuthenticate
The following structure contains data values that are read from the local node during out-of-band commissioning of the node.
typedef struct{
uint8 au8Key[16]__attribute__((aligned(16)));
uint64 u64TcAddress;
uint64 u64PanId;
uint16 u16ShortPanId;
uint8 u8ActiveKeySeq;
uint8 u8Channel;
}BDB_tsOobReadDataToAuthenticate;
where:
au8Key[16]__attribute__((aligned (16)))
is an array containing the current network key, with one byte per array element.u64TcAddress
is the IEEE/MAC address of the Trust Centre of the network to which the node is being commissioned.u64PanId
is the Extended PAN ID of the network to which the node is being commissioned.u16ShortPanId
is the PAN ID of the network to which the node is being commissioned.u8ActiveKeySeq
is the key sequence number of the currently active network key.u8Channel
is the radio channel number on which the network operates.
Parent topic:Structures
BDB_tsOobWriteDataToAuthenticate
The following structure contains authentication data that is used to encrypt a security key during out-of-band commissioning of the node.
typedef struct{
uint64 u64ExtAddr;
uint8* pu8InstallCode;
}BDB_tsOobWriteDataToAuthenticate;
where:
u64ExtAddr
is the IEEE/MAC address of the node.pu8InstallCode
is a pointer to a 16-bit install code to be used in the key encryption.
Parent topic:Structures
Parent topic:ZigBee Base Device