Forum: GNU Radio one input stream to two output streams

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Garrett Mcgrath (Guest)
on 2006-04-24 09:15
(Received via mailing list)
I'm currently generating an aloumoti encoding library function that
takes a
single vector input, splits the vector in half and processes it.  This
single vector then becomes the data payload for 2 separate IR base band
transmissions.  I'm attempting to figure out how you output those 2
output
streams from the DPS block to their respective daughter boards on the
USRP
(I'm under the impression that this can be done on one board but not two
at
the moment w/ a reliable phase difference.).  would it be something as
simple as:

src=aloumoti_encode()

dst=sink.usrp()

fg.connect((src,0), (dst,0))

fg.connect((src,0), (dst,1))



// this is of course just pseudo code as I'm not entirely sure how to
sink
to the USRP yet, but I'm working on it.



-Garrett McGrath



PS: if I wanted to have a set of arguments passed to the aloumoti_encode
block when it's bound to 'src' would I just create a constructor in the
class definition that has those arguments then add it to the .i file and
be
capable of passing arguments to it that way?
Eric B. (Guest)
on 2006-04-24 20:45
(Received via mailing list)
On Mon, Apr 24, 2006 at 01:11:26AM -0400, Garrett Mcgrath wrote:
> I'm currently generating an aloumoti encoding library function that takes a
> single vector input, splits the vector in half and processes it.  This
> single vector then becomes the data payload for 2 separate IR base band
> transmissions.  I'm attempting to figure out how you output those 2 output
> streams from the DPS block to their respective daughter boards on the USRP
> (I'm under the impression that this can be done on one board but not two at
> the moment w/ a reliable phase difference.).  would it be something as
> simple as:

As long as you're Tx'ing at baseband, and that you haven't ever set
the txfreq to non-zero since power up, the two sides will be coherent.


> src=aloumoti_encode()
>
> dst=sink.usrp()
>
> fg.connect((src,0), (dst,0))
> fg.connect((src,0), (dst,1))
>

The usrp sink has only a single input (this could be considered a
bug).  You'll have to interleave the two streams prior to sending them
to the usrp.  See the fm_tx_2_daughterboards.py example in
gnuradio-examples/python/usrp for how to perform the interleaving.

> // this is of course just pseudo code as I'm not entirely sure how to sink
> to the USRP yet, but I'm working on it.
>
> -Garrett McGrath
>
> PS: if I wanted to have a set of arguments passed to the aloumoti_encode
> block when it's bound to 'src' would I just create a constructor in the
> class definition that has those arguments then add it to the .i file and be
> capable of passing arguments to it that way?

Yes, you can just add constructor args to the .h, .i and .cc files.
You'll see them when the block is instantiated, not connected.

Eric
This topic is locked and can not be replied to.