diff options
author | Eric Blossom | 2010-09-26 15:43:39 -0700 |
---|---|---|
committer | Eric Blossom | 2010-09-27 14:56:44 -0700 |
commit | bca2f5a5abf62eb51eb7b6230e8877e17b86d91d (patch) | |
tree | bcc8c9f06fa54df520e1184cbf1b9d3b87a27db9 /vrt/lib/expanded_if_context_section.cc | |
parent | d80ed729f2559076b243d5de97fce7b570fc28d1 (diff) | |
download | gnuradio-bca2f5a5abf62eb51eb7b6230e8877e17b86d91d.tar.gz gnuradio-bca2f5a5abf62eb51eb7b6230e8877e17b86d91d.tar.bz2 gnuradio-bca2f5a5abf62eb51eb7b6230e8877e17b86d91d.zip |
Display context assoc lists
Diffstat (limited to 'vrt/lib/expanded_if_context_section.cc')
-rw-r--r-- | vrt/lib/expanded_if_context_section.cc | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/vrt/lib/expanded_if_context_section.cc b/vrt/lib/expanded_if_context_section.cc index acefa5bdb..46c30be23 100644 --- a/vrt/lib/expanded_if_context_section.cc +++ b/vrt/lib/expanded_if_context_section.cc @@ -490,6 +490,28 @@ namespace vrt os << std::endl; } + + static void wr_cntx_list(std::ostream &os, const std::string &name, const std::vector<uint32_t> &v) + { + if (v.empty()) + return; + + wr_name(os, " " + name); + for (size_t j = 0; j < v.size(); j++) + os << format("%#x ") % v[j]; + os << std::endl; + } + + static void wr_cntx_assoc_lists(std::ostream &os, const exp_context_assocs &x) + { + os << std::endl; + wr_cntx_list(os, "source", x.source); + wr_cntx_list(os, "system", x.system); + wr_cntx_list(os, "vector", x.vector_comp); + wr_cntx_list(os, "async_chan", x.async_channel); + wr_cntx_list(os, "async_tag", x.async_tag); + } + void expanded_if_context_section::write(std::ostream &os) const @@ -607,11 +629,13 @@ namespace vrt if (cif & CI_GPS_ASCII) if (!u.get_gps_ascii(e->gps_ascii)) return false; - - if (cif & CI_CNTX_ASSOC_LISTS) - if (!u.get_cntx_assoc_lists(e->cntx_assoc_lists)) - return false; #endif + + if (cif & CI_CNTX_ASSOC_LISTS){ + wr_name(os, "cntx_assoc_lists"); + wr_cntx_assoc_lists(os, cntx_assoc_lists); + } + } std::ostream& operator<<(std::ostream &os, const expanded_if_context_section &obj) |