QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE > Class Template Reference

#include <QOS_DwTp_Base_T.h>

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

List of all members.

Public Member Functions

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

Private Types

typedef QOS_DwDrTp_Base_T
< XML_QOS_TYPE, DDS_QOS_TYPE > 
DwDrTpBase

Detailed Description

template<typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
class QOS_DwTp_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 and the DataReader have in common.

The DDS_QOS_TYPE template attribute can either contain an DDS::DataReaderQos or an DDS::DataWriterQos. These are the IDL representatives.

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

Definition at line 24 of file QOS_DwTp_Base_T.h.


Member Typedef Documentation

template<typename XML_QOS_TYPE , typename DDS_QOS_TYPE >
typedef QOS_DwDrTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE> QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::DwDrTpBase [private]

Definition at line 34 of file QOS_DwTp_Base_T.h.


Constructor & Destructor Documentation

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

Definition at line 8 of file QOS_DwTp_Base_T.cpp.

00009 {
00010 }

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

Definition at line 13 of file QOS_DwTp_Base_T.cpp.

00014 {
00015 }


Member Function Documentation

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

Reimplemented from QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >.

Reimplemented in QOS_DataWriter_T< XML_QOS_TYPE, DDS_QOS_TYPE >.

Definition at line 19 of file QOS_DwTp_Base_T.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, QosCommon::get_duration(), QosCommon::get_history_kind(), QosCommon::get_qos_long(), LM_TRACE, max_samples, and QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().

Referenced by QOS_DataWriter_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().

00020 {
00021   DwDrTpBase::read_qos (dds_qos, xml_qos);
00022 
00023   if (xml_qos->durability_service_p ())
00024     {
00025       if (xml_qos->durability_service ().service_cleanup_delay_p ())
00026         {
00027           const std::string nsec = xml_qos->durability_service ().service_cleanup_delay ().nanosec ();
00028           const std::string sec = xml_qos->durability_service ().service_cleanup_delay ().sec ();
00029 
00030           QosCommon::get_duration (dds_qos.durability_service.service_cleanup_delay,
00031                                    sec.c_str (),
00032                                    nsec.c_str ());
00033           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00034             {
00035               ACE_DEBUG ((LM_TRACE,
00036                 ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00037                 ACE_TEXT ("Set durability Service service_cleanup_delay to <%d:%u>\n"),
00038                 dds_qos.durability_service.service_cleanup_delay.sec,
00039                 dds_qos.durability_service.service_cleanup_delay.nanosec));
00040             }
00041         }
00042       if (xml_qos->durability_service ().history_kind_p ())
00043         {
00044           QosCommon::get_history_kind (xml_qos->durability_service ().history_kind (),
00045                                        dds_qos.durability_service.history_kind);
00046 
00047           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00048             {
00049               ACE_DEBUG ((LM_TRACE,
00050                 ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00051                 ACE_TEXT ("Set durability Service history_kind to <%d>\n"),
00052                 dds_qos.durability_service.history_kind));
00053             }
00054 
00055         }
00056       if (xml_qos->durability_service ().history_depth_p ())
00057         {
00058           dds_qos.durability_service.history_depth =
00059             static_cast<CORBA::Long>(xml_qos->durability_service().history_depth());
00060 
00061           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00062             {
00063               ACE_DEBUG ((LM_TRACE,
00064                 ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00065                 ACE_TEXT ("Set durability Service history_depth to <%u>\n"),
00066                 dds_qos.durability_service.history_depth));
00067             }
00068         }
00069       if (xml_qos->durability_service ().max_samples_p ())
00070         {
00071           const std::string max_samples = xml_qos->durability_service ().max_samples ();
00072 
00073           dds_qos.durability_service.max_samples =
00074             QosCommon::get_qos_long (max_samples.c_str ());
00075 
00076           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00077             {
00078               ACE_DEBUG ((LM_TRACE,
00079                 ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00080                 ACE_TEXT ("Set durability service max_samples to <%d>\n"),
00081                 dds_qos.durability_service.max_samples));
00082             }
00083         }
00084       if (xml_qos->durability_service ().max_instances_p ())
00085         {
00086           const std::string max_instances = xml_qos->durability_service ().max_instances ();
00087 
00088           dds_qos.durability_service.max_instances =
00089             QosCommon::get_qos_long (max_instances.c_str ());
00090 
00091           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00092             {
00093               ACE_DEBUG ((LM_TRACE,
00094                 ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00095                 ACE_TEXT ("Set durability service max_instances to <%d>\n"),
00096                 dds_qos.durability_service.max_instances));
00097             }
00098         }
00099       if (xml_qos->durability_service ().max_samples_per_instance_p ())
00100         {
00101           const std::string max_samples_per_instance =
00102             xml_qos->durability_service ().max_samples_per_instance ();
00103 
00104           dds_qos.durability_service.max_samples_per_instance =
00105             QosCommon::get_qos_long (max_samples_per_instance.c_str ());
00106 
00107           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00108             {
00109               ACE_DEBUG ((LM_TRACE,
00110                 ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00111                 ACE_TEXT ("Set durability service max_samples_per_instance to <%u>\n"),
00112                 dds_qos.durability_service.max_samples_per_instance));
00113             }
00114         }
00115     }
00116   if (xml_qos->transport_priority_p ())
00117     {
00118       dds_qos.transport_priority.value =
00119         static_cast<CORBA::Long>(xml_qos->transport_priority().value());
00120 
00121       if (OpenDDS::DCPS::DCPS_debug_level > 9)
00122         {
00123           ACE_DEBUG ((LM_TRACE,
00124             ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00125             ACE_TEXT ("Set transport_priority to <%u>\n"),
00126             dds_qos.transport_priority.value));
00127         }
00128     }
00129   if (xml_qos->lifespan_p ())
00130     {
00131       if (xml_qos->lifespan ().duration_p ())
00132         {
00133           const std::string nsec = xml_qos->lifespan ().duration ().nanosec ();
00134           const std::string sec = xml_qos->lifespan ().duration ().sec ();
00135 
00136           QosCommon::get_duration (dds_qos.lifespan.duration,
00137                                    sec.c_str (),
00138                                    nsec.c_str ());
00139           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00140             {
00141               ACE_DEBUG ((LM_TRACE,
00142                 ACE_TEXT ("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00143                 ACE_TEXT ("Set Lifespan duration to <%d:%u>\n"),
00144                 dds_qos.lifespan.duration.sec, dds_qos.lifespan.duration.nanosec));
00145             }
00146         }
00147     }
00148 }

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