UHD Interface - Difference between num samps rx

Using USRP1.

Whats the difference between using this:
Int32 total_num_samps = 1000;
uhd::stream_cmd_t
stream_cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
stream_cmd.num_samps = total_num_samps;
stream_cmd.stream_now = true;
m_pSdev->issue_stream_cmd(stream_cmd);

Versus using:
Int32 sampsPerBlock = 1000;
pBuff = new vector<complex >(sampsPerBlock);
size_t num_rx_samps = m_pDev->recv(&(pBuff->front()),
pBuff->size(),
md,uhd::io_type_t::COMPLEX_FLOAT32,uhd::device::RECV_MODE_FULL_BUFF);

What if total_num_samps and sampsPerBlock differ in length?

Isaac

On 01/27/2011 07:10 AM, Isaac G. wrote:

Using USRP1.

Whats the difference between using this:
Int32 total_num_samps = 1000;
uhd::stream_cmd_t
stream_cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
stream_cmd.num_samps = total_num_samps;

I think the confusion is that stream_cmd.num_samps is ignored when in
continuous streaming mode.

stream_cmd.stream_now = true;
m_pSdev->issue_stream_cmd(stream_cmd);

Versus using:
Int32 sampsPerBlock = 1000;
pBuff = new vector<complex >(sampsPerBlock);
size_t num_rx_samps = m_pDev->recv(&(pBuff->front()), pBuff->size(),
md,uhd::io_type_t::COMPLEX_FLOAT32,uhd::device::RECV_MODE_FULL_BUFF);

In this case, the buffer always fills to pBuff->size()
-josh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs