123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509 |
- // Copyright 2019 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.
- /**
- * @file TopicQos.hpp
- */
- #ifndef _FASTDDS_TOPICQOS_HPP
- #define _FASTDDS_TOPICQOS_HPP
- #include <fastdds/dds/core/policy/QosPolicies.hpp>
- #include <fastrtps/attributes/TopicAttributes.h>
- #include <fastdds/dds/log/Log.hpp>
- namespace eprosima {
- namespace fastdds {
- namespace dds {
- /**
- * Class TopicQos, containing all the possible Qos that can be set for a determined Topic.
- * Although these values can be set and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
- class TopicQos
- {
- public:
- /**
- * @brief Constructor
- */
- RTPS_DllAPI TopicQos();
- bool operator ==(
- const TopicQos& b) const
- {
- return (this->topic_data_ == b.topic_data()) &&
- (this->durability_ == b.durability()) &&
- (this->durability_service_ == b.durability_service()) &&
- (this->deadline_ == b.deadline()) &&
- (this->latency_budget_ == b.latency_budget()) &&
- (this->liveliness_ == b.liveliness()) &&
- (this->reliability_ == b.reliability()) &&
- (this->destination_order_ == b.destination_order()) &&
- (this->history_ == b.history()) &&
- (this->resource_limits_ == b.resource_limits()) &&
- (this->transport_priority_ == b.transport_priority()) &&
- (this->lifespan_ == b.lifespan()) &&
- (this->ownership_ == b.ownership());
- }
- /**
- * Getter for TopicDataQosPolicy
- * @return TopicDataQos reference
- */
- const TopicDataQosPolicy& topic_data() const
- {
- return topic_data_;
- }
- /**
- * Getter for TopicDataQosPolicy
- * @return TopicDataQos reference
- */
- TopicDataQosPolicy& topic_data()
- {
- return topic_data_;
- }
- /**
- * Setter for TopicDataQosPolicy
- * @param value new value for the TopicDataQosPolicy
- */
- void topic_data(
- const TopicDataQosPolicy& value)
- {
- topic_data_ = value;
- }
- /**
- * Getter for DurabilityQosPolicy
- * @return DurabilityQos reference
- */
- const DurabilityQosPolicy& durability() const
- {
- return durability_;
- }
- /**
- * Getter for DurabilityQosPolicy
- * @return DurabilityQos reference
- */
- DurabilityQosPolicy& durability()
- {
- return durability_;
- }
- /**
- * Setter for DurabilityQosPolicy
- * @param durability new value for the DurabilityQosPolicy
- */
- void durability(
- const DurabilityQosPolicy& durability)
- {
- durability_ = durability;
- }
- /**
- * Getter for DurabilityServiceQosPolicy
- * @return DurabilityServiceQos reference
- */
- const DurabilityServiceQosPolicy& durability_service() const
- {
- return durability_service_;
- }
- /**
- * Getter for DurabilityServiceQosPolicy
- * @return DurabilityServiceQos reference
- */
- DurabilityServiceQosPolicy& durability_service()
- {
- return durability_service_;
- }
- /**
- * Setter for DurabilityServiceQosPolicy
- * @param durability_service new value for the DurabilityServiceQosPolicy
- */
- void durability_service(
- const DurabilityServiceQosPolicy& durability_service)
- {
- durability_service_ = durability_service;
- }
- /**
- * Getter for DeadlineQosPolicy
- * @return DeadlineQos reference
- */
- const DeadlineQosPolicy& deadline() const
- {
- return deadline_;
- }
- /**
- * Getter for DeadlineQosPolicy
- * @return DeadlineQos reference
- */
- DeadlineQosPolicy& deadline()
- {
- return deadline_;
- }
- /**
- * Setter for DeadlineQosPolicy
- * @param deadline new value for the DeadlineQosPolicy
- */
- void deadline(
- const DeadlineQosPolicy& deadline)
- {
- deadline_ = deadline;
- }
- /**
- * Getter for LatencyBudgetQosPolicy
- * @return LatencyBudgetQos reference
- */
- const LatencyBudgetQosPolicy& latency_budget() const
- {
- return latency_budget_;
- }
- /**
- * Getter for LatencyBudgetQosPolicy
- * @return LatencyBudgetQos reference
- */
- LatencyBudgetQosPolicy& latency_budget()
- {
- return latency_budget_;
- }
- /**
- * Setter for LatencyBudgetQosPolicy
- * @param latency_budget new value for the LatencyBudgetQosPolicy
- */
- void latency_budget(
- const LatencyBudgetQosPolicy& latency_budget)
- {
- latency_budget_ = latency_budget;
- }
- /**
- * Getter for LivelinessQosPolicy
- * @return LivelinessQos reference
- */
- const LivelinessQosPolicy& liveliness() const
- {
- return liveliness_;
- }
- /**
- * Getter for LivelinessQosPolicy
- * @return LivelinessQos reference
- */
- LivelinessQosPolicy& liveliness()
- {
- return liveliness_;
- }
- /**
- * Setter for LivelinessQosPolicy
- * @param liveliness new value for the LivelinessQosPolicy
- */
- void liveliness(
- const LivelinessQosPolicy& liveliness)
- {
- liveliness_ = liveliness;
- }
- /**
- * Getter for ReliabilityQosPolicy
- * @return ReliabilityQos reference
- */
- const ReliabilityQosPolicy& reliability() const
- {
- return reliability_;
- }
- /**
- * Getter for ReliabilityQosPolicy
- * @return ReliabilityQos reference
- */
- ReliabilityQosPolicy& reliability()
- {
- return reliability_;
- }
- /**
- * Setter for ReliabilityQosPolicy
- * @param reliability new value for the ReliabilityQosPolicy
- */
- void reliability(
- const ReliabilityQosPolicy& reliability)
- {
- reliability_ = reliability;
- }
- /**
- * Getter for DestinationOrderQosPolicy
- * @return DestinationOrderQos reference
- */
- const DestinationOrderQosPolicy& destination_order() const
- {
- return destination_order_;
- }
- /**
- * Getter for DestinationOrderQosPolicy
- * @return DestinationOrderQos reference
- */
- DestinationOrderQosPolicy& destination_order()
- {
- return destination_order_;
- }
- /**
- * Setter for DestinationOrderQosPolicy
- * @param destination_order new value for the DestinationOrderQosPolicy
- */
- void destination_order(
- const DestinationOrderQosPolicy& destination_order)
- {
- destination_order_ = destination_order;
- }
- /**
- * Getter for HistoryQosPolicy
- * @return HistoryQos reference
- */
- const HistoryQosPolicy& history() const
- {
- return history_;
- }
- /**
- * Getter for HistoryQosPolicy
- * @return HistoryQos reference
- */
- HistoryQosPolicy& history()
- {
- return history_;
- }
- /**
- * Setter for HistoryQosPolicy
- * @param history new value for the HistoryQosPolicy
- */
- void history(
- const HistoryQosPolicy& history)
- {
- history_ = history;
- }
- /**
- * Getter for ResourceLimitsQosPolicy
- * @return ResourceLimitsQos reference
- */
- const ResourceLimitsQosPolicy& resource_limits() const
- {
- return resource_limits_;
- }
- /**
- * Getter for ResourceLimitsQosPolicy
- * @return ResourceLimitsQos reference
- */
- ResourceLimitsQosPolicy& resource_limits()
- {
- return resource_limits_;
- }
- /**
- * Setter for ResourceLimitsQosPolicy
- * @param resource_limits new value for the ResourceLimitsQosPolicy
- */
- void resource_limits(
- const ResourceLimitsQosPolicy& resource_limits)
- {
- resource_limits_ = resource_limits;
- }
- /**
- * Getter for TransportPriorityQosPolicy
- * @return TransportPriorityQos reference
- */
- const TransportPriorityQosPolicy& transport_priority() const
- {
- return transport_priority_;
- }
- /**
- * Getter for TransportPriorityQosPolicy
- * @return TransportPriorityQos reference
- */
- TransportPriorityQosPolicy& transport_priority()
- {
- return transport_priority_;
- }
- /**
- * Setter for TransportPriorityQosPolicy
- * @param transport_priority new value for the TransportPriorityQosPolicy
- */
- void transport_priority(
- const TransportPriorityQosPolicy& transport_priority)
- {
- transport_priority_ = transport_priority;
- }
- /**
- * Getter for LifespanQosPolicy
- * @return LifespanQos reference
- */
- const LifespanQosPolicy& lifespan() const
- {
- return lifespan_;
- }
- /**
- * Getter for LifespanQosPolicy
- * @return LifespanQos reference
- */
- LifespanQosPolicy& lifespan()
- {
- return lifespan_;
- }
- /**
- * Setter for LifespanQosPolicy
- * @param lifespan new value for the LifespanQosPolicy
- */
- void lifespan(
- const LifespanQosPolicy& lifespan)
- {
- lifespan_ = lifespan;
- }
- /**
- * Getter for OwnershipQosPolicy
- * @return OwnershipQos reference
- */
- const OwnershipQosPolicy& ownership() const
- {
- return ownership_;
- }
- /**
- * Getter for OwnershipQosPolicy
- * @return OwnershipQos reference
- */
- OwnershipQosPolicy& ownership()
- {
- return ownership_;
- }
- /**
- * Setter for OwnershipQosPolicy
- * @param ownership new value for the OwnershipQosPolicy
- */
- void ownership(
- const OwnershipQosPolicy& ownership)
- {
- ownership_ = ownership;
- }
- /**
- * Getter for DataRepresentationQosPolicy
- * @return DataRepresentationQosPolicy reference
- */
- const DataRepresentationQosPolicy& representation() const
- {
- return representation_;
- }
- /**
- * Getter for DataRepresentationQosPolicy
- * @return DataRepresentationQosPolicy reference
- */
- DataRepresentationQosPolicy& representation()
- {
- return representation_;
- }
- /**
- * Setter for DataRepresentationQosPolicy
- * @param representation new value for the DataRepresentationQosPolicy
- */
- void representation(
- const DataRepresentationQosPolicy& representation)
- {
- representation_ = representation;
- }
- private:
- //!Topic Data Qos, NOT implemented in the library.
- TopicDataQosPolicy topic_data_;
- //!Durability Qos, implemented in the library.
- DurabilityQosPolicy durability_;
- //!Durability Service Qos, NOT implemented in the library.
- DurabilityServiceQosPolicy durability_service_;
- //!Deadline Qos, implemented in the library.
- DeadlineQosPolicy deadline_;
- //!Latency Budget Qos, NOT implemented in the library.
- LatencyBudgetQosPolicy latency_budget_;
- //!Liveliness Qos, implemented in the library.
- LivelinessQosPolicy liveliness_;
- //!Reliability Qos, implemented in the library.
- ReliabilityQosPolicy reliability_;
- //!Destination Order Qos, NOT implemented in the library.
- DestinationOrderQosPolicy destination_order_;
- //!History Qos, implemented in the library.
- HistoryQosPolicy history_;
- //!Resource Limits Qos, implemented in the library.
- ResourceLimitsQosPolicy resource_limits_;
- //!Transport Priority Qos, NOT implemented in the library.
- TransportPriorityQosPolicy transport_priority_;
- //!Lifespan Qos, implemented in the library.
- LifespanQosPolicy lifespan_;
- //!Ownership Qos, NOT implemented in the library.
- OwnershipQosPolicy ownership_;
- //!Data Representation Qos, (XTypes extension).
- DataRepresentationQosPolicy representation_;
- };
- RTPS_DllAPI extern const TopicQos TOPIC_QOS_DEFAULT;
- } // namespace dds
- } // namespace fastdds
- } // namespace eprosima
- #endif // _FASTDDS_TOPICQOS_HPP
|