aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/transport/links.hpp
blob: 89d5774ce8bfb86037eaeff5ec76b3d09f23c8a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//

#pragma once

#include <uhdlib/transport/io_service.hpp>
#include <uhdlib/transport/link_if.hpp>
#include <tuple>

namespace uhd { namespace transport {

enum class link_type_t { CTRL = 0, ASYNC_MSG, TX_DATA, RX_DATA };

//! Contains all information regarding a link interface
using both_links_t = std::tuple<uhd::transport::send_link_if::sptr,
    size_t, // num_send_frames
    uhd::transport::recv_link_if::sptr,
    size_t, // num_recv_frames
    bool, // lossy_xport
    bool, // packet flow control
    bool>; // enable flow control

/*!
 * Parameters for link creation.
 */
struct link_params_t
{
    size_t recv_frame_size = 0;
    size_t send_frame_size = 0;
    size_t num_recv_frames = 0;
    size_t num_send_frames = 0;
    size_t recv_buff_size  = 0;
    size_t send_buff_size  = 0;
};


}} // namespace uhd::transport