Adding ini options for TGRewrite code

This commit is contained in:
Simon 2016-09-21 16:33:35 +01:00
parent aa69f1a660
commit 65bdc54997
9 changed files with 43 additions and 34 deletions

View file

@ -97,7 +97,7 @@ m_dmrSelfOnly(false),
m_TGRewriteSlot1(false), m_TGRewriteSlot1(false),
m_TGRewriteSlot2(false), m_TGRewriteSlot2(false),
m_BMAutoRewrite(false), m_BMAutoRewrite(false),
m_DirectDial(false), m_BMRewriteReflectorVoicePrompts(false),
m_dmrPrefixes(), m_dmrPrefixes(),
m_dmrBlackList(), m_dmrBlackList(),
m_dmrDstIdBlacklistSlot1RF(), m_dmrDstIdBlacklistSlot1RF(),
@ -206,7 +206,7 @@ bool CConf::read()
section = SECTION_NEXTION; section = SECTION_NEXTION;
else if (::strncmp(buffer, "[OLED]", 6U) == 0) else if (::strncmp(buffer, "[OLED]", 6U) == 0)
section = SECTION_OLED; section = SECTION_OLED;
else if (::strncmp(buffer, "[DMR TG Rewirte]", 16U) == 0) else if (::strncmp(buffer, "[DMR TG Rewrite]", 16U) == 0)
section = SECTION_TGREWRITE; section = SECTION_TGREWRITE;
else else
section = SECTION_NONE; section = SECTION_NONE;
@ -528,7 +528,7 @@ bool CConf::read()
m_TGRewriteSlot2 = ::atoi(value) == 1; m_TGRewriteSlot2 = ::atoi(value) == 1;
else if (::strcmp(key, "BMAutoRewrite") == 0) else if (::strcmp(key, "BMAutoRewrite") == 0)
m_BMAutoRewrite = ::atoi(value) == 1; m_BMAutoRewrite = ::atoi(value) == 1;
else if (::strcmp(key, "DirectDial") == 0) else if (::strcmp(key, "BMRewriteReflectorVoicePrompts") == 0)
m_BMAutoRewrite = ::atoi(value) == 1; m_BMAutoRewrite = ::atoi(value) == 1;
} }
@ -780,9 +780,9 @@ bool CConf::getDMRBMAutoRewrite() const
return m_BMAutoRewrite; return m_BMAutoRewrite;
} }
bool CConf::getDMRDirectDial() const bool CConf::getDMRBMRewriteReflectorVoicePrompts() const
{ {
return m_DirectDial; return m_BMRewriteReflectorVoicePrompts;
} }
std::vector<unsigned int> CConf::getDMRPrefixes() const std::vector<unsigned int> CConf::getDMRPrefixes() const

4
Conf.h
View file

@ -91,7 +91,7 @@ public:
bool getDMRTGRewriteSlot1() const; bool getDMRTGRewriteSlot1() const;
bool getDMRTGRewriteSlot2() const; bool getDMRTGRewriteSlot2() const;
bool getDMRBMAutoRewrite() const; bool getDMRBMAutoRewrite() const;
bool getDMRDirectDial() const; bool getDMRBMRewriteReflectorVoicePrompts() const;
std::vector<unsigned int> getDMRPrefixes() const; std::vector<unsigned int> getDMRPrefixes() const;
std::vector<unsigned int> getDMRBlackList() const; std::vector<unsigned int> getDMRBlackList() const;
std::vector<unsigned int> getDMRDstIdBlacklistSlot1RF() const; std::vector<unsigned int> getDMRDstIdBlacklistSlot1RF() const;
@ -220,7 +220,7 @@ private:
bool m_TGRewriteSlot1; bool m_TGRewriteSlot1;
bool m_TGRewriteSlot2; bool m_TGRewriteSlot2;
bool m_BMAutoRewrite; bool m_BMAutoRewrite;
bool m_DirectDial; bool m_BMRewriteReflectorVoicePrompts;
std::vector<unsigned int> m_dmrPrefixes; std::vector<unsigned int> m_dmrPrefixes;
std::vector<unsigned int> m_dmrBlackList; std::vector<unsigned int> m_dmrBlackList;

View file

@ -51,9 +51,10 @@ unsigned int DMRAccessControl::m_callHang;
bool DMRAccessControl::m_TGRewriteSlot1; bool DMRAccessControl::m_TGRewriteSlot1;
bool DMRAccessControl::m_TGRewriteSlot2; bool DMRAccessControl::m_TGRewriteSlot2;
bool DMRAccessControl::m_BMAutoRewrite;
bool DMRAccessControl::m_BMRewriteReflectorVoicePrompts;
void DMRAccessControl::init(const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, const std::vector<unsigned int>& SrcIdBlacklist, bool selfOnly, const std::vector<unsigned int>& prefixes,unsigned int id,unsigned int callHang,bool TGRewriteSlot1, bool TGRewriteSlot2, bool BMAutoRewrite, bool BMRewriteReflectorVoicePrompts)
void DMRAccessControl::init(const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, const std::vector<unsigned int>& SrcIdBlacklist, bool selfOnly, const std::vector<unsigned int>& prefixes,unsigned int id,unsigned int callHang,bool TGRewriteSlot1, bool TGRewriteSlot2)
{ {
m_dstBlackListSlot1RF = DstIdBlacklistSlot1RF; m_dstBlackListSlot1RF = DstIdBlacklistSlot1RF;
m_dstWhiteListSlot1RF = DstIdWhitelistSlot1RF; m_dstWhiteListSlot1RF = DstIdWhitelistSlot1RF;
@ -66,6 +67,8 @@ void DMRAccessControl::init(const std::vector<unsigned int>& DstIdBlacklistSlot1
m_callHang = callHang; m_callHang = callHang;
m_TGRewriteSlot1 = TGRewriteSlot1; m_TGRewriteSlot1 = TGRewriteSlot1;
m_TGRewriteSlot2 = TGRewriteSlot2; m_TGRewriteSlot2 = TGRewriteSlot2;
m_BMAutoRewrite = BMAutoRewrite;
m_BMRewriteReflectorVoicePrompts = BMRewriteReflectorVoicePrompts;
} }
bool DMRAccessControl::DstIdBlacklist(unsigned int did, unsigned int slot, bool network) bool DMRAccessControl::DstIdBlacklist(unsigned int did, unsigned int slot, bool network)
@ -203,26 +206,27 @@ bool DMRAccessControl::validateAccess (unsigned int src_id, unsigned int dst_id,
unsigned int DMRAccessControl::DstIdRewrite (unsigned int did, unsigned int sid, unsigned int slot, bool network, CDMRLC* dmrLC) unsigned int DMRAccessControl::DstIdRewrite (unsigned int did, unsigned int sid, unsigned int slot, bool network, CDMRLC* dmrLC)
{ {
// if (slot == 1 && m_TGRewriteSlot1 == false) if (slot == 1 && m_TGRewriteSlot1 == false)
// return 0; return 0;
// if (slot == 2 && m_TGRewriteSlot2 == false) if (slot == 2 && m_TGRewriteSlot2 == false)
// return 0; return 0;
std::time_t currenttime = std::time(nullptr); std::time_t currenttime = std::time(nullptr);
if (network) { if (network) {
m_dstRewriteID = did; m_dstRewriteID = did;
m_SrcID = sid; m_SrcID = sid;
//memcpy(&dmrLC, &m_lastdmrLC, sizeof(dmrLC)); memcpy(&m_lastdmrLC, &dmrLC, sizeof(dmrLC));
if ( (did < 4000 || did > 5000) && did > 0 && did != 9 && dmrLC->getFLCO() == FLCO_GROUP ) { if (m_BMAutoRewrite && (did < 4000 || did > 5000) && did > 0 && did != 9 && dmrLC->getFLCO() == FLCO_GROUP ) {
LogMessage("DMR Slot %u, Rewrite DST ID (TG) of of inbound network traffic from %u to 9",slot,did); LogMessage("DMR Slot %u, Rewrite DST ID (TG) of of inbound network traffic from %u to 9",slot,did);
return 9; return 9;
// rewrite incoming BM voice prompts to TG 9 // rewrite incoming BM voice prompts to TG 9
} else if ((sid >= 4000 && sid <= 5000) && dmrLC->getFLCO() == FLCO_USER_USER) { } else if (m_BMRewriteReflectorVoicePrompts && (sid >= 4000 && sid <= 5000) && dmrLC->getFLCO() == FLCO_USER_USER) {
dmrLC->setFLCO(FLCO_GROUP); dmrLC->setFLCO(FLCO_GROUP);
LogMessage("DMR Slot %u, Rewrite inbound private call to %u to Group Call on TG 9 (BM reflector voice prompt)",slot,did); LogMessage("DMR Slot %u, Rewrite inbound private call to %u to Group Call on TG 9 (BM reflector voice prompt)",slot,did);
return 9; return 9;
// commented because BM does not seem to pass Private Call to repeater ID. Will need to ask master devs.
// rewrite direct dial inbound // rewrite direct dial inbound
// } else if (did == 235135 && dmrLC->getFLCO() == FLCO_USER_USER) { // } else if (did == 235135 && dmrLC->getFLCO() == FLCO_USER_USER) {
// dmrLC->setFLCO(FLCO_GROUP); // dmrLC->setFLCO(FLCO_GROUP);
@ -231,15 +235,16 @@ unsigned int DMRAccessControl::DstIdRewrite (unsigned int did, unsigned int sid,
} else { } else {
return 0; return 0;
} }
} else if (did == 9 && m_dstRewriteID != 9 && m_dstRewriteID != 0 && (m_time + m_callHang) > currenttime && dmrLC->getFLCO() == FLCO_GROUP ) { } else if (m_BMAutoRewrite && did == 9 && m_dstRewriteID != 9 && m_dstRewriteID != 0 && (m_time + m_callHang) > currenttime && dmrLC->getFLCO() == FLCO_GROUP ) {
LogMessage("DMR Slot %u, Rewrite DST ID (TG) of outbound network traffic from %u to %u (return traffic during CallHang)",slot,did,m_dstRewriteID); LogMessage("DMR Slot %u, Rewrite DST ID (TG) of outbound network traffic from %u to %u (return traffic during CallHang)",slot,did,m_dstRewriteID);
return(m_dstRewriteID); return(m_dstRewriteID);
} else if ((did < 4000 || did > 5000) && did > 0 && did !=9) { } else if (m_BMAutoRewrite && (did < 4000 || did > 5000) && did > 0 && did !=9) {
m_dstRewriteID = did; m_dstRewriteID = did;
} //else if (m_dstRewriteID == 235135 && m_lastdmrLC->getFLCO() == FLCO_USER_USER) { // commented because BM does not seem to pass Private Call to repeater ID. Will need to ask master devs.
//LogMessage("DMR Slot %u, Rewrite DST ID of outbound network group call on TG %u to private call %u (direct dial response)",slot,did,m_SrcID); /*} else if (m_dstRewriteID == 235135 && m_lastdmrLC->getFLCO() == FLCO_USER_USER) {
//return(m_SrcID); LogMessage("DMR Slot %u, Rewrite DST ID of outbound network group call on TG %u to private call %u (direct dial response)",slot,did,m_SrcID);
//} return(m_SrcID);*/
}
return 0; return 0;
} }

View file

@ -23,7 +23,7 @@ class DMRAccessControl {
public: public:
static bool validateAccess (unsigned int src_id, unsigned int dst_id, unsigned int slot, bool network); static bool validateAccess (unsigned int src_id, unsigned int dst_id, unsigned int slot, bool network);
static void init(const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, const std::vector<unsigned int>& SrcIdBlacklist, bool selfOnly, const std::vector<unsigned int>& prefixes,unsigned int id,unsigned int callHang, bool TGRewrteSlot1, bool TGRewrteSlot2); static void init(const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, const std::vector<unsigned int>& SrcIdBlacklist, bool selfOnly, const std::vector<unsigned int>& prefixes,unsigned int id,unsigned int callHang, bool TGRewrteSlot1, bool TGRewrteSlot2, bool m_BMAutoRewrite, bool m_BMRewriteReflectorVoicePrompts);
static unsigned int DstIdRewrite(unsigned int id, unsigned int sid,unsigned int slot, bool network, CDMRLC* dmrLC); static unsigned int DstIdRewrite(unsigned int id, unsigned int sid,unsigned int slot, bool network, CDMRLC* dmrLC);
static void setOverEndTime(); static void setOverEndTime();
@ -60,6 +60,8 @@ private:
static bool m_TGRewriteSlot1; static bool m_TGRewriteSlot1;
static bool m_TGRewriteSlot2; static bool m_TGRewriteSlot2;
static bool m_BMAutoRewrite;
static bool m_BMRewriteReflectorVoicePrompts;
static CDMRLC* m_lastdmrLC; static CDMRLC* m_lastdmrLC;

View file

@ -20,7 +20,7 @@
#include <cassert> #include <cassert>
#include <algorithm> #include <algorithm>
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, unsigned int timeout, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, const std::string& lookupFile, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2) : CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, unsigned int timeout, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, const std::string& lookupFile, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2, bool BMAutoRewrite, bool BMRewriteReflectorVoicePrompts) :
m_id(id), m_id(id),
m_colorCode(colorCode), m_colorCode(colorCode),
m_selfOnly(selfOnly), m_selfOnly(selfOnly),
@ -38,7 +38,7 @@ m_lookup(NULL)
m_lookup = new CDMRLookup(lookupFile); m_lookup = new CDMRLookup(lookupFile);
m_lookup->read(); m_lookup->read();
CDMRSlot::init(id, colorCode, callHang, selfOnly, prefixes, blackList, DstIdBlacklistSlot1RF, DstIdWhitelistSlot1RF, DstIdBlacklistSlot2RF, DstIdWhitelistSlot2RF, DstIdBlacklistSlot1NET, DstIdWhitelistSlot1NET, DstIdBlacklistSlot2NET, DstIdWhitelistSlot2NET, modem, network, display, duplex, m_lookup, rssiMultiplier, rssiOffset, jitter, TGRewriteSlot1, TGRewriteSlot2); CDMRSlot::init(id, colorCode, callHang, selfOnly, prefixes, blackList, DstIdBlacklistSlot1RF, DstIdWhitelistSlot1RF, DstIdBlacklistSlot2RF, DstIdWhitelistSlot2RF, DstIdBlacklistSlot1NET, DstIdWhitelistSlot1NET, DstIdBlacklistSlot2NET, DstIdWhitelistSlot2NET, modem, network, display, duplex, m_lookup, rssiMultiplier, rssiOffset, jitter, TGRewriteSlot1, TGRewriteSlot2, BMAutoRewrite, BMRewriteReflectorVoicePrompts);
} }
CDMRControl::~CDMRControl() CDMRControl::~CDMRControl()

View file

@ -30,7 +30,7 @@
class CDMRControl { class CDMRControl {
public: public:
CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF,const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, unsigned int timeout, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, const std::string& lookupFile, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2); CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF,const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, unsigned int timeout, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, const std::string& lookupFile, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2, bool BMAutoRewrite, bool BMRewriteReflectorVoicePrompts);
~CDMRControl(); ~CDMRControl();
bool processWakeup(const unsigned char* data); bool processWakeup(const unsigned char* data);

View file

@ -1361,7 +1361,7 @@ void CDMRSlot::writeQueueNet(const unsigned char *data)
m_queue.addData(data, len); m_queue.addData(data, len);
} }
void CDMRSlot::init(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& SrcIdBlacklist, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, CDMRLookup* lookup, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2) void CDMRSlot::init(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& SrcIdBlacklist, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, CDMRLookup* lookup, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2, bool BMAutoRewrite, bool BMRewriteReflectorVoicePrompts)
{ {
assert(id != 0U); assert(id != 0U);
assert(modem != NULL); assert(modem != NULL);
@ -1396,7 +1396,7 @@ void CDMRSlot::init(unsigned int id, unsigned int colorCode, unsigned int callHa
slotType.getData(m_idle + 2U); slotType.getData(m_idle + 2U);
//Load black and white lists to DMRAccessControl //Load black and white lists to DMRAccessControl
DMRAccessControl::init(DstIdBlacklistSlot1RF, DstIdWhitelistSlot1RF, DstIdBlacklistSlot2RF, DstIdWhitelistSlot2RF, DstIdBlacklistSlot1NET, DstIdWhitelistSlot1NET, DstIdBlacklistSlot2NET, DstIdWhitelistSlot2NET, SrcIdBlacklist, m_selfOnly, m_prefixes, m_id,callHang, TGRewriteSlot1, TGRewriteSlot2); DMRAccessControl::init(DstIdBlacklistSlot1RF, DstIdWhitelistSlot1RF, DstIdBlacklistSlot2RF, DstIdWhitelistSlot2RF, DstIdBlacklistSlot1NET, DstIdWhitelistSlot1NET, DstIdBlacklistSlot2NET, DstIdWhitelistSlot2NET, SrcIdBlacklist, m_selfOnly, m_prefixes, m_id,callHang, TGRewriteSlot1, TGRewriteSlot2, BMAutoRewrite, BMRewriteReflectorVoicePrompts);
} }

View file

@ -50,7 +50,7 @@ public:
void clock(); void clock();
static void init(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& SrcIdBlackList, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, CDMRLookup* lookup, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2); static void init(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& SrcIdBlackList, const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, CDMRLookup* lookup, int rssiMultiplier, int rssiOffset, unsigned int jitter, bool TGRewriteSlot1, bool TGRewriteSlot2, bool BMAutoRewrite, bool BMRewriteReflectorVoicePrompts);
private: private:
unsigned int m_slotNo; unsigned int m_slotNo;

View file

@ -298,6 +298,8 @@ int CMMDVMHost::run()
bool selfOnly = m_conf.getDMRSelfOnly(); bool selfOnly = m_conf.getDMRSelfOnly();
bool TGRewriteSlot1 = m_conf.getDMRTGRewriteSlot1(); bool TGRewriteSlot1 = m_conf.getDMRTGRewriteSlot1();
bool TGRewriteSlot2 = m_conf.getDMRTGRewriteSlot2(); bool TGRewriteSlot2 = m_conf.getDMRTGRewriteSlot2();
bool BMAutoRewrite = m_conf.getDMRBMAutoRewrite();
bool BMRewriteReflectorVoicePrompts = m_conf.getDMRBMRewriteReflectorVoicePrompts();
std::vector<unsigned int> prefixes = m_conf.getDMRPrefixes(); std::vector<unsigned int> prefixes = m_conf.getDMRPrefixes();
std::vector<unsigned int> blackList = m_conf.getDMRBlackList(); std::vector<unsigned int> blackList = m_conf.getDMRBlackList();
std::vector<unsigned int> dstIDBlackListSlot1RF = m_conf.getDMRDstIdBlacklistSlot1RF(); std::vector<unsigned int> dstIDBlackListSlot1RF = m_conf.getDMRDstIdBlacklistSlot1RF();
@ -364,7 +366,7 @@ int CMMDVMHost::run()
LogInfo(" TG Rewrite Slot 2 enabled"); LogInfo(" TG Rewrite Slot 2 enabled");
dmr = new CDMRControl(id, colorCode, callHang, selfOnly, prefixes, blackList,dstIDBlackListSlot1RF,dstIDWhiteListSlot1RF, dstIDBlackListSlot2RF, dstIDWhiteListSlot2RF, dstIDBlackListSlot1NET,dstIDWhiteListSlot1NET, dstIDBlackListSlot2NET, dstIDWhiteListSlot2NET, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, lookupFile, rssiMultiplier, rssiOffset, jitter, TGRewriteSlot1, TGRewriteSlot2); dmr = new CDMRControl(id, colorCode, callHang, selfOnly, prefixes, blackList,dstIDBlackListSlot1RF,dstIDWhiteListSlot1RF, dstIDBlackListSlot2RF, dstIDWhiteListSlot2RF, dstIDBlackListSlot1NET,dstIDWhiteListSlot1NET, dstIDBlackListSlot2NET, dstIDWhiteListSlot2NET, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, lookupFile, rssiMultiplier, rssiOffset, jitter, TGRewriteSlot1, TGRewriteSlot2, BMAutoRewrite, BMRewriteReflectorVoicePrompts);
m_dmrTXTimer.setTimeout(txHang); m_dmrTXTimer.setTimeout(txHang);
} }