discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] sampling rate of a customized signal source


From: Pengyu Zhang
Subject: Re: [Discuss-gnuradio] sampling rate of a customized signal source
Date: Mon, 2 Jun 2014 14:53:16 -0400

Hi Activecat,

Thanks for providing the flowgraph_01.grc example. Now I understand that how to set sample rate of a customized block. For others, sample rate of a customized block can be initialized in the make() function of the block. Details of setting the sample rate can be found in Activecat's example. Thanks.

make(float samp_rate)
    {
      return gnuradio::get_initial_sptr
        (new reader_impl(samp_rate));
    }

Pengyu


On Sun, Jun 1, 2014 at 1:30 AM, Activecat <address@hidden> wrote:
On Sat, May 31, 2014 at 11:47 PM, Activecat <address@hidden> wrote:
I've created a sample for you at https://github.com/activecat/gr-test1
You could run the flowgraph found in the "examples" directory.
Try to change the samp_rate of the flowgraph from 32kHz to different values (64kHz, 200kHrz etc).
You will observe via the GUI Scope Sink, that the block consistently produces two 1ms pulse for every 10ms.


Try to run gr-test1/examples/flowgraph_02.grc, you may try setting different values to samp_rate of the flowgraph.
The outcomes indicates that this "pulse1" block is very consistent with the built-in Signal Source block, in term of how it works respecting to the samp_rate variable.

https://github.com/activecat/gr-test1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]