correct logic when dealing with RF or network traffic when configured for dedicated control channel; transmit voice grants across network;

pull/12/head
Bryan Biedenkapp 4 years ago
parent 94213364fa
commit 50cb75e4b3

@ -440,7 +440,13 @@ bool Control::processFrame(uint8_t* data, uint32_t len)
case P25_DUID_HDU:
case P25_DUID_LDU1:
case P25_DUID_LDU2:
ret = m_voice->process(data, len);
if (!m_dedicatedControl)
ret = m_voice->process(data, len);
else {
if (m_voiceOnControl && m_trunk->isChBusy(m_siteData.channelNo())) {
ret = m_voice->process(data, len);
}
}
break;
case P25_DUID_TDU:
@ -449,7 +455,13 @@ bool Control::processFrame(uint8_t* data, uint32_t len)
break;
case P25_DUID_PDU:
ret = m_data->process(data, len);
if (!m_dedicatedControl)
ret = m_data->process(data, len);
else {
if (m_voiceOnControl && m_trunk->isChBusy(m_siteData.channelNo())) {
ret = m_data->process(data, len);
}
}
break;
case P25_DUID_TSDU:
@ -765,13 +777,20 @@ void Control::processNetwork()
case P25_DUID_HDU:
case P25_DUID_LDU1:
case P25_DUID_LDU2:
if (!m_dedicatedControl)
ret = m_voice->processNetwork(data, length, control, lsd, duid);
// dedicated control ignores network voice frames -- always
break;
case P25_DUID_TDU:
case P25_DUID_TDULC:
m_voice->processNetwork(data, length, control, lsd, duid);
break;
case P25_DUID_PDU:
m_data->processNetwork(data, length, control, lsd, duid);
if (!m_dedicatedControl)
ret = m_data->processNetwork(data, length, control, lsd, duid);
// dedicated control ignores network data frames -- always
break;
case P25_DUID_TSDU:

@ -563,6 +563,18 @@ bool TrunkPacket::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, d
uint32_t dstId = m_netTSBK.getDstId();
switch (m_netTSBK.getLCO()) {
case TSBK_IOSP_GRP_VCH:
if (m_verbose) {
LogMessage(LOG_NET, P25_TSDU_STR ", TSBK_IOSP_GRP_VCH (Group Voice Channel Grant), emerg = %u, encrypt = %u, prio = %u, chNo = %u, srcId = %u, dstId = %u",
m_netTSBK.getEmergency(), m_netTSBK.getEncrypted(), m_netTSBK.getPriority(), m_netTSBK.getGrpVchNo(), srcId, dstId);
}
break;
case TSBK_IOSP_UU_VCH:
if (m_verbose) {
LogMessage(LOG_NET, P25_TSDU_STR ", TSBK_IOSP_UU_VCH (Unit-to-Unit Voice Channel Grant), emerg = %u, encrypt = %u, prio = %u, chNo = %u, srcId = %u, dstId = %u",
m_netTSBK.getEmergency(), m_netTSBK.getEncrypted(), m_netTSBK.getPriority(), m_netTSBK.getGrpVchNo(), srcId, dstId);
}
break;
case TSBK_IOSP_UU_ANS:
if (m_netTSBK.getResponse() > 0U) {
if (m_verbose) {
@ -1857,7 +1869,7 @@ bool TrunkPacket::writeRF_TSDU_Grant(bool grp, bool skip, bool net)
// transmit group grant
m_rfTSBK.setLCO(TSBK_IOSP_GRP_VCH);
writeRF_TSDU_SBF(true, true);
writeRF_TSDU_SBF(false, true);
}
else {
if (!net) {
@ -1871,7 +1883,7 @@ bool TrunkPacket::writeRF_TSDU_Grant(bool grp, bool skip, bool net)
// transmit private grant
m_rfTSBK.setLCO(TSBK_IOSP_UU_VCH);
writeRF_TSDU_SBF(true, true);
writeRF_TSDU_SBF(false, true);
}
m_rfTSBK.setLCO(lco);

Loading…
Cancel
Save

Powered by TurnKey Linux.