Re: [Hamlib-developer] Tuner frontend functions
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Stephane F. <f8...@fr...> - 2003-03-27 23:43:55
|
On Mon, Mar 24, 2003, Nate Bargmann wrote: > In looking at the docs and the code for rig_set_func and its companion > rig_get_func, there is some minor confusion. In both function > declarations, func is a type setting_t, which is a long long int, and > status is an int. So far, so good. While the rig_set_func docs talk > about using status to pass a 1 or 0 (activate, de-activate the > function), the rig_get_func talks about setting bits and the inference > is that status is a bit map analog of setting_t, which currently isn't > possible. absolutely right. This is fixed now, commit should follow. Let me know if there're other flaws or mistakes. > However, this does raise an interesting thought. If status were also > type setting_t, then multiple functions could be set in one call to > rig_set_func. For example, if func is set to RIG_FUNC_TUNER, then > checking bit 30 of status would reveal the requested action. Likewise, > the application could send an or'ed func value consisting of > RIG_FUNC_TUNER|RIG_FUNC_NB and the backend would need to test status > bits 30 and 1 for the resulting rig command. yes, that would be cool, but being too smart add complexity. It's better to keep the KISS approach. > Conversely, rig_get_func could return multiple bit values in status. > The Yaesu rigs, at least, return a number of flag bytes with one > command. It seems to me that the computer running Hamlib can sort > through multiple flags and assemble a bitmap much faster than repeated > polls through the library to the rig. This increases efficiency. In that case, I would recommand the use of rig_get_channel, with an optimized backend. > The downside of this idea is that only ON/OFF values may be reported. > How would we report multiple AGC values, for instance? rig_get_channel and levels. BTW Nate, your idea of allowing vfo target in rigctl is very good for testing purpose. I took the liberty of extending it to other commands. Just pass "-o" to rigctl when you want to specify the VFO. VFO_CURR will apply otherwise. I've also allocated 'Z' and 'z' to set_xit/get_xit. Cheers, Stephane |