123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #ifndef SUBSCRIBERATTRIBUTES_H_
- #define SUBSCRIBERATTRIBUTES_H_
- #include <fastdds/rtps/resources/ResourceManagement.h>
- #include <fastdds/rtps/common/Time_t.h>
- #include <fastdds/rtps/common/Locator.h>
- #include <fastdds/rtps/attributes/ReaderAttributes.h>
- #include <fastrtps/attributes/TopicAttributes.h>
- #include <fastrtps/qos/ReaderQos.h>
- #include <fastdds/rtps/attributes/PropertyPolicy.h>
- namespace eprosima {
- namespace fastrtps {
- class SubscriberAttributes
- {
- public:
-
- TopicAttributes topic;
-
- ReaderQos qos;
-
- rtps::ReaderTimes times;
-
- rtps::LocatorList_t unicastLocatorList;
-
- rtps::LocatorList_t multicastLocatorList;
-
- rtps::LocatorList_t remoteLocatorList;
-
- bool expectsInlineQos;
-
- rtps::MemoryManagementPolicy_t historyMemoryPolicy;
-
- rtps::PropertyPolicy properties;
-
- ResourceLimitedContainerConfig matched_publisher_allocation;
- SubscriberAttributes()
- : expectsInlineQos(false)
- , historyMemoryPolicy(rtps::PREALLOCATED_MEMORY_MODE)
- , m_userDefinedID(-1)
- , m_entityID(-1)
- {}
- virtual ~SubscriberAttributes(){}
- bool operator==(const SubscriberAttributes& b) const
- {
- return (this->topic == b.topic) &&
- (this->qos == b.qos) &&
- (this->times == b.times) &&
- (this->unicastLocatorList == b.unicastLocatorList) &&
- (this->multicastLocatorList == b.multicastLocatorList) &&
- (this->remoteLocatorList == b.remoteLocatorList) &&
- (this->historyMemoryPolicy == b.historyMemoryPolicy) &&
- (this->properties == b.properties);
- }
- bool operator!=(const SubscriberAttributes& b) const
- {
- return !(*this == b);
- }
-
- inline int16_t getUserDefinedID() const { return m_userDefinedID; }
-
- inline int16_t getEntityID() const { return m_entityID; }
-
- inline void setUserDefinedID(uint8_t id) { m_userDefinedID = id; }
-
- inline void setEntityID(uint8_t id) { m_entityID = id; }
- private:
-
- int16_t m_userDefinedID;
-
- int16_t m_entityID;
- };
- }
- }
- #endif
|