Add optional names for each network for use in the log,

This commit is contained in:
Jonathan Naylor
2017-08-01 21:51:22 +01:00
parent 49254bc7c9
commit 367116bdf4
19 changed files with 175 additions and 89 deletions

View File

@@ -25,7 +25,7 @@
#include <cstdio>
#include <cassert>
CRewriteSrc::CRewriteSrc(const char* name, unsigned int fromSlot, unsigned int fromId, unsigned int toSlot, unsigned int toTG, unsigned int range) :
CRewriteSrc::CRewriteSrc(const std::string& name, unsigned int fromSlot, unsigned int fromId, unsigned int toSlot, unsigned int toTG, unsigned int range) :
m_name(name),
m_fromSlot(fromSlot),
m_fromIdStart(fromId),
@@ -53,7 +53,7 @@ bool CRewriteSrc::process(CDMRData& data, bool trace)
if (flco != FLCO_USER_USER || slotNo != m_fromSlot || srcId < m_fromIdStart || srcId > m_fromIdEnd) {
if (trace)
LogDebug("Rule Trace,\tRewriteSrc from %s Slot=%u Src=%u-%u: not matched", m_name, m_fromSlot, m_fromIdStart, m_fromIdEnd);
LogDebug("Rule Trace,\tRewriteSrc from %s Slot=%u Src=%u-%u: not matched", m_name.c_str(), m_fromSlot, m_fromIdStart, m_fromIdEnd);
return false;
}
@@ -82,8 +82,8 @@ bool CRewriteSrc::process(CDMRData& data, bool trace)
}
if (trace) {
LogDebug("Rule Trace,\tRewriteSrc from %s Slot=%u Src=%u-%u: matched", m_name, m_fromSlot, m_fromIdStart, m_fromIdEnd);
LogDebug("Rule Trace,\tRewriteSrc to %s Slot=%u Dst=TG%u", m_name, m_toSlot, m_toTG);
LogDebug("Rule Trace,\tRewriteSrc from %s Slot=%u Src=%u-%u: matched", m_name.c_str(), m_fromSlot, m_fromIdStart, m_fromIdEnd);
LogDebug("Rule Trace,\tRewriteSrc to %s Slot=%u Dst=TG%u", m_name.c_str(), m_toSlot, m_toTG);
}
return true;