Fast RTPS  Version 2.8.1
Fast RTPS
PublisherAttributes.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
19#ifndef PUBLISHERATTRIBUTES_H_
20#define PUBLISHERATTRIBUTES_H_
21
22#include <fastdds/rtps/resources/ResourceManagement.h>
23
24#include <fastdds/rtps/attributes/ExternalLocators.hpp>
25#include <fastdds/rtps/attributes/PropertyPolicy.h>
26#include <fastdds/rtps/attributes/WriterAttributes.h>
27#include <fastdds/rtps/common/Locator.h>
28#include <fastdds/rtps/common/Time_t.h>
29#include <fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h>
30#include <fastrtps/attributes/TopicAttributes.h>
31#include <fastrtps/qos/WriterQos.h>
32
33namespace eprosima {
34namespace fastrtps {
35
41{
42public:
43
45
46 virtual ~PublisherAttributes() = default;
47
49 const PublisherAttributes& b) const
50 {
51 return (this->m_userDefinedID == b.m_userDefinedID) &&
52 (this->m_entityID == b.m_entityID) &&
53 (this->topic == b.topic) &&
54 (this->qos == b.qos) &&
55 (this->times == b.times) &&
60 (this->properties == b.properties);
61 }
62
65
68
70 rtps::WriterTimes times;
71
73 rtps::LocatorList_t unicastLocatorList;
74
76 rtps::LocatorList_t multicastLocatorList;
77
79 rtps::LocatorList_t remoteLocatorList;
80
82 fastdds::rtps::ExternalLocators external_unicast_locators;
83
86
88 rtps::ThroughputControllerDescriptor throughputController;
89
91 rtps::MemoryManagementPolicy_t historyMemoryPolicy = rtps::MemoryManagementPolicy_t::PREALLOCATED_MEMORY_MODE;
92
94 rtps::PropertyPolicy properties;
95
98
103 inline int16_t getUserDefinedID() const
104 {
105 return m_userDefinedID;
106 }
107
112 inline int16_t getEntityID() const
113 {
114 return m_entityID;
115 }
116
121 inline void setUserDefinedID(
122 uint8_t id)
123 {
124 m_userDefinedID = id;
125 }
126
131 inline void setEntityID(
132 uint8_t id)
133 {
134 m_entityID = id;
135 }
136
137private:
138
140 int16_t m_userDefinedID = -1;
142 int16_t m_entityID = -1;
143};
144
145} // namespace fastrtps
146} // namespace eprosima
147
148#endif /* PUBLISHERATTRIBUTES_H_ */
Class PublisherAttributes, used by the user to define the attributes of a Publisher.
Definition: PublisherAttributes.h:41
fastdds::rtps::ExternalLocators external_unicast_locators
The collection of external locators to use for communication.
Definition: PublisherAttributes.h:82
rtps::LocatorList_t unicastLocatorList
Unicast locator list.
Definition: PublisherAttributes.h:73
rtps::MemoryManagementPolicy_t historyMemoryPolicy
Underlying History memory policy.
Definition: PublisherAttributes.h:91
bool operator==(const PublisherAttributes &b) const
Definition: PublisherAttributes.h:48
rtps::LocatorList_t remoteLocatorList
Remote locator list.
Definition: PublisherAttributes.h:79
rtps::LocatorList_t multicastLocatorList
Multicast locator list.
Definition: PublisherAttributes.h:76
rtps::ThroughputControllerDescriptor throughputController
Throughput controller.
Definition: PublisherAttributes.h:88
bool ignore_non_matching_locators
Whether locators that don't match with the announced locators should be kept.
Definition: PublisherAttributes.h:85
WriterQos qos
QOS for the Publisher.
Definition: PublisherAttributes.h:67
int16_t getEntityID() const
Get the entity defined ID.
Definition: PublisherAttributes.h:112
TopicAttributes topic
Topic Attributes for the Publisher.
Definition: PublisherAttributes.h:64
void setEntityID(uint8_t id)
Set the entity ID.
Definition: PublisherAttributes.h:131
int16_t getUserDefinedID() const
Get the user defined ID.
Definition: PublisherAttributes.h:103
rtps::PropertyPolicy properties
Properties.
Definition: PublisherAttributes.h:94
ResourceLimitedContainerConfig matched_subscriber_allocation
Allocation limits on the matched subscribers collections.
Definition: PublisherAttributes.h:97
void setUserDefinedID(uint8_t id)
Set the user defined ID.
Definition: PublisherAttributes.h:121
rtps::WriterTimes times
Writer Attributes.
Definition: PublisherAttributes.h:70
Class TopicAttributes, used by the user to define the attributes of the topic associated with a Publi...
Definition: TopicAttributes.h:36
fastdds::dds::WriterQos WriterQos
Definition: WriterQos.h:30
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
Specifies the configuration of a resource limited collection.
Definition: ResourceLimitedContainerConfig.hpp:36