Re: [Hamlib-developer] API outstanding issues
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Frank S. <vk...@ix...> - 2000-11-30 04:44:08
|
Stephane Fillod wrote: <snip> > * I'm still not happy with the rig_set_mode/rig_get_mode. > Frank, what do you think of getting rid of set_passband/get_passband > in favor of the following? > > int rig_set_mode(RIG *rig, rmode_t mode, pbwidth_t width); > int rig_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width); <snip> hmmm, of course we need our VFO in there as well.. :-) > int rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); > int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); Some raw thoughts here.. maybe wishlists but anyway ... I see a VFO as "the" basic communication resource that can have particular "parameters" associated with it. ie: Normally to use the VFO for some communications purposes, then vfo,freq,mode and filter selections need to be made, as a minimum. So what about. int rig_set_vfo_params(RIG *rig, vfo_t vfo, rmode_t mode, fresp_t fresp) ?? int rig_get_vfo_params(RIG *rig, vfo_t vfo, rmode_t *mode, fresp_t *fresp) ?? Also, the pbwidth_t is a subset of a general freq response type struct freqresp { filter_path_t fpt; /* filter location */ filter_mode_t fmt; /* filter mode, eg: NORMAL,WIDE etc or CUSTOM */ /* CUSTOM must provide flower,fupper,fcenter etc */ /* depending on CUSTOM type */ }; typedef freqresp fresp_t; where filter path (location) is for example.. enum filter_path_e { RIG_FILT_RF = 0, RIG_FILT_IF, RIG_FILT_AF, RIG_FILT_RF_EXTERNAL, RIG_FILT_IF_EXTERNAL, RIG_FILT_AF_EXTERNAL, } typedef filter_path_e filter_path_t and.. filter_mode_t consists for example, enum filter_resp_e { RIG_FILTER_WIDE, /* ie: provided by rig buttons ? */ RIG_FILTER_NARROW, RIG_FILTER_BPASS, RIG_FILTER_BREJECT, RIG_FILTER_HPF, RIG_FILTER_LPF, RIG_FILTER_CUSTOM_BPF, /* custom options ?? */ RIG_FILTER_CUSTOM_BREJ, RIG_FILTER_CUSTOM_LPF, RIG_FILTER_CUSTOM_HPF, ..etc } typedef filter_resp_e filter_resp_t; So we can chose a filter with either the plain vanilla wide/narrow etc or if use CUSTOM, then provide flower, fupper, or fcenter and fbw etc.. struct filt_mode { filter_resp_t frt; freq_t flower; freq_t fupper; freq_t fcenter; freq_t fbw; /* bandwidth*/ etc.. } typedef filt_mode filt_mode_t; Any thoughts or comments. (I'm sure :-) ) I guess the main thing I try to say is filter type (inbuilt or custom) and filter location (RF,IF,AF,EXT). Cheers / Frank.. |