Quantcast
Channel: Zigbee 和 Thread
Viewing all articles
Browse latest Browse all 16962

帖子: RE: 终端通过AF_DataRequest发送数据

$
0
0

我想问的是调用AF_DataRequest()来发送数据,

 AF_DataRequest( &GenericApp_DstAddr, &GenericApp_epDesc,
                       GENERICAPP_CLUSTERID,
                       (byte)osal_strlen( theMessageData ) + 1,
                       (byte *)&theMessageData,
                       &GenericApp_TransID,
                       AF_DISCV_ROUTE, AF_DEFAULT_RADIUS ) == afStatus_SUCCESS

返回状态为afStatus_SUCCESS代表的是什么意思?只是代表通过天线发送出去了吗?还是发送出去了并且对方也接收到了?

一直很疑惑。

还有就是如果通过系统事件AF_DATA_CONFIRM_CMD:来判断消息是否发送成功这些参数是干啥用的(   afDataConfirm = (afDataConfirm_t *)MSGpkt;
          sentEP = afDataConfirm->endpoint;
          sentStatus = afDataConfirm->hdr.status;
          sentTransID = afDataConfirm->transID;
          (void)sentEP;
          (void)sentTransID;   )

如果不成功我怎么把不成功的这条数据重新发送出去,在下面的if里面我应该添加些什么

           // Action taken when confirmation is received.
          if ( sentStatus != ZSuccess )
          {
            // The data wasn't delivered -- Do something
          }


Viewing all articles
Browse latest Browse all 16962

Trending Articles