[Top][All Lists]

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

Re: [Discuss-gnuradio] Transmit BPSK symbols from OOT block using memcpy

From: Ron Economos
Subject: Re: [Discuss-gnuradio] Transmit BPSK symbols from OOT block using memcpy
Date: Fri, 15 Feb 2019 15:10:38 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Something like this:

      const unsigned char *in = (const unsigned char *) input_items[0];
      gr_complex *out = (gr_complex *) output_items[0];
      gr_complex zero, one;

      zero = gr_complex(1.0, 0.0);

      for (int i = 0; i < noutput_items; i++) {
        if (in[i] == 0) {
          out[i] = zero;
          out[i] = one;


On 2/15/19 14:53, Laura Arjona wrote:

I want to transmit a bit-stream with an usrp_sink, using BPSK modulation.
I have an OOT block in C++ (let's name it tx_bpsk_impl.cc) , where I want to define the symbol vector for bit_0 and bit_1, and pass those symbols
to the uhd_sink.

I have the system already implemented for transmitting ASK-FM0 symbols (also 1 bit per symbol), and
I am confused about adapting my system to use BPSK modulation.

Overall, I would like to do the following (this is a simplified implementation:

 if( bit_stream[i]  == 1)
      memcpy(&out[written], &data_bpsk1[0], sizeof(float) * data_bpsk1.size() );
     written +=data_bpsk1.size()
   memcpy(&out[written], &data_bpsk0[0], sizeof(float) * data_bpsk0.size() );
    written +=data_bpsk0.size()

I am not sure about how to generate the vectors data_bpsk1 and data_bpsk0

I have been reading many documentation already, so any advice/guidance about
the generation of the bit0 and bit1 symbols would be appreciated.


Laura Arjona 
Washington Research Foundation Innovation Postdoctoral Fellow in Neuroengineering

Paul G. Allen School of Computer Science & Engineering
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350

Discuss-gnuradio mailing list

reply via email to

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