[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuradio-discuss
Subject: Re: Error in RFNOC blocks in CPP ?? Cannot create! Property already exists at: /blocks/0/DUC#0/noc_i
From: sp h <stackprogramer () gmail ! com>
Date: 2022-01-28 10:56:43
Message-ID: CAA=S3Psh6-kXdB=AbmfQ4F0YrQ90ujix+Q1zkFBuh_u4wXPYvw () mail ! gmail ! com
[Download RAW message or body]
Finally, my code worked correctly. I share it for future use.
gr::top_block_sptr tb = gr::make_top_block("receiver");
gr::ettus::rfnoc_graph::sptr rfnoc_graph_ctrl;
const::uhd::device_addr_t device("addr=192.168.10.2");
rfnoc_graph_ctrl=gr::ettus::rfnoc_graph::make(device);
uhd::stream_args_t stream_arg=uhd::stream_args_t("fc32","sc16");
gr::ettus::rfnoc_rx_streamer::sptr
rx_streamer=gr::ettus::rfnoc_rx_streamer::make(rfnoc_graph_ctrl,1,stream_arg,1,true);
gr::ettus::rfnoc_rx_radio::sptr
rx_radio=gr::ettus::rfnoc_rx_radio::make(rfnoc_graph_ctrl,device,-1,-1);
rx_radio->set_rate(stod(sampleRateRX) * 1000);
rx_radio->set_antenna(rxAntenna, 0);
rx_radio->set_frequency(stod(frequencyRX) * 1000000, 0);
rx_radio->set_gain(rfGain, 0);
//rx_radio->set_bandwidth(0, 0);
rx_radio->set_dc_offset(false, 0);
rx_radio->set_iq_balance(false, 0);
gr::ettus::rfnoc_ddc::sptr
ddc_0=gr::ettus::rfnoc_ddc::make(rfnoc_graph_ctrl,device,-1,-1);
gr::blocks::null_sink::sptr
null_sink=gr::blocks::null_sink::make(sizeof(gr_complex));
ddc_0->set_freq(0, 0);
ddc_0->set_output_rate(0, 0);
//Connections
rfnoc_graph_ctrl->connect(ddc_0->get_unique_id(),
0,rx_streamer->get_unique_id(), 0,false);
rfnoc_graph_ctrl->connect(rx_radio->get_unique_id(),
0,ddc_0->get_unique_id(), 0, false);
tb->connect(rx_streamer, 0,tsnk_c , 0);
tb->connect(rx_streamer, 0,fsnk_c , 0);
tb->start();
On Tue, Jan 25, 2022 at 11:02 AM sp h <stackprogramer@gmail.com> wrote:
> The source code also warns me time out blocks and after it, the program
> crashes...
>
> when I disabled connect for rx_streamer block, the software has not any
> error but I can not see outputs...
>
> still, I am working on the problem to solve it.
>
>
> *[WARNING] [RFNOC::GRAPH] One or more blocks timed out during flush!*
>
> [ERROR] [RFNOC::GRAPH] Caught exception while initializing graph:
> RuntimeError: Cannot create! Property already exists at:
> /blocks/0/DUC#0/noc_id
>
> terminate called after throwing an instance of 'uhd::runtime_error'
>
> what(): RuntimeError: Failure to create rfnoc_graph.
>
> On Mon, Jan 24, 2022 at 11:05 AM sp h <stackprogramer@gmail.com> wrote:
>
> > when I want to convert a GRC python code to CPP code I am faced with NOC
> > graph error?
> > any idea for solving the problem...? I too attached python code...
> >
> > [ERROR] [RFNOC::GRAPH] Caught exception while initializing graph:
> > RuntimeError: Cannot create! Property already exists at:
> > /blocks/0/DUC#0/noc_id
> >
> > terminate called after throwing an instance of 'uhd::runtime_error'
> >
> > what(): RuntimeError: Failure to create rfnoc_graph.
> >
> >
> >
> > const::uhd::device_addr_t device("addr=192.168.10.2");
> >
> > gr::ettus::rfnoc_graph::sptr \
> > rfnoc_graph_ctrl=gr::ettus::rfnoc_graph::make(device);
> > uhd::stream_args_t stream_arg=uhd::stream_args_t("fc32","sc16");
> >
> > gr::ettus::rfnoc_rx_streamer::sptr \
> > rx_streamer=gr::ettus::rfnoc_rx_streamer::make(rfnoc_graph_ctrl,1,stream_arg,1,true);
> >
> > gr::ettus::rfnoc_rx_radio::sptr \
> > rx_radio=gr::ettus::rfnoc_rx_radio::make(rfnoc_graph_ctrl,device,-1,-1);
> > rx_radio->set_rate(2000);
> >
> > rx_radio->set_antenna("AB", 0);
> >
> > rx_radio->set_frequency(25e6, 0);
> >
> > rx_radio->set_gain(10, 0);
> >
> > rx_radio->set_bandwidth(0, 0);
> >
> > rx_radio->set_dc_offset(false, 0);
> >
> > rx_radio->set_iq_balance(false, 0);
> >
> >
> > gr::ettus::rfnoc_ddc::sptr \
> > ddc=gr::ettus::rfnoc_ddc::make(rfnoc_graph_ctrl,device,-1,-1);
> >
> > ddc->set_freq(0, 0);
> >
> > ddc->set_output_rate(0, 0);
> >
> >
> > //Connections
> >
> > rfnoc_graph_ctrl->connect(ddc->get_unique_id(), 0,rx_streamer->get_unique_id(), \
> > 0, false);
> > rfnoc_graph_ctrl->connect(rx_radio->get_unique_id(), 0,ddc->get_unique_id(), 0, \
> > false);
> >
> > tb->connect(rx_streamer, 0,tsnk_c , 0);
> >
> > tb->connect(rx_streamer, 0,fsnk_c , 0);
> >
> > tb->start();
> >
> >
> >
[Attachment #3 (text/html)]
<div dir="ltr">Finally, my code worked correctly. I share it for future \
use.<div><pre style="margin-top:0px;margin-bottom:0px"><span \
style="color:rgb(192,192,192)"> </span>gr::top_block_sptr<span \
style="font-family:Arial,Helvetica,sans-serif;color:rgb(192,192,192)"> tb</span> \
<span style="font-family:Arial,Helvetica,sans-serif;color:rgb(0,103,124)">=</span><span \
style="font-family:Arial,Helvetica,sans-serif;color:rgb(192,192,192)"> </span><span \
style="font-family:Arial,Helvetica,sans-serif;color:rgb(128,0,128)">gr</span><span \
style="font-family:Arial,Helvetica,sans-serif">::</span><span \
style="font-family:Arial,Helvetica,sans-serif;color:rgb(0,103,124)">make_top_block</span><span \
style="font-family:Arial,Helvetica,sans-serif">(</span><span \
style="font-family:Arial,Helvetica,sans-serif;color:rgb(0,128,0)">"receiver"</span><span \
style="font-family:Arial,Helvetica,sans-serif">);</span></pre><pre \
style="margin-top:0px;margin-bottom:0px"><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_graph</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">rfnoc_graph_ctrl</span>;</pre><pre \
style="margin-top:0px;margin-bottom:0px"><br></pre></pre></div><div><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,128,0)">const</span>::<span \
style="color:rgb(128,0,128)">uhd</span>::<span \
style="color:rgb(128,0,128)">device_addr_t</span><span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(9,46,100)">device</span>(<span \
style="color:rgb(0,128,0)">"addr=192.168.10.2"</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">rfnoc_graph_ctrl</span><span \
style="color:rgb(0,103,124)">=</span><span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_graph</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(9,46,100)">device</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">uhd</span>::<span \
style="color:rgb(128,0,128)">stream_args_t</span><span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(9,46,100)">stream_arg</span>=<span \
style="color:rgb(128,0,128)">uhd</span>::<span \
style="color:rgb(128,0,128)">stream_args_t</span>(<span \
style="color:rgb(0,128,0)">"fc32"</span>,<span \
style="color:rgb(0,128,0)">"sc16"</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_streamer</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_streamer</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_streamer</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(128,0,0)">rfnoc_graph_ctrl</span>,<span \
style="color:rgb(0,0,128)">1</span>,<span \
style="color:rgb(9,46,100)">stream_arg</span>,<span \
style="color:rgb(0,0,128)">1</span>,<span \
style="color:rgb(128,128,0)">true</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_radio</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_radio</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(128,0,0)">rfnoc_graph_ctrl</span>,<span \
style="color:rgb(9,46,100)">device</span>,-<span \
style="color:rgb(0,0,128)">1</span>,-<span \
style="color:rgb(0,0,128)">1</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_rate</span>(<span \
style="color:rgb(0,103,124)">stod</span>(<span \
style="color:rgb(206,92,0)">sampleRateRX</span>)<span style="color:rgb(192,192,192)"> \
</span>*<span style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">1000</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_antenna</span>(<span \
style="color:rgb(206,92,0)">rxAntenna</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_frequency</span>(<span \
style="color:rgb(0,103,124)">stod</span>(<span \
style="color:rgb(206,92,0)">frequencyRX</span>)<span style="color:rgb(192,192,192)"> \
</span>*<span style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">1000000</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_gain</span>(<span \
style="color:rgb(9,46,100)">rfGain</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,128,0)">//rx_radio->set_bandwidth(0,</span><span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,128,0)">0);</span></pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_dc_offset</span>(<span \
style="color:rgb(128,128,0)">false</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_iq_balance</span>(<span \
style="color:rgb(128,128,0)">false</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><br></pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_ddc</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">ddc_0</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_ddc</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(128,0,0)">rfnoc_graph_ctrl</span>,<span \
style="color:rgb(9,46,100)">device</span>,-<span \
style="color:rgb(0,0,128)">1</span>,-<span \
style="color:rgb(0,0,128)">1</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">blocks</span>::<span \
style="color:rgb(128,0,128)">null_sink</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">null_sink</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">blocks</span>::<span \
style="color:rgb(128,0,128)">null_sink</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(128,128,0)">sizeof</span>(<span \
style="color:rgb(128,0,128)">gr_complex</span>));</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">ddc_0</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_freq</span>(<span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">ddc_0</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_output_rate</span>(<span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><br></pre> <pre \
style="margin-top:0px;margin-bottom:0px"><br></pre> <pre \
style="margin-top:0px;margin-bottom:0px"><br></pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,128,0)">//Connections</span></pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">rfnoc_graph_ctrl</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">connect</span>(<span \
style="color:rgb(9,46,100)">ddc_0</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span \
style="color:rgb(9,46,100)">rx_streamer</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span \
style="color:rgb(128,128,0)">false</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">rfnoc_graph_ctrl</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">connect</span>(<span \
style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span \
style="color:rgb(9,46,100)">ddc_0</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,128,0)">false</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">tb</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">connect</span>(<span \
style="color:rgb(9,46,100)">rx_streamer</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>,<span \
style="color:rgb(206,92,0)">tsnk_c</span><span style="color:rgb(192,192,192)"> \
</span>,<span style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>);</pre> <pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">tb</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">start</span>();</pre></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 25, 2022 at 11:02 \
AM sp h <<a href="mailto:stackprogramer@gmail.com">stackprogramer@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p \
style="margin:0px;white-space:pre-wrap">The source code also warns me time out blocks \
and after it, the program crashes...</p><p \
style="margin:0px;white-space:pre-wrap">when I disabled connect for rx_streamer \
block, the software has not any error but I can not see outputs...</p><p \
style="margin:0px;white-space:pre-wrap">still, I am working on the problem to solve \
it. </p><p style="margin:0px;white-space:pre-wrap"><br></p><p \
style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)"><b>[WARNING] \
[RFNOC::GRAPH] One or more blocks timed out during flush!</b></span></p> <p \
style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">[ERROR] \
[RFNOC::GRAPH] Caught exception while initializing graph: RuntimeError: Cannot \
create! Property already exists at: /blocks/0/DUC#0/noc_id</span></p> <p \
style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">terminate \
called after throwing an instance of 'uhd::runtime_error'</span></p> <p \
style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)"> what(): \
RuntimeError: Failure to create rfnoc_graph.</span></p></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 24, 2022 at 11:05 \
AM sp h <<a href="mailto:stackprogramer@gmail.com" \
target="_blank">stackprogramer@gmail.com</a>> wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr">when I want to convert a GRC python \
code to CPP code I am faced with NOC graph error?<div>any idea for solving the \
problem...? I too attached python code...<br><div><br></div><div><p \
style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">[ERROR] \
[RFNOC::GRAPH] Caught exception while initializing graph: RuntimeError: Cannot \
create! Property already exists at: /blocks/0/DUC#0/noc_id</span></p> <p \
style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">terminate \
called after throwing an instance of 'uhd::runtime_error'</span></p> <p \
style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)"> what(): \
RuntimeError: Failure to create rfnoc_graph.</span></p><p \
style="margin:0px;white-space:pre-wrap"><span \
style="color:rgb(170,0,0)"><br></span></p><p \
style="margin:0px;white-space:pre-wrap"><span \
style="color:rgb(170,0,0)"><br></span></p><p style="margin:0px;white-space:pre-wrap">
</p><pre style="margin-top:0px;margin-bottom:0px"><span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(128,128,0)">const</span>::<span \
style="color:rgb(128,0,128)">uhd</span>::<span \
style="color:rgb(128,0,128)">device_addr_t</span><span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(9,46,100)">device</span>(<span \
style="color:rgb(0,128,0)">"addr=192.168.10.2"</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_graph</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rfnoc_graph_ctrl</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_graph</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(9,46,100)">device</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">uhd</span>::<span \
style="color:rgb(128,0,128)">stream_args_t</span><span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(9,46,100)">stream_arg</span>=<span \
style="color:rgb(128,0,128)">uhd</span>::<span \
style="color:rgb(128,0,128)">stream_args_t</span>(<span \
style="color:rgb(0,128,0)">"fc32"</span>,<span \
style="color:rgb(0,128,0)">"sc16"</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_streamer</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_streamer</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_streamer</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(9,46,100)">rfnoc_graph_ctrl</span>,<span \
style="color:rgb(0,0,128)">1</span>,<span \
style="color:rgb(9,46,100)">stream_arg</span>,<span \
style="color:rgb(0,0,128)">1</span>,<span \
style="color:rgb(128,128,0)">true</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_radio</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_rx_radio</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(9,46,100)">rfnoc_graph_ctrl</span>,<span \
style="color:rgb(9,46,100)">device</span>,-<span \
style="color:rgb(0,0,128)">1</span>,-<span \
style="color:rgb(0,0,128)">1</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_rate</span>(<span \
style="color:rgb(0,0,128)">2000</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_antenna</span>(<span \
style="color:rgb(0,128,0)">"AB"</span>,<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_frequency</span>(<span \
style="color:rgb(0,0,128)">25e6</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_gain</span>(<span \
style="color:rgb(0,0,128)">10</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_bandwidth</span>(<span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_dc_offset</span>(<span \
style="color:rgb(128,128,0)">false</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_iq_balance</span>(<span \
style="color:rgb(128,128,0)">false</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><br></pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_ddc</span>::<span \
style="color:rgb(128,0,128)">sptr</span><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">ddc</span>=<span \
style="color:rgb(128,0,128)">gr</span>::<span \
style="color:rgb(128,0,128)">ettus</span>::<span \
style="color:rgb(128,0,128)">rfnoc_ddc</span>::<span \
style="color:rgb(0,103,124)">make</span>(<span \
style="color:rgb(9,46,100)">rfnoc_graph_ctrl</span>,<span \
style="color:rgb(9,46,100)">device</span>,-<span \
style="color:rgb(0,0,128)">1</span>,-<span \
style="color:rgb(0,0,128)">1</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><br></pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">ddc</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_freq</span>(<span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">ddc</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">set_output_rate</span>(<span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"><br></p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,128,0)">//Connections</span></pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rfnoc_graph_ctrl</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">connect</span>(<span \
style="color:rgb(9,46,100)">ddc</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span \
style="color:rgb(9,46,100)">rx_streamer</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,128,0)">false</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(9,46,100)">rfnoc_graph_ctrl</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="font-style:italic;color:rgb(0,103,124)">connect</span>(<span \
style="color:rgb(9,46,100)">rx_radio</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(9,46,100)">ddc</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">get_unique_id</span>(),<span \
style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,128,0)">false</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><br></pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">tb</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">connect</span>(<span \
style="color:rgb(9,46,100)">rx_streamer</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>,<span \
style="color:rgb(206,92,0)">tsnk_c</span><span style="color:rgb(192,192,192)"> \
</span>,<span style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(128,0,0)">tb</span><span \
style="color:rgb(0,103,124)">-></span><span \
style="color:rgb(0,103,124)">connect</span>(<span \
style="color:rgb(9,46,100)">rx_streamer</span>,<span style="color:rgb(192,192,192)"> \
</span><span style="color:rgb(0,0,128)">0</span>,<span \
style="color:rgb(206,92,0)">fsnk_c</span><span style="color:rgb(192,192,192)"> \
</span>,<span style="color:rgb(192,192,192)"> </span><span \
style="color:rgb(0,0,128)">0</span>);</pre><p \
style="margin:0px;white-space:pre-wrap"> </p><pre \
style="margin-top:0px;margin-bottom:0px"> <span \
style="font-family:Arial,Helvetica,sans-serif;color:rgb(128,0,0)">tb</span><span \
<pre style="margin-top:0px;margin-bottom:0px"><br></pre></div></div></div>
</blockquote></div>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic