ReaderQos.hpp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. /**
  15. * @file ReaderQos.hpp
  16. *
  17. */
  18. #ifndef _FASTDDS_DDS_QOS_READERQOS_HPP_
  19. #define _FASTDDS_DDS_QOS_READERQOS_HPP_
  20. #include <fastdds/dds/core/policy/QosPolicies.hpp>
  21. namespace eprosima {
  22. namespace fastdds {
  23. namespace dds {
  24. /**
  25. * Class ReaderQos, contains all the possible Qos that can be set for a determined Subscriber.
  26. * Although these values can be set and are transmitted
  27. * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
  28. * Please consult each of them to check for implementation details and default values.
  29. * @ingroup FASTRTPS_ATTRIBUTES_MODULE
  30. */
  31. class ReaderQos
  32. {
  33. public:
  34. RTPS_DllAPI ReaderQos()
  35. {
  36. }
  37. RTPS_DllAPI virtual ~ReaderQos()
  38. {
  39. }
  40. bool operator ==(
  41. const ReaderQos& b) const
  42. {
  43. return (m_durability == b.m_durability) &&
  44. (m_deadline == b.m_deadline) &&
  45. (m_latencyBudget == b.m_latencyBudget) &&
  46. (m_liveliness == b.m_liveliness) &&
  47. (m_reliability == b.m_reliability) &&
  48. (m_ownership == b.m_ownership) &&
  49. (m_destinationOrder == b.m_destinationOrder) &&
  50. (m_userData == b.m_userData) &&
  51. (m_timeBasedFilter == b.m_timeBasedFilter) &&
  52. (m_presentation == b.m_presentation) &&
  53. (m_partition == b.m_partition) &&
  54. (m_topicData == b.m_topicData) &&
  55. (m_groupData == b.m_groupData) &&
  56. (m_durabilityService == b.m_durabilityService) &&
  57. (m_lifespan == b.m_lifespan) &&
  58. (m_disablePositiveACKs == b.m_disablePositiveACKs) &&
  59. (type_consistency == b.type_consistency) &&
  60. (representation == b.representation);
  61. }
  62. //!Durability Qos, implemented in the library.
  63. DurabilityQosPolicy m_durability;
  64. //!Deadline Qos, implemented in the library.
  65. DeadlineQosPolicy m_deadline;
  66. //!Latency Budget Qos, NOT implemented in the library.
  67. LatencyBudgetQosPolicy m_latencyBudget;
  68. //!Liveliness Qos, implemented in the library.
  69. LivelinessQosPolicy m_liveliness;
  70. //!ReliabilityQos, implemented in the library.
  71. ReliabilityQosPolicy m_reliability;
  72. //!Ownership Qos, NOT implemented in the library.
  73. OwnershipQosPolicy m_ownership;
  74. //!Destinatio Order Qos, NOT implemented in the library.
  75. DestinationOrderQosPolicy m_destinationOrder;
  76. //!UserData Qos, NOT implemented in the library.
  77. UserDataQosPolicy m_userData;
  78. //!Time Based Filter Qos, NOT implemented in the library.
  79. TimeBasedFilterQosPolicy m_timeBasedFilter;
  80. //!Presentation Qos, NOT implemented in the library.
  81. PresentationQosPolicy m_presentation;
  82. //!Partition Qos, implemented in the library.
  83. PartitionQosPolicy m_partition;
  84. //!Topic Data Qos, NOT implemented in the library.
  85. TopicDataQosPolicy m_topicData;
  86. //!GroupData Qos, NOT implemented in the library.
  87. GroupDataQosPolicy m_groupData;
  88. //!Durability Service Qos, NOT implemented in the library.
  89. DurabilityServiceQosPolicy m_durabilityService;
  90. //!Lifespan Qos, NOT implemented in the library.
  91. LifespanQosPolicy m_lifespan;
  92. //!Data Representation Qos, implemented in the library.
  93. DataRepresentationQosPolicy representation;
  94. //!Type consistency enforcement Qos, NOT implemented in the library.
  95. TypeConsistencyEnforcementQosPolicy type_consistency;
  96. //!Disable positive ACKs QoS
  97. DisablePositiveACKsQosPolicy m_disablePositiveACKs;
  98. /**
  99. * Set Qos from another class
  100. * @param readerqos Reference from a ReaderQos object.
  101. * @param first_time Boolean indicating whether is the first time (If not some parameters cannot be set).
  102. */
  103. RTPS_DllAPI void setQos(
  104. const ReaderQos& readerqos,
  105. bool first_time);
  106. /**
  107. * Check if the Qos values are compatible between each other.
  108. * @return True if correct.
  109. */
  110. RTPS_DllAPI bool checkQos() const;
  111. /**
  112. * Check if the Qos can be update with the values provided. This method DOES NOT update anything.
  113. * @param qos Reference to the new qos.
  114. * @return True if they can be updated.
  115. */
  116. RTPS_DllAPI bool canQosBeUpdated(
  117. const ReaderQos& qos) const;
  118. void clear();
  119. };
  120. } //namespace dds
  121. } //namespace fastdds
  122. } //namespace eprosima
  123. #endif // _FASTDDS_DDS_QOS_READERQOS_HPP_