USRP Hardware Driver and USRP Manual  Version: 3.15.0.HEAD-0-g6563c537
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 #ifndef INCLUDED_UHD_USRP_DBOARD_ID_HPP
9 #define INCLUDED_UHD_USRP_DBOARD_ID_HPP
10 
11 #include <uhd/config.hpp>
12 #include <stdint.h>
13 #include <boost/operators.hpp>
14 #include <string>
15 
16 namespace uhd { namespace usrp {
17 
18 class UHD_API dboard_id_t : boost::equality_comparable<dboard_id_t>
19 {
20 public:
25  dboard_id_t(uint16_t id = 0xffff);
26 
31  static dboard_id_t none(void);
32 
38  static dboard_id_t from_uint16(uint16_t uint16);
39 
44  uint16_t to_uint16(void) const;
45 
52  static dboard_id_t from_string(const std::string& string);
53 
58  std::string to_string(void) const;
59 
64  std::string to_cname(void) const;
65 
70  std::string to_pp_string(void) const;
71 
72 private:
73  uint16_t _id; // internal representation
74 };
75 
83 UHD_API bool operator==(const dboard_id_t& lhs, const dboard_id_t& rhs);
84 
85 }} // namespace uhd::usrp
86 
87 #endif /* INCLUDED_UHD_USRP_DBOARD_ID_HPP */
Definition: dboard_id.hpp:18
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
Definition: build_info.hpp:13
#define UHD_API
Definition: config.h:68