USRP Hardware Driver and USRP Manual  Version: 4.2.0.0+ds1-2
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 
10 #include <memory>
11 #include <string>
12 #include <vector>
13 
14 namespace uhd { namespace features {
15 
20 {
21 public:
22  using sptr = std::shared_ptr<gpio_power_iface>;
23 
25  {
27  }
28 
29  std::string get_feature_name() const
30  {
31  return "GPIO power configuration";
32  }
33 
34  virtual ~gpio_power_iface() = default;
35 
43  virtual std::vector<std::string> get_supported_voltages(
44  const std::string& port) const = 0;
45 
52  virtual void set_port_voltage(
53  const std::string& port, const std::string& voltage) = 0;
54 
60  virtual std::string get_port_voltage(const std::string& port) const = 0;
61 
71  virtual void set_external_power(const std::string& port, bool enable) = 0;
72 
81  virtual std::string get_external_power_status(const std::string& port) const = 0;
82 };
83 
84 }} // namespace uhd::features
Definition: discoverable_feature.hpp:25
feature_id_t
An enum of all features supported by the driver. When creating a new.
Definition: discoverable_feature.hpp:31
@ GPIO_POWER
Definition: discoverable_feature.hpp:38
std::shared_ptr< discoverable_feature > sptr
Definition: discoverable_feature.hpp:27
Definition: gpio_power_iface.hpp:20
virtual void set_port_voltage(const std::string &port, const std::string &voltage)=0
virtual std::string get_port_voltage(const std::string &port) const =0
virtual std::string get_external_power_status(const std::string &port) const =0
static discoverable_feature::feature_id_t get_feature_id()
Definition: gpio_power_iface.hpp:24
std::string get_feature_name() const
Returns a human-readable string name of this feature.
Definition: gpio_power_iface.hpp:29
virtual ~gpio_power_iface()=default
virtual std::vector< std::string > get_supported_voltages(const std::string &port) const =0
virtual void set_external_power(const std::string &port, bool enable)=0
Definition: build_info.hpp:12