How do I automatically run ot commands in demo?

openthread can be started by  ”ot thread start ” command in the openthread cli. Now I want to start OpenThread automatically in the program. How can I find the code in the program corresponding to the ot command, Please tell me the API corresponding to ot ifconfig up, ot thread start, ot state and ot rloc16 respectively

Related