Hi, Ben, >From line 59 of gr_probe_avg_mag_sqrd_c.cc, mag_sqrd is the "input" variable. mag_sqrd comes from pointer in at line 58. Pointer in comes from pointer input_item at line 55. I know &input_item is a parameter of function work at line 52. My question is that where will work function be called and what value will be passed for the argument &input_item?
Thanks~ Fengyuan On Sun, Mar 20, 2011 at 5:43 PM, Ben Reynwar <b...@reynwar.net> wrote: > Maybe I'm misunderstanding your question. > It looks to me like line 59 of gr_probe_avg_mag_sqrd_c.cc is calling > the filter function. So "input" in that function is just the value > that is being passed in there. > > On Sun, Mar 20, 2011 at 2:27 PM, Fengyuan Gong <fengyuan.g...@gmail.com> > wrote: > > Hi, Ben, > > I know where to find d_iir, which is actually an instance from class > > gr_single_pole_iih.h . > > If you have time to take a look at line 92 in gr_single_pole_iih.h, > > output = d_alpha * input + d_one_minus_alpha * d_prev_output; > > My question is where the input comes from? I think input is coming from > RSSI > > value reading in from USRP. But not sure how to get it? > > Best Regards~ > > Fengyuan Gong > > On Sun, Mar 20, 2011 at 3:03 PM, Fengyuan Gong <fengyuan.g...@gmail.com> > > wrote: > >> > >> Hi, Ben, > >> Thank you for your answer. > >> In /gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.cc file, I saw > >> d_unmuted = d_iir.prev_output() >= d_threshold; will determine unmuted > to > >> be true or false. > >> Then I want to know what is the C++ source code for d_iir.prev_output() > >> function. > >> I try to find it using find . -name "d_iir.*" > >> but nothing found. > >> why? > >> Best Regards~ > >> Fenyuan Gong > >> > >> On Sun, Mar 20, 2011 at 2:38 PM, Ben Reynwar <b...@reynwar.net> wrote: > >>> > >>> On Sun, Mar 20, 2011 at 10:58 AM, Fengyuan Gong < > fengyuan.g...@gmail.com> > >>> wrote: > >>> > Hi, > >>> > I am a new learner of gnuradio. I want to know how gnuradio do > carrier > >>> > sensing. In the following function, > >>> > def carrier_sensed(self): > >>> > """ > >>> > Return True if we think carrier is present. > >>> > """ > >>> > #return self.probe.level() > X > >>> > return self.probe.unmuted() > >>> > I don't know what is the C++ source code for probe.unmuted, can > anyone > >>> > tell > >>> > me where to find it? I want to know how C++ get RSSI and process it > to > >>> > get > >>> > whether carrier is present or not. > >>> > Thanks~ > >>> > Fengyuan Gong > >>> > _______________________________________________ > >>> > Discuss-gnuradio mailing list > >>> > Discuss-gnuradio@gnu.org > >>> > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > >>> > > >>> > > >>> > >>> Earlier in python file you see: > >>> > >>> self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha) > >>> > >>> The naming convention is that a python block gr.probe_avg_mag_sqrd_c > >>> is defined in C++ as > >>> gr_probe_avg_mag_sqrd_c. The files defining it will shared that name. > >>> > >>> Assuming you're using something unix-like you can find it by > >>> > >>> find . -name "gr_probe_avg_mag_sqrd_c.*" > >>> > >>> and you'll see the source is at > >>> > >>> gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.* > >> > > > > >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio