Program Listing for File PublisherAttributes.h
↰ Return to documentation for file (/tmp/ws/src/fastrtps/include/fastrtps/attributes/PublisherAttributes.h
)
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef PUBLISHERATTRIBUTES_H_
#define PUBLISHERATTRIBUTES_H_
#include <fastdds/rtps/resources/ResourceManagement.h>
#include <fastdds/rtps/attributes/ExternalLocators.hpp>
#include <fastdds/rtps/attributes/PropertyPolicy.h>
#include <fastdds/rtps/attributes/WriterAttributes.h>
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/common/Time_t.h>
#include <fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h>
#include <fastrtps/attributes/TopicAttributes.h>
#include <fastrtps/qos/WriterQos.h>
namespace eprosima {
namespace fastrtps {
class PublisherAttributes
{
public:
PublisherAttributes() = default;
virtual ~PublisherAttributes() = default;
bool operator ==(
const PublisherAttributes& b) const
{
return (this->m_userDefinedID == b.m_userDefinedID) &&
(this->m_entityID == b.m_entityID) &&
(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);
}
TopicAttributes topic;
WriterQos qos;
rtps::WriterTimes times;
rtps::LocatorList_t unicastLocatorList;
rtps::LocatorList_t multicastLocatorList;
rtps::LocatorList_t remoteLocatorList;
fastdds::rtps::ExternalLocators external_unicast_locators;
bool ignore_non_matching_locators = false;
rtps::ThroughputControllerDescriptor throughputController;
rtps::MemoryManagementPolicy_t historyMemoryPolicy =
rtps::MemoryManagementPolicy_t::PREALLOCATED_WITH_REALLOC_MEMORY_MODE;
rtps::PropertyPolicy properties;
ResourceLimitedContainerConfig matched_subscriber_allocation;
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 = -1;
int16_t m_entityID = -1;
};
} // namespace fastrtps
} // namespace eprosima
#endif /* PUBLISHERATTRIBUTES_H_ */