diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-05-15 10:26:44 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:14 -0800 |
commit | b8a6c64d6012ab1ec0b3b843fccec2d990d440a3 (patch) | |
tree | 31a99d71af5a6aa2db2a7c9f2a7d19986a2d3856 /host/lib/rfnoc/actions.cpp | |
parent | d6251df6347390e74784b2fbe116b0e64780547e (diff) | |
download | uhd-b8a6c64d6012ab1ec0b3b843fccec2d990d440a3.tar.gz uhd-b8a6c64d6012ab1ec0b3b843fccec2d990d440a3.tar.bz2 uhd-b8a6c64d6012ab1ec0b3b843fccec2d990d440a3.zip |
rfnoc: Add action API
- Added action_info class
- Allow to send actions from node to node
- Allow to post actions into nodes
- Allow to set default forwarding policies
- Added unit tests
Diffstat (limited to 'host/lib/rfnoc/actions.cpp')
-rw-r--r-- | host/lib/rfnoc/actions.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/host/lib/rfnoc/actions.cpp b/host/lib/rfnoc/actions.cpp new file mode 100644 index 000000000..1f5f0f2f7 --- /dev/null +++ b/host/lib/rfnoc/actions.cpp @@ -0,0 +1,21 @@ +// +// Copyright 2019 Ettus Research, a National Instruments Brand +// +// SPDX-License-Identifier: GPL-3.0-or-later +// + +#include <uhd/rfnoc/actions.hpp> +#include <atomic> + +using namespace uhd::rfnoc; + +namespace { + // A static counter, which we use to uniquely label actions + std::atomic<size_t> action_counter{0}; +} + +action_info::action_info(const std::string& key_) : id(action_counter++), key(key_) +{ + // nop +} + |