| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
WriterListener.hpp
1// Copyright 2016 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
18#ifndef FASTDDS_RTPS_WRITER__WRITERLISTENER_HPP
19#define FASTDDS_RTPS_WRITER__WRITERLISTENER_HPP
20
21#include <fastdds/dds/core/status/BaseStatus.hpp>
22#include <fastdds/dds/core/status/IncompatibleQosStatus.hpp>
23#include <fastdds/rtps/builtin/data/SubscriptionBuiltinTopicData.hpp>
24#include <fastdds/rtps/common/Guid.hpp>
25#include <fastdds/rtps/common/MatchingInfo.hpp>
26#include <fastdds/rtps/reader/ReaderDiscoveryStatus.hpp>
27
28 namespace eprosima {
29 namespace fastdds {
30 namespace rtps {
31
32 class RTPSWriter;
33 struct CacheChange_t;
34
39 class FASTDDS_EXPORTED_API WriterListener
40{
41 public:
42
43 WriterListener() = default;
44
45 virtual ~WriterListener() = default;
46
52 virtual void on_writer_matched(
53 RTPSWriter* writer,
54 const MatchingInfo& info)
55 {
56 static_cast<void>(writer);
57 static_cast<void>(info);
58 }
59
67 virtual void on_offered_incompatible_qos(
68 RTPSWriter* writer,
69 eprosima::fastdds::dds::PolicyMask qos)
70 {
71 static_cast<void>(writer);
72 static_cast<void>(qos);
73 }
74
81 virtual void on_writer_change_received_by_all(
82 RTPSWriter* writer,
83 CacheChange_t* change)
84 {
85 static_cast<void>(writer);
86 static_cast<void>(change);
87 }
88
95 virtual void on_liveliness_lost(
96 RTPSWriter* writer,
97 const LivelinessLostStatus& status)
98 {
99 static_cast<void>(writer);
100 static_cast<void>(status);
101 }
102
111 virtual void on_reader_discovery(
112 RTPSWriter* writer,
113 ReaderDiscoveryStatus reason,
114 const GUID_t& reader_guid,
115 const SubscriptionBuiltinTopicData* reader_info)
116 {
117 static_cast<void>(writer);
118 static_cast<void>(reason);
119 static_cast<void>(reader_guid);
120 static_cast<void>(reader_info);
121 }
122
129 virtual void on_incompatible_type(
130 RTPSWriter* writer)
131 {
132 static_cast<void>(writer);
133 }
134
135};
136
137} // namespace rtps
138} // namespace fastdds
139} // namespace eprosima
140
141
142
143#endif // FASTDDS_RTPS_WRITER__WRITERLISTENER_HPP
eprosima::fastdds::rtps::MatchingInfo
Class MatchingInfo contains information about the matching between two endpoints.
Definition MatchingInfo.hpp:48
eprosima::fastdds::rtps::RTPSWriter
Class RTPSWriter, manages the sending of data to the readers.
Definition RTPSWriter.hpp:62
eprosima::fastdds::rtps::WriterListener::on_writer_change_received_by_all
virtual void on_writer_change_received_by_all(RTPSWriter *writer, CacheChange_t *change)
This method is called when all the readers matched with this Writer acknowledge that a cache change h...
Definition WriterListener.hpp:81
eprosima::fastdds::rtps::WriterListener::~WriterListener
virtual ~WriterListener()=default
eprosima::fastdds::rtps::WriterListener::on_liveliness_lost
virtual void on_liveliness_lost(RTPSWriter *writer, const LivelinessLostStatus &status)
Method called when the liveliness of a writer is lost.
Definition WriterListener.hpp:95
eprosima::fastdds::rtps::WriterListener::on_reader_discovery
virtual void on_reader_discovery(RTPSWriter *writer, ReaderDiscoveryStatus reason, const GUID_t &reader_guid, const SubscriptionBuiltinTopicData *reader_info)
Method called when the discovery information of a reader regarding a writer changes.
Definition WriterListener.hpp:111
eprosima::fastdds::rtps::WriterListener::on_writer_matched
virtual void on_writer_matched(RTPSWriter *writer, const MatchingInfo &info)
This method is called when a new Reader is matched with this Writer by the builtin protocols.
Definition WriterListener.hpp:52
eprosima::fastdds::rtps::WriterListener::on_incompatible_type
virtual void on_incompatible_type(RTPSWriter *writer)
This method is called when a new Reader is discovered, with a Topic that matches the name of a local ...
Definition WriterListener.hpp:129
eprosima::fastdds::rtps::WriterListener::WriterListener
WriterListener()=default
eprosima::fastdds::rtps::WriterListener::on_offered_incompatible_qos
virtual void on_offered_incompatible_qos(RTPSWriter *writer, eprosima::fastdds::dds::PolicyMask qos)
This method is called when a new Reader is discovered, with a Topic that matches that of a local writ...
Definition WriterListener.hpp:67
eprosima::fastdds::dds::PolicyMask
std::bitset< NEXT_QOS_POLICY_ID > PolicyMask
Definition QosPolicies.hpp:104
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds::rtps::ReaderDiscoveryStatus
ReaderDiscoveryStatus
Enum DISCOVERY_STATUS, four different status for discovered readers.
Definition ReaderDiscoveryStatus.hpp:36
eprosima::fastdds
eprosima::fastdds::LivelinessLostStatus
fastdds::dds::BaseStatus LivelinessLostStatus
Definition BaseStatus.hpp:47
eprosima
eProsima namespace.
eprosima::fastdds::rtps::CacheChange_t
Structure CacheChange_t, contains information on a specific CacheChange.
Definition CacheChange.hpp:78
eprosima::fastdds::rtps::GUID_t
Structure GUID_t, entity identifier, unique in DDS-RTPS Domain.
Definition Guid.hpp:40
eprosima::fastdds::rtps::SubscriptionBuiltinTopicData
Structure SubscriptionBuiltinTopicData, contains the information on a discovered subscription.
Definition SubscriptionBuiltinTopicData.hpp:47