Fast RTPS  Version 2.5.0
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/common/Locator.h>
25 #include <fastdds/rtps/common/Time_t.h>
26 #include <fastdds/rtps/attributes/WriterAttributes.h>
27 #include <fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h>
28 #include <fastrtps/attributes/TopicAttributes.h>
29 #include <fastrtps/qos/WriterQos.h>
30 #include <fastdds/rtps/attributes/PropertyPolicy.h>
31 
32 namespace eprosima {
33 namespace fastrtps {
34 
40 {
41 public:
42 
44  : historyMemoryPolicy(rtps::PREALLOCATED_MEMORY_MODE)
45  , m_userDefinedID(-1)
46  , m_entityID(-1)
47  {
48  }
49 
51  {
52  }
53 
55  const PublisherAttributes& b) const
56  {
57  return (this->m_userDefinedID == b.m_userDefinedID) &&
58  (this->m_entityID == b.m_entityID) &&
59  (this->topic == b.topic) &&
60  (this->qos == b.qos) &&
61  (this->times == b.times) &&
64  (this->remoteLocatorList == b.remoteLocatorList) &&
66  (this->properties == b.properties);
67  }
68 
71 
74 
76  rtps::WriterTimes times;
77 
79  rtps::LocatorList_t unicastLocatorList;
80 
82  rtps::LocatorList_t multicastLocatorList;
83 
85  rtps::LocatorList_t remoteLocatorList;
86 
88  rtps::ThroughputControllerDescriptor throughputController;
89 
91  rtps::MemoryManagementPolicy_t historyMemoryPolicy;
92 
94  rtps::PropertyPolicy properties;
96 
101  inline int16_t getUserDefinedID() const
102  {
103  return m_userDefinedID;
104  }
105 
110  inline int16_t getEntityID() const
111  {
112  return m_entityID;
113  }
114 
119  inline void setUserDefinedID(
120  uint8_t id)
121  {
122  m_userDefinedID = id;
123  }
124 
129  inline void setEntityID(
130  uint8_t id)
131  {
132  m_entityID = id;
133  }
134 
135 private:
136 
138  int16_t m_userDefinedID;
140  int16_t m_entityID;
141 };
142 
143 } // namespace fastrtps
144 } /* namespace eprosima */
145 
146 #endif /* PUBLISHERATTRIBUTES_H_ */
Class PublisherAttributes, used by the user to define the attributes of a Publisher.
Definition: PublisherAttributes.h:40
rtps::LocatorList_t unicastLocatorList
Unicast locator list.
Definition: PublisherAttributes.h:79
PublisherAttributes()
Definition: PublisherAttributes.h:43
rtps::MemoryManagementPolicy_t historyMemoryPolicy
Underlying History memory policy.
Definition: PublisherAttributes.h:91
bool operator==(const PublisherAttributes &b) const
Definition: PublisherAttributes.h:54
rtps::LocatorList_t remoteLocatorList
Remote locator list.
Definition: PublisherAttributes.h:85
rtps::LocatorList_t multicastLocatorList
Multicast locator list.
Definition: PublisherAttributes.h:82
rtps::ThroughputControllerDescriptor throughputController
Throughput controller.
Definition: PublisherAttributes.h:88
WriterQos qos
QOS for the Publisher.
Definition: PublisherAttributes.h:73
int16_t getEntityID() const
Get the entity defined ID.
Definition: PublisherAttributes.h:110
TopicAttributes topic
Topic Attributes for the Publisher.
Definition: PublisherAttributes.h:70
void setEntityID(uint8_t id)
Set the entity ID.
Definition: PublisherAttributes.h:129
int16_t getUserDefinedID() const
Get the user defined ID.
Definition: PublisherAttributes.h:101
rtps::PropertyPolicy properties
Properties.
Definition: PublisherAttributes.h:94
ResourceLimitedContainerConfig matched_subscriber_allocation
Definition: PublisherAttributes.h:95
virtual ~PublisherAttributes()
Definition: PublisherAttributes.h:50
void setUserDefinedID(uint8_t id)
Set the user defined ID.
Definition: PublisherAttributes.h:119
rtps::WriterTimes times
Writer Attributes.
Definition: PublisherAttributes.h:76
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:34