ParticipantQos_Handler.cpp

Go to the documentation of this file.
00001 #include "ParticipantQos_Handler.h"
00002 #include "dds/DdsDcpsInfrastructureC.h"
00003 #include "dds/DCPS/debug.h"
00004 
00005 bool
00006 ParticipantQos_Handler::get_participant_qos (DDS::DomainParticipantQos& dp_qos,
00007                                            dds::qosProfile * profile,
00008                                            const ACE_TCHAR * name)
00009 {
00010   if (name)
00011     {
00012 //       // find the correct Participant_qos
00013 //       for (dds::qosProfile::Participant_qos_iterator dw_it = profile->begin_Participant_qos ();
00014 //           dw_it != profile->end_Participant_qos();
00015 //           ++dw_it)
00016 //         {
00017 //           if (ACE_OS::strcmp (dw_name.c_str (), name) == 0)
00018 //             {
00019 //               return get_Participant_qos (dw_qos, *dw_it->get());
00020 //             }
00021 //         }
00022     }
00023   else
00024     {
00025       if (profile->count_domainparticipant_qos () == 0)
00026         {
00027           if (OpenDDS::DCPS::DCPS_debug_level > 8)
00028             {
00029               ACE_DEBUG ((LM_TRACE,
00030                 ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00031                 ACE_TEXT ("No Participant QOS available in profile <%C>\n"),
00032                 profile->name ().c_str ()));
00033             }
00034           return true;
00035         }
00036       // get the first Participant in the XML
00037       dds::qosProfile::domainparticipant_qos_iterator dr_it = profile->begin_domainparticipant_qos ();
00038       return ParticipantQos_Handler::get_participant_qos (dp_qos, dr_it->get ());
00039     }
00040 
00041   ACE_ERROR ((LM_DEBUG,
00042     ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00043     ACE_TEXT ("Unable to find ParticipantQos <%C>\n"),
00044     name));
00045   return false;
00046 }
00047 
00048 bool
00049 ParticipantQos_Handler::get_participant_qos (DDS::DomainParticipantQos& dp_qos,
00050                                            dds::domainparticipantQos * dp)
00051 {
00052 
00053 //  if (xml_qos->user_data ())
00054 //    {
00055       // TODO: Have a good look at this.
00056 
00057 //       const std::string value = *xml_qos->user_data ()->value ();
00058 //
00059 //       ACE_DEBUG ((LM_TRACE,
00060 //         ACE_TEXT ("QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00061 //         ACE_TEXT ("Set user_data to <%C>\n"),
00062 //         value.c_str ()));
00063 //
00064 //       dds_qos.user_data.value =
00065 //         *xml_qos->user_data ()->value ();
00066 //     }
00067 
00068 
00069   if (dp->entity_factory_p ())
00070     {
00071       if (dp->entity_factory ().autoenable_created_entities_p ())
00072         {
00073           dp_qos.entity_factory.autoenable_created_entities =
00074             dp->entity_factory ().autoenable_created_entities ();
00075 
00076           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00077             {
00078               ACE_DEBUG ((LM_TRACE,
00079                 ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00080                 ACE_TEXT ("Set entity_factory autoenable_created_entities to <%d>\n"),
00081                 dp_qos.entity_factory.autoenable_created_entities));
00082             }
00083         }
00084     }
00085   return true;
00086 }

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