SocketCAN PCAN getting PCAN Timestamp

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
Ales1000
Posts: 19
Joined: Fri 4. Oct 2019, 09:01

SocketCAN PCAN getting PCAN Timestamp

Post by Ales1000 » Thu 20. Aug 2020, 14:43

Hello,

I would like to ask you, is it somehow possible to get the same Timestamp using SocketCAN API as from PCAN Basic API?

Thank you.

Ales

M.Heidemann
Sales & Support
Sales & Support
Posts: 486
Joined: Fri 20. Sep 2019, 13:31

Re: SocketCAN PCAN getting PCAN Timestamp

Post by M.Heidemann » Thu 20. Aug 2020, 16:08

Hello Ales,

Both SocketCAN and PCANBasic provide timestamping, although not the same mechanism is behind both APIs.

In short: Yes, both APIs will provide timestamps but they are handled
differently by both APIs.


Best Regards

Marvin

Ales1000
Posts: 19
Joined: Fri 4. Oct 2019, 09:01

Re: SocketCAN PCAN getting PCAN Timestamp

Post by Ales1000 » Fri 21. Aug 2020, 07:13

Hello Marvin,

thank you for information.

Can you tell me please, how to get Timestamp from SocketCAN API?

Thank you.

Ales

M.Heidemann
Sales & Support
Sales & Support
Posts: 486
Joined: Fri 20. Sep 2019, 13:31

Re: SocketCAN PCAN getting PCAN Timestamp

Post by M.Heidemann » Fri 21. Aug 2020, 08:30

Hello Ales,

You should take a look at the source for the can-util "candump" to see how timestamps are handled in SocketCAN.

https://github.com/linux-can/can-utils/ ... /candump.c

Beyond that you can ask the SocketCAN community for help regarding this. We do not maintain SocketCAN, we can only provide limited support for application related questions regarding SocketCAN.

Best Regards

Marvin

Ales1000
Posts: 19
Joined: Fri 4. Oct 2019, 09:01

Re: SocketCAN PCAN getting PCAN Timestamp

Post by Ales1000 » Fri 21. Aug 2020, 14:16

Thank you Marvin, this is exactly what I looked for.

Ales

Post Reply