summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/doxygen/other/metadata.dox43
-rw-r--r--docs/doxygen/other/msg_passing.dox16
-rw-r--r--gnuradio-core/src/examples/msg_passing/hier/test_msg_hier.grc4
-rw-r--r--gnuradio-core/src/examples/msg_passing/hier/test_msg_hier_topblock.grc4
-rw-r--r--gnuradio-core/src/examples/msg_passing/strobe.grc4
-rw-r--r--gnuradio-core/src/lib/runtime/qa_block_tags.cc182
-rw-r--r--gnuradio-core/src/python/gnuradio/gr/hier_block2.py4
-rw-r--r--gr-uhd/include/gr_uhd_usrp_sink.h12
-rw-r--r--gr-uhd/include/gr_uhd_usrp_source.h8
-rw-r--r--grc/blocks/gr_message_strobe.xml2
10 files changed, 138 insertions, 141 deletions
diff --git a/docs/doxygen/other/metadata.dox b/docs/doxygen/other/metadata.dox
index b527b21008..76553c696a 100644
--- a/docs/doxygen/other/metadata.dox
+++ b/docs/doxygen/other/metadata.dox
@@ -106,7 +106,7 @@ interface.
The file metadata consists of a static mandatory header and a dynamic
optional extras header. Each header is a separate PMT
dictionary. Headers are created by building a PMT dictionary
-(pmt::pmt_make_dict) of key:value pairs, then the dictionary is
+(pmt::make_dict) of key:value pairs, then the dictionary is
serialized into a string to be written to file. The header is always
the same length that is predetermined by the version of the header
(this must be known already). The header will then indicate if there
@@ -117,27 +117,26 @@ we use PMT operators. For example, we create a simplified version of
the header in C++ like this:
\code
- using namespace pmt;
const char METADATA_VERSION = 0x0;
- pmt_t header;
- header = pmt_make_dict();
- header = pmt_dict_add(header, mp("version"), mp(METADATA_VERSION));
- header = pmt_dict_add(header, mp("rx_rate"), mp(samp_rate));
- std::string hdr_str = pmt_serialize_str(header);
+ pmt::pmt_t header;
+ header = pmt::make_dict();
+ header = pmt::dict_add(header, pmt::mp("version"), pmt::mp(METADATA_VERSION));
+ header = pmt::dict_add(header, pmt::mp("rx_rate"), pmt::mp(samp_rate));
+ std::string hdr_str = pmt::serialize_str(header);
\endcode
-The call to pmt::pmt_dict_add adds a new key:value pair to the
+The call to pmt::dict_add adds a new key:value pair to the
dictionary. Notice that it both takes and returns the 'header'
variable. This is because we are actually creating a new dictionary
with this function, so we just assign it to the same variable.
The 'mp' functions are convenience functions provided by the PMT
library. They interpret the data type of the value being inserted and
-call the correct 'pmt_from_xxx' function. For more direct control over
+call the correct 'pmt::from_xxx' function. For more direct control over
the data type, see PMT functions in pmt.h, such as
-pmt::pmt_from_uint64 or pmt::pmt_from_double.
+pmt::from_uint64 or pmt::from_double.
-We finish this off by using pmt::pmt_serialize_str to convert the PMT
+We finish this off by using pmt::serialize_str to convert the PMT
dictionary into a specialized string format that makes it easy to
write to a file.
@@ -153,10 +152,10 @@ Assuming that 'std::string str' contains the full string as read from
a file, we can access the dictionary in C++ like this:
\code
- pmt_t hdr = pmt_deserialize_str(str);
- if(pmt_dict_has_key(hdr, pmt_string_to_symbol("strt"))) {
- pmt_t r = pmt_dict_ref(hdr, pmt_string_to_symbol("strt"), PMT_NIL);
- uint64_t seg_start = pmt_to_uint64(r);
+ pmt::pmt_t hdr = pmt::deserialize_str(str);
+ if(pmt::dict_has_key(hdr, pmt::string_to_symbol("strt"))) {
+ pmt::pmt_t r = pmt::dict_ref(hdr, pmt::string_to_symbol("strt"), pmt::PMT_NIL);
+ uint64_t seg_start = pmt::to_uint64(r);
uint64_t extra_len = seg_start - METADATA_HEADER_SIZE;
}
\endcode
@@ -221,7 +220,7 @@ a PMT dictionary of key:value pairs. The extras header can contain
anything and can grow while a program is running.
We can insert extra data into the header at the beginning if we
-wish. All we need to do is use the pmt::pmt_dict_add function to insert
+wish. All we need to do is use the pmt::dict_add function to insert
our hand-made metadata. This can be useful to add our own markers and
information.
@@ -239,7 +238,7 @@ When reading out data from the extras, we do not necessarily know the
data type of the PMT value. The key is always a PMT symbol, but the
value can be any other PMT type. There are PMT functions that allow us
to query the PMT to test if it is a particular type. We also have the
-ability to do pmt::pmt_print on any PMT object to print it to
+ability to do pmt::print on any PMT object to print it to
screen. Before converting from a PMT to it's natural data type, it is
necessary to know the data type.
@@ -313,12 +312,12 @@ encoded as a vector of uint16 with [day, month, year].
from gruel import pmt
from gnuradio import blocks
- key = pmt.pmt_intern("date")
- val = pmt.pmt_init_u16vector(3, [13,12,2012])
+ key = pmt.intern("date")
+ val = pmt.init_u16vector(3, [13,12,2012])
- extras = pmt.pmt_make_dict()
- extras = pmt.pmt_dict_add(extras, key, val)
- extras_str = pmt.pmt_serialize_str(extras)
+ extras = pmt.make_dict()
+ extras = pmt.dict_add(extras, key, val)
+ extras_str = pmt.serialize_str(extras)
self.sink = blocks.file_meta_sink(gr.sizeof_gr_complex,
"/tmp/metadat_file.out",
samp_rate, 1,
diff --git a/docs/doxygen/other/msg_passing.dox b/docs/doxygen/other/msg_passing.dox
index aea0ac94ae..7035f291e4 100644
--- a/docs/doxygen/other/msg_passing.dox
+++ b/docs/doxygen/other/msg_passing.dox
@@ -83,7 +83,7 @@ received by \b dbg on port \a print. Note here how we are just using
strings to define the ports, not PMT symbols. This is a convenience to
the user to be able to more easily type in the port names (for
reference, you can create a PMT symbol in Python using the
-pmt::pmt_intern function as pmt.pmt_intern("string")).
+pmt::intern function as pmt.intern("string")).
Users can also query blocks for the names of their input and output
ports using the following API calls:
@@ -157,13 +157,13 @@ void
gr_message_debug::print(pmt::pmt_t msg)
{
std::cout << "***** MESSAGE DEBUG PRINT ********\n";
- pmt::pmt_print(msg);
+ pmt::print(msg);
std::cout << "**********************************\n";
}
\endcode
The function simply takes in the PMT message and prints it. The method
-pmt::pmt_print is a function in the PMT library to print the
+pmt::print is a function in the PMT library to print the
PMT in a friendly, (mostly) pretty manner.
The gr_tagged_stream_to_pdu block only defines a single
@@ -196,11 +196,11 @@ gr_tagged_stream_to_pdu::send_message function that is shown below.
void
gr_tagged_stream_to_pdu::send_meassage()
{
- if(pmt::pmt_length(d_pdu_vector) != d_pdu_length) {
+ if(pmt::length(d_pdu_vector) != d_pdu_length) {
throw std::runtime_error("msg length not correct");
}
- pmt::pmt_t msg = pmt::pmt_cons(d_pdu_meta,
+ pmt::pmt_t msg = pmt::cons(d_pdu_meta,
d_pdu_vector);
message_port_pub(pdu_port_id, msg);
@@ -247,9 +247,9 @@ flowgraph. These PDUs could come from another block or flowgraph, but
here, we will create and insert them by hand.
\code
- port = pmt.pmt_intern("pdus")
- msg = pmt.pmt_cons(pmt.PMT_NIL,
- pmt.pmt_make_u8vector(16, 0xFF))
+ port = pmt.intern("pdus")
+ msg = pmt.cons(pmt.PMT_NIL,
+ pmt.make_u8vector(16, 0xFF))
src.to_basic_block()._post(port, msg)
\endcode
diff --git a/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier.grc b/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier.grc
index 0faed49bc7..0f25597666 100644
--- a/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier.grc
+++ b/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier.grc
@@ -142,7 +142,7 @@
</param>
<param>
<key>msg</key>
- <value>pmt.pmt_cons(pmt.PMT_NIL, pmt.pmt_make_u8vector(16,0x77))</value>
+ <value>pmt.cons(pmt.PMT_NIL, pmt.make_u8vector(16,0x77))</value>
</param>
<param>
<key>period</key>
@@ -204,7 +204,7 @@
</param>
<param>
<key>msg</key>
- <value>pmt.pmt_intern("OUTPUT2")</value>
+ <value>pmt.intern("OUTPUT2")</value>
</param>
<param>
<key>period</key>
diff --git a/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier_topblock.grc b/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier_topblock.grc
index f440b06b39..d9d9e62c38 100644
--- a/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier_topblock.grc
+++ b/gnuradio-core/src/examples/msg_passing/hier/test_msg_hier_topblock.grc
@@ -72,7 +72,7 @@
</param>
<param>
<key>msg</key>
- <value>pmt.pmt_intern("UPDATED2")</value>
+ <value>pmt.intern("UPDATED2")</value>
</param>
<param>
<key>period</key>
@@ -99,7 +99,7 @@
</param>
<param>
<key>msg</key>
- <value>pmt.pmt_intern("UPDATED")</value>
+ <value>pmt.intern("UPDATED")</value>
</param>
<param>
<key>period</key>
diff --git a/gnuradio-core/src/examples/msg_passing/strobe.grc b/gnuradio-core/src/examples/msg_passing/strobe.grc
index 7e7e8c345e..78c1786e21 100644
--- a/gnuradio-core/src/examples/msg_passing/strobe.grc
+++ b/gnuradio-core/src/examples/msg_passing/strobe.grc
@@ -132,7 +132,7 @@
</param>
<param>
<key>msg</key>
- <value>pmt.pmt_intern("TEST")</value>
+ <value>pmt.intern("TEST")</value>
</param>
<param>
<key>period</key>
@@ -159,7 +159,7 @@
</param>
<param>
<key>msg</key>
- <value>pmt.pmt_cons( pmt.PMT_NIL, pmt.pmt_make_u8vector(512,0) )</value>
+ <value>pmt.pmtcons( pmt.PMT_NIL, pmt.make_u8vector(512,0) )</value>
</param>
<param>
<key>period</key>
diff --git a/gnuradio-core/src/lib/runtime/qa_block_tags.cc b/gnuradio-core/src/lib/runtime/qa_block_tags.cc
index 8cc1b49b3c..d3ae476027 100644
--- a/gnuradio-core/src/lib/runtime/qa_block_tags.cc
+++ b/gnuradio-core/src/lib/runtime/qa_block_tags.cc
@@ -38,8 +38,6 @@
// ----------------------------------------------------------------
-using namespace pmt;
-
// set to 1 to turn on debug output
// The debug output fully checks that the tags seen are what are expected. While
// this behavior currently works with our implementation, there is no guarentee
@@ -119,39 +117,39 @@ qa_block_tags::t1 ()
str1 << ann1->name() << ann1->unique_id();
str2 << ann2->name() << ann2->unique_id();
- pmt_t expected_tags3[8];
- expected_tags3[0] = mp(pmt_from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
- expected_tags3[1] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
- expected_tags3[2] = mp(pmt_from_uint64(10000), mp(str1.str()), mp("seq"), mp(1));
- expected_tags3[3] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
- expected_tags3[4] = mp(pmt_from_uint64(20000), mp(str1.str()), mp("seq"), mp(2));
- expected_tags3[5] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
- expected_tags3[6] = mp(pmt_from_uint64(30000), mp(str1.str()), mp("seq"), mp(3));
- expected_tags3[7] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
-
- pmt_t expected_tags4[8];
- expected_tags4[0] = mp(pmt_from_uint64(0), mp(str2.str()), mp("seq"), mp(0));
- expected_tags4[1] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
- expected_tags4[2] = mp(pmt_from_uint64(10000), mp(str2.str()), mp("seq"), mp(1));
- expected_tags4[3] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
- expected_tags4[4] = mp(pmt_from_uint64(20000), mp(str2.str()), mp("seq"), mp(2));
- expected_tags4[5] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
- expected_tags4[6] = mp(pmt_from_uint64(30000), mp(str2.str()), mp("seq"), mp(3));
- expected_tags4[7] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
+ pmt::pmt_t expected_tags3[8];
+ expected_tags3[0] = mp(pmt::from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
+ expected_tags3[1] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
+ expected_tags3[2] = mp(pmt::from_uint64(10000), mp(str1.str()), mp("seq"), mp(1));
+ expected_tags3[3] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
+ expected_tags3[4] = mp(pmt::from_uint64(20000), mp(str1.str()), mp("seq"), mp(2));
+ expected_tags3[5] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
+ expected_tags3[6] = mp(pmt::from_uint64(30000), mp(str1.str()), mp("seq"), mp(3));
+ expected_tags3[7] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
+
+ pmt::pmt_t expected_tags4[8];
+ expected_tags4[0] = mp(pmt::from_uint64(0), mp(str2.str()), mp("seq"), mp(0));
+ expected_tags4[1] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
+ expected_tags4[2] = mp(pmt::from_uint64(10000), mp(str2.str()), mp("seq"), mp(1));
+ expected_tags4[3] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
+ expected_tags4[4] = mp(pmt::from_uint64(20000), mp(str2.str()), mp("seq"), mp(2));
+ expected_tags4[5] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
+ expected_tags4[6] = mp(pmt::from_uint64(30000), mp(str2.str()), mp("seq"), mp(3));
+ expected_tags4[7] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
std::cout << std::endl << "qa_block_tags::t1" << std::endl;
// For annotator 3, we know it gets tags from ann0 and ann1, test this
for(size_t i = 0; i < tags3.size(); i++) {
std::cout << "tags3[" << i << "] = " << tags3[i] << "\t\t" << expected_tags3[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags3[i]), pmt_write_string(expected_tags3[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags3[i]), pmt::write_string(expected_tags3[i]));
}
// For annotator 4, we know it gets tags from ann0 and ann2, test this
std::cout << std::endl;
for(size_t i = 0; i < tags4.size(); i++) {
std::cout << "tags4[" << i << "] = " << tags4[i] << "\t\t" << expected_tags4[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags4[i]), pmt_write_string(expected_tags4[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags4[i]), pmt::write_string(expected_tags4[i]));
}
#endif
}
@@ -209,33 +207,33 @@ qa_block_tags::t2 ()
str0 << ann0->name() << ann0->unique_id();
str1 << ann1->name() << ann1->unique_id();
- pmt_t expected_tags2[12];
- expected_tags2[0] = mp(pmt_from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
- expected_tags2[1] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
- expected_tags2[2] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
- expected_tags2[3] = mp(pmt_from_uint64(10000), mp(str1.str()), mp("seq"), mp(3));
- expected_tags2[4] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
- expected_tags2[5] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
- expected_tags2[6] = mp(pmt_from_uint64(20000), mp(str1.str()), mp("seq"), mp(6));
- expected_tags2[7] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
- expected_tags2[8] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
- expected_tags2[9] = mp(pmt_from_uint64(30000), mp(str1.str()), mp("seq"), mp(9));
- expected_tags2[10] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
- expected_tags2[11] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
-
- pmt_t expected_tags4[12];
- expected_tags4[0] = mp(pmt_from_uint64(0), mp(str1.str()), mp("seq"), mp(2));
- expected_tags4[1] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
- expected_tags4[2] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
- expected_tags4[3] = mp(pmt_from_uint64(10000), mp(str1.str()), mp("seq"), mp(5));
- expected_tags4[4] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
- expected_tags4[5] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
- expected_tags4[6] = mp(pmt_from_uint64(20000), mp(str1.str()), mp("seq"), mp(8));
- expected_tags4[7] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
- expected_tags4[8] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
- expected_tags4[9] = mp(pmt_from_uint64(30000), mp(str1.str()), mp("seq"), mp(11));
- expected_tags4[10] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
- expected_tags4[11] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
+ pmt::pmt_t expected_tags2[12];
+ expected_tags2[0] = mp(pmt::from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
+ expected_tags2[1] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
+ expected_tags2[2] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
+ expected_tags2[3] = mp(pmt::from_uint64(10000), mp(str1.str()), mp("seq"), mp(3));
+ expected_tags2[4] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
+ expected_tags2[5] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
+ expected_tags2[6] = mp(pmt::from_uint64(20000), mp(str1.str()), mp("seq"), mp(6));
+ expected_tags2[7] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
+ expected_tags2[8] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
+ expected_tags2[9] = mp(pmt::from_uint64(30000), mp(str1.str()), mp("seq"), mp(9));
+ expected_tags2[10] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
+ expected_tags2[11] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
+
+ pmt::pmt_t expected_tags4[12];
+ expected_tags4[0] = mp(pmt::from_uint64(0), mp(str1.str()), mp("seq"), mp(2));
+ expected_tags4[1] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
+ expected_tags4[2] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
+ expected_tags4[3] = mp(pmt::from_uint64(10000), mp(str1.str()), mp("seq"), mp(5));
+ expected_tags4[4] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
+ expected_tags4[5] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
+ expected_tags4[6] = mp(pmt::from_uint64(20000), mp(str1.str()), mp("seq"), mp(8));
+ expected_tags4[7] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
+ expected_tags4[8] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
+ expected_tags4[9] = mp(pmt::from_uint64(30000), mp(str1.str()), mp("seq"), mp(11));
+ expected_tags4[10] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
+ expected_tags4[11] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
std::cout << std::endl << "qa_block_tags::t2" << std::endl;
@@ -245,13 +243,13 @@ qa_block_tags::t2 ()
// inconceivable for ann3 to have it wrong.
for(size_t i = 0; i < tags2.size(); i++) {
std::cout << "tags2[" << i << "] = " << tags2[i] << "\t\t" << expected_tags2[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags2[i]), pmt_write_string(expected_tags2[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags2[i]), pmt::write_string(expected_tags2[i]));
}
std::cout << std::endl;
for(size_t i = 0; i < tags4.size(); i++) {
std::cout << "tags2[" << i << "] = " << tags4[i] << "\t\t" << expected_tags4[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags4[i]), pmt_write_string(expected_tags4[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags4[i]), pmt::write_string(expected_tags4[i]));
}
#endif
}
@@ -303,39 +301,39 @@ qa_block_tags::t3 ()
str1 << ann1->name() << ann1->unique_id();
str2 << ann2->name() << ann2->unique_id();
- pmt_t expected_tags3[8];
- expected_tags3[0] = mp(pmt_from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
- expected_tags3[1] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
- expected_tags3[2] = mp(pmt_from_uint64(10000), mp(str1.str()), mp("seq"), mp(1));
- expected_tags3[3] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
- expected_tags3[4] = mp(pmt_from_uint64(20000), mp(str1.str()), mp("seq"), mp(2));
- expected_tags3[5] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
- expected_tags3[6] = mp(pmt_from_uint64(30000), mp(str1.str()), mp("seq"), mp(3));
- expected_tags3[7] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
-
- pmt_t expected_tags4[8];
- expected_tags4[0] = mp(pmt_from_uint64(0), mp(str2.str()), mp("seq"), mp(0));
- expected_tags4[1] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
- expected_tags4[2] = mp(pmt_from_uint64(10000), mp(str2.str()), mp("seq"), mp(1));
- expected_tags4[3] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
- expected_tags4[4] = mp(pmt_from_uint64(20000), mp(str2.str()), mp("seq"), mp(2));
- expected_tags4[5] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
- expected_tags4[6] = mp(pmt_from_uint64(30000), mp(str2.str()), mp("seq"), mp(3));
- expected_tags4[7] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
+ pmt::pmt_t expected_tags3[8];
+ expected_tags3[0] = mp(pmt::from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
+ expected_tags3[1] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
+ expected_tags3[2] = mp(pmt::from_uint64(10000), mp(str1.str()), mp("seq"), mp(1));
+ expected_tags3[3] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(2));
+ expected_tags3[4] = mp(pmt::from_uint64(20000), mp(str1.str()), mp("seq"), mp(2));
+ expected_tags3[5] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(4));
+ expected_tags3[6] = mp(pmt::from_uint64(30000), mp(str1.str()), mp("seq"), mp(3));
+ expected_tags3[7] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(6));
+
+ pmt::pmt_t expected_tags4[8];
+ expected_tags4[0] = mp(pmt::from_uint64(0), mp(str2.str()), mp("seq"), mp(0));
+ expected_tags4[1] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(1));
+ expected_tags4[2] = mp(pmt::from_uint64(10000), mp(str2.str()), mp("seq"), mp(1));
+ expected_tags4[3] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(3));
+ expected_tags4[4] = mp(pmt::from_uint64(20000), mp(str2.str()), mp("seq"), mp(2));
+ expected_tags4[5] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(5));
+ expected_tags4[6] = mp(pmt::from_uint64(30000), mp(str2.str()), mp("seq"), mp(3));
+ expected_tags4[7] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(7));
std::cout << std::endl << "qa_block_tags::t3" << std::endl;
// For annotator 3, we know it gets tags from ann0 and ann1, test this
for(size_t i = 0; i < tags3.size(); i++) {
std::cout << "tags3[" << i << "] = " << tags3[i] << "\t\t" << expected_tags3[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags3[i]), pmt_write_string(expected_tags3[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags3[i]), pmt::write_string(expected_tags3[i]));
}
// For annotator 4, we know it gets tags from ann0 and ann2, test this
std::cout << std::endl;
for(size_t i = 0; i < tags4.size(); i++) {
std::cout << "tags4[" << i << "] = " << tags4[i] << "\t\t" << expected_tags4[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags4[i]), pmt_write_string(expected_tags4[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags4[i]), pmt::write_string(expected_tags4[i]));
}
#endif
}
@@ -412,23 +410,23 @@ qa_block_tags::t5 ()
str1 << ann1->name() << ann1->unique_id();
str2 << ann2->name() << ann2->unique_id();
- pmt_t expected_tags1[5];
- expected_tags1[0] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
- expected_tags1[1] = mp(pmt_from_uint64(10000), mp(str0.str()), mp("seq"), mp(1));
- expected_tags1[2] = mp(pmt_from_uint64(20000), mp(str0.str()), mp("seq"), mp(2));
- expected_tags1[3] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(3));
-
- pmt_t expected_tags2[10];
- expected_tags2[0] = mp(pmt_from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
- expected_tags2[1] = mp(pmt_from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
- expected_tags2[2] = mp(pmt_from_uint64(1000), mp(str1.str()), mp("seq"), mp(1));
- expected_tags2[3] = mp(pmt_from_uint64(1000), mp(str0.str()), mp("seq"), mp(1));
- expected_tags2[4] = mp(pmt_from_uint64(2000), mp(str1.str()), mp("seq"), mp(2));
- expected_tags2[5] = mp(pmt_from_uint64(2000), mp(str0.str()), mp("seq"), mp(2));
- expected_tags2[6] = mp(pmt_from_uint64(3000), mp(str1.str()), mp("seq"), mp(3));
- expected_tags2[7] = mp(pmt_from_uint64(3000), mp(str0.str()), mp("seq"), mp(3));
- expected_tags2[8] = mp(pmt_from_uint64(4000), mp(str1.str()), mp("seq"), mp(4));
- expected_tags2[9] = mp(pmt_from_uint64(4000), mp(str0.str()), mp("seq"), mp(4));
+ pmt::pmt_t expected_tags1[5];
+ expected_tags1[0] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
+ expected_tags1[1] = mp(pmt::from_uint64(10000), mp(str0.str()), mp("seq"), mp(1));
+ expected_tags1[2] = mp(pmt::from_uint64(20000), mp(str0.str()), mp("seq"), mp(2));
+ expected_tags1[3] = mp(pmt::from_uint64(30000), mp(str0.str()), mp("seq"), mp(3));
+
+ pmt::pmt_t expected_tags2[10];
+ expected_tags2[0] = mp(pmt::from_uint64(0), mp(str1.str()), mp("seq"), mp(0));
+ expected_tags2[1] = mp(pmt::from_uint64(0), mp(str0.str()), mp("seq"), mp(0));
+ expected_tags2[2] = mp(pmt::from_uint64(1000), mp(str1.str()), mp("seq"), mp(1));
+ expected_tags2[3] = mp(pmt::from_uint64(1000), mp(str0.str()), mp("seq"), mp(1));
+ expected_tags2[4] = mp(pmt::from_uint64(2000), mp(str1.str()), mp("seq"), mp(2));
+ expected_tags2[5] = mp(pmt::from_uint64(2000), mp(str0.str()), mp("seq"), mp(2));
+ expected_tags2[6] = mp(pmt::from_uint64(3000), mp(str1.str()), mp("seq"), mp(3));
+ expected_tags2[7] = mp(pmt::from_uint64(3000), mp(str0.str()), mp("seq"), mp(3));
+ expected_tags2[8] = mp(pmt::from_uint64(4000), mp(str1.str()), mp("seq"), mp(4));
+ expected_tags2[9] = mp(pmt::from_uint64(4000), mp(str0.str()), mp("seq"), mp(4));
std::cout << std::endl << "qa_block_tags::t5" << std::endl;
@@ -436,7 +434,7 @@ qa_block_tags::t5 ()
std::cout << "tags1.size(): " << tags1.size() << std::endl;
for(size_t i = 0; i < tags1.size(); i++) {
std::cout << "tags1[" << i << "] = " << tags1[i] << "\t\t" << expected_tags1[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags1[i]), pmt_write_string(expected_tags1[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags1[i]), pmt::write_string(expected_tags1[i]));
}
// annotator 2 gets tags from annotators 0 and 1
@@ -444,7 +442,7 @@ qa_block_tags::t5 ()
std::cout << "tags2.size(): " << tags2.size() << std::endl;
for(size_t i = 0; i < tags2.size(); i++) {
std::cout << "tags2[" << i << "] = " << tags2[i] << "\t\t" << expected_tags2[i] << std::endl;
- CPPUNIT_ASSERT_EQUAL(pmt_write_string(tags2[i]), pmt_write_string(expected_tags2[i]));
+ CPPUNIT_ASSERT_EQUAL(pmt::write_string(tags2[i]), pmt::write_string(expected_tags2[i]));
}
#endif
}
diff --git a/gnuradio-core/src/python/gnuradio/gr/hier_block2.py b/gnuradio-core/src/python/gnuradio/gr/hier_block2.py
index b055edc0b1..ff39b3e709 100644
--- a/gnuradio-core/src/python/gnuradio/gr/hier_block2.py
+++ b/gnuradio-core/src/python/gnuradio/gr/hier_block2.py
@@ -125,8 +125,8 @@ class hier_block2(object):
self.primitive_msg_disconnect(src.to_basic_block(), srcport, dst.to_basic_block(), dstport);
def message_port_register_hier_in(self, portname):
- self.primitive_message_port_register_hier_in(pmt.pmt_intern(portname));
+ self.primitive_message_port_register_hier_in(pmt.intern(portname));
def message_port_register_hier_out(self, portname):
- self.primitive_message_port_register_hier_out(pmt.pmt_intern(portname));
+ self.primitive_message_port_register_hier_out(pmt.intern(portname));
diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h
index eaf60fb777..b684ca146f 100644
--- a/gr-uhd/include/gr_uhd_usrp_sink.h
+++ b/gr-uhd/include/gr_uhd_usrp_sink.h
@@ -59,9 +59,9 @@ class uhd_usrp_sink;
* TX Stream tagging:
*
* The following tag keys will be consumed by the work function:
- * - pmt::pmt_string_to_symbol("tx_sob")
- * - pmt::pmt_string_to_symbol("tx_eob")
- * - pmt::pmt_string_to_symbol("tx_time")
+ * - pmt::string_to_symbol("tx_sob")
+ * - pmt::string_to_symbol("tx_eob")
+ * - pmt::string_to_symbol("tx_time")
*
* The sob and eob (start and end of burst) tag values are pmt booleans.
* When present, burst tags should be set to true (pmt::PMT_T).
@@ -92,9 +92,9 @@ GR_UHD_API boost::shared_ptr<uhd_usrp_sink> uhd_make_usrp_sink(
* TX Stream tagging:
*
* The following tag keys will be consumed by the work function:
- * - pmt::pmt_string_to_symbol("tx_sob")
- * - pmt::pmt_string_to_symbol("tx_eob")
- * - pmt::pmt_string_to_symbol("tx_time")
+ * - pmt::string_to_symbol("tx_sob")
+ * - pmt::string_to_symbol("tx_eob")
+ * - pmt::string_to_symbol("tx_time")
*
* The sob and eob (start and end of burst) tag values are pmt booleans.
* When present, burst tags should be set to true (pmt::PMT_T).
diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h
index 1243ddcc2f..a56da6ab09 100644
--- a/gr-uhd/include/gr_uhd_usrp_source.h
+++ b/gr-uhd/include/gr_uhd_usrp_source.h
@@ -59,9 +59,9 @@ class uhd_usrp_source;
* RX Stream tagging:
*
* The following tag keys will be produced by the work function:
- * - pmt::pmt_string_to_symbol("rx_time")
- * - pmt::pmt_string_to_symbol("rx_rate")
- * - pmt::pmt_string_to_symbol("rx_freq")
+ * - pmt::string_to_symbol("rx_time")
+ * - pmt::string_to_symbol("rx_rate")
+ * - pmt::string_to_symbol("rx_freq")
*
* The timstamp tag value is a pmt tuple of the following:
* (uint64 seconds, and double fractional seconds).
@@ -94,7 +94,7 @@ GR_UHD_API boost::shared_ptr<uhd_usrp_source> uhd_make_usrp_source(
* RX Stream tagging:
*
* The following tag keys will be produced by the work function:
- * - pmt::pmt_string_to_symbol("rx_time")
+ * - pmt::string_to_symbol("rx_time")
*
* The timstamp tag value is a pmt tuple of the following:
* (uint64 seconds, and double fractional seconds).
diff --git a/grc/blocks/gr_message_strobe.xml b/grc/blocks/gr_message_strobe.xml
index 60a7724dfc..067d345c8e 100644
--- a/grc/blocks/gr_message_strobe.xml
+++ b/grc/blocks/gr_message_strobe.xml
@@ -13,7 +13,7 @@
<param>
<name>Message PMT</name>
<key>msg</key>
- <value>pmt.pmt_intern("TEST")</value>
+ <value>pmt.intern("TEST")</value>
<type>raw</type>
</param>
<param>