refactor CC/VC notification log messages;

pull/42/head
Bryan Biedenkapp 2 years ago
parent 685ea4df14
commit 41e4d7fccf

@ -674,15 +674,16 @@ void Slot::releaseGrantTG(uint32_t dstId)
} }
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_DMR, "DMR Slot %u, REST request, release TG grant, dstId = %u", m_slotNo, dstId); LogMessage(LOG_DMR, "DMR Slot %u, VC request, release TG grant, dstId = %u", m_slotNo, dstId);
} }
if (m_affiliations->isGranted(dstId)) { if (m_affiliations->isGranted(dstId)) {
uint32_t chNo = m_affiliations->getGrantedCh(dstId); uint32_t chNo = m_affiliations->getGrantedCh(dstId);
uint32_t srcId = m_affiliations->getGrantedSrcId(dstId);
::lookups::VoiceChData voiceCh = m_affiliations->getRFChData(chNo); ::lookups::VoiceChData voiceCh = m_affiliations->getRFChData(chNo);
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_DMR, "DMR Slot %u, REST request, TG grant released, chNo = %u, dstId = %u, address = %s:%u", m_slotNo, chNo, dstId, voiceCh.address().c_str(), voiceCh.port()); LogMessage(LOG_DMR, "DMR Slot %u, VC %s:%u, TG grant released, srcId = %u, dstId = %u, chId = %u, chNo = %u", m_slotNo, voiceCh.address().c_str(), voiceCh.port(), srcId, dstId, voiceCh.chId(), chNo);
} }
m_affiliations->releaseGrant(dstId, false); m_affiliations->releaseGrant(dstId, false);
@ -701,10 +702,11 @@ void Slot::touchGrantTG(uint32_t dstId)
if (m_affiliations->isGranted(dstId)) { if (m_affiliations->isGranted(dstId)) {
uint32_t chNo = m_affiliations->getGrantedCh(dstId); uint32_t chNo = m_affiliations->getGrantedCh(dstId);
uint32_t srcId = m_affiliations->getGrantedSrcId(dstId);
::lookups::VoiceChData voiceCh = m_affiliations->getRFChData(chNo); ::lookups::VoiceChData voiceCh = m_affiliations->getRFChData(chNo);
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_DMR, "DMR Slot %u, REST request, touch TG grant, chNo = %u, dstId = %u, address = %s:%u", m_slotNo, chNo, dstId, voiceCh.address().c_str(), voiceCh.port()); LogMessage(LOG_DMR, "DMR Slot %u, VC %s:%u, call in progress, TG grant, srcId = %u, dstId = %u, chId = %u, chNo = %u", m_slotNo, voiceCh.address().c_str(), voiceCh.port(), srcId, dstId, voiceCh.chId(), chNo);
} }
m_affiliations->touchGrant(dstId); m_affiliations->touchGrant(dstId);
@ -1079,6 +1081,10 @@ void Slot::notifyCC_ReleaseGrant(uint32_t dstId)
return; return;
} }
if (m_verbose) {
LogMessage(LOG_DMR, "DMR Slot %u, CC %s:%u, notifying CC of call termination, dstId = %u", m_slotNo, m_controlChData.address().c_str(), m_controlChData.port(), dstId);
}
// callback REST API to release the granted TG on the specified control channel // callback REST API to release the granted TG on the specified control channel
json::object req = json::object(); json::object req = json::object();
int state = modem::DVM_STATE::STATE_DMR; int state = modem::DVM_STATE::STATE_DMR;

@ -742,15 +742,16 @@ void Control::releaseGrantTG(uint32_t dstId)
} }
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_NXDN, "REST request, release TG grant, dstId = %u", dstId); LogMessage(LOG_NXDN, "VC request, release TG grant, dstId = %u", dstId);
} }
if (m_affiliations.isGranted(dstId)) { if (m_affiliations.isGranted(dstId)) {
uint32_t chNo = m_affiliations.getGrantedCh(dstId); uint32_t chNo = m_affiliations.getGrantedCh(dstId);
uint32_t srcId = m_affiliations.getGrantedSrcId(dstId);
::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo); ::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo);
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_NXDN, "REST request, TG grant released, chNo = %u, dstId = %u, address = %s:%u", chNo, dstId, voiceCh.address().c_str(), voiceCh.port()); LogMessage(LOG_NXDN, "VC %s:%u, TG grant released, srcId = %u, dstId = %u, chId = %u, chNo = %u", voiceCh.address().c_str(), voiceCh.port(), srcId, dstId, voiceCh.chId(), chNo);
} }
m_affiliations.releaseGrant(dstId, false); m_affiliations.releaseGrant(dstId, false);
@ -769,10 +770,11 @@ void Control::touchGrantTG(uint32_t dstId)
if (m_affiliations.isGranted(dstId)) { if (m_affiliations.isGranted(dstId)) {
uint32_t chNo = m_affiliations.getGrantedCh(dstId); uint32_t chNo = m_affiliations.getGrantedCh(dstId);
uint32_t srcId = m_affiliations.getGrantedSrcId(dstId);
::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo); ::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo);
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_NXDN, "REST request, touch TG grant, chNo = %u, dstId = %u, address = %s:%u", chNo, dstId, voiceCh.address().c_str(), voiceCh.port()); LogMessage(LOG_NXDN, "VC %s:%u, call in progress, TG grant, srcId = %u, dstId = %u, chId = %u, chNo = %u", voiceCh.address().c_str(), voiceCh.port(), srcId, dstId, voiceCh.chId(), chNo);
} }
m_affiliations.touchGrant(dstId); m_affiliations.touchGrant(dstId);
@ -1044,6 +1046,9 @@ void Control::notifyCC_ReleaseGrant(uint32_t dstId)
return; return;
} }
if (m_verbose) {
LogMessage(LOG_NXDN, "CC %s:%u, notifying CC of call termination, dstId = %u", m_controlChData.address().c_str(), m_controlChData.port(), dstId);
}
// callback REST API to release the granted TG on the specified control channel // callback REST API to release the granted TG on the specified control channel
json::object req = json::object(); json::object req = json::object();

@ -964,15 +964,16 @@ void Control::releaseGrantTG(uint32_t dstId)
} }
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_P25, "REST request, release TG grant, dstId = %u", dstId); LogMessage(LOG_P25, "VC request, release TG grant, dstId = %u", dstId);
} }
if (m_affiliations.isGranted(dstId)) { if (m_affiliations.isGranted(dstId)) {
uint32_t chNo = m_affiliations.getGrantedCh(dstId); uint32_t chNo = m_affiliations.getGrantedCh(dstId);
uint32_t srcId = m_affiliations.getGrantedSrcId(dstId);
::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo); ::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo);
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_P25, "REST request, TG grant released, chId = %u, chNo = %u, dstId = %u, address = %s:%u", voiceCh.chId(), chNo, dstId, voiceCh.address().c_str(), voiceCh.port()); LogMessage(LOG_P25, "VC %s:%u, TG grant released, srcId = %u, dstId = %u, chId = %u, chNo = %u", voiceCh.address().c_str(), voiceCh.port(), srcId, dstId, voiceCh.chId(), chNo);
} }
m_affiliations.releaseGrant(dstId, false); m_affiliations.releaseGrant(dstId, false);
@ -991,10 +992,11 @@ void Control::touchGrantTG(uint32_t dstId)
if (m_affiliations.isGranted(dstId)) { if (m_affiliations.isGranted(dstId)) {
uint32_t chNo = m_affiliations.getGrantedCh(dstId); uint32_t chNo = m_affiliations.getGrantedCh(dstId);
uint32_t srcId = m_affiliations.getGrantedSrcId(dstId);
::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo); ::lookups::VoiceChData voiceCh = m_affiliations.getRFChData(chNo);
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_P25, "REST request, call in progress, touch TG grant, chId = %u, chNo = %u, dstId = %u, address = %s:%u", voiceCh.chId(), chNo, dstId, voiceCh.address().c_str(), voiceCh.port()); LogMessage(LOG_P25, "VC %s:%u, call in progress, TG grant, srcId = %u, dstId = %u, chId = %u, chNo = %u", voiceCh.address().c_str(), voiceCh.port(), srcId, dstId, voiceCh.chId(), chNo);
} }
m_affiliations.touchGrant(dstId); m_affiliations.touchGrant(dstId);
@ -1420,7 +1422,7 @@ void Control::notifyCC_ReleaseGrant(uint32_t dstId)
} }
if (m_verbose) { if (m_verbose) {
LogMessage(LOG_P25, "REST request, notifying CC of call termination, dstId = %u", dstId); LogMessage(LOG_P25, "CC %s:%u, notifying CC of call termination, dstId = %u", m_controlChData.address().c_str(), m_controlChData.port(), dstId);
} }
// callback REST API to release the granted TG on the specified control channel // callback REST API to release the granted TG on the specified control channel

Loading…
Cancel
Save

Powered by TurnKey Linux.