234567891011121aps_Group_t;typedefstruct{uint16ID;//IDuint8name[APS_GROUP_NAME_LEN];//}aps_Group_t;213typedefstructapsGroupItem{structapsGroupItem*next;//uint8endpoint;//aps_Group_tgroup;//ID}apsGroupItem_t;3rtgEntry_t;typedefstruct{uint16dstAddress;//uint16nextHopAddress;//byteexpiryTime;//bytestatus;//}rtgEntry_t;4BindingEntry_t;typedefstruct{uint8srcEP;//uint8dstGroupMode;//;0–,1–uint16dstIdx;//()NVRAM//dstGroupMode=0-AddressManagerindex//dstGroupMode=1–uint8dstEP;//uint8numClusterIds;//uint16clusterIdList[MAX_BINDING_CLUSTER_IDS];//Don'tuseMAX_BINDING_CLUSTERS_IDwhen//usingtheclusterIdListfield.Use//gMAX_BINDING_CLUSTER_IDS}BindingEntry_t;5neighborEntry_t;typedefstruct{uint16neighborAddress;//uint16panId;//PANIDlinkInfo_tlinkInfo;///}neighborEntry_t;6rtDiscEntry_t;typedefstruct{byterreqId;//IDuint16srcAddress;//uint16previousNode;//byteforwardCost;//byteresidualCost;//14byteexpiryTime;//}rtDiscEntry_t;7bcastEntry_t;typedefstruct{uint16srcAddr;//uint8bdt;//uint8pat;//uint8mbr;//uint8handle;//.uint8ackCnt;//uint8id;//ID}bcastEntry_t;8MTZDO_ConversionItem_t;typedefstruct{uint16clusterID;//uint32subCBID;//uint16mtID;//SPIIDpfnMtZdoRspProcpFn;//}MTZDO_ConversionItem_t;9macRadioDefsTxPowerTable10NVzgItem_t;typedefstructzgItem{uint16id;//uint16len;//void*buf;//}zgItem_t;11*pTaskEventHandlerFn;(unsignedchartask_id,unsignedshortevent);12maczmacCBEventTable;13zmacCBSizeTable;mac14ZDPzdpMsgProcItem_t;typedefstruct{uint16clusterID;//--ID()pfnZDPMsgProcessorpFn;//}zdpMsgProcItem_t;15PANnetworkDesc_t;typedefstruct15{uint16panId;//PANIDbytelogicalChannel;//bytebeaconOrder;//bytesuperFrameOrder;//byterouterCapacity;//bytedeviceCapacity;//byteversion;//bytestackProfile;//profilestack//bytesecurityLevel;uint16chosenRouter;//uint8chosenRouterLinkQuality;//bytechosenRouterDepth;//uint8extendedPANID[Z_EXTADDR_LEN];//PANIDvoid*nextDesc;//PAN}networkDesc_t;16endPointDesc_t;typedefstruct{byteendPoint;//byte*task_id;//PointertolocationoftheApplicationtaskID.//–,IDSimpleDescriptionFormat_t*simpleDesc;//afNetworkLatencyReq_tlatencyReq;//nolatencyreqs}endPointDesc_t;17epList_ttypedefstruct{endPointDesc_t*epDesc;//eEP_Flagsflags;pDescCBpfnDescCB;//Don'tuseifthisfunctionpointerisNULL.void*nextDesc;}epList_t;18associated_devices_ttypedefstruct{UINT16shortAddr;//uint16addrIdx;//bytenodeRelation;bytedevStatus;//bitmapofvariousstatusvaluesbyteassocCnt;linkInfo_tlinkInfo;}associated_devices_t;161AssociatedDevListNWK_MAX_DEVICES2neighborTableMAX_NEIGHBOR_ENTRIES3rtgTableMAX_RTG_ENTRIES4rtDiscTableMAX_RREQ_ENTRIES5bcastTableMAX_BCAST6BindingTableNWK_MAX_BINDING_ENTRIES7SampleApp_Group1tasksArr2tasksEvents2*3macRadioDefsTxPowerTable4zgItemTablestaticuint8zgItemInit(uint16id,uint16len,void*buf,uint8setDefault)//1ZDOzdpMsgProcsoidZDP_IncomingData(afIncomingMSGPacket_t*pData)//2MTmtzdoConvTable3MACzmacCBEventTable4MACzmacCBSizeTablevoidMAC_CbackEvent(macCbackEvent_t*pData)//1PANNwkDescList2epListvoidafInit(void)//Status_tafRegister(endPointDesc_t*epDesc)//1halTimerSettings_thalTimerRecord2halTimerChannel_thalTimerChannelHalTimerStartHalTimerStop17ZigBee5.1ZigBee5.25.2.1AssociatedDevListAssociatedDevList1235.2.2NWK_addr_reqIEEE_addr_reqNWK_addr_reqIEEE_addr_reqZDP_ADDR_REQTYPE_EXTENDEDNode_Desc_reqNLME_GetCoordShortAddrNLME_GetCoordExtAddrZDP_NwkAddrReq5.3AssociatedDevListZigBeeIEEEAssociatedDevListAssociatedDevListge5.4()185.5(PANID)?PanIDFlashFlashRAMPanIDRFCOORDRoutertypedefstruct{UINT16shortAddr;//uint16addrIdx;//bytenodeRelation;//bytedevStatus;//bitmapofvariousstatusvaluesbyteassocCnt;//IEEE1linkInfo_tlinkInfo;}associated_devices_t;devStatus#defineDEV_LINK_STATUS0x01//linkisin-active?#defineDEV_LINK_REPAIR0x02//linkrepairinprogress?#defineDEV_SEC_INIT_STATUS0x04//securityinit#defineDEV_SEC_AUTH_STATUS0x08//securityauthenticatednodeRelation//NodeRelations#definePARENT0//#defineCHILD_RFD1//#defineCHILD_RFD_RX_IDLE2//RF#defineCHILD_FFD3//#defineCHILD_FFD_RX_IDLE4//RF#defineNEIGHBOR5//#defineOTHER6//#defineNOTUSED0xFF//typedefstruct{uint8txCost;//counteroftransmissionsuccess/failuresuint8rxCost;//averageofreceivedrssivaluesrssiuint8inKeySeqNum;//securitykeysequencenumber19uint32inFrmCntr;//securityframecounter..}linkInfo_t;6.16.1.1A16ZDApp_event_loopIDZDO_NETWORK_INITBBNLME_NetworkFormationRequestlibvoidZDO_NetworkFormationConfirmCB(ZStatus_tStatus)voidnwk_Status(uint16statusCode,uint16statusValue)nwk_StatusZDO_NetworkFormationConfirmCBClibZDO_NetworkFormationConfirmCBZDApp_event_loopIDZDO_NETWORK_STARTDDZDApp_NetworkStartEvt16ZDApp_event_loopIDZDO_NETWORK_INITBZDApp_event_loopIDZDO_STATE_CHANGE_EVTEEZDO_UpdateNwkStatusSampleApp_ProcessEventZDO_STATE_CHANGEFFZDApp_event_loopIDSAMPLEAPP_SEND_PERIODIC_MSG_EVTGGZDApp_event_loopIDSAMPLEAPP_SEND_PERIODIC_MSG_EVTG1BC—D2ZDO_StartDeviceif(ret!=ZSuccess)osal_start_timerEx(ZDAppTaskID,ZDO_NETWORK_INIT,NWK_RETRY_DELAY);ret==ZSuccess6.1.2AZDApp_event_loopIDZDO_NWK_UPDATE_NVZDApp_SaveNetworkStateEvt6.2ZDApp_event_loopIDZDO_NWK_UPDATE_NVAssociatedDevList6.31.voidosal_start_system(void)ID2.20pollRate3.ZDO_S