| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
DomainParticipantListener.hpp
1// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
19
20#ifndef FASTDDS_DDS_DOMAIN__DOMAINPARTICIPANTLISTENER_HPP
21#define FASTDDS_DDS_DOMAIN__DOMAINPARTICIPANTLISTENER_HPP
22
23#include <fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp>
24#include <fastdds/dds/builtin/topic/SubscriptionBuiltinTopicData.hpp>
25#include <fastdds/dds/publisher/PublisherListener.hpp>
26#include <fastdds/dds/subscriber/SubscriberListener.hpp>
27#include <fastdds/dds/topic/TopicListener.hpp>
28#include <fastdds/dds/builtin/topic/ParticipantBuiltinTopicData.hpp>
29#include <fastdds/rtps/participant/ParticipantDiscoveryInfo.hpp>
30#include <fastdds/rtps/reader/ReaderDiscoveryStatus.hpp>
31#include <fastdds/rtps/writer/WriterDiscoveryStatus.hpp>
32
33 namespace eprosima {
34 namespace fastdds {
35 namespace dds {
36
37 class DomainParticipant;
38 class ParticipantProxyData;
39
45 class DomainParticipantListener :
46 public PublisherListener,
47 public SubscriberListener,
48 public TopicListener
49{
50 public:
51
55 DomainParticipantListener()
56 {
57 }
58
62 virtual ~DomainParticipantListener()
63 {
64 }
65
75 virtual void on_participant_discovery(
76 DomainParticipant* participant,
77 fastdds::rtps::ParticipantDiscoveryStatus reason,
78 const ParticipantBuiltinTopicData& info,
79 bool& should_be_ignored)
80 {
81 static_cast<void>(participant);
82 static_cast<void>(reason);
83 static_cast<void>(info);
84
85 should_be_ignored = false;
86 }
87
88#if HAVE_SECURITY
95 virtual void onParticipantAuthentication(
96 DomainParticipant* participant,
97 rtps::ParticipantAuthenticationInfo&& info)
98 {
99 static_cast<void>(participant);
100 static_cast<void>(info);
101 }
102
103#endif // if HAVE_SECURITY
104
114 virtual void on_data_reader_discovery(
115 DomainParticipant* participant,
116 rtps::ReaderDiscoveryStatus reason,
117 const SubscriptionBuiltinTopicData& info,
118 bool& should_be_ignored)
119 {
120 static_cast<void>(participant);
121 static_cast<void>(reason);
122 static_cast<void>(info);
123 static_cast<void>(should_be_ignored);
124 }
125
135 virtual void on_data_writer_discovery(
136 DomainParticipant* participant,
137 rtps::WriterDiscoveryStatus reason,
138 const PublicationBuiltinTopicData& info,
139 bool& should_be_ignored)
140 {
141 static_cast<void>(participant);
142 static_cast<void>(reason);
143 static_cast<void>(info);
144 should_be_ignored = false;
145 }
146
147 // TODO: Methods in DomainParticipantListener (p.33 - DDS)
148};
149
150} // namespace dds
151} // namespace fastdds
152} // namespace eprosima
153
154#endif // FASTDDS_DDS_DOMAIN__DOMAINPARTICIPANTLISTENER_HPP
eprosima::fastdds::dds::DomainParticipant
Class DomainParticipant used to group Publishers and Subscribers into a single working unit.
Definition DomainParticipant.hpp:86
eprosima::fastdds::dds::DomainParticipantListener::on_data_writer_discovery
virtual void on_data_writer_discovery(DomainParticipant *participant, rtps::WriterDiscoveryStatus reason, const PublicationBuiltinTopicData &info, bool &should_be_ignored)
This method is called when a new DataWriter is discovered, or a previously discovered DataWriter chan...
Definition DomainParticipantListener.hpp:135
eprosima::fastdds::dds::DomainParticipantListener::on_data_reader_discovery
virtual void on_data_reader_discovery(DomainParticipant *participant, rtps::ReaderDiscoveryStatus reason, const SubscriptionBuiltinTopicData &info, bool &should_be_ignored)
This method is called when a new DataReader is discovered, or a previously discovered DataReader chan...
Definition DomainParticipantListener.hpp:114
eprosima::fastdds::dds::DomainParticipantListener::~DomainParticipantListener
virtual ~DomainParticipantListener()
Destructor.
Definition DomainParticipantListener.hpp:62
eprosima::fastdds::dds::DomainParticipantListener::DomainParticipantListener
DomainParticipantListener()
Constructor.
Definition DomainParticipantListener.hpp:55
eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery
virtual void on_participant_discovery(DomainParticipant *participant, fastdds::rtps::ParticipantDiscoveryStatus reason, const ParticipantBuiltinTopicData &info, bool &should_be_ignored)
This method is called when a new Participant is discovered, or a previously discovered participant ch...
Definition DomainParticipantListener.hpp:75
eprosima::fastdds::dds::PublisherListener::PublisherListener
FASTDDS_EXPORTED_API PublisherListener()
Constructor.
Definition PublisherListener.hpp:45
eprosima::fastdds::dds::SubscriberListener::SubscriberListener
FASTDDS_EXPORTED_API SubscriberListener()
Constructor.
Definition SubscriberListener.hpp:47
eprosima::fastdds::dds::TopicListener::TopicListener
TopicListener()
Constructor.
Definition TopicListener.hpp:43
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::ParticipantBuiltinTopicData
rtps::ParticipantBuiltinTopicData ParticipantBuiltinTopicData
Definition ParticipantBuiltinTopicData.hpp:29
eprosima::fastdds::dds::SubscriptionBuiltinTopicData
rtps::SubscriptionBuiltinTopicData SubscriptionBuiltinTopicData
Definition SubscriptionBuiltinTopicData.hpp:28
eprosima::fastdds::dds::PublicationBuiltinTopicData
rtps::PublicationBuiltinTopicData PublicationBuiltinTopicData
Definition PublicationBuiltinTopicData.hpp:28
eprosima::fastdds::rtps::WriterDiscoveryStatus
WriterDiscoveryStatus
Enum WriterDiscoveryStatus, four different status for discovered writers.
Definition WriterDiscoveryStatus.hpp:35
eprosima::fastdds::rtps::ParticipantDiscoveryStatus
ParticipantDiscoveryStatus
Enum ParticipantDiscoveryStatus, four different status for discovered participants.
Definition ParticipantDiscoveryInfo.hpp:37
eprosima::fastdds::rtps::ReaderDiscoveryStatus
ReaderDiscoveryStatus
Enum DISCOVERY_STATUS, four different status for discovered readers.
Definition ReaderDiscoveryStatus.hpp:36
eprosima::fastdds
eprosima
eProsima namespace.