NLME_IsAddressBroadcast()
在AF_DataRequest中
if ( ( dstAddr->addrMode == afAddr16Bit ) ||
( dstAddr->addrMode == afAddrBroadcast ) )
{
// Check for valid broadcast values
if( ADDR_NOT_BCAST != NLME_IsAddressBroadcast( dstAddr->addr.shortAddr ) )
{
// Force mode to broadcast
dstAddr->addrMode = afAddrBroadcast;//fhh0606
}
请问什么样的addr.shortAddr 会使NLME_IsAddressBroadcast返回值不等于ADDR_NOT_BCAST ?网络中某个router地址返回值是ADDR_NOT_BCAST 吗?
enum addr_filter_e {
ADDR_NOT_BCAST, // not a broadcast address
ADDR_BCAST_NOT_ME, // broadcast address but not for me based on capabilities
ADDR_BCAST_FOR_ME // broadcast for me based on capabilities
};
返回ADDR_NOT-BCAST的是如下地址
enum bcast_addr_e {
NWK_BROADCAST_SHORTADDR_RESRVD_F8 = 0xFFF8,
NWK_BROADCAST_SHORTADDR_RESRVD_F9,
NWK_BROADCAST_SHORTADDR_RESRVD_FA,
NWK_BROADCAST_SHORTADDR_RESRVD_FB,
NWK_BROADCAST_SHORTADDR_DEVZCZR, // 0xFFFC: Routers and Coordinators
NWK_BROADCAST_SHORTADDR_DEVRXON, // 0xFFFD: Everyone with RxOnWhenIdle == TRUE
// 0xFFFE: Reserved (legacy: used for 'invalid address')
NWK_BROADCAST_SHORTADDR_DEVALL = 0xFFFF
};
非常感谢