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

Timestamps #4

Open
tejeez opened this issue Feb 20, 2020 · 0 comments
Open

Timestamps #4

tejeez opened this issue Feb 20, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@tejeez
Copy link
Contributor

tejeez commented Feb 20, 2020

For hardware which supports them, the buffer timestamps in readStream and writeStream are useful for a number of purposes:

  • Synchronization of RX and TX signals
  • Controlling the latency of TX signals
  • Absolute timing of RX signals on hardware with a PPS input
  • Detecting lost RX samples

How should we pass the timestamps between seeder and leecher? For RX, the shared buffer could contain the calculated timestamp of the latest sample. readStream would then use it to calculate the timestamp for the first sample in the returned buffer. Note that this might need locking in the state structure or an atomic way to update both the sample pointer and the latest timestamp at the same time.

For TX, what if we don't use a similar ring buffer but somehow pass the writeStream calls more directly together with a timestamp? It would still allow multiple leechers to transmit at different times. Simultaneous transmission from multiple leechers (with summation of signals) wouldn't work but doesn't work now either. Note that resampling might add some challenges for handling the timestamps.

How about hardware time functions? For example, on USRP, getHardwareTime("PPS") returns the timestamp of the sample during which the latest PPS pulse happened, so the value updates once a second. Should these calls also be passed to the seeder and return value back to the leecher?

@tejeez tejeez added the enhancement New feature or request label Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant