How to obtain frame id and data in a TWAI EspTwaiFrame? #3059
-
Dear community, I am working with TWAI on an ESP32C6. I was able to read and print frames from a CAN bus (as shown in the snapshot). However, I don't see a way to obtain the Any insight is appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We should probably have some inherent methods on the frame itself, but you can get the ID and data from the embedded-can trait which it implements: https://docs.esp-rs.org/esp-hal/esp-hal/0.23.1/esp32c6/esp_hal/twai/struct.EspTwaiFrame.html#impl-Frame-for-EspTwaiFrame |
Beta Was this translation helpful? Give feedback.
We should probably have some inherent methods on the frame itself, but you can get the ID and data from the embedded-can trait which it implements: https://docs.esp-rs.org/esp-hal/esp-hal/0.23.1/esp32c6/esp_hal/twai/struct.EspTwaiFrame.html#impl-Frame-for-EspTwaiFrame