Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions configs/fne-config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ master:
# spanning tree updates.)
spanningTreeFastReconnect: true

# Console patch status registry configuration.
patchStatus:
# Flag indicating whether or not console patch status publishing is enabled.
enabled: true
# Default TTL, in seconds, for console patch status updates that do not specify one.
defaultTtlSeconds: 15
# Minimum accepted TTL, in seconds, for console patch status updates.
minTtlSeconds: 5
# Maximum accepted TTL, in seconds, for console patch status updates.
maxTtlSeconds: 300

# Flag indicating whether or not peer pinging will be reported.
reportPeerPing: true

Expand Down
1 change: 1 addition & 0 deletions src/common/network/BaseNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#define TAG_TRANSFER_ACT_LOG "TRNSLOG"
#define TAG_TRANSFER_DIAG_LOG "TRNSDIAG"
#define TAG_TRANSFER_STATUS "TRNSSTS"
#define TAG_TRANSFER_PATCH_STATUS "TRNSPTCH"

#define TAG_ANNOUNCE "ANNC"
#define TAG_PEER_REPLICA "REPL"
Expand Down
4 changes: 3 additions & 1 deletion src/common/network/RTPFNEHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ namespace network
TRANSFER_SUBFUNC_ACTIVITY = 0x01U, //!< Activity Log Transfer
TRANSFER_SUBFUNC_DIAG = 0x02U, //!< Diagnostic Log Transfer
TRANSFER_SUBFUNC_STATUS = 0x03U, //!< Status Transfer
TRANSFER_SUBFUNC_PATCH_STATUS = 0x04U, //!< Console Patch Status Transfer

ANNC_SUBFUNC_GRP_AFFIL = 0x00U, //!< Announce Group Affiliation
ANNC_SUBFUNC_UNIT_REG = 0x01U, //!< Announce Unit Registration
Expand All @@ -126,6 +127,7 @@ namespace network

REPL_ACT_PEER_LIST = 0xA2U, //!< FNE Replication Active Peer List Transfer
REPL_HA_PARAMS = 0xA3U, //!< FNE Replication HA Parameters
REPL_PATCH_STATUS = 0xA4U, //!< FNE Replication Patch Status Transfer

NET_TREE_LIST = 0x00U, //!< FNE Network Tree List
NET_TREE_DISC = 0x01U //!< FNE Network Tree Disconnect
Expand Down Expand Up @@ -235,4 +237,4 @@ namespace network
} // namespace frame
} // namespace network

#endif // __RTP_FNE_HEADER_H__
#endif // __RTP_FNE_HEADER_H__
10 changes: 10 additions & 0 deletions src/fne/HostFNE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ bool HostFNE::createPeerNetworks()

network->setNetTreeDiscCallback(std::bind(&HostFNE::processNetworkTreeDisconnect, this, std::placeholders::_1, std::placeholders::_2));
network->setNotifyPeerReplicaCallback(std::bind(&HostFNE::processPeerReplicaNotify, this, std::placeholders::_1));
network->setPatchStatusCallback(std::bind(&HostFNE::processPeerPatchStatus, this, std::placeholders::_1, std::placeholders::_2));

network->enable(enabled);
if (enabled) {
Expand Down Expand Up @@ -1314,3 +1315,12 @@ void HostFNE::processPeerReplicaNotify(network::PeerNetwork* peerNetwork)
m_network->setPeerReplica(true);
}
}

/* Processes peer patch status replication. */

void HostFNE::processPeerPatchStatus(network::PeerNetwork* peerNetwork, json::object obj)
{
if (m_network != nullptr && peerNetwork != nullptr) {
m_network->processReplicatedPatchStatus(peerNetwork->getPeerId(), obj);
}
}
7 changes: 7 additions & 0 deletions src/fne/HostFNE.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __HOST_FNE_H__

#include "fne/Defines.h"
#include "common/json/json.h"
#include "common/lookups/RadioIdLookup.h"
#include "common/lookups/RadioAliasLookup.h"
#include "common/lookups/TalkgroupRulesLookup.h"
Expand Down Expand Up @@ -298,6 +299,12 @@ class HOST_SW_API HostFNE {
* @param peerNetwork Peer network instance.
*/
void processPeerReplicaNotify(network::PeerNetwork* peerNetwork);
/**
* @brief Processes peer patch status replication.
* @param peerNetwork Peer network instance.
* @param obj Patch status JSON payload.
*/
void processPeerPatchStatus(network::PeerNetwork* peerNetwork, json::object obj);
};

#endif // __HOST_FNE_H__
Loading