change logging
This commit is contained in:
+4
-3
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <boost/crc.hpp>
|
#include <boost/crc.hpp>
|
||||||
#include <boost/format.hpp>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
@@ -147,8 +146,10 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") %
|
mylog("encoding: {} - length: {} - symbols: {}",
|
||||||
d_ofdm.encoding % d_frame.psdu_size % d_frame.n_sym);
|
d_ofdm.encoding,
|
||||||
|
d_frame.psdu_size,
|
||||||
|
d_frame.n_sym);
|
||||||
|
|
||||||
// create PDU
|
// create PDU
|
||||||
pmt::pmt_t blob = pmt::make_blob(out_bytes + 2, d_frame.psdu_size - 4);
|
pmt::pmt_t blob = pmt::make_blob(out_bytes + 2, d_frame.psdu_size - 4);
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
#include "frame_equalizer_impl.h"
|
#include "frame_equalizer_impl.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
namespace gr {
|
namespace gr {
|
||||||
namespace ieee802_11 {
|
namespace ieee802_11 {
|
||||||
@@ -360,8 +359,10 @@ bool frame_equalizer_impl::parse_signal(uint8_t* decoded_bits)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") % d_frame_encoding %
|
mylog("encoding: {} - length: {} - symbols: {}",
|
||||||
d_frame_bytes % d_frame_symbols);
|
d_frame_encoding,
|
||||||
|
d_frame_bytes,
|
||||||
|
d_frame_symbols);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -21,7 +21,6 @@
|
|||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
|
|
||||||
@@ -64,7 +63,7 @@ public:
|
|||||||
int frame_len = pmt::blob_length(d_msg);
|
int frame_len = pmt::blob_length(d_msg);
|
||||||
mac_header* h = (mac_header*)pmt::blob_data(d_msg);
|
mac_header* h = (mac_header*)pmt::blob_data(d_msg);
|
||||||
|
|
||||||
mylog(boost::format("length: %1%") % frame_len);
|
mylog("length: {}",frame_len);
|
||||||
|
|
||||||
dout << std::endl << "new mac frame (length " << frame_len << ")" << std::endl;
|
dout << std::endl << "new mac frame (length " << frame_len << ")" << std::endl;
|
||||||
dout << "=========================================" << std::endl;
|
dout << "=========================================" << std::endl;
|
||||||
|
|||||||
+1
-2
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -113,7 +112,7 @@ public:
|
|||||||
|
|
||||||
if (d_offset == SYNC_LENGTH) {
|
if (d_offset == SYNC_LENGTH) {
|
||||||
search_frame_start();
|
search_frame_start();
|
||||||
mylog(boost::format("LONG: frame start at %1%") % d_frame_start);
|
mylog("LONG: frame start at {}",d_frame_start);
|
||||||
d_offset = 0;
|
d_offset = 0;
|
||||||
d_count = 0;
|
d_count = 0;
|
||||||
d_state = COPY;
|
d_state = COPY;
|
||||||
|
|||||||
+1
-2
@@ -19,7 +19,6 @@
|
|||||||
#include <ieee802_11/sync_short.h>
|
#include <ieee802_11/sync_short.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
|
|
||||||
@@ -139,7 +138,7 @@ public:
|
|||||||
|
|
||||||
void insert_tag(uint64_t item, double freq_offset, uint64_t input_item)
|
void insert_tag(uint64_t item, double freq_offset, uint64_t input_item)
|
||||||
{
|
{
|
||||||
mylog(boost::format("frame start at in: %2% out: %1%") % item % input_item);
|
mylog("frame start at in: {} out: {}", item, input_item);
|
||||||
|
|
||||||
const pmt::pmt_t key = pmt::string_to_symbol("wifi_start");
|
const pmt::pmt_t key = pmt::string_to_symbol("wifi_start");
|
||||||
const pmt::pmt_t value = pmt::from_double(freq_offset);
|
const pmt::pmt_t value = pmt::from_double(freq_offset);
|
||||||
|
|||||||
+2
-2
@@ -32,10 +32,10 @@ using gr::ieee802_11::Encoding;
|
|||||||
#define MAX_ENCODED_BITS ((16 + 8 * MAX_PSDU_SIZE + 6) * 2 + MAX_BITS_PER_SYM)
|
#define MAX_ENCODED_BITS ((16 + 8 * MAX_PSDU_SIZE + 6) * 2 + MAX_BITS_PER_SYM)
|
||||||
|
|
||||||
#define dout d_debug&& std::cout
|
#define dout d_debug&& std::cout
|
||||||
#define mylog(msg) \
|
#define mylog(...) \
|
||||||
do { \
|
do { \
|
||||||
if (d_log) { \
|
if (d_log) { \
|
||||||
GR_LOG_INFO(d_logger, msg); \
|
d_logger->info(__VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user