WriterQos.hpp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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 WriterQos.hpp
  16. *
  17. */
  18. #ifndef _FASTDDS_DDS_QOS_WRITERQOS_HPP_
  19. #define _FASTDDS_DDS_QOS_WRITERQOS_HPP_
  20. #include <fastdds/dds/core/policy/QosPolicies.hpp>
  21. namespace eprosima {
  22. namespace fastdds {
  23. namespace dds {
  24. /**
  25. * Class WriterQos, containing all the possible Qos that can be set for a determined Publisher.
  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 WriterQos
  32. {
  33. public:
  34. RTPS_DllAPI WriterQos();
  35. RTPS_DllAPI virtual ~WriterQos();
  36. bool operator ==(
  37. const WriterQos& b) const
  38. {
  39. return (this->m_durability == b.m_durability) &&
  40. (this->m_durabilityService == b.m_durabilityService) &&
  41. (this->m_deadline == b.m_deadline) &&
  42. (this->m_latencyBudget == b.m_latencyBudget) &&
  43. (this->m_liveliness == b.m_liveliness) &&
  44. (this->m_reliability == b.m_reliability) &&
  45. (this->m_lifespan == b.m_lifespan) &&
  46. (this->m_userData == b.m_userData) &&
  47. (this->m_timeBasedFilter == b.m_timeBasedFilter) &&
  48. (this->m_ownership == b.m_ownership) &&
  49. (this->m_ownershipStrength == b.m_ownershipStrength) &&
  50. (this->m_destinationOrder == b.m_destinationOrder) &&
  51. (this->m_presentation == b.m_presentation) &&
  52. (this->m_partition == b.m_partition) &&
  53. (this->m_topicData == b.m_topicData) &&
  54. (this->m_groupData == b.m_groupData) &&
  55. (this->m_publishMode == b.m_publishMode) &&
  56. (this->m_disablePositiveACKs == b.m_disablePositiveACKs) &&
  57. (this->representation == b.representation);
  58. }
  59. //!Durability Qos, implemented in the library.
  60. DurabilityQosPolicy m_durability;
  61. //!Durability Service Qos, NOT implemented in the library.
  62. DurabilityServiceQosPolicy m_durabilityService;
  63. //!Deadline Qos, implemented in the library.
  64. DeadlineQosPolicy m_deadline;
  65. //!Latency Budget Qos, NOT implemented in the library.
  66. LatencyBudgetQosPolicy m_latencyBudget;
  67. //!Liveliness Qos, implemented in the library.
  68. LivelinessQosPolicy m_liveliness;
  69. //!Reliability Qos, implemented in the library.
  70. ReliabilityQosPolicy m_reliability;
  71. //!Lifespan Qos, NOT implemented in the library.
  72. LifespanQosPolicy m_lifespan;
  73. //!UserData Qos, NOT implemented in the library.
  74. UserDataQosPolicy m_userData;
  75. //!Time Based Filter Qos, NOT implemented in the library.
  76. TimeBasedFilterQosPolicy m_timeBasedFilter;
  77. //!Ownership Qos, NOT implemented in the library.
  78. OwnershipQosPolicy m_ownership;
  79. //!Owenership Strength Qos, NOT implemented in the library.
  80. OwnershipStrengthQosPolicy m_ownershipStrength;
  81. //!Destination Order Qos, NOT implemented in the library.
  82. DestinationOrderQosPolicy m_destinationOrder;
  83. //!Presentation Qos, NOT implemented in the library.
  84. PresentationQosPolicy m_presentation;
  85. //!Partition Qos, implemented in the library.
  86. PartitionQosPolicy m_partition;
  87. //!Topic Data Qos, NOT implemented in the library.
  88. TopicDataQosPolicy m_topicData;
  89. //!Group Data Qos, NOT implemented in the library.
  90. GroupDataQosPolicy m_groupData;
  91. //!Publication Mode Qos, implemented in the library.
  92. PublishModeQosPolicy m_publishMode;
  93. //!Data Representation Qos, implemented in the library.
  94. DataRepresentationQosPolicy representation;
  95. //!Disable positive acks QoS, implemented in the library.
  96. DisablePositiveACKsQosPolicy m_disablePositiveACKs;
  97. /**
  98. * Set Qos from another class
  99. * @param qos Reference from a WriterQos object.
  100. * @param first_time Boolean indicating whether is the first time (If not some parameters cannot be set).
  101. */
  102. RTPS_DllAPI void setQos(
  103. const WriterQos& qos,
  104. bool first_time);
  105. /**
  106. * Check if the Qos values are compatible between each other.
  107. * @return True if correct.
  108. */
  109. RTPS_DllAPI bool checkQos() const;
  110. RTPS_DllAPI bool canQosBeUpdated(
  111. const WriterQos& qos) const;
  112. void clear();
  113. };
  114. //RTPS_DllAPI extern const WriterQos DATAWRITER_QOS_DEFAULT;
  115. } //namespace dds
  116. } //namespace fastdds
  117. } //namespace eprosima
  118. #endif // _FASTDDS_DDS_QOS_WRITERQOS_HPP_