| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
RTPSWriter.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
19#ifndef FASTDDS_RTPS_WRITER__RTPSWRITER_HPP
20#define FASTDDS_RTPS_WRITER__RTPSWRITER_HPP
21
22#include <chrono>
23#include <cstdint>
24#include <functional>
25#include <limits>
26#include <memory>
27#include <mutex>
28#include <vector>
29
30#include <fastdds/fastdds_dll.hpp>
31#include <fastdds/dds/core/policy/QosPolicies.hpp>
32#include <fastdds/dds/core/status/BaseStatus.hpp>
33#include <fastdds/rtps/attributes/HistoryAttributes.hpp>
34#include <fastdds/rtps/attributes/WriterAttributes.hpp>
35#include <fastdds/rtps/builtin/data/SubscriptionBuiltinTopicData.hpp>
36#include <fastdds/rtps/common/CdrSerialization.hpp>
37#include <fastdds/rtps/common/Guid.hpp>
38#include <fastdds/rtps/common/RemoteLocators.hpp>
39#include <fastdds/rtps/common/VendorId_t.hpp>
40#include <fastdds/rtps/Endpoint.hpp>
41#include <fastdds/rtps/interfaces/IReaderDataFilter.hpp>
42#include <fastdds/statistics/IListeners.hpp>
43#include <fastdds/statistics/rtps/monitor_service/connections_fwd.hpp>
44#include <fastdds/rtps/common/SequenceNumber.hpp>
45#include <fastdds/rtps/common/Time_t.hpp>
46#include <fastdds/utils/TimedMutex.hpp>
47
48 namespace eprosima {
49 namespace fastdds {
50 namespace rtps {
51
52 class FlowController;
53 class RTPSParticipantImpl;
54 class WriterHistory;
55 class WriterListener;
56
61 class RTPSWriter : public Endpoint
62{
63 protected:
64
65 RTPSWriter(
66 RTPSParticipantImpl* impl,
67 const GUID_t& guid,
68 const WriterAttributes& att);
69
70 virtual ~RTPSWriter();
71
72 public:
73
81 FASTDDS_EXPORTED_API virtual bool matched_reader_add(
82 const SubscriptionBuiltinTopicData& info) = 0;
83
89 FASTDDS_EXPORTED_API virtual bool matched_reader_remove(
90 const GUID_t& reader_guid) = 0;
91
97 FASTDDS_EXPORTED_API virtual bool matched_reader_is_matched(
98 const GUID_t& reader_guid) = 0;
99
109 FASTDDS_EXPORTED_API virtual void reader_data_filter(
110 IReaderDataFilter* filter) = 0;
111
117 FASTDDS_EXPORTED_API virtual const IReaderDataFilter* reader_data_filter() const = 0;
118
126 FASTDDS_EXPORTED_API virtual bool has_been_fully_delivered(
127 const SequenceNumber_t& seq_num) const = 0;
128
137 FASTDDS_EXPORTED_API virtual bool is_acked_by_all(
138 const SequenceNumber_t& seq_num) const = 0;
139
147 FASTDDS_EXPORTED_API virtual bool wait_for_all_acked(
148 const dds::Duration_t& max_wait) = 0;
149
154 FASTDDS_EXPORTED_API virtual void update_attributes(
155 const WriterAttributes& att) = 0;
156
161 FASTDDS_EXPORTED_API virtual WriterListener* get_listener() const = 0;
162
169 FASTDDS_EXPORTED_API virtual bool set_listener(
170 WriterListener* listener) = 0;
171
176 FASTDDS_EXPORTED_API virtual bool is_async() const = 0;
177
184 FASTDDS_EXPORTED_API virtual bool get_disable_positive_acks() const = 0;
185
192 FASTDDS_EXPORTED_API virtual bool matched_readers_guids(
193 std::vector<GUID_t>& guids) const = 0;
194
195#ifdef FASTDDS_STATISTICS
196
202 FASTDDS_EXPORTED_API virtual bool add_statistics_listener(
203 std::shared_ptr<fastdds::statistics::IListener> listener) = 0;
204
210 FASTDDS_EXPORTED_API virtual bool remove_statistics_listener(
211 std::shared_ptr<fastdds::statistics::IListener> listener) = 0;
212
218 FASTDDS_EXPORTED_API virtual void set_enabled_statistics_writers_mask(
219 uint32_t enabled_writers) = 0;
220
227 FASTDDS_EXPORTED_API virtual bool get_connections(
228 fastdds::statistics::rtps::ConnectionList& connection_list) = 0;
229
230#endif // FASTDDS_STATISTICS
231
232 private:
233
234 RTPSWriter& operator =(
235 const RTPSWriter&) = delete;
236
237};
238
239} // namespace rtps
240} // namespace fastdds
241} // namespace eprosima
242
243#endif // FASTDDS_RTPS_WRITER__RTPSWRITER_HPP
eprosima::fastdds::rtps::Endpoint::Endpoint
Endpoint()=default
eprosima::fastdds::rtps::Endpoint::RTPSParticipantImpl
friend class RTPSParticipantImpl
Definition Endpoint.hpp:47
eprosima::fastdds::rtps::IReaderDataFilter
Abstract class IReaderDataFilter that acts as virtual interface for data filters in ReaderProxy.
Definition IReaderDataFilter.hpp:36
eprosima::fastdds::rtps::RTPSWriter::has_been_fully_delivered
virtual FASTDDS_EXPORTED_API bool has_been_fully_delivered(const SequenceNumber_t &seq_num) const =0
Check if a specific change has been delivered to the transport layer of every matched remote RTPSRead...
eprosima::fastdds::rtps::RTPSWriter::get_listener
virtual FASTDDS_EXPORTED_API WriterListener * get_listener() const =0
Get listener.
eprosima::fastdds::rtps::RTPSWriter::matched_reader_add
virtual FASTDDS_EXPORTED_API bool matched_reader_add(const SubscriptionBuiltinTopicData &info)=0
Add a matched reader represented by its attributes.
eprosima::fastdds::rtps::RTPSWriter::is_async
virtual FASTDDS_EXPORTED_API bool is_async() const =0
Get the publication mode.
eprosima::fastdds::rtps::RTPSWriter::RTPSWriter
RTPSWriter(RTPSParticipantImpl *impl, const GUID_t &guid, const WriterAttributes &att)
eprosima::fastdds::rtps::RTPSWriter::is_acked_by_all
virtual FASTDDS_EXPORTED_API bool is_acked_by_all(const SequenceNumber_t &seq_num) const =0
Check if a specific change has been acknowledged by all Readers.
eprosima::fastdds::rtps::RTPSWriter::wait_for_all_acked
virtual FASTDDS_EXPORTED_API bool wait_for_all_acked(const dds::Duration_t &max_wait)=0
Waits until all changes were acknowledged or max_wait.
eprosima::fastdds::rtps::RTPSWriter::reader_data_filter
virtual FASTDDS_EXPORTED_API const IReaderDataFilter * reader_data_filter() const =0
Get the content filter used to perform content filtering on this writer.
eprosima::fastdds::rtps::RTPSWriter::get_disable_positive_acks
virtual FASTDDS_EXPORTED_API bool get_disable_positive_acks() const =0
Returns if disable positive ACKs QoS is enabled.
eprosima::fastdds::rtps::RTPSWriter::reader_data_filter
virtual FASTDDS_EXPORTED_API void reader_data_filter(IReaderDataFilter *filter)=0
Set a content filter to perform content filtering on this writer.
eprosima::fastdds::rtps::RTPSWriter::matched_reader_remove
virtual FASTDDS_EXPORTED_API bool matched_reader_remove(const GUID_t &reader_guid)=0
Remove a matched reader.
eprosima::fastdds::rtps::RTPSWriter::~RTPSWriter
virtual ~RTPSWriter()
eprosima::fastdds::rtps::RTPSWriter::matched_reader_is_matched
virtual FASTDDS_EXPORTED_API bool matched_reader_is_matched(const GUID_t &reader_guid)=0
Tells us if a specific Reader is matched against this writer.
eprosima::fastdds::rtps::RTPSWriter::set_listener
virtual FASTDDS_EXPORTED_API bool set_listener(WriterListener *listener)=0
Set the listener.
eprosima::fastdds::rtps::RTPSWriter::update_attributes
virtual FASTDDS_EXPORTED_API void update_attributes(const WriterAttributes &att)=0
Update the Attributes of the Writer.
eprosima::fastdds::rtps::RTPSWriter::matched_readers_guids
virtual FASTDDS_EXPORTED_API bool matched_readers_guids(std::vector< GUID_t > &guids) const =0
Fills the provided vector with the GUIDs of the matched readers.
eprosima::fastdds::rtps::WriterAttributes
Class WriterAttributes, defining the attributes of a RTPSWriter.
Definition WriterAttributes.hpp:73
eprosima::fastdds::rtps::WriterHistory
Class WriterHistory, container of the different CacheChanges of a writer.
Definition WriterHistory.hpp:47
eprosima::fastdds::rtps::WriterListener
Class WriterListener with virtual method so the user can implement callbacks to certain events.
Definition WriterListener.hpp:40
eprosima::fastdds::dds::Duration_t
Time_t Duration_t
Definition Time_t.hpp:91
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds::statistics::rtps::ConnectionList
std::vector< eprosima::fastdds::statistics::Connection > ConnectionList
Definition connections_fwd.hpp:31
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::rtps::GUID_t
Structure GUID_t, entity identifier, unique in DDS-RTPS Domain.
Definition Guid.hpp:40
eprosima::fastdds::rtps::SequenceNumber_t
Structure SequenceNumber_t, different for each change in the same writer.
Definition SequenceNumber.hpp:38
eprosima::fastdds::rtps::SubscriptionBuiltinTopicData
Structure SubscriptionBuiltinTopicData, contains the information on a discovered subscription.
Definition SubscriptionBuiltinTopicData.hpp:47