add option to selectively enable/disable CC notification from a VC for traffic channel updates (this option defaults to enabled/on for all configurations but VOC);

pull/32/head
Bryan Biedenkapp 3 years ago
parent e86a8aae03
commit 39e0e4a254

@ -327,7 +327,7 @@ system:
#
# Control Channel
# Note: These parameters are used by a voice channel to communicate back to a
# control channel to give the control channel "realtime" traffic channel updates.
# control channel to give the control channel "real time" traffic channel updates.
#
controlCh:
# REST API IP Address for control channel.
@ -336,6 +336,8 @@ system:
restPort: 9990
# REST API access password for control channel.
restPassword: "PASSWORD"
# Flag indicating voice channels will notify the control channel of traffic status.
notifyEnable: true
#
# Voice Channels

@ -178,7 +178,12 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::vector<ui
}
m_enableTSCC = enableTSCC;
yaml::Node rfssConfig = systemConf["config"];
yaml::Node controlCh = rfssConfig["controlCh"];
bool notifyCC = controlCh["notifyEnable"].as<bool>(true);
m_slot1->setNotifyCC(notifyCC);
m_slot2->setNotifyCC(notifyCC);
uint32_t silenceThreshold = dmrProtocol["silenceThreshold"].as<uint32_t>(dmr::DEFAULT_SILENCE_THRESHOLD);
if (silenceThreshold > MAX_DMR_VOICE_ERRORS) {

@ -164,6 +164,7 @@ Slot::Slot(uint32_t slotNo, uint32_t timeout, uint32_t tgHang, uint32_t queueSiz
m_disableGrantSrcIdCheck(false),
m_lastLateEntry(0U),
m_supervisor(false),
m_notifyCC(true),
m_verbose(verbose),
m_debug(debug)
{
@ -915,8 +916,7 @@ void Slot::notifyCC_ReleaseGrant(uint32_t dstId)
{
// callback REST API to release the granted TG on the specified control channel
if (!m_controlChData.address().empty() && m_controlChData.port() > 0) {
if (m_controlChData.address() == "127.0.0.1") {
// cowardly ignore trying to send release grants to ourselves
if (!m_notifyCC) {
return;
}
@ -943,8 +943,7 @@ void Slot::notifyCC_TouchGrant(uint32_t dstId)
{
// callback REST API to touch the granted TG on the specified control channel
if (!m_controlChData.address().empty() && m_controlChData.port() > 0) {
if (m_controlChData.address() == "127.0.0.1") {
// cowardly ignore trying to send touch grants to ourselves
if (!m_notifyCC) {
return;
}

@ -116,6 +116,8 @@ namespace dmr
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>Sets a flag indicating whether the voice channels will notify the TSCC of traffic channel changes.</summary>
void setNotifyCC(bool notifyCC) { m_notifyCC = notifyCC; }
/// <summary>Helper to set the voice error silence threshold.</summary>
void setSilenceThreshold(uint32_t threshold);
@ -209,6 +211,7 @@ namespace dmr
uint32_t m_lastLateEntry;
bool m_supervisor;
bool m_notifyCC;
bool m_verbose;
bool m_debug;

@ -140,6 +140,7 @@ Control::Control(bool authoritative, uint32_t ran, uint32_t callHang, uint32_t q
m_aveRSSI(0U),
m_rssiCount(0U),
m_dumpRCCH(dumpRCCHData),
m_notifyCC(true),
m_verbose(verbose),
m_debug(debug)
{
@ -316,6 +317,10 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
m_trunk->m_disableGrantSrcIdCheck = control["disableGrantSourceIdCheck"].as<bool>(false);
yaml::Node rfssConfig = systemConf["config"];
yaml::Node controlCh = rfssConfig["controlCh"];
m_notifyCC = controlCh["notifyEnable"].as<bool>(true);
if (printOptions) {
LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F);
@ -893,8 +898,7 @@ void Control::notifyCC_ReleaseGrant(uint32_t dstId)
{
// callback REST API to release the granted TG on the specified control channel
if (!m_controlChData.address().empty() && m_controlChData.port() > 0) {
if (m_controlChData.address() == "127.0.0.1") {
// cowardly ignore trying to send release grants to ourselves
if (!m_notifyCC) {
return;
}
@ -919,8 +923,7 @@ void Control::notifyCC_TouchGrant(uint32_t dstId)
{
// callback REST API to touch the granted TG on the specified control channel
if (!m_controlChData.address().empty() && m_controlChData.port() > 0) {
if (m_controlChData.address() == "127.0.0.1") {
// cowardly ignore trying to send touch grants to ourselves
if (!m_notifyCC) {
return;
}

@ -202,6 +202,8 @@ namespace nxdn
bool m_dumpRCCH;
bool m_notifyCC;
bool m_verbose;
bool m_debug;

@ -140,6 +140,7 @@ Control::Control(bool authoritative, uint32_t nac, uint32_t callHang, uint32_t q
m_minRSSI(0U),
m_aveRSSI(0U),
m_rssiCount(0U),
m_notifyCC(true),
m_verbose(verbose),
m_debug(debug)
{
@ -358,6 +359,15 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
m_trunk->m_disableGrantSrcIdCheck = p25Protocol["control"]["disableGrantSourceIdCheck"].as<bool>(false);
yaml::Node rfssConfig = systemConf["config"];
yaml::Node controlCh = rfssConfig["controlCh"];
m_notifyCC = controlCh["notifyEnable"].as<bool>(true);
// voice on control forcibly disables CC notification
if (m_voiceOnControl) {
m_notifyCC = false;
}
if (printOptions) {
LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F);
@ -1262,8 +1272,7 @@ void Control::notifyCC_ReleaseGrant(uint32_t dstId)
{
// callback REST API to release the granted TG on the specified control channel
if (!m_controlChData.address().empty() && m_controlChData.port() > 0) {
if (m_controlChData.address() == "127.0.0.1") {
// cowardly ignore trying to send release grants to ourselves
if (!m_notifyCC) {
return;
}
@ -1288,8 +1297,7 @@ void Control::notifyCC_TouchGrant(uint32_t dstId)
{
// callback REST API to touch the granted TG on the specified control channel
if (!m_controlChData.address().empty() && m_controlChData.port() > 0) {
if (m_controlChData.address() == "127.0.0.1") {
// cowardly ignore trying to send touch grants to ourselves
if (!m_notifyCC) {
return;
}

@ -220,6 +220,8 @@ namespace p25
uint32_t m_aveRSSI;
uint32_t m_rssiCount;
bool m_notifyCC;
bool m_verbose;
bool m_debug;

Loading…
Cancel
Save

Powered by TurnKey Linux.