USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
gpio_power_iface.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2021 Ettus Research, a National Instruments Brand
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #pragma once
8 
9 #include <uhd/config.hpp>
11 #include <memory>
12 #include <string>
13 #include <vector>
14 
15 namespace uhd { namespace features {
16 
21 {
22 public:
23  using sptr = std::shared_ptr<gpio_power_iface>;
24 
26  {
28  }
29 
30  std::string get_feature_name() const
31  {
32  return "GPIO power configuration";
33  }
34 
35  virtual ~gpio_power_iface() = default;
36 
44  virtual std::vector<std::string> get_supported_voltages(
45  const std::string& port) const = 0;
46 
53  virtual void set_port_voltage(
54  const std::string& port, const std::string& voltage) = 0;
55 
61  virtual std::string get_port_voltage(const std::string& port) const = 0;
62 
72  virtual void set_external_power(const std::string& port, bool enable) = 0;
73 
82  virtual std::string get_external_power_status(const std::string& port) const = 0;
83 };
84 
85 }} // namespace uhd::features
discoverable_feature.hpp
config.hpp
uhd::features::discoverable_feature::GPIO_POWER
@ GPIO_POWER
Definition: discoverable_feature.hpp:39
UHD_API
#define UHD_API
Definition: config.h:87
uhd::features::discoverable_feature::feature_id_t
feature_id_t
An enum of all features supported by the driver. When creating a new.
Definition: discoverable_feature.hpp:32
uhd
Definition: build_info.hpp:12
uhd::features::gpio_power_iface::get_feature_name
std::string get_feature_name() const
Returns a human-readable string name of this feature.
Definition: gpio_power_iface.hpp:30
uhd::features::discoverable_feature
Definition: discoverable_feature.hpp:25
uhd::features::discoverable_feature::sptr
std::shared_ptr< discoverable_feature > sptr
Definition: discoverable_feature.hpp:28
uhd::features::gpio_power_iface::get_feature_id
static discoverable_feature::feature_id_t get_feature_id()
Definition: gpio_power_iface.hpp:25
uhd::features::gpio_power_iface
Definition: gpio_power_iface.hpp:20