Skip to content

Commit 8722ae5

Browse files
authored
When logging Control Channel decode rate warnings, include the Control Channel's frequency. (#1030)
1 parent bd545a3 commit 8722ae5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

trunk-recorder/monitor_systems.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ bool start_recorder(Call *call, TrunkMessage message, Config &config, System *sy
1919
bool source_found = false;
2020
bool recorder_found = false;
2121
bool override_record_unknown = false;
22-
22+
2323
Recorder *recorder;
2424
Recorder *debug_recorder;
2525
Recorder *sigmf_recorder;
26-
26+
2727
if (!talkgroup){
2828
BOOST_FOREACH (auto &TGID, sys->get_talkgroup_patch(call->get_talkgroup())) { //for each talkgroup in the patch
2929
if (sys->find_talkgroup(TGID) != NULL){ //if the patched talkgroup is known
@@ -219,7 +219,7 @@ void manage_conventional_call(Call *call, Config &config) {
219219
// if any recording has happened
220220

221221
if (call->get_current_length() > 0) {
222-
222+
223223
BOOST_LOG_TRIVIAL(trace) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\033[0m Call Length: " << call->get_current_length() << "s\t Idle: " << call->get_recorder()->is_idle() << "\t Squelched: " << call->get_recorder()->is_squelched() << " Idle Count: " << call->get_idle_count();
224224

225225
// means that the squelch is on and it has stopped recording
@@ -753,9 +753,9 @@ void check_message_count(float timeDiff, Config &config, gr::top_block_sptr &tb,
753753
}
754754

755755
if (msgs_decoded_per_second < config.control_message_warn_rate) {
756-
BOOST_LOG_TRIVIAL(error) << "[" << sys->get_short_name() << "]\t Control Channel Message Decode Rate: " << msgs_decoded_per_second << "/sec, count: " << sys->message_count;
756+
BOOST_LOG_TRIVIAL(error) << "[" << sys->get_short_name() << "]\tfreq: " << format_freq(sys->get_current_control_channel()) << "\tControl Channel Message Decode Rate: " << msgs_decoded_per_second << "/sec, count: " << sys->message_count;
757757
} else if (config.control_message_warn_rate == -1) {
758-
BOOST_LOG_TRIVIAL(info) << "[" << sys->get_short_name() << "]\t Control Channel Message Decode Rate: " << msgs_decoded_per_second << "/sec, count: " << sys->message_count;
758+
BOOST_LOG_TRIVIAL(info) << "[" << sys->get_short_name() << "]\tfreq: " << format_freq(sys->get_current_control_channel()) << "\tControl Channel Message Decode Rate: " << msgs_decoded_per_second << "/sec, count: " << sys->message_count;
759759
}
760760
}
761761
sys->message_count = 0;
@@ -898,4 +898,4 @@ int monitor_messages(Config &config, gr::top_block_sptr &tb, std::vector<Source
898898
print_status(sources, systems, calls);
899899
}
900900
}
901-
}
901+
}

0 commit comments

Comments
 (0)