协调器关联表中的关联设备地址怎么全是0xffff
时间:10-02
整理:3721RD
点击:
用串口将协调器的AssociatedDevList[x].nodeRelation与AssociatedDevList[x].shortAddr全都打印出来,怎么前者全都是FF 后者全都是0xFFFF
static void CheckAddr(void) {
for (uint8 x=0;x<NWK_MAX_DEVICES;x++) {
byte nr = AssociatedDevList[x].nodeRelation;
if (nr == CHILD_RFD) {
//终端节点地址,数量可在此统计
//AssociatedDevList[x].shortAddr
}}}
typedef struct
{
uint16 shortAddr; // Short address of associated device
uint16 addrIdx; // Index from the address manager
byte nodeRelation;
byte devStatus; // bitmap of various status values
byte assocCnt;
byte age;
linkInfo_t linkInfo;
aging_end_device_t endDev;
uint32 timeoutCounter;
bool keepaliveRcv;
} associated_devices_t;