diff options
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp index 1fee0d40e..bac510f04 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp @@ -7,6 +7,7 @@ #ifndef INCLUDED_RFNOC_RFNOC_COMMON_HPP #define INCLUDED_RFNOC_RFNOC_COMMON_HPP +#include <uhd/transport/zero_copy.hpp> #include <memory> namespace uhd { namespace rfnoc { @@ -42,11 +43,33 @@ using sep_inst_t = uint16_t; using sep_addr_t = std::pair<device_id_t, sep_inst_t>; //! Stream Endpoint ID Type using sep_id_t = uint16_t; +//! Stream Endpoint pair Type (first = source, second = destination) +using sep_id_pair_t = std::pair<sep_id_t, sep_id_t>; +//! Stream Endpoint Virtual Channel Type +using sep_vc_t = uint8_t; -//! Type of data carried by the stream endpoint -enum class sep_type_t { CTRL, DATA }; +//! NULL/unassigned device ID +static constexpr device_id_t NULL_DEVICE_ID = 0; +//! NULL/unassigned device address +static constexpr sep_addr_t NULL_DEVICE_ADDR{NULL_DEVICE_ID, 0}; +//! NULL/unassigned stream endpoint ID +static constexpr sep_id_t NULL_EPID = 0; +// TODO: Update these +struct chdr_ctrl_xport_t +{ + chdr_ctrl_xport_t() = default; + uhd::transport::zero_copy_if::sptr recv; + uhd::transport::zero_copy_if::sptr send; + size_t recv_buff_size = 0; + size_t send_buff_size = 0; + sep_id_t src_epid = 0; + sep_id_t dst_epid = 0; +}; + +using chdr_data_xport_t = chdr_ctrl_xport_t; + //---------------------------------------------- // Constants //---------------------------------------------- |