USRP Hardware Driver and USRP Manual
Version: 3.15.0.0-2+b1
UHD and USRP Manual
stream_sig.hpp
Go to the documentation of this file.
1
//
2
// Copyright 2014-2015 Ettus Research LLC
3
// Copyright 2018 Ettus Research, a National Instruments Company
4
//
5
// SPDX-License-Identifier: GPL-3.0-or-later
6
//
7
8
#ifndef INCLUDED_LIBUHD_RFNOC_STREAMSIG_HPP
9
#define INCLUDED_LIBUHD_RFNOC_STREAMSIG_HPP
10
11
#include <
uhd/config.hpp
>
12
#include <iostream>
13
14
namespace
uhd
{
namespace
rfnoc {
15
23
class
UHD_RFNOC_API
stream_sig_t
24
{
25
public
:
26
/***********************************************************************
27
* Structors
28
***********************************************************************/
29
stream_sig_t
();
30
31
/***********************************************************************
32
* The stream signature attributes
33
***********************************************************************/
35
// to empty.
36
std::string item_type;
37
39
size_t
vlen;
40
42
size_t
packet_size;
43
44
bool
is_bursty;
45
46
/***********************************************************************
47
* Helpers
48
***********************************************************************/
50
std::string to_string();
52
std::string to_pp_string();
53
55
// Note: The vector length is *not* considered here.
56
//
57
// \returns Number of bytes per item or 0 if the item type is
58
// undefined.
59
// \throws uhd::key_error if the item type is invalid.
60
size_t
get_bytes_per_item
()
const
;
61
67
static
bool
is_compatible(
68
const
stream_sig_t
& output_sig,
const
stream_sig_t
& input_sig);
69
};
70
72
UHD_INLINE
std::ostream&
operator<<
(std::ostream& out,
stream_sig_t
stream_sig)
73
{
74
out << stream_sig.
to_string
().c_str();
75
return
out;
76
}
77
78
}}
/* namespace uhd::rfnoc */
79
80
#endif
/* INCLUDED_LIBUHD_RFNOC_STREAMSIG_HPP */
config.hpp
uhd::rfnoc::operator<<
std::ostream & operator<<(std::ostream &out, block_id_t block_id)
Shortcut for << block_id.to_string()
Definition:
block_id.hpp:227
UHD_RFNOC_API
#define UHD_RFNOC_API
Definition:
config.hpp:117
UHD_INLINE
#define UHD_INLINE
Definition:
config.h:53
uhd
Definition:
build_info.hpp:13
uhd::rfnoc::stream_sig_t::to_string
std::string to_string()
Compact string representation.
uhd::rfnoc::stream_sig_t
Definition:
stream_sig.hpp:23
uhd::convert::get_bytes_per_item
UHD_API size_t get_bytes_per_item(const std::string &format)
Convert an item format to a size in bytes.
include
uhd
rfnoc
stream_sig.hpp
Generated by
1.8.16