USRP Hardware Driver and USRP Manual  Version: 3.11.0.HEAD-0-ge00f1f37
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  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
85 
86 #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:14
#define UHD_API
Definition: config.h:63