QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE > Class Template Reference

#include <QOS_DwDrTp_Base_T.h>

Inheritance diagram for QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 QOS_DwDrTp_Base_T (void)
 ~QOS_DwDrTp_Base_T (void)
void read_qos (DDS_QOS_TYPE &, const XML_QOS_TYPE)

Detailed Description

template<typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
class QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >

Author:
Marcel Smit (msmit@remedy.nl)

This template contains the parsing of all QOS XML setting which the DataWriter, the DataReader, and the Topic Qos have in common. The DDS_QOS_TYPE template attribute can either contain an DDS::DataReaderQos, an DDS::DataWriterQos, or an DDS::TopicQos. These are the IDL representatives.

The XML_QOS_TYPE can either contain an dds::datareaderQos, an dds::datawriterQos, or an dds::topicQos. These are the XML representatives.

Definition at line 23 of file QOS_DwDrTp_Base_T.h.


Constructor & Destructor Documentation

template<typename XML_QOS_TYPE , typename DDS_QOS_TYPE >
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::QOS_DwDrTp_Base_T ( void   )  [inline]

Definition at line 9 of file QOS_DwDrTp_Base_T.cpp.

00010 {
00011 }

template<typename XML_QOS_TYPE , typename DDS_QOS_TYPE >
QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::~QOS_DwDrTp_Base_T ( void   )  [inline]

Definition at line 14 of file QOS_DwDrTp_Base_T.cpp.

00015 {
00016 }


Member Function Documentation

template<typename XML_QOS_TYPE , typename DDS_QOS_TYPE >
void QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos ( DDS_QOS_TYPE &  dds_qos,
const XML_QOS_TYPE  xml_qos 
) [inline]

Reimplemented in QOS_DataReader_T< XML_QOS_TYPE, DDS_QOS_TYPE >, QOS_DataWriter_T< XML_QOS_TYPE, DDS_QOS_TYPE >, QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >, and QOS_Topic_T< XML_QOS_TYPE, DDS_QOS_TYPE >.

Definition at line 20 of file QOS_DwDrTp_Base_T.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, QosCommon::get_destination_order_kind(), QosCommon::get_durability_kind(), QosCommon::get_duration(), QosCommon::get_history_kind(), QosCommon::get_liveliness_kind(), QosCommon::get_ownership_kind(), QosCommon::get_qos_long(), QosCommon::get_realiability_kind(), LM_TRACE, and max_samples.

Referenced by QOS_Topic_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos(), QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos(), and QOS_DataReader_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().

00021 {
00022   if (xml_qos->durability_p ())
00023     {
00024       if (xml_qos->durability().kind_p ())
00025         {
00026           QosCommon::get_durability_kind (xml_qos->durability().kind (),
00027                                           dds_qos.durability.kind);
00028 
00029           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00030             {
00031               ACE_DEBUG ((LM_TRACE,
00032                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00033                 ACE_TEXT ("set durability to <%d>\n"),
00034                 dds_qos.durability.kind));
00035             }
00036 
00037         }
00038     }
00039   if (xml_qos->deadline_p ())
00040     {
00041       const std::string nsec = xml_qos->deadline().period ().nanosec ();
00042       const std::string sec = xml_qos->deadline().period ().sec ();
00043 
00044       QosCommon::get_duration (dds_qos.deadline.period,
00045                                 sec.c_str (),
00046                                 nsec.c_str ());
00047 
00048       if (OpenDDS::DCPS::DCPS_debug_level > 9)
00049         {
00050           ACE_DEBUG ((LM_TRACE,
00051             ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00052             ACE_TEXT ("Set deadline to <%d:%u>\n"),
00053             dds_qos.deadline.period.sec,
00054             dds_qos.deadline.period.nanosec));
00055         }
00056     }
00057   if (xml_qos->latency_budget_p ())
00058     {
00059       const std::string nsec = xml_qos->latency_budget().duration ().nanosec ();
00060       const std::string sec = xml_qos->latency_budget().duration ().sec ();
00061 
00062       QosCommon::get_duration (dds_qos.latency_budget.duration,
00063                                 sec.c_str (),
00064                                 nsec.c_str ());
00065 
00066       if (OpenDDS::DCPS::DCPS_debug_level > 9)
00067         {
00068           ACE_DEBUG ((LM_TRACE,
00069             ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00070             ACE_TEXT ("Set latency_budget to <%d:%u>\n"),
00071             dds_qos.latency_budget.duration.sec, \
00072             dds_qos.latency_budget.duration.nanosec));
00073         }
00074     }
00075   if (xml_qos->liveliness_p ())
00076     {
00077       if (xml_qos->liveliness ().kind_p ())
00078         {
00079           QosCommon::get_liveliness_kind (xml_qos->liveliness ().kind (),
00080                                           dds_qos.liveliness.kind);
00081 
00082           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00083             {
00084               ACE_DEBUG ((LM_TRACE,
00085                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00086                 ACE_TEXT ("Set liveliness_kind to <%d>\n"),
00087                 dds_qos.liveliness.kind));
00088             }
00089         }
00090       if (xml_qos->liveliness ().lease_duration_p ())
00091         {
00092           const std::string nsec = xml_qos->liveliness ().lease_duration ().nanosec ();
00093           const std::string sec = xml_qos->liveliness ().lease_duration ().sec ();
00094 
00095           QosCommon::get_duration (dds_qos.liveliness.lease_duration,
00096                                     sec.c_str (),
00097                                     nsec.c_str ());
00098 
00099           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00100             {
00101               ACE_DEBUG ((LM_TRACE,
00102                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00103                 ACE_TEXT ("Set liveliness lease_duration to <%d:%u>\n"),
00104                 dds_qos.liveliness.lease_duration.sec,
00105                 dds_qos.liveliness.lease_duration.nanosec));
00106             }
00107         }
00108     }
00109   if (xml_qos->reliability_p ())
00110     {
00111       if (xml_qos->reliability ().kind_p ())
00112         {
00113           QosCommon::get_realiability_kind (xml_qos->reliability ().kind (),
00114                                             dds_qos.reliability.kind);
00115 
00116           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00117             {
00118               ACE_DEBUG ((LM_TRACE,
00119                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00120                 ACE_TEXT ("Set reliability_kind to <%d>\n"),
00121                 dds_qos.reliability.kind));
00122             }
00123         }
00124       if (xml_qos->reliability ().max_blocking_time_p ())
00125         {
00126           const std::string nsec = xml_qos->reliability().max_blocking_time ().nanosec ();
00127           const std::string sec = xml_qos->reliability().max_blocking_time ().sec ();
00128 
00129           QosCommon::get_duration (dds_qos.reliability.max_blocking_time,
00130                                     sec.c_str (),
00131                                     nsec.c_str ());
00132 
00133           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00134             {
00135               ACE_DEBUG ((LM_TRACE,
00136                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00137                 ACE_TEXT ("Set reliability max_blocking_time to <%d:%u>\n"),
00138                 dds_qos.reliability.max_blocking_time.sec,
00139                 dds_qos.reliability.max_blocking_time.nanosec));
00140             }
00141         }
00142     }
00143   if (xml_qos->destination_order_p ())
00144     {
00145       QosCommon::get_destination_order_kind (xml_qos->destination_order ().kind (),
00146                                              dds_qos.destination_order.kind);
00147 
00148       if (OpenDDS::DCPS::DCPS_debug_level > 9)
00149         {
00150           ACE_DEBUG ((LM_TRACE,
00151             ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00152             ACE_TEXT ("Set destination_order to <%d>\n"),
00153             dds_qos.destination_order.kind));
00154         }
00155     }
00156   if (xml_qos->history_p ())
00157     {
00158       if (xml_qos->history ().kind_p ())
00159         {
00160           QosCommon::get_history_kind (xml_qos->history ().kind (),
00161                                        dds_qos.history.kind);
00162 
00163           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00164             {
00165               ACE_DEBUG ((LM_TRACE,
00166                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00167                 ACE_TEXT ("Set history to <%d>\n"),
00168                 dds_qos.history.kind));
00169             }
00170         }
00171       if (xml_qos->history ().depth_p ())
00172         {
00173           dds_qos.history.depth = static_cast<CORBA::Long>(xml_qos->history().depth());
00174 
00175           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00176             {
00177               ACE_DEBUG ((LM_TRACE,
00178                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00179                 ACE_TEXT ("Set history depth to <%u>\n"),
00180                 dds_qos.history.depth));
00181             }
00182         }
00183     }
00184   if (xml_qos->resource_limits_p ())
00185     {
00186       if (xml_qos->resource_limits ().max_samples_p ())
00187         {
00188           const std::string max_samples = xml_qos->resource_limits ().max_samples ();
00189 
00190           dds_qos.resource_limits.max_samples =
00191             QosCommon::get_qos_long (max_samples.c_str ());
00192 
00193           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00194             {
00195               ACE_DEBUG ((LM_TRACE,
00196                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00197                 ACE_TEXT ("Set Resource Limits max_samples to <%d>\n"),
00198                 dds_qos.resource_limits.max_samples));
00199             }
00200         }
00201       if (xml_qos->resource_limits ().max_instances_p ())
00202         {
00203           const std::string max_instances = xml_qos->resource_limits ().max_instances ();
00204 
00205           dds_qos.resource_limits.max_instances =
00206             QosCommon::get_qos_long (max_instances.c_str ());
00207 
00208           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00209             {
00210               ACE_DEBUG ((LM_TRACE,
00211                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00212                 ACE_TEXT ("Set Resource Limits max_instances to <%d>\n"),
00213                 dds_qos.resource_limits.max_instances));
00214             }
00215         }
00216       if (xml_qos->resource_limits ().max_samples_per_instance_p ())
00217         {
00218           const std::string max_samples_per_instance =
00219             xml_qos->resource_limits ().max_samples_per_instance ();
00220 
00221           dds_qos.resource_limits.max_samples_per_instance =
00222             QosCommon::get_qos_long (max_samples_per_instance.c_str ());
00223 
00224           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00225             {
00226               ACE_DEBUG ((LM_TRACE,
00227                 ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00228                 ACE_TEXT ("Set Resource Limits max_samples_per_instance to <%d>\n"),
00229                 dds_qos.resource_limits.max_samples_per_instance));
00230             }
00231         }
00232     }
00233   if (xml_qos->ownership_p ())
00234     {
00235       QosCommon::get_ownership_kind (xml_qos->ownership ().kind (),
00236                                      dds_qos.ownership.kind);
00237 
00238       if (OpenDDS::DCPS::DCPS_debug_level > 9)
00239         {
00240           ACE_DEBUG ((LM_TRACE,
00241             ACE_TEXT ("QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00242             ACE_TEXT ("Set ownership to <%d>\n"),
00243             dds_qos.ownership.kind));
00244         }
00245     }
00246 }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1