[Top][All Lists]

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

[Discuss-gnuradio] Custom Block ID as variable

From: Erik von Keyserlingk
Subject: [Discuss-gnuradio] Custom Block ID as variable
Date: Wed, 30 Jan 2019 17:06:47 +0100

I am developing a program with GRC where I want to take N samples. (The hardware is a HackRF-one). I want to take N samples because I want to measure at certain points with a H-field probe.

The way I have thought to solve it is to develop a custom block, "sampling counter" (in python), to count the number of samples that have passed and after N samples it changes its value from 1 to 0 and a "selector" block is directing other samples to /dev/null. This works with a "check box" where a user can set/unset and change where the stream goes, either into a file or to /dev/null.  See attached flowgraph.png.

Q: How to implement the ID of a custom block so that it can be used as a variable as from a checkbox, slider etc. Both in python an xml, that is what is needed to be added in the .xml file and in the .py file to use the ID as a variable?

Attachment: flowgraph.png
Description: PNG image

reply via email to

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