ZigBee Neighbor Table 邻居表

以下内容摘自ZigBee 2015 Pro文档《docs-05-3474-21-0csg-zigbee-specification》
3.6.1.5 Neighbor Tables
The neighbor table of a device shall contain information on every device within transmission range, up to some implementation-dependent limit.

The neighbor table is useful in two contexts. First of all, it is used during network discovery or rejoining to store information about routers within RF reception range that may be candidate parents. Second, after the device has joined a network, it is used to store relationship and link-state information about neighboring devices in that network. A table entry shall be updated every time a device receives any frame from the corresponding neighbor.

The outgoing cost field contains the cost of the link as measured by the neighbor. The value is obtained from the most recent link status command frame received from the neighbor. A value of 0 indicates that no link status command listing this device has been received.

The age field indicates the number of nwkLinkStatusPeriod intervals that have passed since the last link status command frame was received, up to a maximum value of nwkRouterAgeLimit. Mandatory and optional data that are used in normal network operation are listed in Table 3.53.

大意:

邻居表应该包含每一个在传输内的节点信息。

它有两个用处:

  1. 它用于网络发现或重新连接时,存储可能是候选父节点的RF接收范围内路由器的信息;

  2. 设备加入网络后,用于存储该网络中相邻设备的关系和链路状态信息;每次收到任何信息时都应该更新对应的邻居表条目。

输出损耗域包含了由邻居测量的链路成本;这个值是从邻居最新发送的Link Status帧获得,0表示没有收到该设备的Link Status帧。

老化域表示连续多少次没有收到某个设备的Link Status了,时间单位是nwkLinkStatusPeriod,上限为nwkRouterAgeLimit(额外信息:一般来说nwkLinkStatusPeriod为15秒,nwkRouterAgeLimit为3,当nwkRouterAgeLimit大于3时就将设备移出邻居表)。

以下内容摘自NXP ZigBee 3.0 Stack User Guide文档《JN-UG-3113》

B.5.1 Neighbour Table

The Neighbour table on a routing node (Router or Co-ordinator) holds information about the node’s immediate neighbours:
 The first entry in the table contains information about the node’s parent
 Part of the table holds information about child nodes which have joined the network through the local device
 The rest of the table holds information about nodes which are neither children nor the parent (these ‘other’ nodes are only relevant to Mesh networks)

译:
路由节点(路由器或协调器)上的邻接表保存有关该节点的近邻的信息:

  1. 第一个条目保存的是本节点的父节点信息;

  2. 表的一部分保存了通过本节点入网的子节点信息;

  3. 剩下的部分保存了非本节点的子节点或父节点的节点信息(这些节点只是网状网络的其他相关节点);

在Z-Stack中ZigBee规范中的邻居表被分为了以下两个表:

  1. 邻居表
// Neighbor table entry
typedef struct
{
  uint16  neighborAddress;
  uint8   neighborExtAddr[Z_EXTADDR_LEN];
  uint16  panId;
  uint8   age;          // number of nwkLinkStatusPeriod since last link status
  linkInfo_t linkInfo;
} neighborEntry_t;

 // Table of neighboring nodes (not including child nodes)
neighborEntry_t neighborTable[MAX_NEIGHBOR_ENTRIES];

#if !defined ( MAX_NEIGHBOR_ENTRIES )
  #if ( ZG_BUILD_RTR_TYPE )
    #define MAX_NEIGHBOR_ENTRIES    16
  #else
    #define MAX_NEIGHBOR_ENTRIES    4
  #endif
#endif
  1. 关联表
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;

typedef struct
{
  uint8 endDevCfg;
  uint32 deviceTimeout;
} aging_end_device_t;

// Statically defined Associated Device List
associated_devices_t AssociatedDevList[NWK_MAX_DEVICES];

// Don't change this value to set the number of devices.  Change
//  NWK_MAX_DEVICE_LIST above
#define NWK_MAX_DEVICES   ( NWK_MAX_DEVICE_LIST + 1 )    // One extra space for parent

其中的linkInfo_t如下:

typedef struct
{
  uint8  txCounter;    // Counter of transmission success/failures
  uint8  txCost;       // Average of sending rssi values if link staus is enabled
                       // i.e. NWK_LINK_STATUS_PERIOD is defined as non zero
  uint8  rxLqi;        // average of received rssi values
                       // needs to be converted to link cost (1-7) before used
  uint8  inKeySeqNum;  // security key sequence number
  uint32 inFrmCntr;    // security frame counter..
  uint16 txFailure;    // higher values indicate more failures
} linkInfo_t;

其中关联表包含了本节点的全部子节点(EndDevice & Router),EndDevice子节点超时(在设定时间内无通信)后将EndDevice移出关联表,超时间范围如下表:

Table 3.44 Requested Timeout Enumerated Values

Requested Timeout Enumeration ValueActual Timeout Value
010 seconds
12 minutes
24 minutes
38 minutes
416 minutes
532 minutes
664 minutes
7128 minutes
8256 minutes
9512 minutes
101024 minutes
112048 minutes
124096 minutes
138192 minutes
1416384 minutes

时间范围在10秒到16384 分钟(大约11天)之间。

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值