|
From: | Tommy Tracy II |
Subject: | Re: [Discuss-gnuradio] Question about Cycle Detection in GNU Radio |
Date: | Wed, 10 Jul 2013 11:16:40 -0700 |
What I'm trying to do is this: 1. The Root Router receives data from an input flow graph, packages it and sends it to its children in a balanced manner. 2. The Child Routers receive data, and, as a Source block, streams the data to the Child's flow graph. The resulting output needs to be returned to the Root, so the Child Router serves as a sink as well! (here's a cycle) 3. The Child Router sends the data back to the Root Router, which re-orders it and streams the result to it's sink. <ROOT SOURCE>------<ROUTER>--------<ROOT SINK> (no cycle) ...-----------<CHILD ROUTER>------<CHILD FLOWGRAPH>-----… (cycle) --------- This won't work with the existing gnu radio framework because of that cycle. One alternative is the following: 1. The Root flow graph dumps data into a shared input_queue via an input queue sink block. The Router has a shared_ptr to the input_queue, reads the data, and distributes it to its children. 2. The children receive the data and dump it into their input_queue via shared ptr. 3. The child also has a queue source block that also has a shared_ptr to the input_queue, and it reads the data to stream through its flow graph. 4. The child then uses an output queue sink block to dump data into a shared output_queue. 5. The child router reads from the output_queue (via shared_ptr), and sends data to the Root. 6. The Root receives the data, reorders it, and dumps it into its output queue. 7. A queue source reads from the Root's output_queue, and writes it to the Root's sink. <ROOT SOURCE>----<INPUT_QUEUE SINK[shared_ptr]> <[shared_ptr]ROUTER[shared_ptr]> <OUTPUT_QUEUE SOURCE>-------<ROOT SINK> <[shared_ptr]INPUT QUEUE SOURCE>------<CHILD FLOWGRAPH>-------<OUTPUT QUEUE SINK[shared_ptr]> <[shared_ptr]ROUTER[shared_ptr]> This all seems a bit convoluted. Sincerely, Tommy James Tracy II Ph.D Student High Performance Low Power Lab University of Virginia Phone: 913-775-2241 On Jul 10, 2013, at 1:44 AM, Tom Rondeau <address@hidden> wrote: On Wed, Jul 10, 2013 at 1:25 AM, Johnathan Corgan |
[Prev in Thread] | Current Thread | [Next in Thread] |