add option to disable the source ID validation before issuing a grant;

3.0-maint
Bryan Biedenkapp 3 years ago
parent db2212f7c1
commit 81c16f6758

@ -100,6 +100,8 @@ protocols:
enable: false enable: false
# DMR slot number to transmit TSCC data on. # DMR slot number to transmit TSCC data on.
slot: 1 slot: 1
# Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false
# Flag indicating whether or not received RF embedded LC data only should be transmitted. # Flag indicating whether or not received RF embedded LC data only should be transmitted.
embeddedLCOnly: false embeddedLCOnly: false
@ -161,6 +163,8 @@ protocols:
disableTSDUMBF: false disableTSDUMBF: false
# Flag to enable optional TIME_DATE_ANNC TSBK during a CC broadcast. # Flag to enable optional TIME_DATE_ANNC TSBK during a CC broadcast.
enableTimeDateAnn: false enableTimeDateAnn: false
# Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false
# Flag indicating whether or not VOC (voice on control) support is enabled. # Flag indicating whether or not VOC (voice on control) support is enabled.
voiceOnControl: false voiceOnControl: false
@ -228,6 +232,8 @@ protocols:
interval: 300 interval: 300
# Amount of time to transmit non-dedicated CC broadcasts. (seconds) # Amount of time to transmit non-dedicated CC broadcasts. (seconds)
duration: 1 duration: 1
# Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false
# Flag indicating whether or not VOC (voice on control) support is enabled. # Flag indicating whether or not VOC (voice on control) support is enabled.
voiceOnControl: false voiceOnControl: false

@ -155,16 +155,20 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::vector<ui
Slot::setSiteData(voiceChNo, voiceChData, netId, siteId, channelId, channelNo, dedicatedTSCC); Slot::setSiteData(voiceChNo, voiceChData, netId, siteId, channelId, channelNo, dedicatedTSCC);
Slot::setAlohaConfig(nRandWait, backOff); Slot::setAlohaConfig(nRandWait, backOff);
bool disableGrantSourceIdCheck = control["disableGrantSourceIdCheck"].as<bool>(false);
if (enableTSCC) { if (enableTSCC) {
m_tsccSlotNo = (uint8_t)control["slot"].as<uint32_t>(0U); m_tsccSlotNo = (uint8_t)control["slot"].as<uint32_t>(0U);
switch (m_tsccSlotNo) { switch (m_tsccSlotNo) {
case 1U: case 1U:
m_slot1->setTSCC(enableTSCC, dedicatedTSCC); m_slot1->setTSCC(enableTSCC, dedicatedTSCC);
m_slot1->setSupervisor(m_supervisor); m_slot1->setSupervisor(m_supervisor);
m_slot1->setDisableSourceIDGrantCheck(disableGrantSourceIdCheck);
break; break;
case 2U: case 2U:
m_slot2->setTSCC(enableTSCC, dedicatedTSCC); m_slot2->setTSCC(enableTSCC, dedicatedTSCC);
m_slot2->setSupervisor(m_supervisor); m_slot2->setSupervisor(m_supervisor);
m_slot2->setDisableSourceIDGrantCheck(disableGrantSourceIdCheck);
break; break;
default: default:
LogError(LOG_DMR, "DMR, invalid slot, TSCC disabled, slotNo = %u", m_tsccSlotNo); LogError(LOG_DMR, "DMR, invalid slot, TSCC disabled, slotNo = %u", m_tsccSlotNo);
@ -174,6 +178,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::vector<ui
m_enableTSCC = enableTSCC; m_enableTSCC = enableTSCC;
uint32_t silenceThreshold = dmrProtocol["silenceThreshold"].as<uint32_t>(dmr::DEFAULT_SILENCE_THRESHOLD); uint32_t silenceThreshold = dmrProtocol["silenceThreshold"].as<uint32_t>(dmr::DEFAULT_SILENCE_THRESHOLD);
if (silenceThreshold > MAX_DMR_VOICE_ERRORS) { if (silenceThreshold > MAX_DMR_VOICE_ERRORS) {
LogWarning(LOG_DMR, "Silence threshold > %u, defaulting to %u", dmr::MAX_DMR_VOICE_ERRORS, dmr::DEFAULT_SILENCE_THRESHOLD); LogWarning(LOG_DMR, "Silence threshold > %u, defaulting to %u", dmr::MAX_DMR_VOICE_ERRORS, dmr::DEFAULT_SILENCE_THRESHOLD);
@ -194,6 +199,9 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::vector<ui
LogInfo(" TSCC Slot: %u", m_tsccSlotNo); LogInfo(" TSCC Slot: %u", m_tsccSlotNo);
LogInfo(" TSCC Aloha Random Access Wait: %u", nRandWait); LogInfo(" TSCC Aloha Random Access Wait: %u", nRandWait);
LogInfo(" TSCC Aloha Backoff: %u", backOff); LogInfo(" TSCC Aloha Backoff: %u", backOff);
if (disableGrantSourceIdCheck) {
LogInfo(" TSCC Disable Grant Source ID Check: yes");
}
} }
LogInfo(" Silence Threshold: %u (%.1f%%)", silenceThreshold, float(silenceThreshold) / 1.41F); LogInfo(" Silence Threshold: %u (%.1f%%)", silenceThreshold, float(silenceThreshold) / 1.41F);

@ -159,6 +159,7 @@ Slot::Slot(uint32_t slotNo, uint32_t timeout, uint32_t tgHang, uint32_t queueSiz
m_tsccPayloadDstId(0U), m_tsccPayloadDstId(0U),
m_tsccPayloadGroup(false), m_tsccPayloadGroup(false),
m_tsccPayloadVoice(true), m_tsccPayloadVoice(true),
m_disableGrantSrcIdCheck(false),
m_lastLateEntry(0U), m_lastLateEntry(0U),
m_supervisor(false), m_supervisor(false),
m_verbose(verbose), m_verbose(verbose),

@ -109,6 +109,8 @@ namespace dmr
void setTSCCActivated(uint32_t dstId, uint32_t srcId, bool group, bool voice); void setTSCCActivated(uint32_t dstId, uint32_t srcId, bool group, bool voice);
/// <summary>Sets a flag indicating whether the slot has supervisory functions and can send permit TG to voice channels.</summary> /// <summary>Sets a flag indicating whether the slot has supervisory functions and can send permit TG to voice channels.</summary>
void setSupervisor(bool supervisor) { m_supervisor = supervisor; } void setSupervisor(bool supervisor) { m_supervisor = supervisor; }
/// <summary>Sets a flag indicating whether the slot has will perform source ID checks before issuing a grant.</summary>
void setDisableSourceIDGrantCheck(bool disableSourceIdGrant) { m_disableGrantSrcIdCheck = disableSourceIdGrant; }
/// <summary>Helper to set the voice error silence threshold.</summary> /// <summary>Helper to set the voice error silence threshold.</summary>
void setSilenceThreshold(uint32_t threshold); void setSilenceThreshold(uint32_t threshold);
@ -196,6 +198,8 @@ namespace dmr
bool m_tsccPayloadGroup; bool m_tsccPayloadGroup;
bool m_tsccPayloadVoice; bool m_tsccPayloadVoice;
bool m_disableGrantSrcIdCheck;
uint32_t m_lastLateEntry; uint32_t m_lastLateEntry;
bool m_supervisor; bool m_supervisor;

@ -867,6 +867,7 @@ bool ControlSignaling::writeRF_CSBK_Grant(uint32_t srcId, uint32_t dstId, uint8_
} }
} }
else { else {
if (!m_tscc->m_disableGrantSrcIdCheck) {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a // do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
// different source from the original grant // different source from the original grant
uint32_t grantedSrcId = m_tscc->m_affiliations->getGrantedSrcId(dstId); uint32_t grantedSrcId = m_tscc->m_affiliations->getGrantedSrcId(dstId);
@ -881,7 +882,7 @@ bool ControlSignaling::writeRF_CSBK_Grant(uint32_t srcId, uint32_t dstId, uint8_
return false; return false;
} }
}
chNo = m_tscc->m_affiliations->getGrantedCh(dstId); chNo = m_tscc->m_affiliations->getGrantedCh(dstId);
slot = m_tscc->m_affiliations->getGrantedSlot(dstId); slot = m_tscc->m_affiliations->getGrantedSlot(dstId);

@ -309,11 +309,16 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
} }
} }
m_trunk->m_disableGrantSrcIdCheck = control["disableGrantSourceIdCheck"].as<bool>(false);
if (printOptions) { if (printOptions) {
LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F); LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F);
if (m_control) { if (m_control) {
LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no"); LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no");
if (m_trunk->m_disableGrantSrcIdCheck) {
LogInfo(" Disable Grant Source ID Check: yes");
}
} }
LogInfo(" Verify Affiliation: %s", m_trunk->m_verifyAff ? "yes" : "no"); LogInfo(" Verify Affiliation: %s", m_trunk->m_verifyAff ? "yes" : "no");

@ -318,6 +318,7 @@ Trunk::Trunk(Control* nxdn, network::BaseNetwork* network, bool debug, bool verb
m_rcchIterateCnt(2U), m_rcchIterateCnt(2U),
m_verifyAff(false), m_verifyAff(false),
m_verifyReg(false), m_verifyReg(false),
m_disableGrantSrcIdCheck(false),
m_lastRejectId(0U), m_lastRejectId(0U),
m_verbose(verbose), m_verbose(verbose),
m_debug(debug) m_debug(debug)
@ -536,6 +537,7 @@ bool Trunk::writeRF_Message_Grant(uint32_t srcId, uint32_t dstId, uint8_t servic
} }
} }
else { else {
if (!m_disableGrantSrcIdCheck) {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a // do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
// different source from the original grant // different source from the original grant
uint32_t grantedSrcId = m_nxdn->m_affiliations.getGrantedSrcId(dstId); uint32_t grantedSrcId = m_nxdn->m_affiliations.getGrantedSrcId(dstId);
@ -550,6 +552,7 @@ bool Trunk::writeRF_Message_Grant(uint32_t srcId, uint32_t dstId, uint8_t servic
return false; return false;
} }
}
chNo = m_nxdn->m_affiliations.getGrantedCh(dstId); chNo = m_nxdn->m_affiliations.getGrantedCh(dstId);
m_nxdn->m_affiliations.touchGrant(dstId); m_nxdn->m_affiliations.touchGrant(dstId);

@ -82,6 +82,8 @@ namespace nxdn
bool m_verifyAff; bool m_verifyAff;
bool m_verifyReg; bool m_verifyReg;
bool m_disableGrantSrcIdCheck;
uint16_t m_lastRejectId; uint16_t m_lastRejectId;
bool m_verbose; bool m_verbose;

@ -345,12 +345,17 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
uint32_t ccBcstInterval = p25Protocol["control"]["interval"].as<uint32_t>(300U); uint32_t ccBcstInterval = p25Protocol["control"]["interval"].as<uint32_t>(300U);
m_trunk->m_adjSiteUpdateInterval += ccBcstInterval; m_trunk->m_adjSiteUpdateInterval += ccBcstInterval;
m_trunk->m_disableGrantSrcIdCheck = p25Protocol["control"]["disableGrantSourceIdCheck"].as<bool>(false);
if (printOptions) { if (printOptions) {
LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F); LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F);
if (m_control) { if (m_control) {
LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no"); LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no");
LogInfo(" Ack Requests: %s", m_ackTSBKRequests ? "yes" : "no"); LogInfo(" Ack Requests: %s", m_ackTSBKRequests ? "yes" : "no");
if (m_trunk->m_disableGrantSrcIdCheck) {
LogInfo(" Disable Grant Source ID Check: yes");
}
} }
LogInfo(" Disable Network HDUs: %s", m_disableNetworkHDU ? "yes" : "no"); LogInfo(" Disable Network HDUs: %s", m_disableNetworkHDU ? "yes" : "no");

@ -1217,6 +1217,7 @@ Trunk::Trunk(Control* p25, network::BaseNetwork* network, bool dumpTSBKData, boo
m_ctrlTimeDateAnn(false), m_ctrlTimeDateAnn(false),
m_ctrlTSDUMBF(true), m_ctrlTSDUMBF(true),
m_sndcpChGrant(false), m_sndcpChGrant(false),
m_disableGrantSrcIdCheck(false),
m_dumpTSBK(dumpTSBKData), m_dumpTSBK(dumpTSBKData),
m_verbose(verbose), m_verbose(verbose),
m_debug(debug) m_debug(debug)
@ -2227,6 +2228,7 @@ bool Trunk::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_t serviceOp
} }
} }
else { else {
if (!m_disableGrantSrcIdCheck) {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a // do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
// different source from the original grant // different source from the original grant
uint32_t grantedSrcId = m_p25->m_affiliations.getGrantedSrcId(dstId); uint32_t grantedSrcId = m_p25->m_affiliations.getGrantedSrcId(dstId);
@ -2241,6 +2243,7 @@ bool Trunk::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_t serviceOp
return false; return false;
} }
}
chNo = m_p25->m_affiliations.getGrantedCh(dstId); chNo = m_p25->m_affiliations.getGrantedCh(dstId);
m_p25->m_affiliations.touchGrant(dstId); m_p25->m_affiliations.touchGrant(dstId);

@ -150,6 +150,7 @@ namespace p25
bool m_ctrlTSDUMBF; bool m_ctrlTSDUMBF;
bool m_sndcpChGrant; bool m_sndcpChGrant;
bool m_disableGrantSrcIdCheck;
bool m_dumpTSBK; bool m_dumpTSBK;

Loading…
Cancel
Save

Powered by TurnKey Linux.