wip
This commit is contained in:
parent
ec1692608d
commit
90bad8d9c8
17
Conf.cpp
17
Conf.cpp
|
@ -43,7 +43,8 @@ enum SECTION {
|
|||
SECTION_TFTSERIAL,
|
||||
SECTION_HD44780,
|
||||
SECTION_NEXTION,
|
||||
SECTION_OLED
|
||||
SECTION_OLED,
|
||||
SECTION_TGREWRITE
|
||||
};
|
||||
|
||||
CConf::CConf(const std::string& file) :
|
||||
|
@ -95,6 +96,8 @@ m_dmrColorCode(2U),
|
|||
m_dmrSelfOnly(false),
|
||||
m_TGRewriteSlot1(false),
|
||||
m_TGRewriteSlot2(false),
|
||||
m_BMAutoRewrite(false),
|
||||
m_DirectDial(false),
|
||||
m_dmrPrefixes(),
|
||||
m_dmrBlackList(),
|
||||
m_dmrDstIdBlacklistSlot1RF(),
|
||||
|
@ -204,7 +207,7 @@ bool CConf::read()
|
|||
else if (::strncmp(buffer, "[OLED]", 6U) == 0)
|
||||
section = SECTION_OLED;
|
||||
else if (::strncmp(buffer, "[DMR TG Rewirte]", 16U) == 0)
|
||||
section = SECTION_TGREWRITE
|
||||
section = SECTION_TGREWRITE;
|
||||
else
|
||||
section = SECTION_NONE;
|
||||
|
||||
|
@ -772,6 +775,16 @@ bool CConf::getDMRTGRewriteSlot2() const
|
|||
return m_TGRewriteSlot2;
|
||||
}
|
||||
|
||||
bool CConf::getDMRBMAutoRewrite() const
|
||||
{
|
||||
return m_BMAutoRewrite;
|
||||
}
|
||||
|
||||
bool CConf::getDMRDirectDial() const
|
||||
{
|
||||
return m_DirectDial;
|
||||
}
|
||||
|
||||
std::vector<unsigned int> CConf::getDMRPrefixes() const
|
||||
{
|
||||
return m_dmrPrefixes;
|
||||
|
|
5
Conf.h
5
Conf.h
|
@ -90,6 +90,8 @@ public:
|
|||
bool getDMRSelfOnly() const;
|
||||
bool getDMRTGRewriteSlot1() const;
|
||||
bool getDMRTGRewriteSlot2() const;
|
||||
bool getDMRBMAutoRewrite() const;
|
||||
bool getDMRDirectDial() const;
|
||||
std::vector<unsigned int> getDMRPrefixes() const;
|
||||
std::vector<unsigned int> getDMRBlackList() const;
|
||||
std::vector<unsigned int> getDMRDstIdBlacklistSlot1RF() const;
|
||||
|
@ -217,6 +219,9 @@ private:
|
|||
bool m_dmrSelfOnly;
|
||||
bool m_TGRewriteSlot1;
|
||||
bool m_TGRewriteSlot2;
|
||||
bool m_BMAutoRewrite;
|
||||
bool m_DirectDial;
|
||||
|
||||
std::vector<unsigned int> m_dmrPrefixes;
|
||||
std::vector<unsigned int> m_dmrBlackList;
|
||||
std::vector<unsigned int> m_dmrDstIdBlacklistSlot1RF;
|
||||
|
|
|
@ -224,22 +224,22 @@ unsigned int DMRAccessControl::DstIdRewrite (unsigned int did, unsigned int sid,
|
|||
LogMessage("DMR Slot %u, Rewrite inbound private call to %u to Group Call on TG 9 (BM reflector voice prompt)",slot,did);
|
||||
return 9;
|
||||
// rewrite direct dial inbound
|
||||
} else if (did == 235135 && dmrLC->getFLCO() == FLCO_USER_USER) {
|
||||
dmrLC->setFLCO(FLCO_GROUP);
|
||||
LogMessage("DMR Slot %u, Rewrite inbound private call to repeater ID to Group Call on TG9 (direct dial)",slot,did);
|
||||
return(9);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
// } else if (did == 235135 && dmrLC->getFLCO() == FLCO_USER_USER) {
|
||||
// dmrLC->setFLCO(FLCO_GROUP);
|
||||
// LogMessage("DMR Slot %u, Rewrite inbound private call to repeater ID to Group Call on TG9 (direct dial)",slot,did);
|
||||
// return(9);
|
||||
// } else {
|
||||
// return 0;
|
||||
// }
|
||||
} else if (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);
|
||||
return(m_dstRewriteID);
|
||||
} else if ((did < 4000 || did > 5000) && did > 0 && did !=9) {
|
||||
m_dstRewriteID = did;
|
||||
} else if (m_dstRewriteID == 235135 && m_lastdmrLC->getFLCO() == FLCO_USER_USER) {
|
||||
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);
|
||||
}
|
||||
} //else if (m_dstRewriteID == 235135 && m_lastdmrLC->getFLCO() == FLCO_USER_USER) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue