Qos_Helper.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_QOS_HELPER_H
00009 #define OPENDDS_DCPS_QOS_HELPER_H
00010 
00011 #include "dds/DdsDcpsInfrastructureC.h"
00012 #include "dds/DCPS/Time_Helper.h"
00013 
00014 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00015 #pragma once
00016 #endif /* ACE_LACKS_PRAGMA_ONCE */
00017 
00018 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00019 
00020 namespace OpenDDS {
00021 namespace DCPS {
00022 
00023 class Service_Participant;
00024 
00025 /**
00026  * @class Qos_Helper
00027  *
00028  * @brief This class implements methods that verify whether a qos is
00029  *        valid, consistent and changeable.
00030  *
00031  * valid - the values are in acceptable ranges without respect
00032  *         to any other values.
00033  *
00034  * consistent - the values are consistent with each other.
00035  *         The spec sometimes calls this "compatible" but I
00036  *         this compatible should be reserved for matching
00037  *         QoS of subscriptions and publications.
00038  *         The spec is confusing in its inconsistency of the
00039  *         use of "compatible" and "consistent".
00040  *
00041  * The qos supported in current implementation:
00042  *         Liveliness  :   kind = AUTOMATIC
00043  *         Reliability :   kind = RELIABLE | BEST_EFFORT
00044  *                         max_blocking_time
00045  *         History     :   kind = KEEP_ALL | KEEP_LAST
00046  *                         depth > 1
00047  *         RESOURCE_LIMITS : max_samples_per_instance
00048  *
00049  * Other than these supported qos, any qos that is different from the
00050  * initial value is invalid.
00051  *
00052  * @note Since in the first implementation of DSS in TAO a limited
00053  *       number of QoS values are allowed to be modified, the
00054  *       consistency test on QoS settings have not been
00055  *       implemented to check future "valid" QoS values.
00056  *
00057  * @note None of the supported QoS in the first implementation are
00058  *       changeable. The changed value will be checked per the QoS
00059  *       table in the DDS specification.
00060  */
00061 class OpenDDS_Dcps_Export Qos_Helper {
00062 public:
00063 
00064   static bool consistent(
00065     const DDS::ResourceLimitsQosPolicy& resource_limits,
00066     const DDS::HistoryQosPolicy& history);
00067 
00068   static bool consistent(
00069     const DDS::DeadlineQosPolicy& deadline,
00070     const DDS::TimeBasedFilterQosPolicy& time_based_filter);
00071 
00072   static bool consistent(const DDS::DomainParticipantQos& qos);
00073 
00074   static bool consistent(const DDS::TopicQos& qos);
00075 
00076   static bool consistent(const DDS::DataWriterQos& qos);
00077 
00078   static bool consistent(const DDS::PublisherQos& qos);
00079 
00080   static bool consistent(const DDS::DataReaderQos& qos);
00081 
00082   static bool consistent(const DDS::SubscriberQos& qos);
00083 
00084   static bool consistent(const DDS::DomainParticipantFactoryQos & qos);
00085 
00086   static bool valid(const DDS::UserDataQosPolicy& qos);
00087 
00088   static bool valid(const DDS::TopicDataQosPolicy & qos);
00089 
00090   static bool valid(const DDS::GroupDataQosPolicy& qos);
00091 
00092   static bool valid(const DDS::TransportPriorityQosPolicy& qos);
00093 
00094   static bool valid(const DDS::LifespanQosPolicy& qos);
00095 
00096   static bool valid(const DDS::DurabilityQosPolicy& qos);
00097 
00098 #ifndef OPENDDS_NO_PERSISTENCE_PROFILE
00099   static bool valid(const DDS::DurabilityServiceQosPolicy& qos);
00100 #endif
00101 
00102   static bool valid(const DDS::PresentationQosPolicy& qos);
00103 
00104   static bool valid(const DDS::DeadlineQosPolicy& qos);
00105 
00106   static bool valid(const DDS::LatencyBudgetQosPolicy& qos);
00107 
00108   static bool valid(const DDS::OwnershipQosPolicy& qos);
00109 
00110 #ifndef OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE
00111   static bool valid(const DDS::OwnershipStrengthQosPolicy& qos);
00112 #endif
00113 
00114   static bool valid(const DDS::LivelinessQosPolicy& qos);
00115 
00116   static bool valid(const DDS::TimeBasedFilterQosPolicy& qos);
00117 
00118   static bool valid(const DDS::PartitionQosPolicy& qos);
00119 
00120   static bool valid(const DDS::ReliabilityQosPolicy& qos);
00121 
00122   static bool valid(const DDS::DestinationOrderQosPolicy& qos);
00123 
00124   static bool valid(const DDS::HistoryQosPolicy& qos);
00125 
00126   static bool valid(const DDS::ResourceLimitsQosPolicy& qos);
00127 
00128   static bool valid(const DDS::EntityFactoryQosPolicy& qos);
00129 
00130   static bool valid(const DDS::PropertyQosPolicy& qos);
00131 
00132   static bool valid(const DDS::WriterDataLifecycleQosPolicy& qos);
00133 
00134   static bool valid(const DDS::ReaderDataLifecycleQosPolicy& qos);
00135 
00136   static bool valid(const DDS::DomainParticipantQos& qos);
00137 
00138   static bool valid(const DDS::TopicQos& qos);
00139 
00140   static bool valid(const DDS::DataWriterQos& qos);
00141 
00142   static bool valid(const DDS::PublisherQos& qos);
00143 
00144   static bool valid(const DDS::DataReaderQos& qos);
00145 
00146   static bool valid(const DDS::SubscriberQos& qos);
00147 
00148   static bool valid(const DDS::DomainParticipantFactoryQos& qos);
00149 
00150   static bool changeable(const DDS::UserDataQosPolicy& qos1,
00151                          const DDS::UserDataQosPolicy& qos2);
00152 
00153   static bool changeable(const DDS::TopicDataQosPolicy & qos1,
00154                          const DDS::TopicDataQosPolicy & qos2);
00155 
00156   static bool changeable(const DDS::GroupDataQosPolicy& qos1,
00157                          const DDS::GroupDataQosPolicy& qos2);
00158 
00159   static bool changeable(const DDS::TransportPriorityQosPolicy& qos1,
00160                          const DDS::TransportPriorityQosPolicy& qos2);
00161 
00162   static bool changeable(const DDS::LifespanQosPolicy& qos1,
00163                          const DDS::LifespanQosPolicy& qos2);
00164 
00165   static bool changeable(const DDS::DurabilityQosPolicy& qos1,
00166                          const DDS::DurabilityQosPolicy& qos2);
00167 
00168 #ifndef OPENDDS_NO_PERSISTENCE_PROFILE
00169   static bool changeable(const DDS::DurabilityServiceQosPolicy& qos1,
00170                          const DDS::DurabilityServiceQosPolicy& qos2);
00171 #endif
00172 
00173   static bool changeable(const DDS::PresentationQosPolicy& qos1,
00174                          const DDS::PresentationQosPolicy& qos2);
00175 
00176   static bool changeable(const DDS::DeadlineQosPolicy& qos1,
00177                          const DDS::DeadlineQosPolicy& qos2);
00178 
00179   static bool changeable(const DDS::LatencyBudgetQosPolicy& qos1,
00180                          const DDS::LatencyBudgetQosPolicy& qos2);
00181 
00182   static bool changeable(const DDS::OwnershipQosPolicy& qos1,
00183                          const DDS::OwnershipQosPolicy& qos2);
00184 
00185 #ifndef OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE
00186   static bool changeable(const DDS::OwnershipStrengthQosPolicy& qos1,
00187                          const DDS::OwnershipStrengthQosPolicy& qos2);
00188 #endif
00189 
00190   static bool changeable(const DDS::LivelinessQosPolicy& qos1,
00191                          const DDS::LivelinessQosPolicy& qos2);
00192 
00193   static bool changeable(const DDS::TimeBasedFilterQosPolicy& qos1,
00194                          const DDS::TimeBasedFilterQosPolicy& qos2);
00195 
00196   static bool changeable(const DDS::PartitionQosPolicy& qos1,
00197                          const DDS::PartitionQosPolicy& qos2);
00198 
00199   static bool changeable(const DDS::ReliabilityQosPolicy& qos1,
00200                          const DDS::ReliabilityQosPolicy& qos2);
00201 
00202   static bool changeable(const DDS::DestinationOrderQosPolicy& qos1,
00203                          const DDS::DestinationOrderQosPolicy& qos2);
00204 
00205   static bool changeable(const DDS::HistoryQosPolicy& qos1,
00206                          const DDS::HistoryQosPolicy& qos2);
00207 
00208   static bool changeable(const DDS::ResourceLimitsQosPolicy& qos1,
00209                          const DDS::ResourceLimitsQosPolicy& qos2);
00210 
00211   static bool changeable(const DDS::EntityFactoryQosPolicy& qos1,
00212                          const DDS::EntityFactoryQosPolicy& qos2) ;
00213 
00214   static bool changeable(const DDS::WriterDataLifecycleQosPolicy& qos1,
00215                          const DDS::WriterDataLifecycleQosPolicy& qos2);
00216 
00217   static bool changeable(const DDS::ReaderDataLifecycleQosPolicy& qos1,
00218                          const DDS::ReaderDataLifecycleQosPolicy& qos2);
00219 
00220   static bool changeable(const DDS::DomainParticipantQos& qos1,
00221                          const DDS::DomainParticipantQos& qos2);
00222 
00223   static bool changeable(const DDS::TopicQos& qos1,
00224                          const DDS::TopicQos& qos2);
00225 
00226   static bool changeable(const DDS::DataWriterQos& qos1,
00227                          const DDS::DataWriterQos& qos2);
00228 
00229   static bool changeable(const DDS::PublisherQos& qos1,
00230                          const DDS::PublisherQos& qos2);
00231 
00232   static bool changeable(const DDS::DataReaderQos& qos1,
00233                          const DDS::DataReaderQos& qos2);
00234 
00235   static bool changeable(const DDS::SubscriberQos& qos1,
00236                          const DDS::SubscriberQos& qos2);
00237 
00238   static bool changeable(const DDS::DomainParticipantFactoryQos& qos1,
00239                          const DDS::DomainParticipantFactoryQos& qos2);
00240 
00241   static bool copy_from_topic_qos(DDS::DataReaderQos& a_datareader_qos,
00242                                   const DDS::TopicQos& a_topic_qos);
00243 
00244   static bool copy_from_topic_qos(DDS::DataWriterQos& a_datareader_qos,
00245                                   const DDS::TopicQos& a_topic_qos);
00246 };
00247 
00248 #ifndef OPENDDS_SAFETY_PROFILE
00249 ACE_INLINE OpenDDS_Dcps_Export
00250 bool operator==(const DDS::UserDataQosPolicy& qos1,
00251                 const DDS::UserDataQosPolicy& qos2);
00252 
00253 ACE_INLINE OpenDDS_Dcps_Export
00254 bool operator==(const DDS::TopicDataQosPolicy & qos1,
00255                 const DDS::TopicDataQosPolicy & qos2);
00256 
00257 ACE_INLINE OpenDDS_Dcps_Export
00258 bool operator==(const DDS::GroupDataQosPolicy& qos1,
00259                 const DDS::GroupDataQosPolicy& qos2);
00260 
00261 ACE_INLINE OpenDDS_Dcps_Export
00262 bool operator==(const DDS::TransportPriorityQosPolicy& qos1,
00263                 const DDS::TransportPriorityQosPolicy& qos2);
00264 
00265 ACE_INLINE OpenDDS_Dcps_Export
00266 bool operator==(const DDS::LifespanQosPolicy& qos1,
00267                 const DDS::LifespanQosPolicy& qos2);
00268 
00269 ACE_INLINE OpenDDS_Dcps_Export
00270 bool operator==(const DDS::DurabilityQosPolicy& qos1,
00271                 const DDS::DurabilityQosPolicy& qos2);
00272 
00273 ACE_INLINE OpenDDS_Dcps_Export
00274 bool operator==(const DDS::DurabilityServiceQosPolicy& qos1,
00275                 const DDS::DurabilityServiceQosPolicy& qos2);
00276 
00277 ACE_INLINE OpenDDS_Dcps_Export
00278 bool operator==(const DDS::PresentationQosPolicy& qos1,
00279                 const DDS::PresentationQosPolicy& qos2);
00280 
00281 ACE_INLINE OpenDDS_Dcps_Export
00282 bool operator==(const DDS::DeadlineQosPolicy& qos1,
00283                 const DDS::DeadlineQosPolicy& qos2);
00284 
00285 ACE_INLINE OpenDDS_Dcps_Export
00286 bool operator==(const DDS::LatencyBudgetQosPolicy& qos1,
00287                 const DDS::LatencyBudgetQosPolicy& qos2);
00288 
00289 ACE_INLINE OpenDDS_Dcps_Export
00290 bool operator==(const DDS::OwnershipQosPolicy& qos1,
00291                 const DDS::OwnershipQosPolicy& qos2);
00292 
00293 ACE_INLINE OpenDDS_Dcps_Export
00294 bool operator==(const DDS::OwnershipStrengthQosPolicy& qos1,
00295                 const DDS::OwnershipStrengthQosPolicy& qos2);
00296 
00297 ACE_INLINE OpenDDS_Dcps_Export
00298 bool operator==(const DDS::LivelinessQosPolicy& qos1,
00299                 const DDS::LivelinessQosPolicy& qos2);
00300 
00301 ACE_INLINE OpenDDS_Dcps_Export
00302 bool operator==(const DDS::TimeBasedFilterQosPolicy& qos1,
00303                 const DDS::TimeBasedFilterQosPolicy& qos2);
00304 
00305 ACE_INLINE OpenDDS_Dcps_Export
00306 bool operator==(const DDS::PartitionQosPolicy& qos1,
00307                 const DDS::PartitionQosPolicy& qos2);
00308 
00309 ACE_INLINE OpenDDS_Dcps_Export
00310 bool operator==(const DDS::ReliabilityQosPolicy& qos1,
00311                 const DDS::ReliabilityQosPolicy& qos2);
00312 
00313 ACE_INLINE OpenDDS_Dcps_Export
00314 bool operator==(const DDS::DestinationOrderQosPolicy& qos1,
00315                 const DDS::DestinationOrderQosPolicy& qos2);
00316 
00317 ACE_INLINE OpenDDS_Dcps_Export
00318 bool operator==(const DDS::HistoryQosPolicy& qos1,
00319                 const DDS::HistoryQosPolicy& qos2);
00320 
00321 ACE_INLINE OpenDDS_Dcps_Export
00322 bool operator==(const DDS::ResourceLimitsQosPolicy& qos1,
00323                 const DDS::ResourceLimitsQosPolicy& qos2);
00324 
00325 ACE_INLINE OpenDDS_Dcps_Export
00326 bool operator==(const DDS::EntityFactoryQosPolicy& qos1,
00327                 const DDS::EntityFactoryQosPolicy& qos2);
00328 
00329 ACE_INLINE OpenDDS_Dcps_Export
00330 bool operator==(const DDS::WriterDataLifecycleQosPolicy& qos1,
00331                 const DDS::WriterDataLifecycleQosPolicy& qos2);
00332 
00333 ACE_INLINE OpenDDS_Dcps_Export
00334 bool operator==(const DDS::ReaderDataLifecycleQosPolicy& qos1,
00335                 const DDS::ReaderDataLifecycleQosPolicy& qos2);
00336 
00337 ACE_INLINE OpenDDS_Dcps_Export
00338 bool operator==(const DDS::DomainParticipantQos& qos1,
00339                 const DDS::DomainParticipantQos& qos2);
00340 
00341 ACE_INLINE OpenDDS_Dcps_Export
00342 bool operator==(const DDS::TopicQos& qos1,
00343                 const DDS::TopicQos& qos2);
00344 
00345 ACE_INLINE OpenDDS_Dcps_Export
00346 bool operator==(const DDS::DataWriterQos& qos1,
00347                 const DDS::DataWriterQos& qos2);
00348 
00349 ACE_INLINE OpenDDS_Dcps_Export
00350 bool operator==(const DDS::PublisherQos& qos1,
00351                 const DDS::PublisherQos& qos2);
00352 
00353 ACE_INLINE OpenDDS_Dcps_Export
00354 bool operator==(const DDS::DataReaderQos& qos1,
00355                 const DDS::DataReaderQos& qos2);
00356 
00357 ACE_INLINE OpenDDS_Dcps_Export
00358 bool operator==(const DDS::SubscriberQos& qos1,
00359                 const DDS::SubscriberQos& qos2);
00360 
00361 ACE_INLINE OpenDDS_Dcps_Export
00362 bool operator==(const DDS::DomainParticipantFactoryQos& qos1,
00363                 const DDS::DomainParticipantFactoryQos& qos2);
00364 
00365 ACE_INLINE OpenDDS_Dcps_Export
00366 bool operator!=(const DDS::UserDataQosPolicy& qos1,
00367                 const DDS::UserDataQosPolicy& qos2);
00368 
00369 ACE_INLINE OpenDDS_Dcps_Export
00370 bool operator!=(const DDS::TopicDataQosPolicy & qos1,
00371                 const DDS::TopicDataQosPolicy & qos2);
00372 
00373 ACE_INLINE OpenDDS_Dcps_Export
00374 bool operator!=(const DDS::GroupDataQosPolicy& qos1,
00375                 const DDS::GroupDataQosPolicy& qos2);
00376 
00377 ACE_INLINE OpenDDS_Dcps_Export
00378 bool operator!=(const DDS::TransportPriorityQosPolicy& qos1,
00379                 const DDS::TransportPriorityQosPolicy& qos2);
00380 
00381 ACE_INLINE OpenDDS_Dcps_Export
00382 bool operator!=(const DDS::LifespanQosPolicy& qos1,
00383                 const DDS::LifespanQosPolicy& qos2);
00384 
00385 ACE_INLINE OpenDDS_Dcps_Export
00386 bool operator!=(const DDS::DurabilityQosPolicy& qos1,
00387                 const DDS::DurabilityQosPolicy& qos2);
00388 
00389 ACE_INLINE OpenDDS_Dcps_Export
00390 bool operator!=(const DDS::DurabilityServiceQosPolicy& qos1,
00391                 const DDS::DurabilityServiceQosPolicy& qos2);
00392 
00393 ACE_INLINE OpenDDS_Dcps_Export
00394 bool operator!=(const DDS::PresentationQosPolicy& qos1,
00395                 const DDS::PresentationQosPolicy& qos2);
00396 
00397 ACE_INLINE OpenDDS_Dcps_Export
00398 bool operator!=(const DDS::DeadlineQosPolicy& qos1,
00399                 const DDS::DeadlineQosPolicy& qos2);
00400 
00401 ACE_INLINE OpenDDS_Dcps_Export
00402 bool operator!=(const DDS::LatencyBudgetQosPolicy& qos1,
00403                 const DDS::LatencyBudgetQosPolicy& qos2);
00404 
00405 ACE_INLINE OpenDDS_Dcps_Export
00406 bool operator!=(const DDS::OwnershipQosPolicy& qos1,
00407                 const DDS::OwnershipQosPolicy& qos2);
00408 
00409 ACE_INLINE OpenDDS_Dcps_Export
00410 bool operator!=(const DDS::OwnershipStrengthQosPolicy& qos1,
00411                 const DDS::OwnershipStrengthQosPolicy& qos2);
00412 
00413 ACE_INLINE OpenDDS_Dcps_Export
00414 bool operator!=(const DDS::LivelinessQosPolicy& qos1,
00415                 const DDS::LivelinessQosPolicy& qos2);
00416 
00417 ACE_INLINE OpenDDS_Dcps_Export
00418 bool operator!=(const DDS::TimeBasedFilterQosPolicy& qos1,
00419                 const DDS::TimeBasedFilterQosPolicy& qos2);
00420 
00421 ACE_INLINE OpenDDS_Dcps_Export
00422 bool operator!=(const DDS::PartitionQosPolicy& qos1,
00423                 const DDS::PartitionQosPolicy& qos2);
00424 
00425 ACE_INLINE OpenDDS_Dcps_Export
00426 bool operator!=(const DDS::ReliabilityQosPolicy& qos1,
00427                 const DDS::ReliabilityQosPolicy& qos2);
00428 
00429 ACE_INLINE OpenDDS_Dcps_Export
00430 bool operator!=(const DDS::DestinationOrderQosPolicy& qos1,
00431                 const DDS::DestinationOrderQosPolicy& qos2);
00432 
00433 ACE_INLINE OpenDDS_Dcps_Export
00434 bool operator!=(const DDS::HistoryQosPolicy& qos1,
00435                 const DDS::HistoryQosPolicy& qos2);
00436 
00437 ACE_INLINE OpenDDS_Dcps_Export
00438 bool operator!=(const DDS::ResourceLimitsQosPolicy& qos1,
00439                 const DDS::ResourceLimitsQosPolicy& qos2);
00440 
00441 ACE_INLINE OpenDDS_Dcps_Export
00442 bool operator!=(const DDS::EntityFactoryQosPolicy& qos1,
00443                 const DDS::EntityFactoryQosPolicy& qos2);
00444 
00445 ACE_INLINE OpenDDS_Dcps_Export
00446 bool operator!=(const DDS::WriterDataLifecycleQosPolicy& qos1,
00447                 const DDS::WriterDataLifecycleQosPolicy& qos2);
00448 
00449 ACE_INLINE OpenDDS_Dcps_Export
00450 bool operator!=(const DDS::ReaderDataLifecycleQosPolicy& qos1,
00451                 const DDS::ReaderDataLifecycleQosPolicy& qos2);
00452 
00453 ACE_INLINE OpenDDS_Dcps_Export
00454 bool operator!=(const DDS::PropertyQosPolicy& qos1,
00455                 const DDS::PropertyQosPolicy& qos2);
00456 
00457 ACE_INLINE OpenDDS_Dcps_Export
00458 bool operator!=(const DDS::DomainParticipantQos& qos1,
00459                 const DDS::DomainParticipantQos& qos2);
00460 
00461 ACE_INLINE OpenDDS_Dcps_Export
00462 bool operator!=(const DDS::TopicQos& qos1,
00463                 const DDS::TopicQos& qos2);
00464 
00465 ACE_INLINE OpenDDS_Dcps_Export
00466 bool operator!=(const DDS::DataWriterQos& qos1,
00467                 const DDS::DataWriterQos& qos2);
00468 
00469 ACE_INLINE OpenDDS_Dcps_Export
00470 bool operator!=(const DDS::PublisherQos& qos1,
00471                 const DDS::PublisherQos& qos2);
00472 
00473 ACE_INLINE OpenDDS_Dcps_Export
00474 bool operator!=(const DDS::DataReaderQos& qos1,
00475                 const DDS::DataReaderQos& qos2);
00476 
00477 ACE_INLINE OpenDDS_Dcps_Export
00478 bool operator!=(const DDS::SubscriberQos& qos1,
00479                 const DDS::SubscriberQos& qos2);
00480 
00481 ACE_INLINE OpenDDS_Dcps_Export
00482 bool operator!=(const DDS::DomainParticipantFactoryQos& qos1,
00483                 const DDS::DomainParticipantFactoryQos& qos2);
00484 #endif
00485 
00486 } // namespace DCPS
00487 } // namespace OpenDDS
00488 
00489 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00490 
00491 #if defined(__ACE_INLINE__)
00492 #include "Qos_Helper.inl"
00493 #endif /* __ACE_INLINE__ */
00494 
00495 #endif /* OPENDDS_DCPS_QOS_HELPER_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1