@ -322,7 +322,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
yaml : : Node rfssConfig = systemConf [ " config " ] ;
yaml : : Node rfssConfig = systemConf [ " config " ] ;
yaml : : Node controlCh = rfssConfig [ " controlCh " ] ;
yaml : : Node controlCh = rfssConfig [ " controlCh " ] ;
m_notifyCC = controlCh [ " notifyEnable " ] . as < bool > ( tru e) ;
m_notifyCC = controlCh [ " notifyEnable " ] . as < bool > ( fals e) ;
if ( printOptions ) {
if ( printOptions ) {
LogInfo ( " Silence Threshold: %u (%.1f%%) " , m_voice - > m_silenceThreshold , float ( m_voice - > m_silenceThreshold ) / 12.33F ) ;
LogInfo ( " Silence Threshold: %u (%.1f%%) " , m_voice - > m_silenceThreshold , float ( m_voice - > m_silenceThreshold ) / 12.33F ) ;
@ -334,6 +334,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
}
}
}
}
LogInfo ( " Notify Control: %s " , m_notifyCC ? " yes " : " no " ) ;
LogInfo ( " Verify Affiliation: %s " , m_trunk - > m_verifyAff ? " yes " : " no " ) ;
LogInfo ( " Verify Affiliation: %s " , m_trunk - > m_verifyAff ? " yes " : " no " ) ;
LogInfo ( " Verify Registration: %s " , m_trunk - > m_verifyReg ? " yes " : " no " ) ;
LogInfo ( " Verify Registration: %s " , m_trunk - > m_verifyReg ? " yes " : " no " ) ;
}
}
@ -920,12 +921,20 @@ void Control::processNetwork()
/// <param name="dstId"></param>
/// <param name="dstId"></param>
void Control : : notifyCC_ReleaseGrant ( uint32_t dstId )
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 ( ) ) {
if ( ! m_controlChData . address ( ) . empty ( ) & & m_controlChData . port ( ) > 0 ) {
return ;
}
if ( m_controlChData . port ( ) = = 0 ) {
return ;
}
if ( ! m_notifyCC ) {
if ( ! m_notifyCC ) {
return ;
return ;
}
}
// 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_NXDN ;
int state = modem : : DVM_STATE : : STATE_NXDN ;
req [ " state " ] . set < int > ( state ) ;
req [ " state " ] . set < int > ( state ) ;
@ -936,7 +945,6 @@ void Control::notifyCC_ReleaseGrant(uint32_t dstId)
if ( ret ! = network : : rest : : http : : HTTPPayload : : StatusType : : OK ) {
if ( ret ! = network : : rest : : http : : HTTPPayload : : StatusType : : OK ) {
: : LogError ( LOG_NXDN , " failed to notify the CC %s:%u of the release of, dstId = %u " , m_controlChData . address ( ) . c_str ( ) , m_controlChData . port ( ) , dstId ) ;
: : LogError ( LOG_NXDN , " failed to notify the CC %s:%u of the release of, dstId = %u " , m_controlChData . address ( ) . c_str ( ) , m_controlChData . port ( ) , dstId ) ;
}
}
}
}
}
/// <summary>
/// <summary>
@ -945,12 +953,19 @@ void Control::notifyCC_ReleaseGrant(uint32_t dstId)
/// <param name="dstId"></param>
/// <param name="dstId"></param>
void Control : : notifyCC_TouchGrant ( uint32_t dstId )
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 ( ) ) {
if ( ! m_controlChData . address ( ) . empty ( ) & & m_controlChData . port ( ) > 0 ) {
return ;
}
if ( m_controlChData . port ( ) = = 0 ) {
return ;
}
if ( ! m_notifyCC ) {
if ( ! m_notifyCC ) {
return ;
return ;
}
}
// callback REST API to touch the granted TG on the specified control channel
json : : object req = json : : object ( ) ;
json : : object req = json : : object ( ) ;
int state = modem : : DVM_STATE : : STATE_NXDN ;
int state = modem : : DVM_STATE : : STATE_NXDN ;
req [ " state " ] . set < int > ( state ) ;
req [ " state " ] . set < int > ( state ) ;
@ -961,7 +976,6 @@ void Control::notifyCC_TouchGrant(uint32_t dstId)
if ( ret ! = network : : rest : : http : : HTTPPayload : : StatusType : : OK ) {
if ( ret ! = network : : rest : : http : : HTTPPayload : : StatusType : : OK ) {
: : LogError ( LOG_NXDN , " failed to notify the CC %s:%u of the touch of, dstId = %u " , m_controlChData . address ( ) . c_str ( ) , m_controlChData . port ( ) , dstId ) ;
: : LogError ( LOG_NXDN , " failed to notify the CC %s:%u of the touch of, dstId = %u " , m_controlChData . address ( ) . c_str ( ) , m_controlChData . port ( ) , dstId ) ;
}
}
}
}
}
/// <summary>
/// <summary>