zigbee PRO 事件

文件JN-UG-3048-ZigBee-PRO.pdf

6.2.1 ZDO Stack Events
The ZDO stack events are used to report information to the application. They are
enumerated in ZPS_teAfEventType, shown below, and are described in Table 3.

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_ERROR
} ZPS_teAfEventType;

 

/* event message from the stack to the application*/
typedef struct{
        ZPS_teAfEventType eType;
        Zps_tuAfEventData uEvent;
}ZPS_tsAfEvent;
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_tuAfEventData;

 

typedef struct
{
    uint32 u32UnscannedChannels;
    uint8 eStatus;
    uint8 u8NetworkCount;
    uint8 u8SelectedNetwork;
    ZPS_tsNwkNetworkDescr asNwkDescriptors[12];
} ZPS_tsAfNwkDiscoveryEvent;
typedef struct {
    uint8 u8Status;
    uint8 u8SrcEndpoint;
    uint8 u8DstEndpoint;
    uint8 u8DstAddrMode;
    uint16 u16DstAddr;
} ZPS_tsAfDataAckEvent;
typedef struct {
    uint8 u8Status;
    uint8 u8SrcEndpoint;
    uint8 u8DstEndpoint;
    uint8 u8DstAddrMode;
    uint16 u16DstAddr;
} ZPS_tsAfDataConfEvent;
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;


/* address type for short and long addresses */
typedef union {
    uint16 u16Addr;
    uint64 u64Addr;
} ZPS_tuAddress;


/* APDU instance handle 头文件:pdum_apl.h*/ 
typedef const struct pdum_tsAPduInstance_tag *PDUM_thAPduInstance;

 

  

posted on 2013-08-23 11:15  大浪 淘沙  阅读(921)  评论(0编辑  收藏  举报

导航