Loading...
Searching...
No Matches
gpio_power_iface.hpp
Go to the documentation of this file.
//
// Copyright 2021 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <uhd/features/discoverable_feature.hpp>
#include <memory>
#include <string>
#include <vector>
namespace uhd { namespace features {
class UHD_API gpio_power_iface : public discoverable_feature
{
public:
using sptr = std::shared_ptr<gpio_power_iface>;
static discoverable_feature::feature_id_t get_feature_id()
{
return discoverable_feature::GPIO_POWER;
}
std::string get_feature_name() const
{
return "GPIO power configuration";
}
virtual ~gpio_power_iface() = default;
virtual std::vector<std::string> get_supported_voltages(
const std::string& port) const = 0;
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 void set_external_power(const std::string& port, bool enable) = 0;
virtual std::string get_external_power_status(const std::string& port) const = 0;
};
}} // namespace uhd::features
uhd::features::discoverable_feature
Definition discoverable_feature.hpp:26
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::features::discoverable_feature::GPIO_POWER
@ GPIO_POWER
Definition discoverable_feature.hpp:39
uhd::features::gpio_power_iface
Definition gpio_power_iface.hpp:21
uhd::features::gpio_power_iface::set_port_voltage
virtual void set_port_voltage(const std::string &port, const std::string &voltage)=0
uhd::features::gpio_power_iface::get_port_voltage
virtual std::string get_port_voltage(const std::string &port) const =0
uhd::features::gpio_power_iface::get_external_power_status
virtual std::string get_external_power_status(const std::string &port) const =0
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::sptr
std::shared_ptr< gpio_power_iface > sptr
Definition gpio_power_iface.hpp:23
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::gpio_power_iface::get_supported_voltages
virtual std::vector< std::string > get_supported_voltages(const std::string &port) const =0
uhd::features::gpio_power_iface::~gpio_power_iface
virtual ~gpio_power_iface()=default
uhd::features::gpio_power_iface::set_external_power
virtual void set_external_power(const std::string &port, bool enable)=0
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
discoverable_feature.hpp
uhd::features
Definition adc_self_calibration_iface.hpp:16
uhd
Definition build_info.hpp:12