|
virtual size_t | send (const send_buffs_type &buffs, size_t nsamps_per_buff, const tx_metadata_t &metadata, const io_type_t &io_type, send_mode_t send_mode, double timeout=0.1)=0 |
|
virtual size_t | recv (const recv_buffs_type &buffs, size_t nsamps_per_buff, rx_metadata_t &metadata, const io_type_t &io_type, recv_mode_t recv_mode, double timeout=0.1)=0 |
|
virtual size_t | get_max_send_samps_per_packet (void) const =0 |
|
virtual size_t | get_max_recv_samps_per_packet (void) const =0 |
|
virtual bool | recv_async_msg (async_metadata_t &async_metadata, double timeout=0.1)=0 |
|
| obj (void) |
|
| obj (const obj &o) |
|
template<class T > |
| obj (const T &o) |
|
virtual | ~obj (void) |
|
obj | operator[] (const obj &key) |
|
obj & | operator= (const obj &val) |
|
obj | get_link (void) const |
|
const std::type_info & | type (void) const |
|
template<class T > |
T | as (void) const |
|
The usrp device interface represents the usrp hardware. The api allows for discovery, configuration, and streaming.
Receive buffers containing IF data described by the metadata.
Receive handles fragmentation as follows: If the buffer has insufficient space to hold all samples that were received in a single packet over-the-wire, then the buffer will be completely filled and the implementation will hold a pointer into the remaining portion of the packet. Subsequent calls will load from the remainder of the packet, and will flag the metadata to show that this is a fragment. The next call to receive, after the remainder becomes exahausted, will perform an over-the-wire receive as usual. See the rx metadata fragment flags and offset fields for details.
This is a blocking call and will not return until the number of samples returned have been written into each buffer. Under a timeout condition, the number of samples returned may be less than the number of samples specified.
When using the full buffer recv mode, the metadata only applies to the first packet received and written into the recv buffers. Use the one packet recv mode to get per packet metadata.
- Parameters
-
buffs | a vector of writable memory to fill with IF data |
nsamps_per_buff | the size of each buffer in number of samples |
metadata | data to fill describing the buffer |
io_type | the type of data to fill into the buffer |
recv_mode | tells recv how to load the buffer |
timeout | the timeout in seconds to wait for a packet |
- Returns
- the number of samples received or 0 on error
Send buffers containing IF data described by the metadata.
Send handles fragmentation as follows: If the buffer has more samples 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. Fragmentation only applies in the full buffer send mode.
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 IF data |
nsamps_per_buff | the number of samples to send, per buffer |
metadata | data describing the buffer's contents |
io_type | the type of data loaded in the buffer |
send_mode | tells send how to unload the buffer |
timeout | the timeout in seconds to wait on a packet |
- Returns
- the number of samples sent