USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
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 
15 namespace uhd { namespace usrp {
16 
17 class UHD_API dboard_id_t : boost::equality_comparable<dboard_id_t>
18 {
19 public:
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 
71 private:
72  uint16_t _id; // internal representation
73 };
74 
82 UHD_API bool operator==(const dboard_id_t& lhs, const dboard_id_t& rhs);
83 
84 }} // namespace uhd::usrp
config.hpp
UHD_API
#define UHD_API
Definition: config.h:87
uhd::usrp::dboard_id_t
Definition: dboard_id.hpp:17
uhd
Definition: build_info.hpp:12
uhd::usrp::operator==
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)