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

    /*
     * 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;
    }

The stuff_output(out) function will stuff an I value then a Q value 512
times.

Is that the correct way to present I & Q values?

Thx,
Y-
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to