SubscriberQos_Handler.cpp

Go to the documentation of this file.
00001 
00002 #include "SubscriberQos_Handler.h"
00003 #include "QOS_PubSub_T.h"
00004 
00005 bool
00006 SubscriberQos_Handler::get_subscriber_qos (DDS::SubscriberQos& sub_qos,
00007                                       dds::qosProfile * profile,
00008                                       const ACE_TCHAR * name)
00009 {
00010   if (name)
00011     {
00012 //       // find the correct DataReader_qos
00013 //       for (dds::qosProfile::DataReader_qos_iterator dw_it = profile->begin_DataReader_qos ();
00014 //           dw_it != profile->end_DataReader_qos();
00015 //           ++dw_it)
00016 //         {
00017 //           if (ACE_OS::strcmp (dw_name.c_str (), name) == 0)
00018 //             {
00019 //               return get_DataReader_qos (dw_qos, *dw_it->get());
00020 //             }
00021 //         }
00022     }
00023   else
00024     {
00025       if (profile->count_subscriber_qos () == 0)
00026         {
00027           if (OpenDDS::DCPS::DCPS_debug_level > 7)
00028             {
00029               ACE_DEBUG ((LM_TRACE,
00030                 ACE_TEXT ("SubscriberQos_Handler::get_subscriber_qos - ")
00031                 ACE_TEXT ("No Subscriber QOS available in profile <%C>\n"),
00032                 profile->name ().c_str ()));
00033             }
00034           return true;
00035         }
00036       // get the first DataReader in the XML
00037       dds::qosProfile::subscriber_qos_iterator sub_it = profile->begin_subscriber_qos ();
00038       return SubscriberQos_Handler::get_subscriber_qos (sub_qos, sub_it->get ());
00039     }
00040 
00041   ACE_ERROR ((LM_DEBUG,
00042     ACE_TEXT ("SubscriberQos_Handler::get_subscriber_qos - ")
00043     ACE_TEXT ("Unable to find SubscriberQos <%C>\n"),
00044     name));
00045   return false;
00046 }
00047 
00048 bool
00049 SubscriberQos_Handler::get_subscriber_qos (DDS::SubscriberQos& sub_qos,
00050                                          dds::subscriberQos * sub)
00051 {
00052   typedef QOS_PubSub_T<dds::subscriberQos*, DDS::SubscriberQos> sub_type;
00053   sub_type subscriber_qos_handler;
00054   subscriber_qos_handler.read_qos (sub_qos, sub);
00055 
00056   return true;
00057 }

Generated on Fri Feb 12 20:05:27 2016 for OpenDDS by  doxygen 1.4.7