17#ifndef CYBER_SERVICE_DISCOVERY_TOPOLOGY_MANAGER_H_
18#define CYBER_SERVICE_DISCOVERY_TOPOLOGY_MANAGER_H_
37namespace service_discovery {
70 std::map<eprosima::fastrtps::rtps::GUID_t, std::string>;
71 using PartInfo = eprosima::fastrtps::ParticipantDiscoveryInfo;
112 bool InitNodeManager();
113 bool InitChannelManager();
114 bool InitServiceManager();
116 bool CreateParticipant();
117 void OnParticipantChange(
const PartInfo& info);
119 bool ParseParticipantName(
const std::string& participant_name,
120 std::string* host_name,
int* process_id);
122 std::atomic<bool> init_;
Topology Manager of Service related
Topology Manager of Service related
elements in Cyber – Node, Channel, Service, Writer, Reader, Client and Server's relationship is prese...
void RemoveChangeListener(const ChangeConnection &conn)
Remove the observe function connect to change_signal_ by conn
ChangeConnection AddChangeListener(const ChangeFunc &func)
To observe the topology change, you can register a ChangeFunc
std::function< void(const ChangeMsg &)> ChangeFunc
void Shutdown()
Shutdown the TopologyManager
base::Signal< const ChangeMsg & > ChangeSignal
ServiceManagerPtr & service_manager()
Get shared_ptr for ServiceManager
NodeManagerPtr & node_manager()
Get shared_ptr for NodeManager
eprosima::fastrtps::ParticipantDiscoveryInfo PartInfo
std::map< eprosima::fastrtps::rtps::GUID_t, std::string > PartNameContainer
ChannelManagerPtr & channel_manager()
Get shared_ptr for ChannelManager
virtual ~TopologyManager()
#define DECLARE_SINGLETON(classname)
std::shared_ptr< ChannelManager > ChannelManagerPtr
std::shared_ptr< NodeManager > NodeManagerPtr
std::shared_ptr< ServiceManager > ServiceManagerPtr
std::shared_ptr< Participant > ParticipantPtr