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

212 Views Asked by At

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!

2

There are 2 best solutions below

0
On BEST ANSWER

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

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

0
On

There is a link to OpenThread Github issue opened by me: https://github.com/openthread/openthread/issues/5259

We discuss there an idea of get_child_table() function implementation.