OpenDDS  Snapshot(2023/04/28-20:55)
PublisherQos_Handler.cpp
Go to the documentation of this file.
1 #include "PublisherQos_Handler.h"
2 #include "QOS_PubSub_T.h"
3 
5 
6 bool
8  dds::qosProfile * profile,
9  const ACE_TCHAR * name)
10 {
11  if (name)
12  {
13 // // find the correct DataReader_qos
14 // for (dds::qosProfile::DataReader_qos_iterator dw_it = profile->begin_DataReader_qos();
15 // dw_it != profile->end_DataReader_qos();
16 // ++dw_it)
17 // {
18 // if (ACE_OS::strcmp(dw_name.c_str(), name) == 0)
19 // {
20 // return get_DataReader_qos(dw_qos, *dw_it->get());
21 // }
22 // }
23  }
24  else
25  {
26  if (profile->count_publisher_qos() == 0)
27  {
29  {
30  ACE_DEBUG((LM_TRACE,
31  ACE_TEXT("PublisherQos_Handler::get_publisher_qos - ")
32  ACE_TEXT("No Publisher QOS available in profile <%s>\n"),
33  profile->name().c_str()));
34  }
35  return true;
36  }
37  // get the first DataReader in the XML
38  dds::qosProfile::publisher_qos_iterator pub_it = profile->begin_publisher_qos();
39  return PublisherQos_Handler::get_publisher_qos(pub_qos, pub_it->get());
40  }
41 
42  ACE_ERROR((LM_ERROR,
43  ACE_TEXT("(%P|%t) ERROR: PublisherQos_Handler::get_publisher_qos - ")
44  ACE_TEXT("Unable to find PublisherQos <%s>\n"),
45  name));
46  return false;
47 }
48 
49 bool
51  dds::publisherQos * pub)
52 {
54  pub_type publisher_qos_handler;
55  publisher_qos_handler.read_qos(pub_qos, pub);
56 
57  return true;
58 }
59 
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
static bool get_publisher_qos(::DDS::PublisherQos &pub_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
char ACE_TCHAR
void read_qos(DDS_QOS_TYPE &, const XML_QOS_TYPE)
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL