Re: [Discuss-gnuradio] Referencing USRP sink object

2017-03-27 Thread Marcus Müller
Hi Emanuel,

you can technically do that, pass a python object (if you write your
block in python) or a smart_ptr as a parameter to a
method or the constructor of your block (in C++).

However, that feels like it'd be wildly ugly in terms of "who owns
what"; it might be the best way, still. If you can, however, I'd
recommend doing something like encapsulating the USRP sink in your own
hier block, so that you have control of it :) but that really depends on
whether you're the one who can lay out your application.

I wish GNU Radio had a proper in-application RPC mechanism right now. We
want that, we've just not found the "golden way" to implement it.

Best regards,

Marcus

On 27.03.2017 14:48, emanuel.staudin...@dlr.de wrote:
>
> Hi all,
>
>  
>
> Do you know if the following is possible in a flowgraph:
>
> 1.   I have a USRP sink instantiated and configured in GRC
>
> 2.   I have my own OOT block from which I want to get the current
> time of the USRP sink. Independent of the fact that the sink is
> streaming or bursting with/without timed commands. Is that possible
> and how?
>
>  
>
> I saw from the usrp_block.h that a get-function is implemented
> “virtual ::uhd::time_spec_t get_time_now(size_t mboard = 0) = 0;”
>
> Is it possible to pass a reference of the USRP object outside my OOT
> block into my OOT block to call that function?
>
>  
>
> Regards,
>
> Emanuel
>
>
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Referencing USRP sink object

2017-03-27 Thread Emanuel.Staudinger
Hi all,

Do you know if the following is possible in a flowgraph:

1.   I have a USRP sink instantiated and configured in GRC

2.   I have my own OOT block from which I want to get the current time of 
the USRP sink. Independent of the fact that the sink is streaming or bursting 
with/without timed commands. Is that possible and how?

I saw from the usrp_block.h that a get-function is implemented "virtual 
::uhd::time_spec_t get_time_now(size_t mboard = 0) = 0;"
Is it possible to pass a reference of the USRP object outside my OOT block into 
my OOT block to call that function?

Regards,
Emanuel
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio