Fast RTPS  Version 2.1.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:
43  : historyMemoryPolicy(rtps::PREALLOCATED_MEMORY_MODE)
44  , m_userDefinedID(-1)
45  , m_entityID(-1)
46  {}
47 
49 
50  bool operator==(const PublisherAttributes& b) const
51  {
52  return (this->m_userDefinedID == b.m_userDefinedID) &&
53  (this->m_entityID == b.m_entityID) &&
54  (this->topic == b.topic) &&
55  (this->qos == b.qos) &&
56  (this->times == b.times) &&
59  (this->remoteLocatorList == b.remoteLocatorList) &&
61  (this->properties == b.properties);
62  }
63 
66 
69 
71  rtps::WriterTimes times;
72 
74  rtps::LocatorList_t unicastLocatorList;
75 
77  rtps::LocatorList_t multicastLocatorList;
78 
80  rtps::LocatorList_t remoteLocatorList;
81 
83  rtps::ThroughputControllerDescriptor throughputController;
84 
86  rtps::MemoryManagementPolicy_t historyMemoryPolicy;
87 
89  rtps::PropertyPolicy properties;
91 
96  inline int16_t getUserDefinedID() const { return m_userDefinedID; }
97 
102  inline int16_t getEntityID() const { return m_entityID; }
103 
108  inline void setUserDefinedID(uint8_t id) { m_userDefinedID = id; }
109 
114  inline void setEntityID(uint8_t id) { m_entityID = id; }
115 private:
117  int16_t m_userDefinedID;
119  int16_t m_entityID;
120 };
121 
122 }
123 } /* namespace eprosima */
124 
125 #endif /* PUBLISHERATTRIBUTES_H_ */
eprosima::fastrtps::PublisherAttributes::getUserDefinedID
int16_t getUserDefinedID() const
Get the user defined ID.
Definition: PublisherAttributes.h:96
eprosima::fastrtps::PublisherAttributes::throughputController
rtps::ThroughputControllerDescriptor throughputController
Throughput controller.
Definition: PublisherAttributes.h:83
eprosima::fastrtps::PublisherAttributes::times
rtps::WriterTimes times
Writer Attributes.
Definition: PublisherAttributes.h:71
eprosima::fastrtps::PublisherAttributes::properties
rtps::PropertyPolicy properties
Properties.
Definition: PublisherAttributes.h:89
eprosima::fastrtps::PublisherAttributes::topic
TopicAttributes topic
Topic Attributes for the Publisher.
Definition: PublisherAttributes.h:65
eprosima::fastrtps::PublisherAttributes::setEntityID
void setEntityID(uint8_t id)
Set the entity ID.
Definition: PublisherAttributes.h:114
eprosima::fastrtps::WriterQos
fastdds::dds::WriterQos WriterQos
Definition: WriterQos.h:30
eprosima::fastrtps::PublisherAttributes
Class PublisherAttributes, used by the user to define the attributes of a Publisher.
Definition: PublisherAttributes.h:40
eprosima::fastrtps::PublisherAttributes::multicastLocatorList
rtps::LocatorList_t multicastLocatorList
Multicast locator list.
Definition: PublisherAttributes.h:77
eprosima::fastrtps::PublisherAttributes::qos
WriterQos qos
QOS for the Publisher.
Definition: PublisherAttributes.h:68
eprosima::fastrtps::PublisherAttributes::~PublisherAttributes
virtual ~PublisherAttributes()
Definition: PublisherAttributes.h:48
eprosima::fastrtps::PublisherAttributes::matched_subscriber_allocation
ResourceLimitedContainerConfig matched_subscriber_allocation
Definition: PublisherAttributes.h:90
eprosima::fastrtps::PublisherAttributes::getEntityID
int16_t getEntityID() const
Get the entity defined ID.
Definition: PublisherAttributes.h:102
eprosima::fastrtps::PublisherAttributes::unicastLocatorList
rtps::LocatorList_t unicastLocatorList
Unicast locator list.
Definition: PublisherAttributes.h:74
eprosima::fastrtps::PublisherAttributes::operator==
bool operator==(const PublisherAttributes &b) const
Definition: PublisherAttributes.h:50
eprosima::fastrtps::PublisherAttributes::remoteLocatorList
rtps::LocatorList_t remoteLocatorList
Remote locator list.
Definition: PublisherAttributes.h:80
eprosima::fastrtps::TopicAttributes
Class TopicAttributes, used by the user to define the attributes of the topic associated with a Publi...
Definition: TopicAttributes.h:36
eprosima::fastrtps::PublisherAttributes::historyMemoryPolicy
rtps::MemoryManagementPolicy_t historyMemoryPolicy
Underlying History memory policy.
Definition: PublisherAttributes.h:86
eprosima
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
eprosima::fastrtps::PublisherAttributes::setUserDefinedID
void setUserDefinedID(uint8_t id)
Set the user defined ID.
Definition: PublisherAttributes.h:108
eprosima::fastrtps::PublisherAttributes::PublisherAttributes
PublisherAttributes()
Definition: PublisherAttributes.h:42
eprosima::fastrtps::ResourceLimitedContainerConfig
Specifies the configuration of a resource limited collection.
Definition: ResourceLimitedContainerConfig.hpp:34