#include <participant_listener.h>
|
using | ChangeFunc = std::function< void(const eprosima::fastrtps::rtps::ParticipantDiscoveryInfo &info)> |
|
◆ ChangeFunc
◆ ParticipantListener()
apollo::cyber::service_discovery::ParticipantListener::ParticipantListener |
( |
const ChangeFunc & |
callback | ) |
|
|
explicit |
◆ ~ParticipantListener()
apollo::cyber::service_discovery::ParticipantListener::~ParticipantListener |
( |
| ) |
|
|
virtual |
◆ on_participant_discovery()
void apollo::cyber::service_discovery::ParticipantListener::on_participant_discovery |
( |
eprosima::fastdds::dds::DomainParticipant * |
p, |
|
|
eprosima::fastrtps::rtps::ParticipantDiscoveryInfo && |
info |
|
) |
| |
|
override |
Event handler for participant discovery.
This function is called when a new participant is discovered in the DDS domain.
- 参数
-
p | Pointer to the DomainParticipant. This parameter is unused in this function. DomainParticipant represents an entity that participates in a DDS domain, allowing publishers and subscribers to communicate. |
info | An rvalue reference to the ParticipantDiscoveryInfo, which contains information about the discovered participant. |
在文件 participant_listener.cc 第 44 行定义.
46 {
48 (void)p;
49 std::lock_guard<std::mutex> lock(mutex_);
50 callback_(info);
51}
#define RETURN_IF_NULL(ptr)
该类的文档由以下文件生成: