On Mon, Apr 18, 2016 at 10:43 PM, Ekko <[email protected]> wrote:

> hi Tom
> i read the examples in gr-audio/examples/c++, and the examples in
> gr-uhd/examples/c++;
> these two examples is all use the block in gnuradio,just like the audio
> sink,uhd sink.
> and i want to multiple the output of the signal source of gnuradio with my
> own data (for example the data in an array);
> the function connect will not work here,so i want to know how can i use
> gnuradio block just like a function not with the connect,
> because my own data is not ok for connect.
>
> thank you
>
> --Ekko
>

No. Blocks are designed to work within a flowgraph. You can use a
vector_source_x block to pull samples into a flowgraph from a vector though.

Tom

(Ok, so it's possible to call work/general_work yourself from outside of a
flowgraph, but it's very difficult to set up and do and almost certainly
not worth the hassle.)



> 2016-04-18 21:18 GMT+08:00 Tom Rondeau <[email protected]>:
>
>> On Mon, Apr 18, 2016 at 3:53 AM, Ekko <[email protected]> wrote:
>>
>>> hello all
>>> i want to know how to write a c program with the lib of gnuradio.
>>> for example i want to write a c program,to add a 15HZ sin signal with a
>>> 135HZ sin signal,then send from the usrp.
>>> i know how to send the data to the usrp.but i don't know how to use the
>>> signal source and the add fnuction of gnuradio in c program,just like use
>>> the uhd api as a fnuction.
>>> i will not want to write a oot block,i just want to write a *.c file to
>>> accomplish this work.
>>> but i don't how to start.
>>> is there some demo in gnuradio about how to use the gnuradio with C?just
>>> like the tx_samples_c.c in uhd.
>>> or something others to teel me how to solve this .
>>>
>>>
>>>
>>> thank you
>>>
>>> --Ekko
>>>
>>
>>
>> Ekko,
>>
>> No, you cannot write a C program. GNU Radio is all written in C++, so you
>> will have to do this with a C++ program.
>>
>> You can find examples in the source code under gr-audio/examples/c++ and
>> gr-uhd/examples/c++.
>>
>> Tom
>>
>>
>
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to