Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for gnuradio 3.11 / newer spdlog library #390

Open
wants to merge 7 commits into
base: maint-3.10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/decode_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ class decode_mac_impl : public decode_mac
return;
}

mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") %
d_ofdm.encoding % d_frame.psdu_size % d_frame.n_sym);
d_logger->info("encoding: {} - length: {} - symbols: {}",
d_ofdm.encoding, d_frame.psdu_size, d_frame.n_sym);

// create PDU
pmt::pmt_t blob = pmt::make_blob(out_bytes + 2, d_frame.psdu_size - 4);
Expand Down
4 changes: 2 additions & 2 deletions lib/frame_equalizer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ bool frame_equalizer_impl::parse_signal(uint8_t* decoded_bits)
return false;
}

mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") % d_frame_encoding %
d_frame_bytes % d_frame_symbols);
d_logger->info("encoding: {} - length: {} - symbols: {}",d_frame_encoding,
d_frame_bytes, d_frame_symbols);
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/parse_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class parse_mac_impl : public parse_mac
int frame_len = pmt::blob_length(d_msg);
mac_header* h = (mac_header*)pmt::blob_data(d_msg);

mylog(boost::format("length: %1%") % frame_len);
d_logger->info("length: {}",frame_len);

dout << std::endl << "new mac frame (length " << frame_len << ")" << std::endl;
dout << "=========================================" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion lib/sync_long.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class sync_long_impl : public sync_long

if (d_offset == SYNC_LENGTH) {
search_frame_start();
mylog(boost::format("LONG: frame start at %1%") % d_frame_start);
d_logger->info("LONG: frame start at {}",d_frame_start);
d_offset = 0;
d_count = 0;
d_state = COPY;
Expand Down
2 changes: 1 addition & 1 deletion lib/sync_short.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class sync_short_impl : public sync_short

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);
d_logger->info("frame start at in: {} out: {}", item, input_item);

const pmt::pmt_t key = pmt::string_to_symbol("wifi_start");
const pmt::pmt_t value = pmt::from_double(freq_offset);
Expand Down
4 changes: 3 additions & 1 deletion lib/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ using gr::ieee802_11::Encoding;
#define mylog(msg) \
do { \
if (d_log) { \
GR_LOG_INFO(d_logger, msg); \
std::ostringstream msgx; \
msgx << msg; \
GR_LOG_INFO(d_logger, msgx.str()); \
} \
} while (0);

Expand Down