USRP Hardware Driver and USRP Manual  Version: 3.11.0.HEAD-0-gdca39145
UHD and USRP Manual
dboard_id.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010 Ettus Research LLC
3 //
4 // SPDX-License-Identifier: GPL-3.0
5 //
6 
7 #ifndef INCLUDED_UHD_USRP_DBOARD_ID_HPP
8 #define INCLUDED_UHD_USRP_DBOARD_ID_HPP
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  public:
23  dboard_id_t(uint16_t id = 0xffff);
24 
29  static dboard_id_t none(void);
30 
36  static dboard_id_t from_uint16(uint16_t uint16);
37 
42  uint16_t to_uint16(void) const;
43 
50  static dboard_id_t from_string(const std::string &string);
51 
56  std::string to_string(void) const;
57 
62  std::string to_cname(void) const;
63 
68  std::string to_pp_string(void) const;
69 
70  private:
71  uint16_t _id; //internal representation
72  };
73 
81  UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs);
82 
83 }} //namespace
84 
85 #endif /* INCLUDED_UHD_USRP_DBOARD_ID_HPP */
Definition: dboard_id.hpp:17
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:62