Representative of a Topic Description. More...
#include <DCPS_IR_Topic_Description.h>
Representative of a Topic Description.
Definition at line 43 of file DCPS_IR_Topic_Description.h.
DCPS_IR_Topic_Description h OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL DCPS_IR_Topic_Description::DCPS_IR_Topic_Description | ( | DCPS_IR_Domain * | domain, | |
const char * | name, | |||
const char * | dataTypeName | |||
) |
Definition at line 25 of file DCPS_IR_Topic_Description.cpp.
00028 : name_(name), 00029 dataTypeName_(dataTypeName), 00030 domain_(domain) 00031 { 00032 }
DCPS_IR_Topic_Description::~DCPS_IR_Topic_Description | ( | ) |
Definition at line 34 of file DCPS_IR_Topic_Description.cpp.
int DCPS_IR_Topic_Description::add_subscription_reference | ( | DCPS_IR_Subscription * | subscription, | |
bool | associate = true | |||
) |
Adds the subscription to the list of subscriptions Tries to associate with existing publications if successfully added 'associate' switch toggles association attempt. Returns 0 if added, 1 if already exists, -1 other failure
Definition at line 38 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::DCPS_debug_level, domain_, DCPS_IR_Subscription::get_id(), ACE_Unbounded_Set_Ex< T, C >::insert(), LM_DEBUG, LM_ERROR, name_, DCPS_IR_Domain::publish_subscription_bit(), status, subscriptionRefs_, and try_associate_subscription().
Referenced by DCPS_IR_Topic::add_subscription_reference().
00040 { 00041 int status = subscriptionRefs_.insert(subscription); 00042 00043 switch (status) { 00044 case 0: 00045 00046 // Publish the BIT information 00047 domain_->publish_subscription_bit(subscription); 00048 00049 if (associate) { 00050 try_associate_subscription(subscription); 00051 // Do not check incompatible qos here. The check is done 00052 // in the DCPS_IR_Topic_Description::try_associate_subscription method 00053 } 00054 00055 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00056 OpenDDS::DCPS::RepoIdConverter converter(subscription->get_id()); 00057 ACE_DEBUG((LM_DEBUG, 00058 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::add_subscription_reference: ") 00059 ACE_TEXT("topic description %C added subscription %C at %x\n"), 00060 this->name_.c_str(), 00061 std::string(converter).c_str(), 00062 subscription)); 00063 } 00064 00065 break; 00066 00067 case 1: { 00068 OpenDDS::DCPS::RepoIdConverter converter(subscription->get_id()); 00069 ACE_ERROR((LM_ERROR, 00070 ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Topic_Description::add_subscription_reference: ") 00071 ACE_TEXT("topic description %C attempt to re-add subscription %C.\n"), 00072 this->name_.c_str(), 00073 std::string(converter).c_str())); 00074 } 00075 break; 00076 00077 case -1: { 00078 OpenDDS::DCPS::RepoIdConverter converter(subscription->get_id()); 00079 ACE_ERROR((LM_ERROR, 00080 ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Topic_Description::add_subscription_reference: ") 00081 ACE_TEXT("topic description %C failed to add subscription %C.\n"), 00082 this->name_.c_str(), 00083 std::string(converter).c_str())); 00084 } 00085 }; 00086 00087 return status; 00088 }
int DCPS_IR_Topic_Description::add_topic | ( | DCPS_IR_Topic * | topic | ) |
Add a topic Takes ownership of memory pointed to by topic Returns 0 if added, 1 if already exists, -1 other failure
Definition at line 116 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Topic::get_id(), ACE_Unbounded_Set_Ex< T, C >::insert(), LM_DEBUG, LM_ERROR, LM_WARNING, name_, status, and topics_.
Referenced by DCPS_IR_Domain::add_topic_i().
00117 { 00118 int status = topics_.insert(topic); 00119 00120 switch (status) { 00121 case 0: 00122 00123 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00124 OpenDDS::DCPS::RepoIdConverter converter(topic->get_id()); 00125 ACE_DEBUG((LM_DEBUG, 00126 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::add_topic: ") 00127 ACE_TEXT("topic description %C added topic %C at %x.\n"), 00128 this->name_.c_str(), 00129 std::string(converter).c_str(), 00130 topic)); 00131 } 00132 00133 break; 00134 case 1: 00135 00136 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00137 OpenDDS::DCPS::RepoIdConverter converter(topic->get_id()); 00138 ACE_DEBUG((LM_WARNING, 00139 ACE_TEXT("(%P|%t) WARNING: DCPS_IR_Topic_Description::add_topic: ") 00140 ACE_TEXT("topic description %C attempt to re-add topic %C.\n"), 00141 this->name_.c_str(), 00142 std::string(converter).c_str())); 00143 } 00144 00145 break; 00146 case -1: { 00147 OpenDDS::DCPS::RepoIdConverter converter(topic->get_id()); 00148 ACE_ERROR((LM_ERROR, 00149 ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Topic_Description::add_topic: ") 00150 ACE_TEXT("topic description %C failed to add topic %C.\n"), 00151 this->name_.c_str(), 00152 std::string(converter).c_str())); 00153 } 00154 break; 00155 }; 00156 00157 return status; 00158 }
void DCPS_IR_Topic_Description::associate | ( | DCPS_IR_Publication * | publication, | |
DCPS_IR_Subscription * | subscription | |||
) |
Associate the publication and subscription.
Definition at line 339 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), DCPS_IR_Subscription::add_associated_publication(), DCPS_IR_Publication::add_associated_subscription(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Subscription::get_id(), DCPS_IR_Publication::get_id(), LM_DEBUG, LM_INFO, and name_.
Referenced by try_associate().
00341 { 00342 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00343 OpenDDS::DCPS::RepoIdConverter pub_converter(publication->get_id()); 00344 OpenDDS::DCPS::RepoIdConverter sub_converter(subscription->get_id()); 00345 ACE_DEBUG((LM_DEBUG, 00346 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::associate: ") 00347 ACE_TEXT("topic description %C associating ") 00348 ACE_TEXT("publication %C with subscription %C.\n"), 00349 this->name_.c_str(), 00350 std::string(pub_converter).c_str(), 00351 std::string(sub_converter).c_str())); 00352 } 00353 00354 // The publication must be told first because it will be the connector 00355 // if a data link needs to be created. 00356 // This is only required if the publication and subscription are being 00357 // handed by the same process and thread. Order when there is 00358 // another thread or process is not important. 00359 // Note: the client thread may process the add_associations() oneway 00360 // call instead of the ORB thread because it is currently 00361 // in a two-way call to the Repo. 00362 int error = publication->add_associated_subscription(subscription, true); 00363 00364 // If there was no TAO error contacting the publication (This can happen if 00365 // an old publisher has exited non-gracefully) 00366 if (error != -1) { 00367 // Associate the subscription with the publication 00368 subscription->add_associated_publication(publication, false); 00369 } else { 00370 ACE_DEBUG((LM_INFO, ACE_TEXT("Invalid publication detected, NOT notifying subcription of association\n"))); 00371 } 00372 }
std::string DCPS_IR_Topic_Description::dump_to_string | ( | const std::string & | prefix, | |
int | depth | |||
) | const |
Definition at line 419 of file DCPS_IR_Topic_Description.cpp.
References ACE_Unbounded_Set_Ex< T, C >::begin(), ACE_String_Base< ACE_CHAR_T >::c_str(), dataTypeName_, ACE_Unbounded_Set_Ex< T, C >::end(), name_, str, subscriptionRefs_, and topics_.
00421 { 00422 std::string str; 00423 #if !defined (OPENDDS_INFOREPO_REDUCED_FOOTPRINT) 00424 for (int i=0; i < depth; i++) 00425 str += prefix; 00426 std::string indent = str + prefix; 00427 str += "DCPS_IR_Topic_Description ["; 00428 str += name_.c_str(); 00429 str += "]["; 00430 str += dataTypeName_.c_str(); 00431 str += "]\n"; 00432 00433 str += indent + "Subscription References [ "; 00434 for (DCPS_IR_Subscription_Set::const_iterator sub = subscriptionRefs_.begin(); 00435 sub != subscriptionRefs_.end(); 00436 sub++) 00437 { 00438 OpenDDS::DCPS::RepoIdConverter sub_converter((*sub)->get_id()); 00439 str += std::string(sub_converter); 00440 str += " "; 00441 } 00442 str += "]\n"; 00443 00444 str += indent + "Topics [ "; 00445 for (DCPS_IR_Topic_Set::const_iterator top = topics_.begin(); 00446 top != topics_.end(); 00447 top++) 00448 { 00449 OpenDDS::DCPS::RepoIdConverter top_converter((*top)->get_id()); 00450 str += std::string(top_converter); 00451 str += " "; 00452 } 00453 str += "]\n"; 00454 #endif // !defined (OPENDDS_INFOREPO_REDUCED_FOOTPRINT) 00455 return str; 00456 }
const char * DCPS_IR_Topic_Description::get_dataTypeName | ( | ) | const |
Definition at line 408 of file DCPS_IR_Topic_Description.cpp.
References ACE_String_Base< ACE_CHAR_T >::c_str(), and dataTypeName_.
Referenced by TAO_DDS_DCPSInfo_i::find_topic(), DCPS_IR_Domain::publish_publication_bit(), DCPS_IR_Domain::publish_subscription_bit(), DCPS_IR_Domain::publish_topic_bit(), and DCPS_IR_Domain::remove_topic().
00409 { 00410 return dataTypeName_.c_str(); 00411 }
DCPS_IR_Topic * DCPS_IR_Topic_Description::get_first_topic | ( | ) |
Gets the first topic in the topic list.
Definition at line 186 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), ACE_Unbounded_Set_Ex< T, C >::begin(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Topic::get_id(), LM_DEBUG, name_, ACE_Unbounded_Set_Ex< T, C >::size(), and topics_.
00187 { 00188 DCPS_IR_Topic* topic = 0; 00189 00190 if (0 < topics_.size()) { 00191 DCPS_IR_Topic_Set::ITERATOR iter = topics_.begin(); 00192 topic = *iter; 00193 00194 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00195 OpenDDS::DCPS::RepoIdConverter converter(topic->get_id()); 00196 ACE_DEBUG((LM_DEBUG, 00197 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::get_first_topic: ") 00198 ACE_TEXT("topic description %C first topic %C.\n"), 00199 this->name_.c_str(), 00200 std::string(converter).c_str())); 00201 } 00202 } 00203 00204 return topic; 00205 }
const char * DCPS_IR_Topic_Description::get_name | ( | void | ) | const |
Definition at line 403 of file DCPS_IR_Topic_Description.cpp.
References ACE_String_Base< ACE_CHAR_T >::c_str(), and name_.
Referenced by DCPS_IR_Domain::add_topic_description(), DCPS_IR_Domain::publish_publication_bit(), DCPS_IR_Domain::publish_subscription_bit(), DCPS_IR_Domain::publish_topic_bit(), DCPS_IR_Domain::remove_topic(), and DCPS_IR_Domain::remove_topic_description().
CORBA::ULong DCPS_IR_Topic_Description::get_number_topics | ( | ) | const |
Returns the number of topics.
Definition at line 413 of file DCPS_IR_Topic_Description.cpp.
References ACE_Unbounded_Set_Ex< T, C >::size(), and topics_.
Referenced by DCPS_IR_Domain::remove_topic().
00414 { 00415 return static_cast<CORBA::ULong>(topics_.size()); 00416 }
void DCPS_IR_Topic_Description::reevaluate_associations | ( | DCPS_IR_Subscription * | subscription | ) |
Re-evaluate the association between the provided subscription and the publications in all its maintained topics.
Definition at line 374 of file DCPS_IR_Topic_Description.cpp.
References ACE_Unbounded_Set_Ex< T, C >::begin(), ACE_Unbounded_Set_Ex< T, C >::end(), DCPS_IR_Topic::reevaluate_associations(), and topics_.
00375 { 00376 DCPS_IR_Topic* topic = 0; 00377 00378 DCPS_IR_Topic_Set::ITERATOR iter = topics_.begin(); 00379 DCPS_IR_Topic_Set::ITERATOR end = topics_.end(); 00380 00381 while (iter != end) { 00382 topic = *iter; 00383 ++iter; 00384 00385 topic->reevaluate_associations(subscription); 00386 } 00387 }
void DCPS_IR_Topic_Description::reevaluate_associations | ( | DCPS_IR_Publication * | publication | ) |
Re-evaluate the association between the provided publication and the subscriptions it maintains.
Definition at line 389 of file DCPS_IR_Topic_Description.cpp.
References ACE_Unbounded_Set_Ex< T, C >::begin(), ACE_Unbounded_Set_Ex< T, C >::end(), DCPS_IR_Subscription::reevaluate_association(), DCPS_IR_Publication::reevaluate_association(), and subscriptionRefs_.
Referenced by DCPS_IR_Subscription::set_qos(), and DCPS_IR_Publication::set_qos().
00390 { 00391 DCPS_IR_Subscription * sub = 0; 00392 DCPS_IR_Subscription_Set::ITERATOR iter = subscriptionRefs_.begin(); 00393 DCPS_IR_Subscription_Set::ITERATOR end = subscriptionRefs_.end(); 00394 00395 while (iter != end) { 00396 sub = *iter; 00397 ++iter; 00398 publication->reevaluate_association(sub); 00399 sub->reevaluate_association(publication); 00400 } 00401 }
int DCPS_IR_Topic_Description::remove_subscription_reference | ( | DCPS_IR_Subscription * | subscription | ) |
Removes the subscription from the list of subscriptions Returns 0 if successful
Definition at line 90 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Subscription::get_id(), LM_DEBUG, LM_ERROR, name_, ACE_Unbounded_Set_Ex< T, C >::remove(), status, and subscriptionRefs_.
Referenced by DCPS_IR_Topic::remove_subscription_reference().
00091 { 00092 int status = subscriptionRefs_.remove(subscription); 00093 00094 if (0 == status) { 00095 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00096 OpenDDS::DCPS::RepoIdConverter converter(subscription->get_id()); 00097 ACE_DEBUG((LM_DEBUG, 00098 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::remove_subscription_reference: ") 00099 ACE_TEXT("topic description %C removed subscription %C.\n"), 00100 this->name_.c_str(), 00101 std::string(converter).c_str())); 00102 } 00103 00104 } else { 00105 OpenDDS::DCPS::RepoIdConverter converter(subscription->get_id()); 00106 ACE_ERROR((LM_ERROR, 00107 ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Topic_Description::remove_subscription_reference: ") 00108 ACE_TEXT("topic description %C failed to remove subscription %C.\n"), 00109 this->name_.c_str(), 00110 std::string(converter).c_str())); 00111 } // if (0 == status) 00112 00113 return status; 00114 }
int DCPS_IR_Topic_Description::remove_topic | ( | DCPS_IR_Topic * | topic | ) |
Removes the topic from the list of topics Gives ownership of the memory pointed to by topic to the caller Returns 0 if successful
Definition at line 160 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Topic::get_id(), LM_DEBUG, LM_ERROR, name_, ACE_Unbounded_Set_Ex< T, C >::remove(), status, and topics_.
Referenced by DCPS_IR_Domain::add_topic_i(), and DCPS_IR_Domain::remove_topic().
00161 { 00162 int status = topics_.remove(topic); 00163 00164 if (0 == status) { 00165 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00166 OpenDDS::DCPS::RepoIdConverter converter(topic->get_id()); 00167 ACE_DEBUG((LM_DEBUG, 00168 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::remove_topic: ") 00169 ACE_TEXT("topic description %C removed topic %C.\n"), 00170 this->name_.c_str(), 00171 std::string(converter).c_str())); 00172 } 00173 00174 } else { 00175 OpenDDS::DCPS::RepoIdConverter converter(topic->get_id()); 00176 ACE_ERROR((LM_ERROR, 00177 ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Topic_Description::remove_topic: ") 00178 ACE_TEXT("topic description failed to remove topic %C.\n"), 00179 this->name_.c_str(), 00180 std::string(converter).c_str())); 00181 } 00182 00183 return status; 00184 }
bool DCPS_IR_Topic_Description::try_associate | ( | DCPS_IR_Publication * | publication, | |
DCPS_IR_Subscription * | subscription | |||
) |
Checks to see if the publication and subscription can be associated.
Definition at line 274 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), associate(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::compatibleQOS(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Subscription::get_datareader_qos(), DCPS_IR_Publication::get_datawriter_qos(), DCPS_IR_Publication::get_id(), DCPS_IR_Subscription::get_id(), DCPS_IR_Subscription::get_incompatibleQosStatus(), DCPS_IR_Publication::get_incompatibleQosStatus(), DCPS_IR_Publication::get_participant_id(), DCPS_IR_Subscription::get_participant_id(), DCPS_IR_Publication::get_publisher_qos(), DCPS_IR_Subscription::get_subscriber_qos(), DCPS_IR_Publication::get_topic_id(), DCPS_IR_Subscription::get_topic_id(), DCPS_IR_Subscription::get_transportLocatorSeq(), DCPS_IR_Publication::get_transportLocatorSeq(), DCPS_IR_Subscription::is_publication_ignored(), DCPS_IR_Publication::is_subscription_ignored(), LM_DEBUG, and name_.
Referenced by DCPS_IR_Subscription::reevaluate_association(), DCPS_IR_Publication::reevaluate_association(), DCPS_IR_Topic::try_associate(), and try_associate_publication().
00276 { 00277 if (publication->is_subscription_ignored(subscription->get_participant_id(), 00278 subscription->get_topic_id(), 00279 subscription->get_id())) { 00280 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00281 OpenDDS::DCPS::RepoIdConverter pub_converter(publication->get_id()); 00282 OpenDDS::DCPS::RepoIdConverter sub_converter(subscription->get_id()); 00283 ACE_DEBUG((LM_DEBUG, 00284 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::try_associate: ") 00285 ACE_TEXT("topic description %C publication %C ignores subscription %C.\n"), 00286 this->name_.c_str(), 00287 std::string(pub_converter).c_str(), 00288 std::string(sub_converter).c_str())); 00289 } 00290 } 00291 00292 else if (subscription->is_publication_ignored(publication->get_participant_id(), 00293 publication->get_topic_id(), 00294 publication->get_id())) { 00295 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00296 OpenDDS::DCPS::RepoIdConverter pub_converter(publication->get_id()); 00297 OpenDDS::DCPS::RepoIdConverter sub_converter(subscription->get_id()); 00298 ACE_DEBUG((LM_DEBUG, 00299 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::try_associate: ") 00300 ACE_TEXT("topic description %C subscription %C ignores publication %C.\n"), 00301 this->name_.c_str(), 00302 std::string(pub_converter).c_str(), 00303 std::string(sub_converter).c_str())); 00304 } 00305 00306 } else { 00307 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00308 OpenDDS::DCPS::RepoIdConverter pub_converter(publication->get_id()); 00309 OpenDDS::DCPS::RepoIdConverter sub_converter(subscription->get_id()); 00310 ACE_DEBUG((LM_DEBUG, 00311 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::try_associate: ") 00312 ACE_TEXT("topic description %C checking compatibility of ") 00313 ACE_TEXT("publication %C with subscription %C.\n"), 00314 this->name_.c_str(), 00315 std::string(pub_converter).c_str(), 00316 std::string(sub_converter).c_str())); 00317 } 00318 00319 if (OpenDDS::DCPS::compatibleQOS(publication->get_incompatibleQosStatus(), 00320 subscription->get_incompatibleQosStatus(), 00321 publication->get_transportLocatorSeq(), 00322 subscription->get_transportLocatorSeq(), 00323 publication->get_datawriter_qos(), 00324 subscription->get_datareader_qos(), 00325 publication->get_publisher_qos(), 00326 subscription->get_subscriber_qos())) { 00327 associate(publication, subscription); 00328 return true; 00329 } 00330 00331 // Dont notify that there is an incompatible qos here 00332 // notify where we can distinguish which one is being added 00333 // so we only send one response(with all incompatible qos) to it 00334 } 00335 00336 return false; 00337 }
void DCPS_IR_Topic_Description::try_associate_publication | ( | DCPS_IR_Publication * | publication | ) |
Tries to associate the publication will each of the subscriptions in the subscription list
Definition at line 207 of file DCPS_IR_Topic_Description.cpp.
References ACE_Unbounded_Set_Ex< T, C >::begin(), OpenDDS::DCPS::IncompatibleQosStatus::count_since_last_send, ACE_Unbounded_Set_Ex< T, C >::end(), DCPS_IR_Publication::get_incompatibleQosStatus(), DCPS_IR_Subscription::get_incompatibleQosStatus(), subscriptionRefs_, try_associate(), DCPS_IR_Publication::update_incompatible_qos(), and DCPS_IR_Subscription::update_incompatible_qos().
Referenced by DCPS_IR_Topic::add_publication_reference(), and DCPS_IR_Topic::reassociate_all_publications().
00208 { 00209 // for each subscription check for compatibility 00210 DCPS_IR_Subscription* subscription = 0; 00211 OpenDDS::DCPS::IncompatibleQosStatus* qosStatus = 0; 00212 00213 DCPS_IR_Subscription_Set::ITERATOR iter = subscriptionRefs_.begin(); 00214 DCPS_IR_Subscription_Set::ITERATOR end = subscriptionRefs_.end(); 00215 00216 while (iter != end) { 00217 subscription = *iter; 00218 ++iter; 00219 try_associate(publication, subscription); 00220 00221 // Check the subscriptions QOS status 00222 qosStatus = subscription->get_incompatibleQosStatus(); 00223 00224 if (0 < qosStatus->count_since_last_send) { 00225 subscription->update_incompatible_qos(); 00226 } 00227 } 00228 00229 // Check the publications QOS status 00230 qosStatus = publication->get_incompatibleQosStatus(); 00231 00232 if (0 < qosStatus->count_since_last_send) { 00233 publication->update_incompatible_qos(); 00234 } 00235 }
void DCPS_IR_Topic_Description::try_associate_subscription | ( | DCPS_IR_Subscription * | subscription | ) |
Tries to associate the subscription will each of the publications in each topic in the topic list
Definition at line 237 of file DCPS_IR_Topic_Description.cpp.
References ACE_TEXT(), ACE_Unbounded_Set_Ex< T, C >::begin(), ACE_String_Base< ACE_CHAR_T >::c_str(), OpenDDS::DCPS::DCPS_debug_level, ACE_Unbounded_Set_Ex< T, C >::end(), DCPS_IR_Subscription::get_id(), DCPS_IR_Subscription::get_incompatibleQosStatus(), LM_DEBUG, name_, topics_, OpenDDS::DCPS::IncompatibleQosStatus::total_count, DCPS_IR_Topic::try_associate(), and DCPS_IR_Subscription::update_incompatible_qos().
Referenced by add_subscription_reference().
00238 { 00239 // check all topics for compatible publications 00240 00241 DCPS_IR_Topic* topic = 0; 00242 00243 DCPS_IR_Topic_Set::ITERATOR iter = topics_.begin(); 00244 DCPS_IR_Topic_Set::ITERATOR end = topics_.end(); 00245 00246 while (iter != end) { 00247 topic = *iter; 00248 ++iter; 00249 00250 topic->try_associate(subscription); 00251 } 00252 00253 // Check the subscriptions QOS status 00254 OpenDDS::DCPS::IncompatibleQosStatus* qosStatus = 00255 subscription->get_incompatibleQosStatus(); 00256 00257 if (0 < qosStatus->total_count) { 00258 if (OpenDDS::DCPS::DCPS_debug_level > 0) { 00259 OpenDDS::DCPS::RepoIdConverter converter(subscription->get_id()); 00260 ACE_DEBUG((LM_DEBUG, 00261 ACE_TEXT("(%P|%t) DCPS_IR_Topic_Description::try_associate_subscription: ") 00262 ACE_TEXT("topic description %C has %d incompatible publications ") 00263 ACE_TEXT("with subscription %C.\n"), 00264 this->name_.c_str(), 00265 qosStatus->total_count, 00266 std::string(converter).c_str())); 00267 } 00268 00269 subscription->update_incompatible_qos(); 00270 } 00271 }
Definition at line 113 of file DCPS_IR_Topic_Description.h.
Referenced by dump_to_string(), and get_dataTypeName().
DCPS_IR_Domain* DCPS_IR_Topic_Description::domain_ [private] |
Definition at line 114 of file DCPS_IR_Topic_Description.h.
Referenced by add_subscription_reference().
ACE_CString DCPS_IR_Topic_Description::name_ [private] |
Definition at line 112 of file DCPS_IR_Topic_Description.h.
Referenced by add_subscription_reference(), add_topic(), associate(), dump_to_string(), get_first_topic(), get_name(), remove_subscription_reference(), remove_topic(), try_associate(), and try_associate_subscription().
Definition at line 116 of file DCPS_IR_Topic_Description.h.
Referenced by add_subscription_reference(), dump_to_string(), reevaluate_associations(), remove_subscription_reference(), and try_associate_publication().
Definition at line 117 of file DCPS_IR_Topic_Description.h.
Referenced by add_topic(), dump_to_string(), get_first_topic(), get_number_topics(), reevaluate_associations(), remove_topic(), and try_associate_subscription().