diff --git a/gnuradio/gr_priv.h b/gnuradio/gr_priv.h index c232e470a..4b16abdf9 100644 --- a/gnuradio/gr_priv.h +++ b/gnuradio/gr_priv.h @@ -1,8 +1,8 @@ /* * Hamlib GNUradio backend - gnuradio priv structure - * Copyright (c) 2001,2002 by Stephane Fillod + * Copyright (c) 2001-2003 by Stephane Fillod * - * $Id: gr_priv.h,v 1.2 2002-10-07 21:46:43 fillods Exp $ + * $Id: gr_priv.h,v 1.3 2003-02-09 22:54:15 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -23,32 +23,79 @@ #ifndef _GR_PRIV_H #define _GR_PRIV_H 1 -/* - * Simple backend of a chirp source. - */ - #include #include #include +#include +/* FM */ +#include +#include +#include +/* SSB */ +#include +#include + +#include #include #define IOTYPE short +union mod_data { + struct { + /* (W)FM demod */ + VrComplexFIRfilter *chan_filter_1; + VrQuadratureDemod *fm_demod_1; + VrRealFIRfilter *audio_filter_1; + + /* these levels, if not in RIG_LEVEL's already, + * are good candidates for rig_set_ext_level + */ + int CFIRdecimate; + int chanTaps; + float chanGain; + float FMdemodGain; + int RFIRdecimate; + int ifTaps; + float ifGain; /* LEVEL_RF? */ + } fm; + + struct { + /* SSB demod */ + GrHilbert *hilb; + GrSSBMod *shifter; + } ssb; +}; + +#define NUM_CHAN 2 /* VFO A and VFO B */ + struct gnuradio_priv_data { /* current vfo already in rig_state ? */ vfo_t curr_vfo; - vfo_t last_vfo; /* VFO A or VFO B, when in MEM mode */ value_t parms[RIG_SETTING_MAX]; - channel_t *curr; /* points to vfo_a, vfo_b or mem[] */ - channel_t vfo_a; + channel_t chans[NUM_CHAN]; - VrSigSource *source; - VrSink *sink; + /* tuner providing IF */ + rig_model_t tuner_model; + RIG *tuner; + shortfreq_t input_rate; + shortfreq_t IF_center_freq; + + VrSource *source; /*< IF source */ + VrFixOffset *offset_fixer; /*< some sources need it */ + VrSink *sink; /*< Audio sink */ VrMultiTask *m; + int need_fixer; /*< always need Offset fixer ? */ + + pthread_t process_thread; + pthread_mutex_t mutex_process; + volatile int do_process; /*< flag to tell process thread to stop */ + + union mod_data mods[NUM_CHAN]; /*< Modulation objects and stuff, one per channel */ }; +#define GR_SOURCE(priv) ((priv)->need_fixer?(priv)->offset_fixer:(priv)->source) -#endif +#endif /* _GR_PRIV_H */