Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Associate a timestamp to pulled packages #6

Merged
merged 7 commits into from
Jun 17, 2021
Merged

Associate a timestamp to pulled packages #6

merged 7 commits into from
Jun 17, 2021

Conversation

tmplt
Copy link
Member

@tmplt tmplt commented Mar 8, 2021

This PR adds Decoder::pull_with_timestamp that associate a timestamp structure to a set of data packets. Local timestamps will monotonically increase a delta timestamp counter. Global timestamps will update a base timestamp, and reset the delta to zero, when pulled from the bitstream.

@tmplt
Copy link
Member Author

tmplt commented Mar 8, 2021

The following must be done before merge:

  • write unit tests;
  • consider supporting bitstreams that only include global timestamps (the delta counter shall be Option<usize>;
  • review the notes in Appendix D4-784.

@tmplt
Copy link
Member Author

tmplt commented Mar 8, 2021

CC @Yatekii. Thoughts on the the added API and documentation?

@tmplt tmplt marked this pull request as ready for review March 10, 2021 00:39
@tmplt
Copy link
Member Author

tmplt commented Mar 10, 2021

Closes #5.

@tmplt
Copy link
Member Author

tmplt commented Mar 16, 2021

https://crates.io/crates/embedded-time should be investigated to see if the API can be improved. Can we abstract the base and delta to an embedded_time::Instant?

@tmplt tmplt merged commit 37f887f into master Jun 17, 2021
@tmplt tmplt deleted the assoc-timestamp branch June 17, 2021 13:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant