All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
uhd::tx_streamer Class Referenceabstract

`#include <stream.hpp>`

Inheritance diagram for uhd::tx_streamer:

## Public Types

typedef boost::shared_ptr < tx_streamer > | sptr
typedef ref_vector< const void * > | buffs_type
| Typedef for a pointer to a single, or a collection of send buffers. More...

## Public Member Functions

virtual size_t | get_num_channels (void) const =0
| Get the number of channels associated with this streamer. More...
virtual size_t | get_max_num_samps (void) const =0
| Get the max number of samples per buffer per packet. More...
virtual size_t | send (const buffs_type &buffs, const size_t nsamps_per_buff, const tx_metadata_t &metadata, const double timeout=0.1)=0

## Detailed Description

The TX streamer is the host interface to transmitting samples. It represents the layer between the samples on the host and samples inside the device's transmit DSP processing.

## Member Typedef Documentation

typedef ref_vector<const void *> uhd::tx_streamer::buffs_type

Typedef for a pointer to a single, or a collection of send buffers.

typedef boost::shared_ptr<tx_streamer> uhd::tx_streamer::sptr

## Member Function Documentation

virtual size_t uhd::tx_streamer::get_max_num_samps | ( | void |  | ) | const

pure virtual

Get the max number of samples per buffer per packet.

virtual size_t uhd::tx_streamer::get_num_channels | ( | void |  | ) | const

pure virtual

Get the number of channels associated with this streamer.

virtual size_t uhd::tx_streamer::send | ( | const buffs_type & | buffs,
|  | const size_t | nsamps_per_buff,
|  | const tx_metadata_t & | metadata,
|  | const double | timeout = `0.1`
| ) |  |

pure virtual

Send buffers containing samples described by the metadata.

Send handles fragmentation as follows: If the buffer has more items than the maximum per packet, the send method will fragment the samples across several packets. Send will respect the burst flags when fragmenting to ensure that start of burst can only be set on the first fragment and that end of burst can only be set on the final fragment.

This is a blocking call and will not return until the number of samples returned have been read out of each buffer. Under a timeout condition, the number of samples returned may be less than the number of samples specified.

Parameters

  buffs | a vector of read-only memory containing samples
  nsamps_per_buff | the number of samples to send, per buffer
  metadata | data describing the buffer's contents
  timeout | the timeout in seconds to wait on a packet

Returns
  the number of samples sent

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

- include/uhd/stream.hpp