#ifndef NONWK<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
//如果禁止了NWK,APS,ZDO函数功能,则需要单独初始化AF层
// Since the AF isn't a task, call it's initialization routine
afInit();
//【AF.c】
void afInit( void )
{
//开始时没有设置ENDPOINT,对于AF的初始化就是初始化ENDPOINT
epList = NULL;
// epList_t *epList;
typedef enum
{
eEP_AllowMatch = 1,
eEP_NotUsed
} eEP_Flags;
typedef struct
{
endPointDesc_t *epDesc;
eEP_Flags flags;
pDescCB pfnDescCB; // Don't use if this function pointer is NULL.
void *nextDesc;
} epList_t;
//endpoint设备描述,每一个在表中的endpoint都需要有一个进入点【AF.h】
typedef struct
{
byte endPoint;
byte *task_id; // Pointer to location of the Application task ID.
SimpleDescriptionFormat_t *simpleDesc;
afNetworkLatencyReq_t latencyReq;
} endPointDesc_t;
//简单描述数据结构
typedef struct
{
byte EndPoint;
uint16 AppProfId;
uint16 AppDeviceId;
byte AppDevVer:4;
byte Reserved:4; // AF_V1_SUPPORT uses for AppFlags:4.
byte AppNumInClusters;
cId_t *pAppInClusterList;
byte AppNumOutClusters;
cId_t *pAppOutClusterList;
} SimpleDescriptionFormat_t;
typedef enum
{
noLatencyReqs,
fastBeacons,
slowBeacons
} afNetworkLatencyReq_t;
}
#endif
文章评论(0条评论)
登录后参与讨论