USRP Hardware Driver and Device Manual Version: 4.10.0.0_release
UHD and USRP Manual
Loading...
Searching...
No Matches
uhd::stream_cmd_t Struct Reference

#include <uhd/types/stream_cmd.hpp>

Detailed Description

Command struct for configuration and control of streaming:

A stream command defines how the device sends samples to the host. Streaming is controlled by submitting a stream command to the rx dsp. Granular control over what the device streams to the host can be achieved through submission of multiple (carefully-crafted) commands.

The mode parameter controls how streaming is issued to the device:

  • "Start continuous" tells the device to stream samples indefinitely.
  • "Stop continuous" tells the device to end continuous streaming.
  • "Num samps and done" tells the device to stream num samps and to not expect a future stream command for contiguous samples.
  • "Num samps and more" tells the device to stream num samps and to expect a future stream command for contiguous samples.

The stream now parameter controls when the stream begins. When true, the device will begin streaming ASAP. When false, the device will start streaming based on the trigger source. The trigger source TIMED will begin at a time specified by time_spec.

Note: When a radio runs at multiple samples per clock cycle, it may not be possible to request samples at any given time, and num_samps might have to be an integer multiple of SPC.

Public Types

enum  stream_mode_t : uint32_t { STREAM_MODE_START_CONTINUOUS = int('a') , STREAM_MODE_STOP_CONTINUOUS = int('o') , STREAM_MODE_NUM_SAMPS_AND_DONE = int('d') , STREAM_MODE_NUM_SAMPS_AND_MORE = int('m') }
enum class  trigger_t { TIMED , TX_RUNNING }
 Trigger source to be used when stream_now is false. More...

Public Member Functions

 stream_cmd_t (const stream_mode_t &stream_mode)

Public Attributes

enum uhd::stream_cmd_t::stream_mode_t stream_mode
uint64_t num_samps
bool stream_now
 When true, the device will begin streaming ASAP.
time_spec_t time_spec
 The time spec to use when stream_now is false and trigger is TIMED.
enum uhd::stream_cmd_t::trigger_t trigger

Member Enumeration Documentation

◆ stream_mode_t

Enumerator
STREAM_MODE_START_CONTINUOUS 
STREAM_MODE_STOP_CONTINUOUS 
STREAM_MODE_NUM_SAMPS_AND_DONE 
STREAM_MODE_NUM_SAMPS_AND_MORE 

◆ trigger_t

enum class uhd::stream_cmd_t::trigger_t
strong

Trigger source to be used when stream_now is false.

Enumerator
TIMED 

Start streaming when the time specified in time_spec is reached.

TX_RUNNING 

Start streaming when the transmitter is running.

Constructor & Destructor Documentation

◆ stream_cmd_t()

uhd::stream_cmd_t::stream_cmd_t ( const stream_mode_t & stream_mode)

Member Data Documentation

◆ num_samps

uint64_t uhd::stream_cmd_t::num_samps

◆ stream_mode

enum uhd::stream_cmd_t::stream_mode_t uhd::stream_cmd_t::stream_mode

◆ stream_now

bool uhd::stream_cmd_t::stream_now

When true, the device will begin streaming ASAP.

◆ time_spec

time_spec_t uhd::stream_cmd_t::time_spec

The time spec to use when stream_now is false and trigger is TIMED.

◆ trigger

enum uhd::stream_cmd_t::trigger_t uhd::stream_cmd_t::trigger

The documentation for this struct was generated from the following file: