Apollo 10.0
自动驾驶开放平台
|
Topology Manager of Service related 更多...
#include <service_manager.h>
Public 类型 | |
using | RoleAttrVec = std::vector< RoleAttributes > |
using | ServerWarehouse = SingleValueWarehouse |
using | ClientWarehouse = MultiValueWarehouse |
![]() | |
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 | PublisherPtr = std::shared_ptr< transport::Publisher > |
using | SubscriberPtr = std::shared_ptr< transport::Subscriber > |
Public 成员函数 | |
ServiceManager () | |
Construct a new Service Manager object | |
virtual | ~ServiceManager () |
Destroy the Service Manager object | |
bool | HasService (const std::string &service_name) |
Inquire whether service_name exists in topology | |
void | GetServers (RoleAttrVec *servers) |
Get the All Server in the topology | |
void | GetClients (const std::string &service_name, RoleAttrVec *clients) |
Get the Clients object that subscribes service_name | |
![]() | |
Manager () | |
Construct a new Manager object | |
virtual | ~Manager () |
Destroy the Manager object | |
bool | StartDiscovery (const ParticipantPtr &participant) |
Startup topology discovery | |
void | StopDiscovery () |
Stop topology discovery | |
virtual void | Shutdown () |
Shutdown module | |
bool | Join (const RoleAttributes &attr, RoleType role, bool need_publish=true) |
Join the topology | |
bool | Leave (const RoleAttributes &attr, RoleType role) |
Leave the topology | |
ChangeConnection | AddChangeListener (const ChangeFunc &func) |
Add topology change listener, when topology changed, func will be called. | |
void | RemoveChangeListener (const ChangeConnection &conn) |
Remove our listener for topology change. | |
友元 | |
class | TopologyManager |
额外继承的成员函数 | |
![]() | |
bool | CreatePublisher (const ParticipantPtr &participant) |
bool | CreateSubscriber (const ParticipantPtr &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::shared_ptr< std::string > &msg_str) |
bool | IsFromSameProcess (const ChangeMsg &msg) |
![]() | |
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_ |
PublisherPtr | publisher_ |
SubscriberPtr | subscriber_ |
ParticipantPtr | participant_ |
std::mutex | lock_ |
ChangeSignal | signal_ |
Topology Manager of Service related
在文件 service_manager.h 第 39 行定义.
在文件 service_manager.h 第 45 行定义.
using apollo::cyber::service_discovery::ServiceManager::RoleAttrVec = std::vector<RoleAttributes> |
在文件 service_manager.h 第 43 行定义.
在文件 service_manager.h 第 44 行定义.
apollo::cyber::service_discovery::ServiceManager::ServiceManager | ( | ) |
Construct a new Service Manager object
在文件 service_manager.cc 第 25 行定义.
|
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 |
在文件 service_manager.cc 第 44 行定义.
void apollo::cyber::service_discovery::ServiceManager::GetServers | ( | RoleAttrVec * | servers | ) |
Get the All Server in the topology
servers | result RoleAttr vector |
在文件 service_manager.cc 第 39 行定义.
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 |
在文件 service_manager.cc 第 34 行定义.
|
friend |
在文件 service_manager.h 第 40 行定义.