JuliaTelecom / UHDBindings.jl

Julia C bindings for UHD to monitor USRP devices.
MIT License
5 stars 3 forks source link

Documentation for full_sec_delay: timestamp or time delta? #12

Open dd0 opened 1 year ago

dd0 commented 1 year ago

Hi, me again :) I wanted to expand the documentation for functions in Rx.jl a bit to include the new check_errors option and explain the arguments to uhd_usrp_create_stream (and others that don't have docstrings). Before I do that, I wanted to check one thing:

The parameters full_sec_delay and frac_sec_delay make it seem like the command will be issued after full_sec_delay + frac_sec_delay, relative to when the function was called, but in practice (at least with a X300), they are used as a timestamp for when the streaming should start. It seems to me that this is just an unfortunate name choice inherited from the documentation for time_spec_t, which is not fully clear about the meaning, and that the function's docstring should state that it's the actual time.

(I don't think changing the argument name is worth the backwards compatibility headache, a note in the docstring sounds like it's enough)

I see that these are used with a constant delay when opening a radio in MIMO mode, but it doesn't matter there because the clock is reset immediately before. I just wanted to check first if this all sounds correct before making any changes to the docs -- I only used the SDR in a single-device configuration and don't know if there are any differences in the behaviour there.

RGerzaguet commented 1 year ago

Hello @dd0 Thank's for tacking this. Documentation can always be improved and this is specially the case when exposing internals of UHD. You are totally correct, I have mirrored the name of the internal variables of UHD. The full delay is expressed as second (int)while the fractional part is indeed a fractional part (between 0 and 1) (as a double). You are right regarding the MIMO part. I have put a delay to be sure all boards are ready to process syncronously and I will not break the things up :)