PublisherQos_Handler.cpp

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

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