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.

CC2530: How is the RTG table refreshed when it is full in Z-stack 3.0.2?

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK

In function RTG_GetRtgEntry in rtg.c of Z-stack 3.0.2, I see this description

  // if looking for vacant entry and did not find one....also look at
  // entries with expirytime == 0

But the code is like this [redacted]

In this processing, why is "(rtgTable[i].expiryTime != 0)" ?   "(rtgTable[i].expiryTime != 0)"  means this record is valid, don't delete it.

  • Hi Aries,

    As you have provided source code on the public forum, I have modified your original post.  Please forgive the imposition.

    I believe you are correct in your analysis.  As TI is no longer investing in this Z-Stack solution, feel free to change as seen fit but be aware that further support cannot be given by TI if any erroneous behavior comes from such modification.

    Regards,
    Ryan

  • I wonder how dose Z-stack in Simplelink for CC2652 process this function? Is it "(rtgTable[i].expiryTime != 0)" or "(rtgTable[i].expiryTime == 0)"?

  • F2 SDK v7.40 is the same as Z-Stack 3.0.2, so I've asked the Zigbee Development Team to address this.

    Regards,
    Ryan

  • Hi Aries, the logic is correct for both Z-Stack 3.0.2 and the F2 SDK.  The if statement that comes afterward is outside of the for loop itself.  The for loop will exit on the first entry it finds for which rtgTable[i].expiryTime != 0.  Then if the entry value is still less than gMAX_RTG_ENTRIES it will remove the expired routing entry.  Thus no further action is necessary.

    Regards,
    Ryan