#include <QOS_PubSub_T.h>
Public Member Functions | |
QOS_PubSub_T (void) | |
~QOS_PubSub_T (void) | |
void | read_qos (DDS_QOS_TYPE &, const XML_QOS_TYPE) |
This template contains the parsing of all QOS XML setting which the Publisher and the Subscriber have in common.
The DDS_QOS_TYPE template attribute can either contain an DDS::PublisherQos or an DDS::SubscriberQos. These are the IDL representatives.
The XML_QOS_TYPE can either contain an dds::publisherQos or an dds::subscriberQos. These are the XML representatives.
Definition at line 22 of file QOS_PubSub_T.h.
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >::QOS_PubSub_T | ( | void | ) | [inline] |
Definition at line 9 of file QOS_PubSub_T.cpp.
QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >::~QOS_PubSub_T | ( | void | ) | [inline] |
Definition at line 14 of file QOS_PubSub_T.cpp.
void QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos | ( | DDS_QOS_TYPE & | dds_qos, | |
const XML_QOS_TYPE | xml_qos | |||
) | [inline] |
Definition at line 20 of file QOS_PubSub_T.cpp.
References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, DDS::GROUP_PRESENTATION_QOS, DDS::INSTANCE_PRESENTATION_QOS, LM_DEBUG, LM_TRACE, FACE::string_dup(), and DDS::TOPIC_PRESENTATION_QOS.
00021 { 00022 // if (xml_qos->group_data ()) 00023 // { 00024 // TODO: Have a good look at this. 00025 00026 // const std::string value = *xml_qos->group_data ()->value (); 00027 // 00028 // ACE_DEBUG ((LM_TRACE, 00029 // ACE_TEXT ("QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ") 00030 // ACE_TEXT ("Set group_data to <%C>\n"), 00031 // value.c_str ())); 00032 // 00033 // dds_qos.group_data.value = 00034 // *xml_qos->group_data ()->value (); 00035 // } 00036 00037 if (xml_qos->presentation_p ()) 00038 { 00039 if (xml_qos->presentation ().access_scope_p ()) 00040 { 00041 switch (xml_qos->presentation ().access_scope ().integral ()) 00042 { 00043 case ::dds::presentationAccessScopeKind::INSTANCE_PRESENTATION_QOS_l: 00044 dds_qos.presentation.access_scope = ::DDS::INSTANCE_PRESENTATION_QOS; 00045 break; 00046 case ::dds::presentationAccessScopeKind::TOPIC_PRESENTATION_QOS_l: 00047 dds_qos.presentation.access_scope = ::DDS::TOPIC_PRESENTATION_QOS; 00048 break; 00049 case ::dds::presentationAccessScopeKind::GROUP_PRESENTATION_QOS_l: 00050 dds_qos.presentation.access_scope = ::DDS::GROUP_PRESENTATION_QOS; 00051 break; 00052 default: 00053 ACE_ERROR ((LM_DEBUG, 00054 ACE_TEXT ("QOS_PubSub_T::read_qos - ") 00055 ACE_TEXT ("Unknown presentation access scope found <%d>; setting it to INSTANCE_PRESENTATION_QOS\n"), 00056 xml_qos->presentation ().access_scope ().integral ())); 00057 dds_qos.presentation.access_scope = ::DDS::INSTANCE_PRESENTATION_QOS; 00058 break; 00059 } 00060 if (OpenDDS::DCPS::DCPS_debug_level > 9) 00061 { 00062 ACE_DEBUG ((LM_TRACE, 00063 ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ") 00064 ACE_TEXT ("Set presentation access scope to <%d>\n"), 00065 dds_qos.presentation.access_scope)); 00066 } 00067 } 00068 if (xml_qos->presentation ().coherent_access_p ()) 00069 { 00070 dds_qos.presentation.coherent_access = 00071 xml_qos->presentation ().coherent_access (); 00072 00073 if (OpenDDS::DCPS::DCPS_debug_level > 9) 00074 { 00075 ACE_DEBUG ((LM_TRACE, 00076 ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ") 00077 ACE_TEXT ("Set presentation coherent_access to <%d>\n"), 00078 dds_qos.presentation.coherent_access)); 00079 } 00080 } 00081 if (xml_qos->presentation ().ordered_access_p ()) 00082 { 00083 dds_qos.presentation.ordered_access = 00084 xml_qos->presentation ().ordered_access (); 00085 00086 if (OpenDDS::DCPS::DCPS_debug_level > 9) 00087 { 00088 ACE_DEBUG ((LM_TRACE, 00089 ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ") 00090 ACE_TEXT ("Set presentation ordered_access to <%d>\n"), 00091 dds_qos.presentation.ordered_access)); 00092 } 00093 } 00094 } 00095 00096 if (xml_qos->partition_p ()) 00097 { 00098 if (xml_qos->partition ().name_p ()) 00099 { 00100 dds_qos.partition.name.length(static_cast<CORBA::ULong>(xml_qos->partition().name().count_element())); 00101 CORBA::ULong pos = 0; 00102 for (::dds::stringSeq::element_const_iterator it = xml_qos->partition ().name ().begin_element (); 00103 it != xml_qos->partition ().name ().end_element (); 00104 ++it, ++pos) 00105 { 00106 dds_qos.partition.name[pos] = ::CORBA::string_dup (it->get()->c_str()); 00107 00108 if (OpenDDS::DCPS::DCPS_debug_level > 9) 00109 { 00110 ACE_DEBUG ((LM_TRACE, 00111 ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ") 00112 ACE_TEXT ("New name <%C> inserted in partition at position <%u>\n"), 00113 dds_qos.partition.name[pos].in (), pos)); 00114 } 00115 } 00116 } 00117 } 00118 00119 if (xml_qos->entity_factory_p ()) 00120 { 00121 if (xml_qos->entity_factory ().autoenable_created_entities_p ()) 00122 { 00123 dds_qos.entity_factory.autoenable_created_entities = 00124 xml_qos->entity_factory ().autoenable_created_entities (); 00125 00126 if (OpenDDS::DCPS::DCPS_debug_level > 9) 00127 { 00128 ACE_DEBUG ((LM_TRACE, 00129 ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ") 00130 ACE_TEXT ("Set entity_factory autoenable_created_entities to <%d>\n"), 00131 dds_qos.entity_factory.autoenable_created_entities)); 00132 } 00133 } 00134 } 00135 }