协议栈:Z-Stack 3.0.2
协调器:CC2538
终端:CC2530
问题描述:
1、我调用 AF_DataRequestSrcRtg() 函数,“RelayCnt”参数为 1,“RelayCnt”参数 “pRelayList” 参数为 “0xd5eb”,然后抓包看见发出去的包并没有使用“source route” 功能。
请问这是为什么?
2、请问 “AF_DataRequestSrcRtg()” 函数的 “RTG_AddSrcRtgEntry_Guaranteed()” 有什么作用?
afStatus_t AF_DataRequestSrcRtg( afAddrType_t *dstAddr, endPointDesc_t *srcEP,
uint16 cID, uint16 len, uint8 *buf, uint8 *transID,
uint8 options, uint8 radius, uint8 relayCnt, uint16* pRelayList )
{
uint8 status;
/* Add the source route to the source routing table */
status = RTG_AddSrcRtgEntry_Guaranteed( dstAddr->addr.shortAddr, relayCnt,
pRelayList );
if( status == RTG_SUCCESS)
{
/* Call AF_DataRequest to send the data */
status = AF_DataRequest( dstAddr, srcEP, cID, len, buf, transID, options, radius );
}
else if( status == RTG_INVALID_PATH )
{
/* The source route relay count is exceeding the network limit */
status = afStatus_INVALID_PARAMETER;
}
else
{
/* The guaranteed adding entry fails due to memory failure */
status = afStatus_MEM_FAIL;
}
return status;
}