Commit 0074fe7c authored by Manolis Surligas's avatar Manolis Surligas

Make consistent the format of the message sink

parent 8424f593
......@@ -119,8 +119,8 @@ namespace gr
std::ofstream fd (filename.c_str ());
su = (uint8_t *) pmt::blob_data (msg);
for (size_t i = 0; i < pmt::blob_length (msg); i++) {
fd << "0x" << std::hex << std::setw (2)
<< std::setfill('0') << (uint32_t) su[i] << " ";
fd << "0x" << std::hex << std::setw (2) << std::setfill ('0')
<< (uint32_t) su[i] << " ";
}
fd.close ();
break;
......
......@@ -67,8 +67,8 @@ namespace gr
case 1:
su = (uint8_t *) pmt::blob_data (msg);
for (size_t i = 0; i < pmt::blob_length (msg); i++) {
d_fos << "0x" << std::hex << std::setw (2)
<< std::setfill('0') << (uint32_t) su[i] << " ";
d_fos << "0x" << std::hex << std::setw (2) << std::setfill ('0')
<< (uint32_t) su[i] << " ";
}
d_fos << std::endl;
break;
......@@ -110,7 +110,7 @@ namespace gr
case 1: // hex annotated
su = (uint8_t *) pmt::blob_data (msg);
for (size_t i = 0; i < pmt::blob_length (msg); i++) {
std::cout << std::hex << std::showbase << std::setw (4)
std::cout << "0x" << std::hex << std::setw (2) << std::setfill ('0')
<< (uint32_t) su[i] << " ";
}
std::cout << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment