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.

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

posted on 2016-02-21 11:46  farbeyond  阅读(820)  评论(0编辑  收藏  举报