USRP Hardware Driver and USRP Manual Version: 4.1.0.1
UHD and USRP Manual
dboard_id.hpp
Go to the documentation of this file.
1//
2// Copyright 2010 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#pragma once
9
10#include <uhd/config.hpp>
11#include <stdint.h>
12#include <boost/operators.hpp>
13#include <string>
14
15namespace uhd { namespace usrp {
16
17class UHD_API dboard_id_t : boost::equality_comparable<dboard_id_t>
18{
19public:
24 dboard_id_t(uint16_t id = 0xffff);
25
30 static dboard_id_t none(void);
31
37 static dboard_id_t from_uint16(uint16_t uint16);
38
43 uint16_t to_uint16(void) const;
44
51 static dboard_id_t from_string(const std::string& string);
52
57 std::string to_string(void) const;
58
63 std::string to_cname(void) const;
64
69 std::string to_pp_string(void) const;
70
71private:
72 uint16_t _id; // internal representation
73};
74
82UHD_API bool operator==(const dboard_id_t& lhs, const dboard_id_t& rhs);
83
84}} // namespace uhd::usrp
Definition: dboard_id.hpp:18
uint16_t to_uint16(void) const
dboard_id_t(uint16_t id=0xffff)
static dboard_id_t from_uint16(uint16_t uint16)
std::string to_pp_string(void) const
std::string to_cname(void) const
static dboard_id_t from_string(const std::string &string)
static dboard_id_t none(void)
std::string to_string(void) const
#define UHD_API
Definition: config.h:70
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
Definition: build_info.hpp:12