|
From: | Ali |
Subject: | Re: [Discuss-gnuradio] GNURadio OOT vector input/output with different size |
Date: | Fri, 21 Jul 2017 08:52:47 +0300 |
Try this instead:
const std::vector<int> inputs{4000,4000,4000,4000,4000, 4000,4000,4000};
and make sure you compile with c++11 enabled.
--Patrick
From: Discuss-gnuradio <discuss-gnuradio-bounces+wpats=address@hidden> on behalf of Ali <address@hidden>
Sent: Thursday, July 20, 2017 12:13 AM
To: address@hidden
Subject: Re: [Discuss-gnuradio] GNURadio OOT vector input/output with different sizeHi,
I dont have any background about C++. So I could not generate the std::vector<int> with the desired content and could not fınd anything on the internet.
const std::vector<int> inputs[] = {4000,4000,4000,4000,4000,4000,4000,4000};
does not work. I am getting the following error:
"conversion from 'int' to non-scalar type 'std::vector<int>' requested"
Best,Ali
2017-07-18 11:51 GMT+03:00 Marcus Müller <address@hidden>:
Hi Ali,
no, that's why I explained what you need to do (use makev).I think this should also work, shouldn't it?
Does this part need to be changed since I am working with the vectors?No, not really. The vectors are still only consecutive numbers in memory.
Best regards,
Marcus
On 18.07.2017 07:51, Ali wrote:
Hi,
1- Actually I am using the followings
make(8,8,1000*sizeof(float))make3(4,4,1000*sizeof(float),1000*sizeof(float),4*sizeof(flo at))
I think this should also work, shouldn't it?
2- Under the general work function I am using the followings:
const float *in1 = (const float *) input_items[0]...float *out1 = (float *) output_items[0]
Does this part need to be changed since I am working with the vectors?
Thanks,Ali
2017-07-17 16:42 GMT+03:00 Marcus Müller <address@hidden>:
Hi Ali,
So, you want one block with:
- 8 inputs, itemsize0…7 = 1000*4B = 4000B
- 4 outputs, itemsize0=itemsize1=4000B, itemsize2=itemsize3=16B
Correct?
You need to generate two std::vector<int> with content
{4000,4000,4000,4000,4000,4000
,4000,4000} and
{4000,4000,16,16}
respectively, and use gr::io_signature::makev(int min_streams, int max_streams, vector) to generate the io_signatures[1] that you use in your block's constructor. The question whether your block should be a general, or a sync block, is independent from the item sizes of the in and outputs, but depends on whether there's always a fixed ratio of produced output items to consumed input items, as explained in [2].
Best regards,
Marcus
[1] https://gnuradio.org/doc/doxyg
en/classgr_1_1io__signature.ht ml#a99e0f9e8de8e7ce16ed92d9f26 55e66c
[2] https://wiki.gnuradio.org/index.php/Guided_Tutorial_GNU_Radi o_in_C%2B%2B#4.3.2_Specific_bl ock_categories
On 07/17/2017 03:31 PM, Ali wrote:
Hi to all,
I want to design my own OOT module with the following I/O:
8 inputs (length of 1000 and each element is type of float)2 outputs (length of 1000 and each element is type of float)2 outputs (length of 4 and each element is type of float)
I used general type block but I could not get the desired outputs. Do you suggest other type of blocks? Is there any example similar to this work that I can study on? Can you suggest a module name or a link?
Best,Ali
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/ listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/ listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |