diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-09-29 14:23:50 -0700 |
---|---|---|
committer | mbr0wn <martin.braun@ettus.com> | 2016-10-13 16:39:54 -0700 |
commit | 8d9ae5b37b4f0c5339fffc138332c9afdf65b11d (patch) | |
tree | aa3558edbc8fb028ffa0a6c3fb53086f21f3bba1 /host/include | |
parent | 95c7337c01c53ffab409cd54fc63db1f0d049d64 (diff) | |
download | uhd-8d9ae5b37b4f0c5339fffc138332c9afdf65b11d.tar.gz uhd-8d9ae5b37b4f0c5339fffc138332c9afdf65b11d.tar.bz2 uhd-8d9ae5b37b4f0c5339fffc138332c9afdf65b11d.zip |
rfnoc nodes: Disconnect on destruct
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/rfnoc/node_ctrl_base.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/host/include/uhd/rfnoc/node_ctrl_base.hpp b/host/include/uhd/rfnoc/node_ctrl_base.hpp index 82e095b1d..071de803c 100644 --- a/host/include/uhd/rfnoc/node_ctrl_base.hpp +++ b/host/include/uhd/rfnoc/node_ctrl_base.hpp @@ -65,6 +65,18 @@ public: node_map_t list_downstream_nodes() { return _downstream_nodes; }; node_map_t list_upstream_nodes() { return _upstream_nodes; }; + /*! Disconnect this node from all neighbouring nodes. + */ + void disconnect(); + + /*! Identify \p output_port as unconnected + */ + void disconnect_output_port(const size_t output_port); + + /*! Identify \p input_port as unconnected + */ + void disconnect_input_port(const size_t input_port); + // TODO we need a more atomic connect procedure, this is too error-prone. /*! For an existing connection, store the remote port number. @@ -156,8 +168,8 @@ protected: /*********************************************************************** * Structors **********************************************************************/ - node_ctrl_base(void) {}; - virtual ~node_ctrl_base() {}; + node_ctrl_base(void) {} + virtual ~node_ctrl_base() { disconnect(); } /*********************************************************************** * Protected members |