mirror of
https://github.com/g4klx/DMRGateway.git
synced 2026-04-06 23:13:48 +00:00
Add basic rule tracing.
This commit is contained in:
parent
efbf42ff83
commit
2e257da997
17 changed files with 177 additions and 56 deletions
|
|
@ -19,13 +19,15 @@
|
|||
#include "PassAllTG.h"
|
||||
|
||||
#include "DMRDefines.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
|
||||
CPassAllTG::CPassAllTG(const char* name, unsigned int slot) :
|
||||
CPassAllTG::CPassAllTG(const char* name, unsigned int slot, bool trace) :
|
||||
m_name(name),
|
||||
m_slot(slot)
|
||||
m_slot(slot),
|
||||
m_trace(trace)
|
||||
{
|
||||
assert(slot == 1U || slot == 2U);
|
||||
}
|
||||
|
|
@ -36,12 +38,22 @@ CPassAllTG::~CPassAllTG()
|
|||
|
||||
bool CPassAllTG::processRF(CDMRData& data)
|
||||
{
|
||||
return process(data);
|
||||
bool ret = process(data);
|
||||
|
||||
if (m_trace)
|
||||
LogDebug("Rule Trace,\tPassAllTG %s Slot=%u: %s", m_name, m_slot, ret ? "matched" : "not matched");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool CPassAllTG::processNet(CDMRData& data)
|
||||
{
|
||||
return process(data);
|
||||
bool ret = process(data);
|
||||
|
||||
if (m_trace)
|
||||
LogDebug("Rule Trace,\tPassAllTG %s Slot=%u: %s", m_name, m_slot, ret ? "matched" : "not matched");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool CPassAllTG::process(CDMRData& data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue