最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 正文

ZigBee重要结构及表解释

来源:动视网 责编:小OO 时间:2025-10-03 00:30:37
文档

ZigBee重要结构及表解释

各表中的元素结构:1、组表的元素结构aps_Group_t;typedefstruct{uint16ID;//组IDuint8name[APS_GROUP_NAME_LEN];//组名称}aps_Group_t;2、组列表的元素结构typedefstructapsGroupItem{structapsGroupItem*next;//指向下一个组表条目uint8endpoint;//此终端接收发送给组的信息aps_Group_tgroup;//组ID和组名}apsGroupItem_t;3、路
推荐度:
导读各表中的元素结构:1、组表的元素结构aps_Group_t;typedefstruct{uint16ID;//组IDuint8name[APS_GROUP_NAME_LEN];//组名称}aps_Group_t;2、组列表的元素结构typedefstructapsGroupItem{structapsGroupItem*next;//指向下一个组表条目uint8endpoint;//此终端接收发送给组的信息aps_Group_tgroup;//组ID和组名}apsGroupItem_t;3、路
各表中的元素结构:

1、组表的元素结构aps_Group_t;

typedef struct

{

uint16ID;//组ID

uint8name[APS_GROUP_NAME_LEN];//组名称

}aps_Group_t;

2、组列表的元素结构

typedef struct apsGroupItem

{

struct apsGroupItem*next;//指向下一个组表条目

uint8endpoint;//此终端接收发送给组的信息

aps_Group_t group;//组ID和组名

}apsGroupItem_t;

3、路由表的元素结构rtgEntry_t;

typedef struct

{

uint16dstAddress;//目标地址

uint16nextHopAddress;//单跳地址

byte expiryTime;//有效时间

byte status;//状态

}rtgEntry_t;

4、绑定表的元素结构BindingEntry_t;

typedef struct

{

uint8srcEP;//没有源地址自从源地址一直是本地设备uint8dstGroupMode;//目标地址类型;0–正常地址,1–组地址

uint16dstIdx;//在两种模式中(组或非组)保存到NV和RAM

//dstGroupMode=0-Address Manager index//dstGroupMode=1–组地址

uint8dstEP;//目标地址

uint8numClusterIds;//簇个数

uint16clusterIdList[MAX_BINDING_CLUSTER_IDS];

//Don't use MAX_BINDING_CLUSTERS_ID when

//using the clusterIdList field.Use

//gMAX_BINDING_CLUSTER_IDS

}BindingEntry_t;

5、相邻表的元素结构neighborEntry_t;

typedef struct

{

uint16neighborAddress;//相邻地址

uint16panId;//所属的PAN网络ID

linkInfo_t linkInfo;//连接信息(包括发送/接收和安全帧计数)}neighborEntry_t;

6、路由发现表的元素结构rtDiscEntry_t;

typedef struct

{

byte rreqId;//接收请求ID

uint16srcAddress;//源地址

uint16previousNode;//上次模式

byte forwardCost;//发送成本

byte residualCost;//剩余成本

byte expiryTime;//有效时间

}rtDiscEntry_t;

7、广播表的元素结构bcastEntry_t;

typedef struct

{

uint16srcAddr;//源地址uint8bdt;//广播传递时间

uint8pat;//被动应答超时

uint8mbr;//最大广播重试次数

uint8handle;

//计数非睡眠邻居和路由器子节点.

uint8ackCnt;//应答次数

uint8id;//广播ID

}bcastEntry_t;

8、回调表的元素结构MTZDO_ConversionItem_t;

typedef struct

{

uint16clusterID;//请求命令

uint32subCBID;//回调回应参数

uint16mtID;//SPI消息ID pfnMtZdoRspProc pFn;//回调函数

}MTZDO_ConversionItem_t;

9、电源功率表

macRadioDefsTxPowerTable

10、全局常量表元素结构(即NV区中的项)zgItem_t;

typedef struct zgItem

{

uint16id;//项目类型

uint16len;//占用空间

void*buf;//要写入的数据

}zgItem_t;

11、任务表元素结构*pTaskEventHandlerFn;

(unsigned char task_id,unsigned short event);

12、mac回调函数事件表zmacCBEventTable;

13、数据结构大小查找表zmacCBSizeTable;必须以mac回调事件顺序相匹配;

14、ZDP处理请求消息表的元素结构zdpMsgProcItem_t;

typedef struct

{

uint16clusterID;//--簇ID(请求消息) pfnZDPMsgProcessor pFn;//要执行的函数

}zdpMsgProcItem_t;

15、PAN网络描述列表的元素结构networkDesc_t;

typedef struct

{

uint16panId;//PAN ID

byte logicalChannel;//逻辑信道

byte beaconOrder;//信标指令

byte superFrameOrder;//超级帧指令

byte routerCapacity;//路由能力

byte deviceCapacity;//设备能力

byte version;//版本

byte stackProfile;//profilestack

//byte securityLevel;

uint16chosenRouter;//所选择的路由器

uint8chosenRouterLinkQuality;//所选择路由器的链路质量

byte chosenRouterDepth;//所选择路由器的深度

uint8extendedPANID[Z_EXTADDR_LEN];//PAN ID的扩展地址void*nextDesc;//指向下一个的PAN

}networkDesc_t;

16、端点表元素结构endPointDesc_t;

typedef struct

{

byte endPoint;//终端号byte*task_id;//Pointer to location of the Application task ID.

//–指向本地应用任务,ID的一个指针SimpleDescriptionFormat_t*simpleDesc;//指向简单描述符afNetworkLatencyReq_t latencyReq;//这个字段必须为nolatencyreqs

}endPointDesc_t;

17、端点列表元素结构epList_t;

typedef struct

{

endPointDesc_t*epDesc;//指向终端描述符

eEP_Flags flags;

pDescCB pfnDescCB;//Don't use if this function pointer is NULL.

void*nextDesc;

}epList_t;

18、关联设备表元素结构associated_devices_t;

typedef struct

{

UINT16shortAddr;//关联设备短地址

uint16addrIdx;//地址管理器的索引标识

byte nodeRelation;

byte devStatus;//bitmap of various status values

byte assocCnt;

linkInfo_t linkInfo;

}associated_devices_t;

重要的表

网络表:

1、关联表AssociatedDevList最大条目数NWK_MAX_DEVICES

2、相邻表neighborTable最大条目数MAX_NEIGHBOR_ENTRIES

3、路由表rtgTable最大条目数MAX_RTG_ENTRIES

4、路由发现表rtDiscTable最大条目数MAX_RREQ_ENTRIES5、广播表bcastTable最大条目数MAX_BCAST

6、绑定表BindingTable最大条目数NWK_MAX_BINDING_ENTRIES

7、组表SampleApp_Group

系统表:

1、任务表tasksArr最大任务数

2、任务事件表tasksEvents2字节*任务数

3、电源功率表macRadioDefsTxPowerTable

4、全局常量表zgItemTable static uint8zgItemInit(uint16id,uint16len,void*buf,uint8setDefault)//初始化

回调表:

1、ZDO消息处理回调表zdpMsgProcs oid ZDP_IncomingData(afIncomingMSGPacket_t*pData)

//执行回调函数

2、MT消息处理回调表mtzdoConvTable

3、MAC事件回调表zmacCBEventTable

4、MAC事件回调大小表zmacCBSizeTable

void MAC_CbackEvent(macCbackEvent_t*pData)//回调事件处理

链表:

1、PAN网络描述符链表NwkDescList

2、端点链表epList void afInit(void)//初始化端点链表

Status_t afRegister(endPointDesc_t*epDesc)//端点注册

记录表:

1、定时器记录表halTimerSettings_t halTimerRecord。

2、定时器通道表halTimerChannel_t halTimerChannel。

HalTimerStart()开始硬件定时器HalTimerStop()停止硬件定时器

文档

ZigBee重要结构及表解释

各表中的元素结构:1、组表的元素结构aps_Group_t;typedefstruct{uint16ID;//组IDuint8name[APS_GROUP_NAME_LEN];//组名称}aps_Group_t;2、组列表的元素结构typedefstructapsGroupItem{structapsGroupItem*next;//指向下一个组表条目uint8endpoint;//此终端接收发送给组的信息aps_Group_tgroup;//组ID和组名}apsGroupItem_t;3、路
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top