first release of translation facility
* runtime - loading and translating * design-time - works with *.ts file (pip_tr utility) * compile-time - CMake macro for compile *.ts
This commit is contained in:
@@ -152,16 +152,16 @@ void PIDiagnostics::sended(int size) {
|
||||
|
||||
|
||||
void PIDiagnostics::tick(int) {
|
||||
auto speed_sec = "/s"_tr("PIDiag");
|
||||
mutex_state.lock();
|
||||
auto speed_sec = PITranslator::tr("/s", "PIDiag");
|
||||
// piCoutObj << "lock";
|
||||
int tcnt_recv = 0;
|
||||
int tcnt_send = 0;
|
||||
Entry send = calcHistory(history_send, tcnt_send);
|
||||
Entry recv = calcHistory(history_rec, tcnt_recv);
|
||||
float itr = disconn_.toSeconds() * (float(tcnt_recv) / history_rec.size());
|
||||
float its = disconn_.toSeconds() * (float(tcnt_send) / history_send.size());
|
||||
float hz = 1. / interval().toSeconds();
|
||||
int tcnt_recv = 0;
|
||||
int tcnt_send = 0;
|
||||
Entry send = calcHistory(history_send, tcnt_send);
|
||||
Entry recv = calcHistory(history_rec, tcnt_recv);
|
||||
float itr = disconn_.toSeconds() * (float(tcnt_recv) / history_rec.size());
|
||||
float its = disconn_.toSeconds() * (float(tcnt_send) / history_send.size());
|
||||
float hz = 1. / interval().toSeconds();
|
||||
if (tcnt_recv == 0) {
|
||||
cur_state.integral_freq = cur_state.immediate_freq = 0;
|
||||
cur_state.received_packets_per_sec = cur_state.received_bytes_per_sec = 0;
|
||||
@@ -197,7 +197,7 @@ void PIDiagnostics::tick(int) {
|
||||
diag = PIDiagnostics::Good;
|
||||
}
|
||||
if ((tcnt_send + tcnt_recv) != 0) {
|
||||
// piCoutObj << tcnt_recv << tcnt_send;
|
||||
// piCoutObj << tcnt_recv << tcnt_send;
|
||||
history_rec.dequeue();
|
||||
history_send.dequeue();
|
||||
Entry e;
|
||||
@@ -225,7 +225,7 @@ PIDiagnostics::Entry PIDiagnostics::calcHistory(PIQueue<Entry> & hist, int & cnt
|
||||
if (!hist[i].empty) cnt++;
|
||||
}
|
||||
e.empty = false;
|
||||
// piCoutObj << hist.size() << cnt;
|
||||
// piCoutObj << hist.size() << cnt;
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user