| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
dirtifier.hpp
Go to the documentation of this file.
1//
2// Copyright 2019 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/rfnoc/property.hpp>
10
11 namespace uhd { namespace rfnoc {
12
18 class dirtifier_t : public property_base_t
19{
20 public:
21 dirtifier_t()
22 : property_base_t("__ALWAYS_DIRTY__", res_source_info(res_source_info::FRAMEWORK))
23 {
24 // nop
25 }
26
28 bool is_dirty() const override
29 {
30 return true;
31 }
32
34 bool is_valid() const override
35 {
36 return false;
37 }
38
40 bool equal(property_base_t*) const override
41 {
42 return false;
43 }
44
46 void force_dirty() override {}
47
48 void set_from_str(const std::string&) override
49 {
50 throw uhd::runtime_error("Dirtifier property can never be set!");
51 }
52
53 private:
55 void mark_clean() override {}
56
58 void forward(property_base_t*) override
59 {
60 throw uhd::type_error("Cannot forward to or from dirtifier property!");
61 }
62
64 bool is_type_equal(property_base_t*) const override
65 {
66 return false;
67 }
68};
69
70}} /* namespace uhd::rfnoc */
uhd::rfnoc::dirtifier_t::force_dirty
void force_dirty() override
Always dirty, so this can be called as often as we like.
Definition dirtifier.hpp:46
uhd::rfnoc::dirtifier_t::set_from_str
void set_from_str(const std::string &) override
Definition dirtifier.hpp:48
uhd::rfnoc::dirtifier_t::is_dirty
bool is_dirty() const override
This property is always dirty.
Definition dirtifier.hpp:28
uhd::rfnoc::dirtifier_t::dirtifier_t
dirtifier_t()
Definition dirtifier.hpp:21
uhd::rfnoc::dirtifier_t::equal
bool equal(property_base_t *) const override
This property is never equal to anything else.
Definition dirtifier.hpp:40
uhd::rfnoc::dirtifier_t::is_valid
bool is_valid() const override
This property is always invalid.
Definition dirtifier.hpp:34
uhd::rfnoc::property_base_t::property_base_t
property_base_t(const std::string &id, const res_source_info &source_info)
Definition property.hpp:36
uhd::rfnoc
Definition actions.hpp:25
uhd
Definition build_info.hpp:12
property.hpp
uhd::rfnoc::res_source_info
Definition res_source_info.hpp:18
uhd::runtime_error
Definition exception.hpp:132
uhd::type_error
Definition exception.hpp:96