Apollo  6.0
Open source self driving car software
Public Types | Public Member Functions | List of all members
apollo::cyber::service_discovery::TopologyManager Class Reference

elements in Cyber – Node, Channel, Service, Writer, Reader, Client and Server's relationship is presented by Topology. You can Imagine that a directed graph – Node is the container of Server/Client/Writer/Reader, and they are the vertice of the graph and Channel is the Edge from Writer flow to the Reader, Service is the Edge from Server to Client. Thus we call Writer and Server Upstream, Reader and Client Downstream To generate this graph, we use TopologyManager, it has three sub managers – NodeManager: You can find Nodes in this topology ChannelManager: You can find Channels in this topology, and their Writers and Readers ServiceManager: You can find Services in this topology, and their Servers and Clients TopologyManager use fast-rtps' Participant to communicate. It can broadcast Join or Leave messages of those elements. Also, you can register you own ChangeFunc to monitor topology change More...

#include <topology_manager.h>

Collaboration diagram for apollo::cyber::service_discovery::TopologyManager:
Collaboration graph

Public Types

using ChangeSignal = base::Signal< const ChangeMsg & >
 
using ChangeFunc = std::function< void(const ChangeMsg &)>
 
using ChangeConnection = base::Connection< const ChangeMsg & >
 
using PartNameContainer = std::map< eprosima::fastrtps::rtps::GUID_t, std::string >
 
using PartInfo = eprosima::fastrtps::ParticipantDiscoveryInfo
 

Public Member Functions

virtual ~TopologyManager ()
 
void Shutdown ()
 Shutdown the TopologyManager. More...
 
ChangeConnection AddChangeListener (const ChangeFunc &func)
 To observe the topology change, you can register a ChangeFunc More...
 
void RemoveChangeListener (const ChangeConnection &conn)
 Remove the observe function connect to change_signal_ by conn More...
 
NodeManagerPtrnode_manager ()
 Get shared_ptr for NodeManager. More...
 
ChannelManagerPtrchannel_manager ()
 Get shared_ptr for ChannelManager. More...
 
ServiceManagerPtrservice_manager ()
 Get shared_ptr for ServiceManager. More...
 

Detailed Description

elements in Cyber – Node, Channel, Service, Writer, Reader, Client and Server's relationship is presented by Topology. You can Imagine that a directed graph – Node is the container of Server/Client/Writer/Reader, and they are the vertice of the graph and Channel is the Edge from Writer flow to the Reader, Service is the Edge from Server to Client. Thus we call Writer and Server Upstream, Reader and Client Downstream To generate this graph, we use TopologyManager, it has three sub managers – NodeManager: You can find Nodes in this topology ChannelManager: You can find Channels in this topology, and their Writers and Readers ServiceManager: You can find Services in this topology, and their Servers and Clients TopologyManager use fast-rtps' Participant to communicate. It can broadcast Join or Leave messages of those elements. Also, you can register you own ChangeFunc to monitor topology change

Member Typedef Documentation

◆ ChangeConnection

◆ ChangeFunc

using apollo::cyber::service_discovery::TopologyManager::ChangeFunc = std::function<void(const ChangeMsg&)>

◆ ChangeSignal

◆ PartInfo

using apollo::cyber::service_discovery::TopologyManager::PartInfo = eprosima::fastrtps::ParticipantDiscoveryInfo

◆ PartNameContainer

using apollo::cyber::service_discovery::TopologyManager::PartNameContainer = std::map<eprosima::fastrtps::rtps::GUID_t, std::string>

Constructor & Destructor Documentation

◆ ~TopologyManager()

virtual apollo::cyber::service_discovery::TopologyManager::~TopologyManager ( )
virtual

Member Function Documentation

◆ AddChangeListener()

ChangeConnection apollo::cyber::service_discovery::TopologyManager::AddChangeListener ( const ChangeFunc func)

To observe the topology change, you can register a ChangeFunc

Parameters
funcis the observe function
Returns
ChangeConnection is the connection that connected to change_signal_. Used to Remove your observe function

◆ channel_manager()

ChannelManagerPtr& apollo::cyber::service_discovery::TopologyManager::channel_manager ( )
inline

Get shared_ptr for ChannelManager.

◆ node_manager()

NodeManagerPtr& apollo::cyber::service_discovery::TopologyManager::node_manager ( )
inline

Get shared_ptr for NodeManager.

◆ RemoveChangeListener()

void apollo::cyber::service_discovery::TopologyManager::RemoveChangeListener ( const ChangeConnection conn)

Remove the observe function connect to change_signal_ by conn

◆ service_manager()

ServiceManagerPtr& apollo::cyber::service_discovery::TopologyManager::service_manager ( )
inline

Get shared_ptr for ServiceManager.

◆ Shutdown()

void apollo::cyber::service_discovery::TopologyManager::Shutdown ( )

Shutdown the TopologyManager.


The documentation for this class was generated from the following file: