DomainParticipantQos.hpp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. // Copyright 2019 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 DomainParticipantQos.hpp
  16. *
  17. */
  18. #ifndef _FASTDDS_PARTICIPANTQOS_HPP_
  19. #define _FASTDDS_PARTICIPANTQOS_HPP_
  20. #include <fastrtps/fastrtps_dll.h>
  21. #include <fastdds/dds/core/policy/QosPolicies.hpp>
  22. namespace eprosima {
  23. namespace fastdds {
  24. namespace dds {
  25. /**
  26. * Class DomainParticipantQos, contains all the possible Qos that can be set for a determined participant.
  27. * Please consult each of them to check for implementation details and default values.
  28. * @ingroup FASTDDS_QOS_MODULE
  29. */
  30. class DomainParticipantQos
  31. {
  32. public:
  33. /**
  34. * @brief Constructor
  35. */
  36. RTPS_DllAPI DomainParticipantQos()
  37. {
  38. }
  39. /**
  40. * @brief Destructor
  41. */
  42. RTPS_DllAPI virtual ~DomainParticipantQos()
  43. {
  44. }
  45. bool operator ==(
  46. const DomainParticipantQos& b) const
  47. {
  48. return (this->user_data_ == b.user_data()) &&
  49. (this->entity_factory_ == b.entity_factory()) &&
  50. (this->allocation_ == b.allocation()) &&
  51. (this->properties_ == b.properties()) &&
  52. (this->wire_protocol_ == b.wire_protocol()) &&
  53. (this->transport_ == b.transport()) &&
  54. (this->name_ == b.name());
  55. }
  56. /**
  57. * Getter for UserDataQosPolicy
  58. * @return UserDataQosPolicy reference
  59. */
  60. const UserDataQosPolicy& user_data() const
  61. {
  62. return user_data_;
  63. }
  64. /**
  65. * Getter for UserDataQosPolicy
  66. * @return UserDataQosPolicy reference
  67. */
  68. UserDataQosPolicy& user_data()
  69. {
  70. return user_data_;
  71. }
  72. /**
  73. * Setter for UserDataQosPolicy
  74. * @param value UserDataQosPolicy
  75. */
  76. void user_data(
  77. const UserDataQosPolicy& value)
  78. {
  79. user_data_ = value;
  80. }
  81. /**
  82. * Getter for EntityFactoryQosPolicy
  83. * @return EntityFactoryQosPolicy reference
  84. */
  85. const EntityFactoryQosPolicy& entity_factory() const
  86. {
  87. return entity_factory_;
  88. }
  89. /**
  90. * Getter for EntityFactoryQosPolicy
  91. * @return EntityFactoryQosPolicy reference
  92. */
  93. EntityFactoryQosPolicy& entity_factory()
  94. {
  95. return entity_factory_;
  96. }
  97. /**
  98. * Setter for EntityFactoryQosPolicy
  99. * @param value EntityFactoryQosPolicy
  100. */
  101. void entity_factory(
  102. const EntityFactoryQosPolicy& value)
  103. {
  104. entity_factory_ = value;
  105. }
  106. /**
  107. * Getter for ParticipantResourceLimitsQos
  108. * @return ParticipantResourceLimitsQos reference
  109. */
  110. const ParticipantResourceLimitsQos& allocation() const
  111. {
  112. return allocation_;
  113. }
  114. /**
  115. * Getter for ParticipantResourceLimitsQos
  116. * @return ParticipantResourceLimitsQos reference
  117. */
  118. ParticipantResourceLimitsQos& allocation()
  119. {
  120. return allocation_;
  121. }
  122. /**
  123. * Setter for ParticipantResourceLimitsQos
  124. * @param allocation ParticipantResourceLimitsQos
  125. */
  126. void allocation(
  127. const ParticipantResourceLimitsQos& allocation)
  128. {
  129. allocation_ = allocation;
  130. }
  131. /**
  132. * Getter for PropertyPolicyQos
  133. * @return PropertyPolicyQos reference
  134. */
  135. const PropertyPolicyQos& properties() const
  136. {
  137. return properties_;
  138. }
  139. /**
  140. * Getter for PropertyPolicyQos
  141. * @return PropertyPolicyQos reference
  142. */
  143. PropertyPolicyQos& properties()
  144. {
  145. return properties_;
  146. }
  147. /**
  148. * Setter for PropertyPolicyQos
  149. * @param properties PropertyPolicyQos
  150. */
  151. void properties(
  152. const PropertyPolicyQos& properties)
  153. {
  154. properties_ = properties;
  155. }
  156. /**
  157. * Getter for WireProtocolConfigQos
  158. * @return WireProtocolConfigQos reference
  159. */
  160. const WireProtocolConfigQos& wire_protocol() const
  161. {
  162. return wire_protocol_;
  163. }
  164. /**
  165. * Getter for WireProtocolConfigQos
  166. * @return WireProtocolConfigQos reference
  167. */
  168. WireProtocolConfigQos& wire_protocol()
  169. {
  170. return wire_protocol_;
  171. }
  172. /**
  173. * Setter for WireProtocolConfigQos
  174. * @param wire_protocol WireProtocolConfigQos
  175. */
  176. void wire_protocol(
  177. const WireProtocolConfigQos& wire_protocol)
  178. {
  179. wire_protocol_ = wire_protocol;
  180. }
  181. /**
  182. * Getter for TransportConfigQos
  183. * @return TransportConfigQos reference
  184. */
  185. const TransportConfigQos& transport() const
  186. {
  187. return transport_;
  188. }
  189. /**
  190. * Getter for TransportConfigQos
  191. * @return TransportConfigQos reference
  192. */
  193. TransportConfigQos& transport()
  194. {
  195. return transport_;
  196. }
  197. /**
  198. * Setter for TransportConfigQos
  199. * @param transport TransportConfigQos
  200. */
  201. void transport(
  202. const TransportConfigQos& transport)
  203. {
  204. transport_ = transport;
  205. }
  206. /**
  207. * Getter for the Participant name
  208. * @return name
  209. */
  210. const fastrtps::string_255& name() const
  211. {
  212. return name_;
  213. }
  214. /**
  215. * Getter for the Participant name
  216. * @return name
  217. */
  218. fastrtps::string_255& name()
  219. {
  220. return name_;
  221. }
  222. /**
  223. * Setter for the Participant name
  224. * @return value New name to be set
  225. */
  226. void name(
  227. const fastrtps::string_255& value)
  228. {
  229. name_ = value;
  230. }
  231. private:
  232. //!UserData Qos, implemented in the library.
  233. UserDataQosPolicy user_data_;
  234. //!EntityFactory Qos, implemented in the library.
  235. EntityFactoryQosPolicy entity_factory_;
  236. //!Participant allocation limits
  237. ParticipantResourceLimitsQos allocation_;
  238. //!Property policies
  239. PropertyPolicyQos properties_;
  240. //!Wire Protocol options
  241. WireProtocolConfigQos wire_protocol_;
  242. //!Transport options
  243. TransportConfigQos transport_;
  244. //!Name of the participant.
  245. fastrtps::string_255 name_ = "RTPSParticipant";
  246. };
  247. RTPS_DllAPI extern const DomainParticipantQos PARTICIPANT_QOS_DEFAULT;
  248. } /* namespace dds */
  249. } /* namespace fastdds */
  250. } /* namespace eprosima */
  251. #endif /* _FASTDDS_PARTICIPANTQOS_HPP_ */