⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zdapp.h

📁 Zigbee2006入门(源代码+文档讲解+系统推荐)
💻 H
📖 第 1 页 / 共 2 页
字号:
 * (byte Endpoint)
 *
 */
extern void ZDApp_SendEndDeviceBindReq( byte endPoint );

/*
 * Sends an osal message to ZDApp with parameter as the msg data byte.
 */
extern void ZDApp_SendEventMsg( byte cmd, byte len, byte *buf );

/*
 * ZdApp Function for Establishing a Link Key
 */
extern ZStatus_t ZDApp_EstablishKey( uint8  endPoint,
                                     uint16 nwkAddr,
                                     uint8* extAddr );

/*
 * Start the network formation process
 *    delay - millisecond wait before
 */
extern void ZDApp_NetworkInit( uint16 delay );

/*********************************************************************
 * Callback FUNCTIONS - API
 */

  /*
   * ZdApp Callback for End Device Bind Request
   */
  extern void ZDApp_EndDeviceBindReqCB( ZDEndDeviceBind_t *bindReq );

  /*
   * ZdApp Callback for Bind Request
   */
  extern void ZDApp_BindReqCB( byte TransSeq,
                               zAddrType_t *SrcAddr,
                               byte *SrcAddress,
                               byte SrcEndPoint,
                               uint16 ClusterID,
                               zAddrType_t *DstAddress,
                               byte DstEndPoint,
                               byte SecurityUse );

  /*
   * ZdApp Callback for Unbind Request
   */
  extern void ZDApp_UnbindReqCB( byte TransSeq,
                                 zAddrType_t *SrcAddr,
                                 byte *SrcAddress,
                                 byte SrcEndPoint,
                                 uint16 ClusterID,
                                 zAddrType_t *DstAddress,
                                 byte DstEndPoint,
                                 byte SecurityUse );

  /*
   * ZdApp Callback for Network Address Response (NWK_addr_rsp)
   */
  extern void ZDApp_NwkAddrRspCB( zAddrType_t *SrcAddr,
                                  byte Status,
                                  byte *IEEEAddr,
                                  uint16 aoi,
                                  byte NumAssocDev,
                                  byte StartIndex,
                                  uint16 *AssocDevList );

  /*
   * ZdApp Callback for IEEE Address Response (IEEE_addr_rsp)
   */
  extern void ZDApp_IEEEAddrRspCB( zAddrType_t *SrcAddr,
                                   byte Status,
                                   byte *IEEEAddr,
                                   uint16 aoi,
                                   byte NumAssocDev,
                                   byte StartIndex,
                                   uint16 *AssocDevList );

  /*
   * ZdApp Callback for a Node Descriptor Response
   */
  extern void ZDApp_NodeDescRspCB( zAddrType_t *SrcAddr,
                                   byte Status,
                                   uint16 aoi,
                                   NodeDescriptorFormat_t *pNodeDesc );

  /*
   * ZdApp Callback for a Power Descriptor Response
   */
  extern void ZDApp_PowerDescRspCB( zAddrType_t *SrcAddr,
                                    byte Status,
                                    uint16 aoi,
                                    NodePowerDescriptorFormat_t *pPwrDesc );

  /*
   * ZdApp Callback for a Simple Descriptor Response
   */
  extern void ZDApp_SimpleDescRspCB( zAddrType_t *SrcAddr,
                                     byte Status,
                                     uint16 aoi,
                                     byte EP,
                                     SimpleDescriptionFormat_t *pSimpleDesc );

  /*
   * ZdApp Callback for a Active Endpoint Response
   */
  extern void ZDApp_ActiveEPRspCB( zAddrType_t *src,
                                   byte Status,
                                   byte epCnt,
                                   byte *epList );

  /*
   * ZdApp Callback for a Match Description Response
   */
  extern void ZDApp_MatchDescRspCB( zAddrType_t *src,
                                    byte Status,
                                    byte epCnt,
                                    byte *epList );

  /*
   * ZdApp Callback for an End Device Bind Response
   */
  extern void ZDApp_EndDeviceBindRsp( zAddrType_t *SrcAddr, byte Status );

  /*
   * ZdApp Callback for a Bind Response
   */
  extern void ZDApp_BindRsp( zAddrType_t *SrcAddr, byte Status );

  /*
   * ZdApp Callback for an Unbind Response
   */
  extern void ZDApp_UnbindRsp( zAddrType_t *SrcAddr, byte Status );

/*********************************************************************
 * Call Back Functions from NWK  - API
 */

/*
 * ZDO_NetworkDiscoveryConfirmCB - scan results
 */

extern ZStatus_t ZDO_NetworkDiscoveryConfirmCB( byte ResultCount,
                              networkDesc_t *NetworkList );

/*
 * ZDO_NetworkFormationConfirm - results of the request to
 *              initialize a coordinator in a network
 */
extern void ZDO_NetworkFormationConfirmCB( ZStatus_t Status );
/*
 * ZDO_JoinConfirmCB - results of its request to join itself or another
 *              device to a network
 */
extern void ZDO_JoinConfirmCB( uint16 PanId, ZStatus_t Status );

/*
 * ZDO_JoinIndicationCB - notified of a remote join request
 */
extern ZStatus_t ZDO_JoinIndicationCB( uint16 ShortAddress,
                      byte *ExtendedAddress, byte CapabilityInformation );

/*
 * ZDO_StartRouterConfirm -  results of the request to
 *              start functioning as a router in a network
 */
extern void ZDO_StartRouterConfirmCB( ZStatus_t Status );

/*
 * ZDO_LeaveCnf - results of the request for this or a child device
 *                to leave
 */
extern void ZDO_LeaveCnf( NLME_LeaveCnf_t* cnf );

/*
 * ZDO_LeaveInd - notified of a remote leave request or indication
 */
extern void ZDO_LeaveInd( NLME_LeaveInd_t* ind );

/*
 * ZDO_SyncIndicationCB - notified of sync loss with parent
 */
extern void ZDO_SyncIndicationCB( byte type, uint16 shortAddr );

/*
 * ZDO_PollConfirmCB - notified of poll confirm
 */
extern void ZDO_PollConfirmCB( byte status );

/*********************************************************************
 * Call Back Functions from Security  - API
 */
extern ZStatus_t ZDO_UpdateDeviceIndication( byte *extAddr, byte status );



/*
 * ZDApp_InMsgCB - Allow the ZDApp to handle messages that are not supported
 */
extern void ZDApp_InMsgCB( byte TransSeq,
                           zAddrType_t *srcAddr,
                           byte wasBroadcast,
                           uint16 clusterID,
                           byte asduLen,
                           byte *asdu,
                           byte SecurityUse );

extern void ZDO_StartRouterConfirm( ZStatus_t Status );

/*
 * ZDApp_MgmtLqiRspCB - Apps incoming response indication
 */
extern void ZDApp_MgmtLqiRspCB( uint16 SrcAddr, byte Status,
                         byte NeighborLqiEntries,
                         byte StartIndex, byte NeighborLqiCount,
                         neighborLqiItem_t *pList );

/*
 * ZDApp_MgmtNwkDiscRspCB - Apps incoming response indication
 */
extern void ZDApp_MgmtNwkDiscRspCB( uint16 SrcAddr, byte Status,
                         byte NetworkCount,
                         byte StartIndex, byte networkListCount,
                         mgmtNwkDiscItem_t *pList );

/*
 * ZDApp_MgmtRtgRspCB - Apps incoming response indication
 */
extern void ZDApp_MgmtRtgRspCB( uint16 SrcAddr, byte Status, byte rtgCount,
                         byte StartIndex, byte rtgListCount,
                         rtgItem_t *pList );

/*
 * ZDO_ProcessMgmtBindRsp - Apps incoming response indication
 */
extern void ZDApp_MgmtBindRspCB( uint16 SrcAddr, byte Status, byte BindingCount,
                         byte StartIndex, byte BindingListCount,
                         apsBindingItem_t *pList );

/*
 * ZDApp_MgmtDirectJoinRspCB - Apps incoming response indication
 */
extern void ZDApp_MgmtDirectJoinRspCB( uint16 SrcAddr, byte Status,
                          byte SecurityUse );

/*
 * ZDApp_MgmtLeaveRspCB - Apps incoming response indication
 */
extern void ZDApp_MgmtLeaveRspCB( uint16 SrcAddr, byte Status,
                          byte SecurityUse );

#if defined ( ZDO_MGMT_BIND_RESPONSE ) && !defined( REFLECTOR )
/*
 * ZDApp_MgmtBindReqCB - This function finishes the processing of the Management
 *              Bind Request and generates the response.
 */
extern void ZDApp_MgmtBindReqCB( byte TransSeq, zAddrType_t *SrcAddr,
                                byte StartIndex, byte SecurityUse );
#endif

/*
 * ZDApp_MgmtPermitJoinCB - Apps incoming response indication
 */
extern void ZDApp_MgmtPermitJoinRspCB( uint16 SrcAddr, byte Status,
                          byte SecurityUse );

/*
 * ZDApp_UserDescRspCB - Apps incoming response indication
 */
extern void ZDApp_UserDescRspCB( uint16 SrcAddr, byte status,
                          uint16 nwkAddrOfInterest, byte userDescLen,
                          byte *userDesc, byte SecurityUse );


/*
 * ZDApp_UserDescConfCB - Apps incoming response indication
 */
extern void ZDApp_UserDescConfCB( uint16 SrcAddr, byte status,
                                  byte SecurityUse );

/*
 * ZDApp_ServerDiscRspCB - Handle the Server_Discovery_rsp response.
 */
#if defined ( ZDO_SERVERDISC_REQUEST )
void ZDApp_ServerDiscRspCB( uint16 srcAddr, byte status,
                            uint16 serverMask, byte securityUse );
#endif

/*
 * ZDApp_EndDeviceAnnounceCB - Received an End Device Announce
 */
extern void ZDApp_EndDeviceAnnounceCB( uint16 SrcAddr, uint16 nwkAddr,
                                      uint8 *extAddr, uint8 capabilities );

/*********************************************************************
 * ZDO Control Functions
 */

/*
 * ZDApp_ChangeMatchDescRespPermission
 *    - Change the Match Descriptor Response permission.
 */
extern void ZDApp_ChangeMatchDescRespPermission( uint8 endpoint, uint8 action );

/*
 * ZDApp_ResetNwkKey
 *    - Re initialize the NV Nwk Key
 */
extern void ZDApp_ResetNwkKey( void );

/*
 * ZDApp_StartUpFromApp
 *    - Start the device.  This function will only start a device
 *          that is in the Holding state.
 *
 * mode - ZDAPP_STARTUP_COORD - Start up as coordinator only
 *        ZDAPP_STARTUP_ROUTER - Start up as router only
 *        ZDAPP_STARTUP_AUTO - Startup in auto, look for coord,
 *                               if not found, become coord.
 *
 * returns  ZSucess if started, ZFailure if in the wrong mode
 */
extern ZStatus_t ZDApp_StartUpFromApp( uint8 mode );

/*
 * ZDApp_StopStartUp
 *    - Stops the joining process of a router.  This will only
 *          work if the router is in the scanning process and
 *          the SOFT_START feature is enabled.
 *
 *    returns  TRUE if SOFT_START is enabled, FALSE if not possible
 */
extern uint8 ZDApp_StopStartUp( void );


/*
 * ZDApp_StartJoiningCycle
 *    - Starts the joining cycle of a device.  This will only continue an
 *      already started (or stopped) joining cycle.
 *
 *    returns  TRUE if joining started, FALSE if not in joining or rejoining
 */
extern uint8 ZDApp_StartJoiningCycle( void );

/*
 * ZDApp_StopJoiningCycle
 *    - Stops the joining or rejoining process of a device.
 *
 *    returns  TRUE if joining stopped, FALSE if joining or rejoining
 */
extern uint8 ZDApp_StopJoiningCycle( void );



/*********************************************************************
 * ZDO Information Notification Registration Functions
 */

/*
 * Register to receive IEEE Addr Response messages
 */
extern void ZDApp_RegisterForIEEEAddrRsp( byte TaskID );

/*
 * Register to receive NWK Addr Response messages
 */
extern void ZDApp_RegisterForNwkAddrRsp( byte TaskID );

/*
 * Register to receive Match Descriptor Response messages
 */
extern void ZDApp_RegisterForMatchDescRsp( byte TaskID );

/*
 * Register to receive End Device Announce messages
 */
extern void ZDApp_RegisterForEndDeviceAnnounce( byte TaskID );

#if defined ( ZDO_BIND_UNBIND_REQUEST )
/*
 * Register to receive Bind_rsp and Unbind_rsp messages
 */
extern void ZDApp_RegisterForBindRsp( byte TaskID );
#endif

#if defined ( ZDO_BIND_UNBIND_RESPONSE ) && !defined ( REFLECTOR )
/*
 * Register to receive Bind and Unbind Request messages
 */
extern void ZDApp_RegisterForBindReq( byte TaskID );
#endif

#if defined ( ZDO_MGMT_BIND_RESPONSE ) && !defined ( REFLECTOR )
/*
 * Register to receive Mgmt Bind Request messages
 */
extern void ZDApp_RegisterForMgmtBindReq( byte TaskID );
#endif


/*********************************************************************
*********************************************************************/

#ifdef __cplusplus
}
#endif

#endif /* ZDOBJECT_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -