Accessing Flowgraph Buffers #107
-
I'm attempting to run my UHD SDR through a simple flowgraph continuously, and I want to access the data coming through such that it is constantly updating. This way I can make a custom live-plot in a local window with plotters. I've tried using the vector sink as an output, but this won't update unless the flowgraph is finite. I've also attempted to create custom let ns = 128;
let mut fg = Flowgraph::new();
let src = SourceBuilder::new()
.frequency(100000000.0)
.sample_rate(1000000.0)
.build()?;
let sink = VectorSink::new(4096);
connect!(fg, src > sink);
Runtime::new().run(fg);
let vec_sink = fg
.kernel::<VectorSink<Complex32>>(sink)
.unwrap();
let my_live_updating_vector = vec_sink.items()
update_fft_plot(my_live_updating_vector); Essentially I'm wondering if there's a way to have |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
The vector sink is not make for live updates. You can pipe the samples into a websocket and display on the web frontend (https://twitter.com/bastibl/status/1476552866336813056) or you a simple Python script to plot live (https://twitter.com/bastibl/status/1625528632587304962), Or you pipe the samples into a TCP or ZMQ Sink and use, for example, GNU Radio to plot. |
Beta Was this translation helpful? Give feedback.
-
Also, sort of unrelated, but I am also trying to figure out how to schedule things simultaneously. I've made a triggering block that responds to messages and either receives or transmits by allowing buffers to pass through it. However, I can't trigger on a microsecond level. I am trying to have my SDR receive and transmit at the exact same time in a scheduled manner. I saw that there were a few scheduler modules in futuresdr but was unable to find too much discussion on them. Is there any way to do this? |
Beta Was this translation helpful? Give feedback.
The vector sink is not make for live updates. You can pipe the samples into a websocket and display on the web frontend (https://twitter.com/bastibl/status/1476552866336813056) or you a simple Python script to plot live (https://twitter.com/bastibl/status/1625528632587304962),
Or you pipe the samples into a TCP or ZMQ Sink and use, for example, GNU Radio to plot.