Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
Publisher.h
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
20#ifndef PUBLISHER_H_
21#define PUBLISHER_H_
22
23#include <fastrtps/fastrtps_dll.h>
24#include <fastdds/rtps/common/Guid.h>
25#include <fastdds/rtps/common/Time_t.h>
26#include <fastrtps/attributes/PublisherAttributes.h>
27#include <fastrtps/qos/DeadlineMissedStatus.h>
28#include <fastrtps/qos/LivelinessLostStatus.h>
29
30namespace eprosima {
31namespace fastrtps {
32
33namespace rtps {
34struct GUID_t;
35class WriteParams;
36class RTPSParticipant;
37} // namespace rtps
38
39class Participant;
40class PublisherImpl;
41
46class RTPS_DllAPI Publisher
47{
48 friend class PublisherImpl;
49 virtual ~Publisher();
50
51public:
52
58 PublisherImpl* pimpl);
59
69 bool write(
70 void* sample);
71
82 bool write(
83 void* sample,
84 rtps::WriteParams& wparams);
85
94 fastrtps::rtps::InstanceHandle_t register_instance(
95 void* instance);
96
106 void* data,
107 const rtps::InstanceHandle_t& handle);
118 void* instance,
119 const rtps::InstanceHandle_t& handle);
120
127 size_t* removed = nullptr);
128
135 const Duration_t& max_wait);
136
141 const rtps::GUID_t& getGuid();
142
148
155 const PublisherAttributes& att);
156
163
168
174 LivelinessLostStatus& status);
175
182 rtps::LocatorList_t& locators) const;
183
184private:
185
186 PublisherImpl* mp_impl;
187};
188
189} /* namespace fastrtps */
190} /* namespace eprosima */
191
192#endif /* PUBLISHER_H_ */
Class PublisherAttributes, used by the user to define the attributes of a Publisher.
Definition PublisherAttributes.h:41
Class Publisher, used to send data to associated subscribers.
Definition Publisher.h:47
void get_offered_deadline_missed_status(OfferedDeadlineMissedStatus &status)
Returns the offered deadline missed status.
fastrtps::rtps::InstanceHandle_t register_instance(void *instance)
Informs that the application will be modifying a particular instance.
const rtps::GUID_t & getGuid()
Get the GUID_t of the associated RTPSWriter.
bool wait_for_all_acked(const Duration_t &max_wait)
Waits until all changes were acknowledged or max_wait.
const PublisherAttributes & getAttributes() const
Get the Attributes of the Publisher.
bool write(void *sample, rtps::WriteParams &wparams)
Writes a sample of the topic with additional options.
bool updateAttributes(const PublisherAttributes &att)
Update the Attributes of the publisher.
bool unregister_instance(void *instance, const rtps::InstanceHandle_t &handle)
This operation reserves the action of register_instance.
bool removeAllChange(size_t *removed=nullptr)
Remove all the Changes in the associated RTPSWriter.
void get_sending_locators(rtps::LocatorList_t &locators) const
Get the list of locators from which this publisher may send data.
Publisher(PublisherImpl *pimpl)
Constructor from a PublisherImpl pointer.
bool write(void *sample)
Writes a sample of the topic.
void get_liveliness_lost_status(LivelinessLostStatus &status)
Returns the liveliness lost status.
bool dispose(void *data, const rtps::InstanceHandle_t &handle)
Requests the middleware to delete the instance.
void assert_liveliness()
Asserts liveliness.
DeadlineMissedStatus OfferedDeadlineMissedStatus
Definition DeadlineMissedStatus.h:29
eProsima namespace.
Definition LibrarySettingsAttributes.h:23