Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canplayer -g gap option seems not working. #474

Open
kaizh102 opened this issue Nov 29, 2023 · 6 comments
Open

canplayer -g gap option seems not working. #474

kaizh102 opened this issue Nov 29, 2023 · 6 comments

Comments

@kaizh102
Copy link

kaizh102 commented Nov 29, 2023

OS: Linux Ubuntu 22.04
Hardware: Peak CAN USB
canplayer version 2020.11.0-1
command:
canplayer -I candump-2023-11-29_102133.log -g 100;

Monitored output with a vector VN16xx CANoe, gap of 100ms is not followed. The gap varies between 0.22 ~ 0.23 ms, with a suden increase to 98.19ms in one of the frames:
image

@kaizh102
Copy link
Author

kaizh102 commented Nov 29, 2023

removing the "-g 100" opiton from the command, canplayer follows the timestamp from the log.

@hartkopp
Copy link
Member

This might be correct.
Can you post the section of the log file that led to this output?

@kaizh102
Copy link
Author

kaizh102 commented Nov 30, 2023

This might be correct. Can you post the section of the log file that led to this output?

here you go:

$ cat candump-2023-11-29_102133.log
(0000052894.459000) can0 0F1##5BD004000170000A000000000A00000000000000A000800000000000000000000
(0000052894.469000) can0 0F1##5F10140005B0100FD01000000A000000000000046010800000000000000000000
(0000052894.479000) can0 0F1##5250240008F02001A02000000A000000000000092020800000000000000000000
(0000052894.489000) can0 0F1##569034000C303004703000000A0000000000000DE030800000000000000000000
(0000052894.499000) can0 0F1##5900440003A0400C904000000A000000000000027040800000000000000000000
(0000052894.509000) can0 0F1##5DC0540007605009405000000A00000000000006B050800000000000000000000
(0000052894.519000) can0 0F1##508064000A206007306000000A0000000000000BF060800000000000000000000
(0000052894.529000) can0 0F1##544074000EE07002E07000000A0000000000000F3070800000000000000000000
(0000052894.539000) can0 0F1##5E70840004D08007208000000A000000000000050080800000000000000000000
(0000052894.549000) can0 0F1##5AB0940000109002F09000000A00000000000001C090800000000000000000000
(0000052894.559000) can0 0F1##57F0A4000D50A00C80A000000A0000000000000C80A0800000000000000000000
(0000052894.569000) can0 0F1##5330B4000990B00950B000000A0000000000000840B0800000000000000000000
(0000052894.579000) can0 0F1##5CA0C4000600C001B0C000000A00000000000007D0C0800000000000000000000
(0000052894.589000) can0 0F1##5860D40002C0D00460D000000A0000000000000310D0800000000000000000000
(0000052894.599000) can0 0F1##5520E4000F80E00A10E000000A0000000000000E50E0800000000000000000000

@kaizh102
Copy link
Author

kaizh102 commented Nov 30, 2023

It was recorded via candump, and I slightly aligned the timestamp (the millisecond portion) mannually.

@hartkopp
Copy link
Member

Thanks! I can confirm the behavior and will take a closer look at it.
Actually I have to remember myself why I made the gap value configurable o_O
IIRC I was calculating with the expectation that we can roughly send a CAN frame on a CAN bus every millisecond - and then sending all the frames that fit into that slot. But I have to recheck.

@kaizh102
Copy link
Author

kaizh102 commented Dec 1, 2023

Thanks! I can confirm the behavior and will take a closer look at it. Actually I have to remember myself why I made the gap value configurable o_O IIRC I was calculating with the expectation that we can roughly send a CAN frame on a CAN bus every millisecond - and then sending all the frames that fit into that slot. But I have to recheck.

thanks! take your time.
Actully the configurable gap could be very helpful - on the vehicle application, the messages are mostly cyclic, with typical period of 10ms, 20ms, 50ms, 100ms, 200ms, 1000ms; 1ms period is pretty rare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants