allow PDUs to be processed for dedicated CCs; enhance W3AXLs code Data.cpp code to check the dedicatedControl flag too;

pull/39/head
Bryan Biedenkapp 3 years ago
parent 74838f990a
commit 7a86b4f5b8

@ -254,13 +254,19 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
}
m_voiceOnControl = p25Protocol["voiceOnControl"].as<bool>(false);
m_controlOnly = p25Protocol["controlOnly"].as<bool>(false);
// if control channel is off for voice on control off
if (!m_control) {
m_voiceOnControl = false;
}
m_controlOnly = p25Protocol["controlOnly"].as<bool>(false);
// if we're a dedicated control channel don't set the control only flag
if (m_dedicatedControl) {
m_controlOnly = false;
}
m_ackTSBKRequests = control["ackRequests"].as<bool>(true);
m_trunk->m_ctrlTSDUMBF = !control["disableTSDUMBF"].as<bool>(false);
m_trunk->m_ctrlTimeDateAnn = control["enableTimeDateAnn"].as<bool>(false);
@ -373,6 +379,10 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
}
}
if (m_controlOnly) {
LogInfo(" Control Data Only: yes");
}
LogInfo(" Notify Control: %s", m_notifyCC ? "yes" : "no");
LogInfo(" Disable Network HDUs: %s", m_disableNetworkHDU ? "yes" : "no");
if (!m_trunk->m_ctrlTSDUMBF) {
@ -558,13 +568,7 @@ bool Control::processFrame(uint8_t* data, uint32_t len)
break;
case P25_DUID_PDU:
if (!m_dedicatedControl)
ret = m_data->process(data, len);
else {
if (m_voiceOnControl && m_affiliations.isChBusy(m_siteData.channelNo())) {
ret = m_data->process(data, len);
}
}
break;
case P25_DUID_TSDU:

@ -162,14 +162,14 @@ bool Data::process(uint8_t* data, uint32_t len)
return false;
}
// If we're in control only mode, we only want to handle AMBTs. Otherwise return
if (m_p25->m_controlOnly && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) {
// if we're a dedicated CC or in control only mode, we only want to handle AMBTs. Otherwise return
if ((m_p25->m_dedicatedControl || m_p25->m_controlOnly) && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) {
if (m_debug) {
LogDebug(LOG_RF, "CC only mode, ignoring non-AMBT PDU from RF");
}
// Reset the CC halted flag
m_p25->m_ccHalted = false;
// Reset everything else
m_rfDataHeader.reset();
m_rfSecondHeader.reset();
m_rfDataBlockCnt = 0U;
@ -508,12 +508,12 @@ bool Data::processNetwork(uint8_t* data, uint32_t len, uint32_t blockLength)
return false;
}
// If we're in control only mode, we only want to handle AMBTs. Otherwise return
if (m_p25->m_controlOnly && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) {
// if we're a dedicated CC or in control only mode, we only want to handle AMBTs. Otherwise return
if ((m_p25->m_dedicatedControl || m_p25->m_controlOnly) && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) {
if (m_debug) {
LogDebug(LOG_NET, "CC only mode, ignoring non-AMBT PDU from network");
}
// Reset everything else
m_netDataHeader.reset();
m_netSecondHeader.reset();
m_netDataOffset = 0U;

Loading…
Cancel
Save

Powered by TurnKey Linux.