This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

指定网络地址单播与指定IEEE地址单播有什么区别?

尊敬的TI工程师,你们好!

          平时都是网络地址单播,所以想尝试一下IEEE地址单播,结果在配置

          SampleApp_Broadcast_DstAddr.addr.extAddr = {0x00,0x12,0x4B,0x00,0x08,0xE8,0x5B,0x70};

         时出现错误,Error[Pe137]: expression must be a modifiable lvalue ,意思好像说必须扩展地址必须是一个变量

        那么,我有两个问题向大家请教:

       ①指定网络地址单播与指定IEEE地址单播有什么区别?哪个寻址的时间更短一些?

       ②扩展地址点播该如何初始化配置?

                                                                                                                               谢谢工程师们的解答!

  • 网络地址2个字节和MAC地址8个字节。通常节点入网前会使用MAC地址,入网后分配了网络地址则会使用网络地址在整个网络中寻址。

    你把SampleApp_Broadcast_DstAddr变量的类型贴出来

  • #define Z_EXTADDR_LEN   8
    
    typedef byte ZLongAddr_t[Z_EXTADDR_LEN];
    
    typedef enum
    {
      afAddrNotPresent = AddrNotPresent,
      afAddr16Bit      = Addr16Bit,
      afAddr64Bit      = Addr64Bit,
      afAddrGroup      = AddrGroup,
      afAddrBroadcast  = AddrBroadcast
    } afAddrMode_t;
    
    typedef struct
    {
      union
      {
        uint16      shortAddr;
        ZLongAddr_t extAddr;
      } addr;
      afAddrMode_t addrMode;
      uint8 endPoint;
      uint16 panId;  // used for the INTER_PAN feature
    } afAddrType_t;
    
    我的代码:
    afAddrType_t SampleApp_Broadcast_DstAddr;
    
    SampleApp_Broadcast_DstAddr.addrMode     =  afAddrMode_t)afAddr64Bit;
    SampleApp_Broadcast_DstAddr.endPoint       =  SAMPLEAPP_ENDPOINT;
    SampleApp_Broadcast_DstAddr.addr.extAddr = {0x00,0x12,0x4B,0x00,0x08,0xE8,0x5B,0x70};
  • osal_cpyExtAddr( devAddr.addr.extAddr, ptr );

    用上面的而方法拷贝下地址