Greetings,
After using the gr-limesdr C++ API for a while, I noticed some things which could be improved a little, and hopefully other users of the C++ API might find these suggestions useful.
-
The stream analyzer is controlled by a variable which is only set at compile time. To enable it, one needs to change the code and recompile gr-limesdr. It is suggested this could be made an option for sink / source object initialization, for easier stream debugging.
-
Time tags are sent by the source at the start of the stream, and after any reconfiguration, as well as when dropped packets are detected. It is suggested to create a configurable option to enable sending RX_TIME tags for each sample packet received. This allows for easier time keeping, without having to count potentially billions of samples with the resulting integer precision / overflow problems. Also, there seems to be a bug in GNU radio 3.8 where the time tag at offset zero in the stream is not propagated, this works around it.
-
The device initialization and release code is peppered with exit(0) calls. It is suggested to replace these calls with throwing runtime exceptions, as other GNU radio sink / source packages use ( eg. throw std::runtime_error). This allows for more graceful handling of device initialization errors downstream from these blocks.
Let me know what are your opinions regarding these proposals.