|
From: | Vitt Benv |
Subject: | Re: [Discuss-gnuradio] how send random values to selector every n-times |
Date: | Mon, 8 Dec 2014 23:14:49 +0100 |
Hi,Please go through the tutorial [1].Short version,1. Use one 5in-1out selector block2. Use on "Function Probe" block3. Set the "Poll Rate" based on your delay4. Generate python file using "Generate flowgraph" button5. Set your selector's input index in the function probeSample function probe>>def _fn_probe_probe():>> while True:>> try:>> self.blks2_selector_0.set_input_index(random.randint(0,4))>> except AttributeError:>> pass>> time.sleep(1.0 / (0.3))6.Run your python codeSreerajOn Sun, Dec 7, 2014 at 10:59 PM, Vitt Benv <address@hidden> wrote:_______________________________________________VictorTnx in advance for any answer!So , in GRC, I've a vector_source with values coming from [random.randint(0, 4) for p in range(0,4)]. This put some random values displayed right.Hi everybody,I need to "switch" randomly 5 different signal generator via selector block every [say] 3 seconds....
Now how I can scan the vector, a values at time sending this index to selector, every n-seconds ???
I'm not with a USRP , simple sound card.
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
--
[Prev in Thread] | Current Thread | [Next in Thread] |