Apollo 10.0
自动驾驶开放平台
|
elements in Cyber – Node, Channel, Service, Writer, Reader, Client and Server's relationship is presented by Topology. 更多...
#include <topology_manager.h>
Public 类型 | |
using | ChangeSignal = base::Signal< const ChangeMsg & > |
using | ChangeFunc = std::function< void(const ChangeMsg &)> |
using | ChangeConnection = base::Connection< const ChangeMsg & > |
using | ParticipantPtr = std::shared_ptr< transport::Participant > |
using | PartNameContainer = std::map< eprosima::fastrtps::rtps::GUID_t, std::string > |
Public 成员函数 | |
virtual | ~TopologyManager () |
void | Shutdown () |
Shutdown the TopologyManager | |
ChangeConnection | AddChangeListener (const ChangeFunc &func) |
To observe the topology change, you can register a ChangeFunc | |
void | RemoveChangeListener (const ChangeConnection &conn) |
Remove the observe function connect to change_signal_ by conn | |
NodeManagerPtr & | node_manager () |
Get shared_ptr for NodeManager | |
ChannelManagerPtr & | channel_manager () |
Get shared_ptr for ChannelManager | |
ServiceManagerPtr & | service_manager () |
Get shared_ptr for ServiceManager | |
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
在文件 topology_manager.h 第 64 行定义.
using apollo::cyber::service_discovery::TopologyManager::ChangeConnection = base::Connection<const ChangeMsg&> |
在文件 topology_manager.h 第 68 行定义.
using apollo::cyber::service_discovery::TopologyManager::ChangeFunc = std::function<void(const ChangeMsg&)> |
在文件 topology_manager.h 第 67 行定义.
using apollo::cyber::service_discovery::TopologyManager::ChangeSignal = base::Signal<const ChangeMsg&> |
在文件 topology_manager.h 第 66 行定义.
using apollo::cyber::service_discovery::TopologyManager::ParticipantPtr = std::shared_ptr<transport::Participant> |
在文件 topology_manager.h 第 69 行定义.
using apollo::cyber::service_discovery::TopologyManager::PartNameContainer = std::map<eprosima::fastrtps::rtps::GUID_t, std::string> |
在文件 topology_manager.h 第 70 行定义.
|
virtual |
在文件 topology_manager.cc 第 36 行定义.
TopologyManager::ChangeConnection apollo::cyber::service_discovery::TopologyManager::AddChangeListener | ( | const ChangeFunc & | func | ) |
To observe the topology change, you can register a ChangeFunc
func | is the observe function |
change_signal_
. Used to Remove your observe function 在文件 topology_manager.cc 第 53 行定义.
|
inline |
|
inline |
void apollo::cyber::service_discovery::TopologyManager::RemoveChangeListener | ( | const ChangeConnection & | conn | ) |
Remove the observe function connect to change_signal_
by conn
在文件 topology_manager.cc 第 58 行定义.
|
inline |
void apollo::cyber::service_discovery::TopologyManager::Shutdown | ( | ) |
Shutdown the TopologyManager
在文件 topology_manager.cc 第 38 行定义.