00001
00002 #include "dds/DdsDcpsInfrastructureC.h"
00003 #include "QOS_Common.h"
00004
00005 template <typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
00006 QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::QOS_DataReader_T (void)
00007 {
00008 }
00009
00010 template <typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
00011 QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::~QOS_DataReader_T (void)
00012 {
00013 }
00014
00015 template <typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
00016 void
00017 QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos (DDS_QOS_TYPE& dds_qos, const XML_QOS_TYPE xml_qos)
00018 {
00019
00020
00021
00022 DwDrTpBase::read_qos (dds_qos, xml_qos);
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 if (xml_qos->time_based_filter_p ())
00041 {
00042 if (xml_qos->time_based_filter ().minimum_separation_p ())
00043 {
00044 const std::string nsec = xml_qos->time_based_filter ().minimum_separation ().nanosec ();
00045 const std::string sec = xml_qos->time_based_filter ().minimum_separation ().sec ();
00046
00047 QosCommon::get_duration (dds_qos.time_based_filter.minimum_separation,
00048 sec.c_str (),
00049 nsec.c_str ());
00050
00051 if (OpenDDS::DCPS::DCPS_debug_level > 9)
00052 {
00053 ACE_DEBUG ((LM_TRACE,
00054 ACE_TEXT ("QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00055 ACE_TEXT ("Set time_based_filter minimum_separation to <%d:%u>\n"),
00056 dds_qos.time_based_filter.minimum_separation.sec,
00057 dds_qos.time_based_filter.minimum_separation.nanosec));
00058 }
00059 }
00060 }
00061 if (xml_qos->reader_data_lifecycle_p ())
00062 {
00063 if (xml_qos->reader_data_lifecycle ().autopurge_nowriter_samples_delay_p ())
00064 {
00065 const std::string nsec = xml_qos->reader_data_lifecycle ().autopurge_nowriter_samples_delay ().nanosec ();
00066 const std::string sec = xml_qos->reader_data_lifecycle ().autopurge_nowriter_samples_delay ().sec ();
00067
00068 QosCommon::get_duration (dds_qos.reader_data_lifecycle.autopurge_nowriter_samples_delay,
00069 sec.c_str (),
00070 nsec.c_str ());
00071
00072 if (OpenDDS::DCPS::DCPS_debug_level > 9)
00073 {
00074 ACE_DEBUG ((LM_TRACE,
00075 ACE_TEXT ("QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00076 ACE_TEXT ("Set reader_data_lifecycle autopurge_nowriter_samples_delay to <%d:%u>\n"),
00077 dds_qos.reader_data_lifecycle.autopurge_nowriter_samples_delay.sec,
00078 dds_qos.reader_data_lifecycle.autopurge_nowriter_samples_delay.nanosec));
00079 }
00080 }
00081 if (xml_qos->reader_data_lifecycle ().autopurge_disposed_samples_delay_p ())
00082 {
00083 const std::string nsec = xml_qos->reader_data_lifecycle ().autopurge_disposed_samples_delay ().nanosec ();
00084 const std::string sec = xml_qos->reader_data_lifecycle ().autopurge_disposed_samples_delay ().sec ();
00085
00086 QosCommon::get_duration (dds_qos.reader_data_lifecycle.autopurge_disposed_samples_delay,
00087 sec.c_str (),
00088 nsec.c_str ());
00089
00090 if (OpenDDS::DCPS::DCPS_debug_level > 9)
00091 {
00092 ACE_DEBUG ((LM_TRACE,
00093 ACE_TEXT ("QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00094 ACE_TEXT ("Set reader_data_lifecycle autopurge_disposed_samples_delay to <%d:%u>\n"),
00095 dds_qos.reader_data_lifecycle.autopurge_disposed_samples_delay.sec,
00096 dds_qos.reader_data_lifecycle.autopurge_disposed_samples_delay.nanosec));
00097 }
00098 }
00099 }
00100 }