|
From: | Tom Rondeau |
Subject: | Re: [Discuss-gnuradio] I & Q channels in source module |
Date: | Fri, 24 Apr 2015 09:22:17 -0400 |
I am writing a source module/block and I generate 16 bit signed I and Q values. There is first a 16 bit I value then a 16 bit Q value repeated 1024 times.In my source module I have:
usbradio_impl::usbradio_impl()
: gr::sync_block("usbradio",
gr::io_signature::make(1, 1, sizeof(short)),
gr::io_signature::make(1, 1, sizeof(short)))
{
state = 0;
cnt = 0;
set_max_noutput_items(1);
set_max_output_buffer(2);
}
Y-Thx,Is that the correct way to present I & Q values?/*The stuff_output(out) function will stuff an I value then a Q value 512 times.
* Our virtual destructor.
*/
usbradio_impl::~usbradio_impl()
{
}
int
usbradio_impl::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
short *out = (short *) output_items[0];
// Do <+signal processing+>
stuff_output(out);
// Tell runtime system how many output items we produced.
return 1024;
}
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |