OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Private Types | List of all members
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]

Public Member Functions

 QOS_DwTp_Base_T ()
 
 ~QOS_DwTp_Base_T ()
 
void read_qos (DDS_QOS_TYPE &, const XML_QOS_TYPE)
 
- Public Member Functions inherited from QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >
 QOS_DwDrTp_Base_T ()
 
 ~QOS_DwDrTp_Base_T ()
 
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.nosp@m.@rem.nosp@m.edy.n.nosp@m.l)

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

◆ DwDrTpBase

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

◆ QOS_DwTp_Base_T()

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 ( )

Definition at line 8 of file QOS_DwTp_Base_T.cpp.

9 {
10 }

◆ ~QOS_DwTp_Base_T()

template<typename XML_QOS_TYPE , typename DDS_QOS_TYPE >
QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::~QOS_DwTp_Base_T ( )

Definition at line 13 of file QOS_DwTp_Base_T.cpp.

14 {
15 }

Member Function Documentation

◆ read_qos()

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 
)

Definition at line 19 of file QOS_DwTp_Base_T.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, QosCommon::get_duration(), QosCommon::get_history_kind(), QosCommon::get_qos_long(), LM_TRACE, max_samples, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.

20 {
21  DwDrTpBase::read_qos(dds_qos, xml_qos);
22 
23  if (xml_qos->durability_service_p())
24  {
25  if (xml_qos->durability_service().service_cleanup_delay_p())
26  {
27  const ACE_TString sec(xml_qos->durability_service().service_cleanup_delay().sec().c_str());
28  const ACE_TString nsec(xml_qos->durability_service().service_cleanup_delay().nanosec().c_str());
29 
30  QosCommon::get_duration(dds_qos.durability_service.service_cleanup_delay,
31  sec.c_str(),
32  nsec.c_str());
34  {
35  ACE_DEBUG((LM_TRACE,
36  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
37  ACE_TEXT("Set durability Service service_cleanup_delay to <%d:%u>\n"),
38  dds_qos.durability_service.service_cleanup_delay.sec,
39  dds_qos.durability_service.service_cleanup_delay.nanosec));
40  }
41  }
42  if (xml_qos->durability_service().history_kind_p())
43  {
44  QosCommon::get_history_kind(xml_qos->durability_service().history_kind(),
45  dds_qos.durability_service.history_kind);
46 
48  {
49  ACE_DEBUG((LM_TRACE,
50  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
51  ACE_TEXT("Set durability Service history_kind to <%d>\n"),
52  dds_qos.durability_service.history_kind));
53  }
54 
55  }
56  if (xml_qos->durability_service().history_depth_p())
57  {
58  dds_qos.durability_service.history_depth =
59  static_cast<CORBA::Long>(xml_qos->durability_service().history_depth());
60 
62  {
63  ACE_DEBUG((LM_TRACE,
64  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
65  ACE_TEXT("Set durability Service history_depth to <%u>\n"),
66  dds_qos.durability_service.history_depth));
67  }
68  }
69  if (xml_qos->durability_service().max_samples_p())
70  {
71  const ACE_TString max_samples(xml_qos->durability_service().max_samples().c_str());
72 
73  dds_qos.durability_service.max_samples =
75 
77  {
78  ACE_DEBUG((LM_TRACE,
79  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
80  ACE_TEXT("Set durability service max_samples to <%d>\n"),
81  dds_qos.durability_service.max_samples));
82  }
83  }
84  if (xml_qos->durability_service().max_instances_p())
85  {
86  const ACE_TString max_instances(xml_qos->durability_service().max_instances().c_str());
87 
88  dds_qos.durability_service.max_instances =
89  QosCommon::get_qos_long(max_instances.c_str());
90 
92  {
93  ACE_DEBUG((LM_TRACE,
94  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
95  ACE_TEXT("Set durability service max_instances to <%d>\n"),
96  dds_qos.durability_service.max_instances));
97  }
98  }
99  if (xml_qos->durability_service().max_samples_per_instance_p())
100  {
101  const ACE_TString max_samples_per_instance(xml_qos->durability_service().max_samples_per_instance().c_str());
102 
103  dds_qos.durability_service.max_samples_per_instance =
104  QosCommon::get_qos_long(max_samples_per_instance.c_str());
105 
107  {
108  ACE_DEBUG((LM_TRACE,
109  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
110  ACE_TEXT("Set durability service max_samples_per_instance to <%u>\n"),
111  dds_qos.durability_service.max_samples_per_instance));
112  }
113  }
114  }
115  if (xml_qos->transport_priority_p())
116  {
117  dds_qos.transport_priority.value =
118  static_cast<CORBA::Long>(xml_qos->transport_priority().value());
119 
121  {
122  ACE_DEBUG((LM_TRACE,
123  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
124  ACE_TEXT("Set transport_priority to <%u>\n"),
125  dds_qos.transport_priority.value));
126  }
127  }
128  if (xml_qos->lifespan_p())
129  {
130  if (xml_qos->lifespan().duration_p())
131  {
132  const ACE_TString sec(xml_qos->lifespan().duration().sec().c_str());
133  const ACE_TString nsec(xml_qos->lifespan().duration().nanosec().c_str());
134 
135  QosCommon::get_duration(dds_qos.lifespan.duration,
136  sec.c_str(),
137  nsec.c_str());
139  {
140  ACE_DEBUG((LM_TRACE,
141  ACE_TEXT("QOS_DwTp_Base_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
142  ACE_TEXT("Set Lifespan duration to <%d:%u>\n"),
143  dds_qos.lifespan.duration.sec, dds_qos.lifespan.duration.nanosec));
144  }
145  }
146  }
147 }
#define ACE_DEBUG(X)
ACE_CDR::Long Long
static void get_history_kind(const ::dds::historyKind kind, ::DDS::HistoryQosPolicyKind &dds_kind)
Definition: QOS_Common.cpp:34
void read_qos(DDS_QOS_TYPE &, const XML_QOS_TYPE)
local interface<%TYPE%> inout ::DDS::SampleInfoSeq in long max_samples
Definition: IDLTemplate.txt:66
::CORBA::Long get_qos_long(const ACE_TCHAR *value)
Definition: QOS_Common.cpp:78
static void get_duration(::DDS::Duration_t &duration, const ACE_TCHAR *sec, const ACE_TCHAR *nsec)
Definition: QOS_Common.cpp:56
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")

The documentation for this class was generated from the following files: