discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Issue_stream_cmd, Segmentation Fault


From: Zhihong Luo
Subject: [Discuss-gnuradio] Issue_stream_cmd, Segmentation Fault
Date: Wed, 10 Feb 2016 18:07:49 -0500

Hi All,

In the manual, it says to use issue_stream_cmd:

After starting the flow graph, the user should call stop()on this block, then issue any desired arbitrary stream_cmd_t structs to the device

Therefore, I tried to stop() then issue the stream command, but it ran into segmentation fault. My code is:
 
    uhd::stream_cmd_t stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
     size_t num_requested_samples= 10000;
     stream_cmd.num_samps = size_t(num_requested_samples);
     stream_cmd.stream_now = true;
     stream_cmd.time_spec = uhd::time_spec_t();
    ...
    std::cout << "starting flow graph" << std::endl;
    tb->start();
    usrp_source->stop();
    usrp_source->issue_stream_cmd (stream_cmd);

Even if I delete the issue_stream_cmd line, there is still a segmentation fault. Can someone point out where I made a mistake? Thanks.

Zhihong Luo

reply via email to

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