OpenDDS  Snapshot(2023/04/28-20:55)
DataReaderQos_Handler.cpp
Go to the documentation of this file.
2 #include "QOS_DataReader_T.h"
3 #include "dds/DCPS/debug.h"
4 
6 
7 bool
9  dds::qosProfile * profile,
10  const ACE_TCHAR * name)
11 {
12  if (name)
13  {
14 // // find the correct DataReader_qos
15 // for (dds::qosProfile::DataReader_qos_iterator dw_it = profile->begin_DataReader_qos();
16 // dw_it != profile->end_DataReader_qos();
17 // ++dw_it)
18 // {
19 // if (ACE_OS::strcmp(dw_name.c_str(), name) == 0)
20 // {
21 // return get_DataReader_qos(dw_qos, *dw_it->get());
22 // }
23 // }
24  }
25  else
26  {
27  if (profile->count_datareader_qos() == 0)
28  {
30  {
31  ACE_DEBUG((LM_TRACE,
32  ACE_TEXT("DataReaderQos_Handler::get_datareader_qos - ")
33  ACE_TEXT("No DataReader QOS available in profile <%s>\n"),
34  profile->name().c_str()));
35  }
36  return true;
37  }
38  // get the first DataReader in the XML
39  dds::qosProfile::datareader_qos_iterator dr_it = profile->begin_datareader_qos();
40  return DataReaderQos_Handler::get_datareader_qos(dr_qos, dr_it->get());
41  }
42 
43  ACE_ERROR((LM_ERROR,
44  ACE_TEXT("(%P|%t) ERROR: DataReaderQos_Handler::get_datareader_qos - ")
45  ACE_TEXT("Unable to find DataReaderQos <%s>\n"),
46  name));
47  return false;
48 }
49 
50 bool
52  dds::datareaderQos * dr)
53 {
55  dr_type datareader_qos_handler;
56  datareader_qos_handler.read_qos(dr_qos, dr);
57 
58  return true;
59 }
60 
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
void read_qos(DDS_QOS_TYPE &, const XML_QOS_TYPE)
static bool get_datareader_qos(::DDS::DataReaderQos &dr_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
char ACE_TCHAR
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