openthread

OpenThread API: How to get child table using OpenThread API?


I have the OpenThread CLI application and I would like to create UDP datagram with the payload consisted of child table information.

So my question is: how to get child table info and which API should I use? I have done some research, and I consider to play with otThreadGetChildInfoByIndex() placed in for/while loop. Does it make sense??

Best regards!


Solution

  • Yes, otThreadGetChildInfoByIndex() is what you are looking for.

    You can find an example in OpenThread's CLI implementation.