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

Flag to encode system timestamp in Beast output #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xander-hirsch
Copy link

The --beast-sys-time flag allows a user to specify that Beast output messages should include the system timestamp (in milliseconds since the epoch) instead of an input device-specific timestamp. Providing this flag does not change the timestamp printed with each decoded message such as the example in issue #163.

@mutability
Copy link

What's the expected use of this new format?

Have you considered using the Radarcape-style timestamp format (which represents nanoseconds since UTC midnight) rather than introducing a third format?

I think this would need to be controlled by a negotiated option to avoid confusing existing software.

Beast clients can request for the message timestamps to be provided by
the system clock as milliseconds since the epoch. This option is
toggled by 't/T'. This option is client specific and off by default.
@xander-hirsch xander-hirsch reopened this Feb 4, 2023
@xander-hirsch
Copy link
Author

I've revised this pull request to incorporate your suggestion of a Beast client negotiated option, enabled by "<esc>1T".

My motivation to provide system timestamps is to enable a much simpler record/replay solution. For example, a user can run $ printf '\x1a\x31\x54' | nc localhost 30005 > capture.bin to record messages for a particular duration and replay them with timing information.

I considered the Radarcape-style timestamp format; however, the date information is needed for the aforementioned use case.

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

Successfully merging this pull request may close these issues.

None yet

2 participants