remove P25 emergency flags from config (emergency functions are unsupported); support *receiving* the P25 emergency alarm request; [Future Note: Emergency modes are not expressly supported by DVM or DVM Project. This project should *never* be used in situations where emergency mode functionality is required.]

3.0-rcon_maint
Bryan Biedenkapp 3 years ago
parent 53a56a277c
commit c77f7eda64

@ -194,16 +194,12 @@ protocols:
noMessageAck: true
# Flag indicating that unit-to-unit availiability checks should be performed for a private call.
unitToUnitAvailCheck: true
# Flag indicating that emergency alarm's will be acknowledged.
localEmergAlarm: false
# Flag indicating whether or not the host will respond to SNDCP data grant requests.
sndcpGrant: false
# BER/Error threshold for silencing voice packets.
silenceThreshold: 124
# Flag indicating whether or not a voice HDU will transmitted at the start of a call from the network.
disableNetworkHDU: false
# Flag indicating whether or not emergency support is enabled.
emergDisabled: true
# Internal data queue size (in P25 packets).
queueSize: 12
# Flag indicating whether or not verbose logging is enabled.

@ -104,7 +104,6 @@ Control::Control(bool authoritative, uint32_t nac, uint32_t callHang, uint32_t q
m_voiceOnControl(false),
m_ackTSBKRequests(true),
m_disableNetworkHDU(false),
m_emergDisabled(true),
m_idenTable(idenTable),
m_ridLookup(ridLookup),
m_tidLookup(tidLookup),
@ -241,7 +240,6 @@ void Control::setOptions(yaml::Node& conf, const std::string cwCallsign, const s
m_trunk->m_noMessageAck = p25Protocol["noMessageAck"].as<bool>(true);
m_trunk->m_unitToUnitAvailCheck = p25Protocol["unitToUnitAvailCheck"].as<bool>(true);
m_trunk->m_localEmergAlarm = p25Protocol["localEmergAlarm"].as<bool>(false);
m_trunk->m_sndcpChGrant = p25Protocol["sndcpGrant"].as<bool>(false);
yaml::Node control = p25Protocol["control"];
@ -316,8 +314,6 @@ void Control::setOptions(yaml::Node& conf, const std::string cwCallsign, const s
uint32_t ccBcstInterval = p25Protocol["control"]["interval"].as<uint32_t>(300U);
m_trunk->m_adjSiteUpdateInterval += ccBcstInterval;
m_emergDisabled = p25Protocol["emergDisabled"].as<bool>(true);
if (printOptions) {
LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F);
@ -330,7 +326,6 @@ void Control::setOptions(yaml::Node& conf, const std::string cwCallsign, const s
if (!m_trunk->m_ctrlTSDUMBF) {
LogInfo(" Disable Multi-Block TSDUs: yes");
}
LogInfo(" Emergency Support Disabled: %s", m_emergDisabled ? "yes" : "no");
LogInfo(" Time/Date Announcement TSBK: %s", m_trunk->m_ctrlTimeDateAnn ? "yes" : "no");
LogInfo(" Inhibit Illegal: %s", m_inhibitIllegal ? "yes" : "no");

@ -164,7 +164,6 @@ namespace p25
bool m_voiceOnControl;
bool m_ackTSBKRequests;
bool m_disableNetworkHDU;
bool m_emergDisabled;
::lookups::IdenTableLookup* m_idenTable;
::lookups::RadioIdLookup* m_ridLookup;

@ -475,23 +475,18 @@ bool Trunk::process(uint8_t* data, uint32_t len, std::unique_ptr<lc::TSBK> preDe
break;
case TSBK_ISP_EMERG_ALRM_REQ:
{
if (!m_p25->m_emergDisabled) {
ISP_EMERG_ALRM_REQ* isp = static_cast<ISP_EMERG_ALRM_REQ*>(tsbk.get());
if (isp->getEmergency()) {
if (m_verbose) {
LogMessage(LOG_RF, P25_TSDU_STR ", TSBK_ISP_EMERG_ALRM_REQ (Emergency Alarm Request), srcId = %u, dstId = %u",
srcId, dstId);
}
ISP_EMERG_ALRM_REQ* isp = static_cast<ISP_EMERG_ALRM_REQ*>(tsbk.get());
if (isp->getEmergency()) {
if (m_verbose) {
LogMessage(LOG_RF, P25_TSDU_STR ", TSBK_ISP_EMERG_ALRM_REQ (Emergency Alarm Request), srcId = %u, dstId = %u",
srcId, dstId);
}
::ActivityLog("P25", true, "emergency alarm request request from %u", srcId);
::ActivityLog("P25", true, "emergency alarm request request from %u", srcId);
writeRF_TSDU_ACK_FNE(srcId, TSBK_ISP_EMERG_ALRM_REQ, false, true);
if (m_localEmergAlarm) {
writeRF_TSDU_Emerg_Alrm(srcId, dstId);
}
}
} else {
LogWarning(LOG_RF, P25_TSDU_STR ", TSBK_ISP_EMERG_ALRM_REQ (Emergency Alarm Request) denial, emergency while emergency disabled, srcId = %u", srcId);
// emergency functions are expressly not supported by DVM -- DVM will *ACKNOWLEDGE* the request but will not do any
// further processing with it
writeRF_TSDU_ACK_FNE(srcId, TSBK_ISP_EMERG_ALRM_REQ, false, true);
}
}
break;
@ -858,14 +853,9 @@ bool Trunk::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, data::L
// ignore a network deny command
return true; // don't allow this to write to the air
} else {
if (!m_p25->m_emergDisabled) {
if (m_verbose) {
LogMessage(LOG_NET, P25_TSDU_STR ", TSBK_ISP_EMERG_ALRM_REQ (Emergency Alarm Request), srcId = %u, dstId = %u",
srcId, dstId);
}
} else {
LogWarning(LOG_NET, P25_TSDU_STR ", TSBK_ISP_EMERG_ALRM_REQ (Emergency Alarm Request) denial, emergency while emergency disabled, srcId = %u", srcId);
return true; // don't allow this to write to the air
if (m_verbose) {
LogMessage(LOG_NET, P25_TSDU_STR ", TSBK_ISP_EMERG_ALRM_REQ (Emergency Alarm Request), srcId = %u, dstId = %u",
srcId, dstId);
}
}
}
@ -1126,10 +1116,6 @@ void Trunk::writeRF_TSDU_U_Reg_Cmd(uint32_t dstId)
/// <param name="dstId"></param>
void Trunk::writeRF_TSDU_Emerg_Alrm(uint32_t srcId, uint32_t dstId)
{
if (m_p25->m_emergDisabled) {
return;
}
std::unique_ptr<ISP_EMERG_ALRM_REQ> isp = new_unique(ISP_EMERG_ALRM_REQ);
isp->setSrcId(srcId);
isp->setDstId(dstId);
@ -1209,7 +1195,6 @@ Trunk::Trunk(Control* p25, network::BaseNetwork* network, bool dumpTSBKData, boo
m_microslotCount(0U),
m_ctrlTimeDateAnn(false),
m_ctrlTSDUMBF(true),
m_localEmergAlarm(false),
m_sndcpChGrant(false),
m_dumpTSBK(dumpTSBKData),
m_verbose(verbose),

@ -148,7 +148,6 @@ namespace p25
bool m_ctrlTSDUMBF;
bool m_localEmergAlarm;
bool m_sndcpChGrant;
bool m_dumpTSBK;

Loading…
Cancel
Save

Powered by TurnKey Linux.