discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in RFNOC blocks in CPP ?? Cannot create! Property already exis


From: sp h
Subject: Re: Error in RFNOC blocks in CPP ?? Cannot create! Property already exists at: /blocks/0/DUC#0/noc_id
Date: Fri, 28 Jan 2022 14:27:11 +0330

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();


reply via email to

[Prev in Thread] Current Thread [Next in Thread]