Esp32 with espidf can comunication

Hello,
We are trying to develop the cansimple with an esp32 and twai on esp-idf.
We are able to make a communication between two esp with canbus and its own twai.

What we not understand is how to create a can message to get a data or to send a command. So, as example:

  • make a can message to read bus voltage
  • make a can message to set motor torque

Has anyone find the same issue or can help us to solve it?
Thanks!