Re: [Hamlib-developer] target VFO proposal
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Frank S. <vk...@ix...> - 2000-11-28 01:13:04
|
Stephane Fillod wrote: > > On Sat, Nov 25, 2000, Frank Singleton wrote: > > > > Looking at the latest API in rig.h, > > I have come to the conclusion we are missing > > something of great importance. > > > > We have not provided a target VFO in the set/get cmd's > > > arg, you're darn right! <snip> > > int rig_set_mode(RIG *rig, rmode_t mode, vfo_t vfo); /* select mode */ > > int rig_get_mode(RIG *rig, rmode_t *mode,vfo_t vfo); /* get mode */ > > > I would prefer like this (which is the same of course): > int rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode); /* select mode */ > > maybe we can extend vfo_e with defines like RIG_VFO_CURR,etc. > and add some macros: > > #define rig_set_mode_c(rig,more) rig_set_mode((rig),RIG_VFO_CURR,(mode)) yes or ... see below <snip> > In that case, we would need also to implement option (1), just > to reduce some set_vfo/get_vfo calls. > > I'm not sure if we have a good solution yet, but at least we have > a good question to chew!! crunch crunch !! > > any ideas? comments? Hmm, how does ths look?? int rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode); /* select mode */ int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode); /* get mode */ int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq); int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); I think it is a good thing for the application to always be VERY specific in what is wants done, and I have no problems with this. Perhaps we can define define some NullVFO or CurrentVFO etc that could indicate that the backend should use the active VFO (and mode ?) if the App choses to pass args like.. rig_set_freq(rig, CurrentVFO, freq_t freq); /* set freq */ rig_get_freq(rig, CurrentVFO, freq_t *freq); /* set freq */ etc.. Comments ?? / Frank.. ps: I want to fix this before our first release unless you have other reasons :-) |