UHD  003.007.001-35-g43512ede
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Public Attributes | List of all members
uhd::stream_args_t Struct Reference

#include <stream.hpp>

Public Member Functions

 stream_args_t (const std::string &cpu="", const std::string &otw="")
 Convenience constructor for streamer args.

Public Attributes

std::string cpu_format
std::string otw_format
device_addr_t args
std::vector< size_t > channels

Detailed Description

A struct of parameters to construct a streamer.

Note: Not all combinations of CPU and OTW format have conversion support. You may however write and register your own conversion routines.

Constructor & Destructor Documentation

uhd::stream_args_t::stream_args_t ( const std::string &  cpu = "",
const std::string &  otw = "" 

Convenience constructor for streamer args.

Member Data Documentation

device_addr_t uhd::stream_args_t::args

The args parameter is used to pass arbitrary key/value pairs. Possible keys used by args (depends on implementation):

  • fullscale: specifies the full-scale amplitude when using floats. By default, the fullscale amplitude under floating point is 1.0. Set the "fullscale" to scale the samples in the host to the expected input range and/or output range of your application.
  • peak: specifies a fractional sample level to calculate scaling with the sc8 wire format. When using sc8 samples over the wire, the device must scale samples (both on the host and in the device) to satisfy the dynamic range needs. The peak value specifies a fraction of the maximum sample level (1.0 = 100%). Set peak to max_sample_level/full_scale_level to ensure optimum dynamic range.
  • underflow_policy: how the TX DSP should recover from underflow. Possible options are "next_burst" or "next_packet". In the "next_burst" mode, the DSP drops incoming packets until a new burst is started. In the "next_packet" mode, the DSP starts transmitting again at the next packet.
  • spp: (samples per packet) controls the size of RX packets. When not specified, the packets are always maximum frame size. Users should specify this option to request smaller than default packets, probably with the intention of reducing packet latency.

The following are not implemented, but are listed for conceptual purposes:

  • function: magnitude or phase/magnitude
  • units: numeric units like counts or dBm
std::vector<size_t> uhd::stream_args_t::channels

The channels is a list of channel numbers. Leave this blank to default to channel 0. Set channels for a multi-channel application. Channel mapping depends on the front-end selection.

std::string uhd::stream_args_t::cpu_format

The CPU format is a string that describes the format of host memory. Conversions for the following CPU formats have been implemented:

  • fc64 - complex<double>
  • fc32 - complex<float>
  • sc16 - complex<int16_t>
  • sc8 - complex<int8_t>

The following are not implemented, but are listed to demonstrate naming convention:

  • f32 - float
  • f64 - double
  • s16 - int16_t
  • s8 - int8_t
std::string uhd::stream_args_t::otw_format

The OTW format is a string that describes the format over-the-wire. The following over-the-wire formats have been implemented:

  • sc16 - Q16 I16
  • sc8 - Q8_1 I8_1 Q8_0 I8_0

The following are not implemented, but are listed to demonstrate naming convention:

  • s16 - R16_1 R16_0
  • s8 - R8_3 R8_2 R8_1 R8_0

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