AddrNotPresent 说明

本文详细解析了ZigBee通信协议中的AddrNotPresent地址模式,介绍了该模式下如何通过绑定表查找目标地址进行数据包发送,并探讨了其在实际应用场景中的使用情况。

AddrNotPresent 这个在发送数据时候需要指明,且看一个结构体

typedef struct

{

  union

  {

    uint16      shortAddr;

    ZLongAddr_t extAddr;

  } addr;

  afAddrMode_t addrMode;

  byte endPoint;

} afAddrType_t;

再看一个共用体

typedef enum

{

  afAddrNotPresent = AddrNotPresent,

  afAddr16Bit      = Addr16Bit,

  afAddr64Bit      = Addr64Bit,

  afAddrGroup      = AddrGroup,

  afAddrBroadcast  = AddrBroadcast

} afAddrMode_t;

The address mode parameter is necessary because, in ZigBee, packets can be unicast, multicast or broadcast.

    在这里,看到AddrNotPresent,;且看该模式发送特点。

      this is when the application is not aware of the final destination of the packet. The mode is set to

AddrNotPresent and the destination address is not specified. Instead,the destination is looked up from a

“binding table” that resides in the stack of the sending device.

When the packet is sent down to the stack, the destination address and end point is looked up from the binding table and used. The packet is then treated as a regular unicast packet.

    由此可见,该模式在绑定设备之间应该是用的很多的,尤其是在源设备中。比如一个按键设备要控制一个或是多个灯设备,那么这个在按键设备中应该用的不少。

转载于:https://www.cnblogs.com/farbeyond/p/5204658.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值