Fast RTPS  Version 2.6.0
Fast RTPS
Loading...
Searching...
No Matches
SubscriberAttributes.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 SUBSCRIBERATTRIBUTES_H_
20#define SUBSCRIBERATTRIBUTES_H_
21
22#include <fastdds/rtps/resources/ResourceManagement.h>
23
24#include <fastdds/rtps/common/Time_t.h>
25#include <fastdds/rtps/common/Locator.h>
26#include <fastdds/rtps/attributes/ReaderAttributes.h>
27#include <fastrtps/attributes/TopicAttributes.h>
28#include <fastrtps/qos/ReaderQos.h>
29#include <fastdds/rtps/attributes/PropertyPolicy.h>
30
31
32
33namespace eprosima {
34namespace fastrtps {
35
41{
42 public:
45
48
50 rtps::ReaderTimes times;
51
53 rtps::LocatorList_t unicastLocatorList;
54
56 rtps::LocatorList_t multicastLocatorList;
57
59 rtps::LocatorList_t remoteLocatorList;
60
63
65 rtps::MemoryManagementPolicy_t historyMemoryPolicy;
66
68 rtps::PropertyPolicy properties;
69
72
74 : expectsInlineQos(false)
75 , historyMemoryPolicy(rtps::PREALLOCATED_MEMORY_MODE)
76 , m_userDefinedID(-1)
77 , m_entityID(-1)
78 {}
79
81
82 bool operator==(const SubscriberAttributes& b) const
83 {
84 return (this->topic == b.topic) &&
85 (this->qos == b.qos) &&
86 (this->times == b.times) &&
87 (this->unicastLocatorList == b.unicastLocatorList) &&
88 (this->multicastLocatorList == b.multicastLocatorList) &&
89 (this->remoteLocatorList == b.remoteLocatorList) &&
90 (this->historyMemoryPolicy == b.historyMemoryPolicy) &&
91 (this->properties == b.properties);
92 }
93
94 bool operator!=(const SubscriberAttributes& b) const
95 {
96 return !(*this == b);
97 }
98
103 inline int16_t getUserDefinedID() const { return m_userDefinedID; }
104
109 inline int16_t getEntityID() const { return m_entityID; }
110
115 inline void setUserDefinedID(uint8_t id) { m_userDefinedID = id; }
116
121 inline void setEntityID(uint8_t id) { m_entityID = id; }
122
123 private:
125 int16_t m_userDefinedID;
126
128 int16_t m_entityID;
129};
130
131} /* namespace fastrtps */
132} /* namespace eprosima */
133
134#endif /* SUBSCRIBERPARAMS_H_ */
Class SubscriberAttributes, used by the user to define the attributes of a Subscriber.
Definition: SubscriberAttributes.h:41
rtps::LocatorList_t unicastLocatorList
Unicast locator list.
Definition: SubscriberAttributes.h:53
rtps::MemoryManagementPolicy_t historyMemoryPolicy
Underlying History memory policy.
Definition: SubscriberAttributes.h:65
SubscriberAttributes()
Definition: SubscriberAttributes.h:73
rtps::LocatorList_t remoteLocatorList
Remote locator list.
Definition: SubscriberAttributes.h:59
ResourceLimitedContainerConfig matched_publisher_allocation
Matched publishers allocation limits.
Definition: SubscriberAttributes.h:71
rtps::LocatorList_t multicastLocatorList
Multicast locator list.
Definition: SubscriberAttributes.h:56
bool expectsInlineQos
Expects Inline QOS.
Definition: SubscriberAttributes.h:62
int16_t getEntityID() const
Get the entity defined ID.
Definition: SubscriberAttributes.h:109
TopicAttributes topic
Topic Attributes.
Definition: SubscriberAttributes.h:44
bool operator==(const SubscriberAttributes &b) const
Definition: SubscriberAttributes.h:82
ReaderQos qos
Reader QOs.
Definition: SubscriberAttributes.h:47
void setEntityID(uint8_t id)
Set the entity ID.
Definition: SubscriberAttributes.h:121
int16_t getUserDefinedID() const
Get the user defined ID.
Definition: SubscriberAttributes.h:103
rtps::ReaderTimes times
Times for a RELIABLE Reader.
Definition: SubscriberAttributes.h:50
rtps::PropertyPolicy properties
Properties.
Definition: SubscriberAttributes.h:68
virtual ~SubscriberAttributes()
Definition: SubscriberAttributes.h:80
bool operator!=(const SubscriberAttributes &b) const
Definition: SubscriberAttributes.h:94
void setUserDefinedID(uint8_t id)
Set the user defined ID.
Definition: SubscriberAttributes.h:115
Class TopicAttributes, used by the user to define the attributes of the topic associated with a Publi...
Definition: TopicAttributes.h:36
fastdds::dds::ReaderQos ReaderQos
Definition: ReaderQos.h:30
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
Specifies the configuration of a resource limited collection.
Definition: ResourceLimitedContainerConfig.hpp:36