|
Apollo
6.0
Open source self driving car software
|
Topology Manager of Service related. More...
#include <service_manager.h>


Public Types | |
| using | RoleAttrVec = std::vector< RoleAttributes > |
| using | ServerWarehouse = SingleValueWarehouse |
| using | ClientWarehouse = MultiValueWarehouse |
Public Types inherited from apollo::cyber::service_discovery::Manager | |
| using | ChangeSignal = base::Signal< const ChangeMsg & > |
| using | ChangeFunc = std::function< void(const ChangeMsg &)> |
| using | ChangeConnection = base::Connection< const ChangeMsg & > |
| using | RtpsParticipant = eprosima::fastrtps::Participant |
| using | RtpsPublisherAttr = eprosima::fastrtps::PublisherAttributes |
| using | RtpsSubscriberAttr = eprosima::fastrtps::SubscriberAttributes |
Public Member Functions | |
| ServiceManager () | |
| Construct a new Service Manager object. More... | |
| virtual | ~ServiceManager () |
| Destroy the Service Manager object. More... | |
| bool | HasService (const std::string &service_name) |
Inquire whether service_name exists in topology. More... | |
| void | GetServers (RoleAttrVec *servers) |
| Get the All Server in the topology. More... | |
| void | GetClients (const std::string &service_name, RoleAttrVec *clients) |
Get the Clients object that subscribes service_name More... | |
Public Member Functions inherited from apollo::cyber::service_discovery::Manager | |
| Manager () | |
| Construct a new Manager object. More... | |
| virtual | ~Manager () |
| Destroy the Manager object. More... | |
| bool | StartDiscovery (RtpsParticipant *participant) |
| Startup topology discovery. More... | |
| void | StopDiscovery () |
| Stop topology discovery. More... | |
| virtual void | Shutdown () |
| Shutdown module. More... | |
| bool | Join (const RoleAttributes &attr, RoleType role, bool need_publish=true) |
| Join the topology. More... | |
| bool | Leave (const RoleAttributes &attr, RoleType role) |
| Leave the topology. More... | |
| ChangeConnection | AddChangeListener (const ChangeFunc &func) |
| Add topology change listener, when topology changed, func will be called. More... | |
| void | RemoveChangeListener (const ChangeConnection &conn) |
| Remove our listener for topology change. More... | |
Friends | |
| class | TopologyManager |
Additional Inherited Members | |
Protected Member Functions inherited from apollo::cyber::service_discovery::Manager | |
| bool | CreatePublisher (RtpsParticipant *participant) |
| bool | CreateSubscriber (RtpsParticipant *participant) |
| virtual bool | NeedPublish (const ChangeMsg &msg) const |
| void | Convert (const RoleAttributes &attr, RoleType role, OperateType opt, ChangeMsg *msg) |
| void | Notify (const ChangeMsg &msg) |
| bool | Publish (const ChangeMsg &msg) |
| void | OnRemoteChange (const std::string &msg_str) |
| bool | IsFromSameProcess (const ChangeMsg &msg) |
Protected Attributes inherited from apollo::cyber::service_discovery::Manager | |
| std::atomic< bool > | is_shutdown_ |
| std::atomic< bool > | is_discovery_started_ |
| int | allowed_role_ |
| ChangeType | change_type_ |
| std::string | host_name_ |
| int | process_id_ |
| std::string | channel_name_ |
| eprosima::fastrtps::Publisher * | publisher_ |
| std::mutex | lock_ |
| eprosima::fastrtps::Subscriber * | subscriber_ |
| SubscriberListener * | listener_ |
| ChangeSignal | signal_ |
| using apollo::cyber::service_discovery::ServiceManager::RoleAttrVec = std::vector<RoleAttributes> |
| apollo::cyber::service_discovery::ServiceManager::ServiceManager | ( | ) |
|
virtual |
| void apollo::cyber::service_discovery::ServiceManager::GetClients | ( | const std::string & | service_name, |
| RoleAttrVec * | clients | ||
| ) |
Get the Clients object that subscribes service_name
| service_name | Name of service you want to get |
| clients | result vector |
| void apollo::cyber::service_discovery::ServiceManager::GetServers | ( | RoleAttrVec * | servers | ) |
Get the All Server in the topology.
| servers | result RoleAttr vector |
| bool apollo::cyber::service_discovery::ServiceManager::HasService | ( | const std::string & | service_name | ) |
Inquire whether service_name exists in topology.
| service_name | the name we inquire |
|
friend |
1.8.13