Is there any way to get a pointer to a UHD sink block from another block
in a flow graph, such that I can read from the time registers of a USRP?
Regards,
David
David Halls Ph.D.
Research Engineer
Toshiba Research Europe Limited
32 Queen Square, Bristol, BS1 4ND, UK
Tel: +44 (0) 117 906 0790
NOTE: The information in this email and any attachments may be
confidential and/or legally privileged. This message may be read, copied
and used only by the intended recipient. If you are not the intended
recipient, please destroy this message, delete any copies held on your
system and notify the sender immediately.
Toshiba Research Europe Limited, registered in England and Wales
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl
Is there any way to get a pointer to a UHD sink block from another
block in a flow graph, such that I can read from the time registers of
a USRP?
Depends how you’re building your flow-graph: In Python, simply pass a
reference to your UHD block object to your block.
In GRC, there is no way to reference another block id in a block’s
params. Try this patch, if you want that [0]. Else, you could
assume a fixed uhd sink block id and add that to your blocks XML’s make
template.
Sebastian
[0]
–
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
Dipl.-Ing. Sebastian Koslowski
Research Associate
Kaiserstraße 12
Building 05.01
76131 Karlsruhe, Germany
On Thu, Oct 16, 2014 at 8:54 AM, Marcus Müller [email protected]
wrote:
conditions…
also, if you want to do things like defining starts and ends of burst,
you might do so using the good ol’ stream tags.
So many possibilities!
Greetings,
Marcus
Yes, Marcus is right. Use the message ports and stream tags to
manipulate
other blocks. Passing them around as references is bad practice because
of
lifecycle concerns of the block’s use inside the scheduler. You want to
communicate through interfaces, not the objects themselves.
My solution in the end was to use a UHD source, which generates rx_time,
I then created a block which reads in this rx_time tag and sends it as a
message to a block just before my UHD sink which converts this to a
tx_time based on the number of bursts sent, and the burst interval that
I desire.
Note that if you are transmitting MIMO, i.e. multiple USRPs in one UHD
sink, you also have to use multiple USRPs in the UHD source to produce
the rx_time (although they multiple rx_times will be equal).
… and in C++ you can just use the sptr that you normally use when
using the uhd sink.
But: since Martin added the message ports to the UHD blocks, things
have gotten easier; you can just add an output message port to your
block and connect it to the message port of the UHD sink, and send
commands there without needing to care about objects, pointers, race
conditions…
also, if you want to do things like defining starts and ends of burst,
you might do so using the good ol’ stream tags.
So many possibilities!
Greetings,
Marcus
On 16.10.2014 13:11, Koslowski, Sebastian (CEL) wrote: