|
Q: |
如何更快的学习zigbee 程序?
|
|
A: |
① 了解zigbee的基础知识,包括什么是zigbee; 什么是协调器,什么是路由器等基本概念; ② 在我们的开发套件中,先下载一个点对点的简单无线例程,体验下无线数据传输。同时了解无线数据传输是怎么回事? ③ 演示,按照说明书把这个例程全部操作一次;体验zigbee的功能; ④ 了解重要的应用函数在文件SampleAppslave.c / SampleAppMaster.c中:? SampleApp_ProcessEvent 重要函数(应用任务处理) ? SampleApp_MessageMSGCB 接收函数? UINT8 SendData(UINT8 *buf, UINT16 addr, UINT8 Leng) RF数据发送函数? 获取物理地址 extern byte *NLME_GetExtAddr( void ); ? 获取网络地址 extern uint16 NLME_GetShortAddr( void ); ? 获取父节点网络地址 uint16 NLME_GetCoordShortAddr( void ) ? 获取父节点物理地址 void NLME_GetCoordExtAddr( byte * ); 发送函数: senddata ⑤ 了解重要的变量? 获取RF接收数据参数指针 MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive( SampleApp_TaskID ); typedef struct { osal_event_hdr_t hdr; uint16 groupId; uint16 clusterId; afAddrType_t srcAddr; //来源地址 byte endPoint; byte wasBroadcast; byte LinkQuality; //RSSI 信号强度 byte SecurityUse; uint32 timestamp; afMSGCommandFormat_t cmd; //接收数据; 接收长度;发送序列包 } afIncomingMSGPacket_t; 这是个结构体,接收数据
|
|
|