diff options
author | Marcus Müller <Marcus.Mueller@ettus.com> | 2015-06-28 12:47:46 +0200 |
---|---|---|
committer | Marcus Müller <Marcus.Mueller@ettus.com> | 2015-06-28 12:47:46 +0200 |
commit | 5fb8f138e8d68496a60d627ff33bb5a84a7a67b8 (patch) | |
tree | 1db1e29813389df82862d4401d0d910b753b30a2 | |
parent | b9034d561b09f2c10f85507662cfd3a3900efead (diff) |
added Doxygen for flowgraph
-rw-r--r-- | gnuradio-runtime/include/gnuradio/flowgraph.h | 76 |
1 files changed, 61 insertions, 15 deletions
diff --git a/gnuradio-runtime/include/gnuradio/flowgraph.h b/gnuradio-runtime/include/gnuradio/flowgraph.h index 452a20cbc6..280c01fc28 100644 --- a/gnuradio-runtime/include/gnuradio/flowgraph.h +++ b/gnuradio-runtime/include/gnuradio/flowgraph.h @@ -146,49 +146,95 @@ namespace gr { public: friend GR_RUNTIME_API flowgraph_sptr make_flowgraph(); - // Destruct an arbitrary flowgraph + /*! + * \brief Destruct an arbitrary flowgraph + */ virtual ~flowgraph(); - // Connect two endpoints + /*! + * \brief Connect two endpoints + * \details + * Checks the validity of both endpoints, and whether the + * destination is unused so far, then adds the edge to the internal list of + * edges. + */ void connect(const endpoint &src, const endpoint &dst); - // Disconnect two endpoints + /*! + * \brief Disconnect two endpoints + */ void disconnect(const endpoint &src, const endpoint &dst); - // Connect an output port to an input port (convenience) + /*! + * \brief convenience wrapper; used to connect two endpoints + */ void connect(basic_block_sptr src_block, int src_port, basic_block_sptr dst_block, int dst_port); - // Disconnect an input port from an output port (convenience) + /*! + * \brief convenience wrapper; used to disconnect two endpoints + */ void disconnect(basic_block_sptr src_block, int src_port, basic_block_sptr dst_block, int dst_port); - // Connect two msg endpoints + /*! + * \brief Connect two message endpoints + * \details + * Checks the validity of both endpoints, then adds the edge to the + * internal list of edges. + */ void connect(const msg_endpoint &src, const msg_endpoint &dst); - // Disconnect two msg endpoints + /*! + * \brief Disconnect two message endpoints + */ void disconnect(const msg_endpoint &src, const msg_endpoint &dst); - // Validate connectivity, raise exception if invalid + /*! + * \brief Validate flow graph + * \details + * Gathers all used blocks, checks the contiguity of all connected in- and + * outputs, and calls the check_topology method of each block. + */ void validate(); - // Clear existing flowgraph + /*! + * \brief Clear existing flowgraph + */ void clear(); - // Return vector of edges + /*! + * \brief Get vector of edges + */ const edge_vector_t &edges() const { return d_edges; } - // Return vector of msg edges + /*! + * \brief Get vector of message edges + */ const msg_edge_vector_t &msg_edges() const { return d_msg_edges; } - // Return vector of connected blocks + /*! + * \brief calculates all used blocks in a flow graph + * \details + * Iterates over all message edges and stream edges, noting both endpoints in a vector. + * + * \return a unique vector of used blocks + */ basic_block_vector_t calc_used_blocks(); - // Return toplogically sorted vector of blocks. All the sources come first. + /*! + * \brief topologically sort blocks + * \details + * Uses depth-first search to return a sorted vector of blocks + * + * \return toplogically sorted vector of blocks. All the sources come first. + */ basic_block_vector_t topological_sort(basic_block_vector_t &blocks); - // Return vector of vectors of disjointly connected blocks, - // topologically sorted. + /*! + * \brief Calculate vector of disjoint graph partions + * \return vector of disjoint vectors of topologically sorted blocks + */ std::vector<basic_block_vector_t> partition(); protected: |