DCPS_IR_Domain Class Reference

Representation of a Domain in the system. More...

#include <DCPS_IR_Domain.h>

Inheritance diagram for DCPS_IR_Domain:
Inheritance graph
[legend]
Collaboration diagram for DCPS_IR_Domain:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DCPS_IR_Domain (DDS::DomainId_t id, OpenDDS::DCPS::RepoIdGenerator &generator)
 ~DCPS_IR_Domain ()
int add_participant (DCPS_IR_Participant_rch participant)
int remove_participant (const OpenDDS::DCPS::RepoId &particpantId, CORBA::Boolean notify_lost)
DCPS_IR_Participantparticipant (const OpenDDS::DCPS::RepoId &id) const
 Find the participant with the id.
OpenDDS::DCPS::TopicStatus find_topic (const char *topicName, DCPS_IR_Topic *&topic)
DCPS_IR_Topicfind_topic (const OpenDDS::DCPS::RepoId &id)
 Find a topic object reference using the topic Id value.
OpenDDS::DCPS::TopicStatus remove_topic (DCPS_IR_Participant *part, DCPS_IR_Topic *&topic)
void remove_topic_id_mapping (const OpenDDS::DCPS::RepoId &topicId)
void add_dead_participant (DCPS_IR_Participant_rch participant)
void remove_dead_participants ()
 Remove any participants currently marked as dead.
DDS::DomainId_t get_id ()
OpenDDS::DCPS::RepoId get_next_participant_id ()
 Next Entity Id value in sequence.
void last_participant_key (long key)
 Ensure no conflicts with sequence values from persistent storage.
int init_built_in_topics (bool federated, bool persistent)
int cleanup_built_in_topics ()
 Cleans up the Built-In Topic structures.
int reassociate_built_in_topic_pubs ()
void publish_participant_bit (DCPS_IR_Participant *participant)
 Publish Participant in the Participant Built-In Topic.
void publish_topic_bit (DCPS_IR_Topic *topic)
 Publish Topic in the Topic Built-In Topic.
void publish_subscription_bit (DCPS_IR_Subscription *subscription)
 Publish Subscription in the Subscription Built-In Topic.
void publish_publication_bit (DCPS_IR_Publication *publication)
 Publish Publication in the Publication Built-In Topic.
void dispose_participant_bit (DCPS_IR_Participant *participant)
 Dispose Participant in the Participant Built-In Topic.
void dispose_topic_bit (DCPS_IR_Topic *topic)
 Dispose Topic in the Topic Built-In Topic.
void dispose_subscription_bit (DCPS_IR_Subscription *subscription)
 Dispose Subscription in the Subscription Built-In Topic.
void dispose_publication_bit (DCPS_IR_Publication *publication)
 Dispose Publication in the Publication Built-In Topic.
const DCPS_IR_Participant_Mapparticipants () const
 Expose a readable reference to the participant map.
std::string dump_to_string (const std::string &prefix, int depth) const
bool useBIT () const

Private Types

typedef std::map
< OpenDDS::DCPS::RepoId,
OpenDDS::DCPS::container_supported_unique_ptr
< DCPS_IR_Topic >
, OpenDDS::DCPS::GUID_tKeyLessThan
IdToTopicMap
 Mapping from RepoId values to Topic object references.

Private Member Functions

OpenDDS::DCPS::TopicStatus add_topic_i (OpenDDS::DCPS::RepoId &topicId, const char *topicName, const char *dataTypeName, const DDS::TopicQos &qos, DCPS_IR_Participant *participantPtr, bool isBIT)
int add_topic_description (OpenDDS::DCPS::unique_ptr< DCPS_IR_Topic_Description > desc)
int find_topic_description (const char *name, const char *dataTypeName, DCPS_IR_Topic_Description *&desc)
int remove_topic_description (DCPS_IR_Topic_Description *desc)
 Returns 0 if successful.
 DCPS_IR_Domain (const DCPS_IR_Domain &)

Private Attributes

DDS::DomainId_t id_
OpenDDS::DCPS::RepoIdGeneratorparticipantIdGenerator_
DCPS_IR_Participant_Map participants_
 all the participants
DCPS_IR_Participant_Set deadParticipants_
DCPS_IR_Topic_Description_Set topicDescriptions_
 all the topics
IdToTopicMap idToTopicMap_
 Actual mapping of Id values to Topic object references.
bool useBIT_
 indicates if the BuiltIn Topics are enabled



DDS::DomainParticipantFactory_var bitParticipantFactory_
DDS::DomainParticipant_var bitParticipant_
DDS::DomainParticipantListener_var bitParticipantListener_
DDS::Publisher_var bitPublisher_
OpenDDS::DCPS::TransportConfig_rch transportConfig_
DDS::Topic_var bitParticipantTopic_
DDS::ParticipantBuiltinTopicDataDataWriter_var bitParticipantDataWriter_
DDS::Topic_var bitTopicTopic_
DDS::TopicBuiltinTopicDataDataWriter_var bitTopicDataWriter_
DDS::Topic_var bitSubscriptionTopic_
DDS::SubscriptionBuiltinTopicDataDataWriter_var bitSubscriptionDataWriter_
DDS::Topic_var bitPublicationTopic_
DDS::PublicationBuiltinTopicDataDataWriter_var bitPublicationDataWriter_
OpenDDS::DCPS::TopicStatus add_topic (OpenDDS::DCPS::RepoId_out topicId, const char *topicName, const char *dataTypeName, const DDS::TopicQos &qos, DCPS_IR_Participant *participantPtr)
OpenDDS::DCPS::TopicStatus force_add_topic (const OpenDDS::DCPS::RepoId &topicId, const char *topicName, const char *dataTypeName, const DDS::TopicQos &qos, DCPS_IR_Participant *participantPtr)
int init_built_in_topics_topics ()
int init_built_in_topics_datawriters (bool federated)
int init_built_in_topics_transport (bool persistent)

Detailed Description

Representation of a Domain in the system.

This represents a Domain in the system. It contains the representatives of the entities that are in the corresponding system's domain.

Definition at line 64 of file DCPS_IR_Domain.h.


Member Typedef Documentation

Mapping from RepoId values to Topic object references.

Definition at line 234 of file DCPS_IR_Domain.h.


Constructor & Destructor Documentation

DCPS_IR_Domain h OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL DCPS_IR_Domain::DCPS_IR_Domain ( DDS::DomainId_t  id,
OpenDDS::DCPS::RepoIdGenerator generator 
)

Definition at line 38 of file DCPS_IR_Domain.cpp.

00039   : id_(id),
00040     participantIdGenerator_(generator),
00041     useBIT_(false)
00042 {
00043 }

DCPS_IR_Domain::~DCPS_IR_Domain (  ) 

Definition at line 45 of file DCPS_IR_Domain.cpp.

00046 {
00047 }

DCPS_IR_Domain::DCPS_IR_Domain ( const DCPS_IR_Domain  )  [private]

Member Function Documentation

void DCPS_IR_Domain::add_dead_participant ( DCPS_IR_Participant_rch  participant  ) 

Mark a participant as being unresponsive (dead) and schedule it to be removed next time remove_dead_participants is called.

Definition at line 946 of file DCPS_IR_Domain.cpp.

References deadParticipants_.

Referenced by DCPS_IR_Participant::mark_dead().

00947 {
00948   deadParticipants_.insert(participant);
00949 }

Here is the caller graph for this function:

int DCPS_IR_Domain::add_participant ( DCPS_IR_Participant_rch  participant  ) 

Add the participant Returns 0 if added, 1 if already exists, -1 other failure

Definition at line 69 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, OpenDDS::DCPS::RcHandle< T >::in(), LM_DEBUG, LM_NOTICE, participants_, and publish_participant_bit().

00070 {
00071   OpenDDS::DCPS::RepoId participantId = participant->get_id();
00072   OpenDDS::DCPS::RepoIdConverter converter(participantId);
00073 
00074   DCPS_IR_Participant_Map::iterator where
00075   = this->participants_.find(participantId);
00076 
00077   if (where == this->participants_.end()) {
00078     this->participants_.insert(
00079       DCPS_IR_Participant_Map::value_type(participantId, participant));
00080 
00081     // Publish the BIT information
00082     publish_participant_bit(participant.in());
00083 
00084     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00085       ACE_DEBUG((LM_DEBUG,
00086                  ACE_TEXT("(%P|%t) DCPS_IR_Domain::add_participant: ")
00087                  ACE_TEXT("added participant %C in domain %d ")
00088                  ACE_TEXT("at 0x%x.\n"),
00089                  std::string(converter).c_str(),
00090                  id_,
00091                  participant.in()));
00092     }
00093 
00094   } else {
00095     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00096       ACE_DEBUG((LM_NOTICE,
00097                  ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Domain::add_participant: ")
00098                  ACE_TEXT("attempt to add already existing participant %C in domain %d.\n"),
00099                  std::string(converter).c_str(),
00100                  id_));
00101     }
00102 
00103     return 1;
00104   }
00105 
00106   return 0;
00107 }

Here is the call graph for this function:

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::add_topic ( OpenDDS::DCPS::RepoId_out  topicId,
const char *  topicName,
const char *  dataTypeName,
const DDS::TopicQos qos,
DCPS_IR_Participant participantPtr 
)

Add a topic to the domain Returns OpenDDS::DCPS::CREATED if successfull

Definition at line 150 of file DCPS_IR_Domain.cpp.

References add_topic_i(), OpenDDS::DCPS::CREATED, DCPS_IR_Participant::get_next_topic_id(), OpenDDS::DCPS::GUID_UNKNOWN, status, and OpenDDS::DCPS::topicIsBIT().

00155 {
00156   topicId = OpenDDS::DCPS::GUID_UNKNOWN;
00157 
00158   bool isBIT = OpenDDS::DCPS::topicIsBIT(topicName, dataTypeName);
00159   OpenDDS::DCPS::RepoId new_topic_id = participantPtr->get_next_topic_id(isBIT);
00160   OpenDDS::DCPS::TopicStatus status = add_topic_i(new_topic_id, topicName
00161                                                   , dataTypeName
00162                                                   , qos, participantPtr, isBIT);
00163 
00164   if (status == OpenDDS::DCPS::CREATED) {
00165     topicId = new_topic_id;
00166   }
00167 
00168   return status;
00169 }

Here is the call graph for this function:

int DCPS_IR_Domain::add_topic_description ( OpenDDS::DCPS::unique_ptr< DCPS_IR_Topic_Description desc  )  [private]

Takes ownership of the memory pointed to by desc if successful returns 0 if successful, 1 if description already exists -1 unknown error 2 if confliciting dataTypeName

Definition at line 878 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, find_topic_description(), OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), DCPS_IR_Topic_Description::get_name(), id_, LM_DEBUG, LM_ERROR, LM_NOTICE, OpenDDS::DCPS::EnableContainerSupportedUniquePtr< DCPS_IR_Domain >::move, OpenDDS::DCPS::move(), and topicDescriptions_.

Referenced by add_topic_i().

00879 {
00880   using OpenDDS::DCPS::move;
00881   DCPS_IR_Topic_Description* discard = 0;
00882   DCPS_IR_Topic_Description* desc_ptr = desc.get();
00883 
00884   switch (this->find_topic_description(
00885             desc->get_name(),
00886             desc->get_dataTypeName(),
00887             discard)) {
00888   case -1:
00889     this->topicDescriptions_[desc_ptr->get_name()] = move(desc);
00890 
00891     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00892       ACE_DEBUG((LM_DEBUG,
00893                  ACE_TEXT("(%P|%t) DCPS_IR_Domain::add_topic_description: ")
00894                  ACE_TEXT("added Topic Description 0x%x in domain %d.\n"),
00895                  desc_ptr,
00896                  id_));
00897     }
00898 
00899     return 0;
00900 
00901   case 0:
00902     ACE_DEBUG((LM_NOTICE,
00903                ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Domain::add_topic_description: ")
00904                ACE_TEXT("attempt to add existing Topic Description 0x%x to domain %d.\n"),
00905                desc_ptr,
00906                id_));
00907     return 1;
00908 
00909   case 1:
00910     ACE_DEBUG((LM_NOTICE,
00911                ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Domain::add_topic_description: ")
00912                ACE_TEXT("attempt to add incompatible Topic Description 0x%x to domain %d.\n"),
00913                desc_ptr,
00914                id_));
00915     return 2;
00916 
00917   default:
00918     ACE_ERROR((LM_ERROR,
00919                ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::add_topic_description: ")
00920                ACE_TEXT("unknown error adding Topic Description 0x%x to domain %d.\n"),
00921                desc_ptr,
00922                id_));
00923     return 2;
00924   }
00925 }

Here is the call graph for this function:

Here is the caller graph for this function:

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::add_topic_i ( OpenDDS::DCPS::RepoId topicId,
const char *  topicName,
const char *  dataTypeName,
const DDS::TopicQos qos,
DCPS_IR_Participant participantPtr,
bool  isBIT 
) [private]

Definition at line 187 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), DCPS_IR_Topic_Description::add_topic(), add_topic_description(), DCPS_IR_Participant::add_topic_reference(), OpenDDS::DCPS::CONFLICTING_TYPENAME, OpenDDS::DCPS::CREATED, OpenDDS::DCPS::DCPS_debug_level, find_topic_description(), OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), OpenDDS::DCPS::GUID_UNKNOWN, id_, idToTopicMap_, LM_DEBUG, LM_ERROR, LM_NOTICE, OpenDDS::DCPS::EnableContainerSupportedUniquePtr< DCPS_IR_Domain >::move, OpenDDS::DCPS::NOT_FOUND, publish_topic_bit(), and DCPS_IR_Topic_Description::remove_topic().

Referenced by add_topic(), and force_add_topic().

00193 {
00194   DCPS_IR_Topic_Description* description;
00195   int descriptionLookup = find_topic_description(topicName, dataTypeName, description);
00196 
00197   if (1 == descriptionLookup) {
00198     topicId = OpenDDS::DCPS::GUID_UNKNOWN;
00199     return OpenDDS::DCPS::CONFLICTING_TYPENAME;
00200 
00201   } else if (-1 == descriptionLookup) {
00202     using namespace OpenDDS::DCPS;
00203     unique_ptr<DCPS_IR_Topic_Description> desc( new
00204                    DCPS_IR_Topic_Description(
00205                      this,
00206                      topicName,
00207                      dataTypeName));
00208     description = desc.get();
00209     int descriptionAddition = add_topic_description(move(desc));
00210 
00211     if (0 != descriptionAddition) {
00212       topicId = OpenDDS::DCPS::GUID_UNKNOWN;
00213 
00214       if (2 == descriptionAddition) {
00215         return OpenDDS::DCPS::CONFLICTING_TYPENAME;
00216 
00217       } else {
00218         return OpenDDS::DCPS::NOT_FOUND;
00219       }
00220     }
00221   }
00222 
00223   OpenDDS::DCPS::unique_ptr<DCPS_IR_Topic> topic( new
00224                  DCPS_IR_Topic(
00225                    topicId,
00226                    qos,
00227                    this,
00228                    participantPtr,
00229                    description,
00230                    isBIT));
00231 
00232   OpenDDS::DCPS::TopicStatus topicStatus = OpenDDS::DCPS::NOT_FOUND;
00233 
00234   switch (description->add_topic(topic.get())) {
00235   case 0: {
00236     switch (participantPtr->add_topic_reference(topic.get())) {
00237     case 0: {
00238       if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00239         OpenDDS::DCPS::RepoIdConverter converter(topicId);
00240         ACE_DEBUG((LM_DEBUG,
00241                    ACE_TEXT("(%P|%t) DCPS_IR_Domain::add_topic_i: ")
00242                    ACE_TEXT("Domain %d successfully added topic %C ")
00243                    ACE_TEXT("at 0x%x.\n"),
00244                    this->id_,
00245                    std::string(converter).c_str(),
00246                    topic.get()));
00247       }
00248 
00249       topicStatus = OpenDDS::DCPS::CREATED;
00250 
00251       // Publish the BIT information
00252       publish_topic_bit(topic.get());
00253 
00254       // Keep a reference to easily locate the topic by id.
00255       this->idToTopicMap_[topicId] = move(topic);
00256 
00257     }
00258     break;
00259 
00260     case 1:
00261 
00262       if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00263         OpenDDS::DCPS::RepoIdConverter converter(topicId);
00264         ACE_DEBUG((LM_NOTICE,
00265                    ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Domain::add_topic_i: ")
00266                    ACE_TEXT("Domain %d declined to add duplicate topic %C at 0x%x.\n"),
00267                    this->id_,
00268                    std::string(converter).c_str(),
00269                    topic.get()));
00270       }
00271 
00272       topicStatus = OpenDDS::DCPS::NOT_FOUND;
00273       topicId = OpenDDS::DCPS::GUID_UNKNOWN;
00274       description->remove_topic(topic.get());
00275       break;
00276 
00277     case -1: {
00278       OpenDDS::DCPS::RepoIdConverter converter(topicId);
00279       ACE_ERROR((LM_ERROR,
00280                  ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::add_topic_i: ")
00281                  ACE_TEXT("Domain %d failed to add topic %C at 0x%x.\n"),
00282                  this->id_,
00283                  std::string(converter).c_str(),
00284                  topic.get()));
00285       topicStatus = OpenDDS::DCPS::NOT_FOUND;
00286       topicId = OpenDDS::DCPS::GUID_UNKNOWN;
00287       description->remove_topic(topic.get());
00288     }
00289     break;
00290     }
00291   }
00292   break;
00293 
00294   case 1:
00295 
00296     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00297       OpenDDS::DCPS::RepoIdConverter converter(topicId);
00298       ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) WARNING: DCPS_IR_Domain::add_topic ")
00299                  ACE_TEXT("Unable to add topic 0x%x id %C to Topic Description\n"),
00300                  topic.get(),
00301                  std::string(converter).c_str()));
00302     }
00303 
00304     topicStatus = OpenDDS::DCPS::NOT_FOUND;
00305     topicId = OpenDDS::DCPS::GUID_UNKNOWN;
00306     break;
00307 
00308   case -1: {
00309     OpenDDS::DCPS::RepoIdConverter converter(topicId);
00310     ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::add_topic ")
00311                ACE_TEXT("Unable to add topic 0x%x id %C to Topic Description\n"),
00312                topic.get(),
00313                std::string(converter).c_str()));
00314     topicStatus = OpenDDS::DCPS::NOT_FOUND;
00315     topicId = OpenDDS::DCPS::GUID_UNKNOWN;
00316   }
00317   break;
00318   }
00319 
00320   return topicStatus;
00321 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Domain::cleanup_built_in_topics (  ) 

Cleans up the Built-In Topic structures.

Definition at line 851 of file DCPS_IR_Domain.cpp.

References bitParticipant_, bitParticipantDataWriter_, bitParticipantFactory_, bitParticipantTopic_, bitPublicationDataWriter_, bitPublicationTopic_, bitPublisher_, bitSubscriptionDataWriter_, bitSubscriptionTopic_, bitTopicDataWriter_, bitTopicTopic_, and useBIT_.

00852 {
00853 #if !defined (DDS_HAS_MINIMUM_BIT)
00854 
00855   if (useBIT_) {
00856     // clean up the Built-in Topic objects
00857     bitParticipant_->delete_contained_entities();
00858     bitPublisher_ = 0;
00859     bitParticipantDataWriter_ = 0;
00860     bitTopicDataWriter_ = 0;
00861     bitSubscriptionDataWriter_ = 0;
00862     bitPublicationDataWriter_ = 0;
00863     bitParticipantTopic_ = 0;
00864     bitTopicTopic_ = 0;
00865     bitSubscriptionTopic_ = 0;
00866     bitPublicationTopic_ = 0;
00867 
00868     bitParticipantFactory_->delete_participant(bitParticipant_); // deletes this
00869   }
00870 
00871   return 0;
00872 
00873 #else
00874   return 1;
00875 #endif // !defined (DDS_HAS_MINIMUM_BIT)
00876 }

void DCPS_IR_Domain::dispose_participant_bit ( DCPS_IR_Participant participant  ) 

Dispose Participant in the Participant Built-In Topic.

Definition at line 1255 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_TEXT(), bitParticipantDataWriter_, DCPS_IR_Participant::get_handle(), DCPS_IR_Participant::get_id(), DCPS_IR_Participant::isBitPublisher(), LM_ERROR, DDS::RETCODE_OK, and useBIT_.

Referenced by remove_participant().

01256 {
01257 #if !defined (DDS_HAS_MINIMUM_BIT)
01258 
01259   if (useBIT_) {
01260     if (!participant->isBitPublisher()) {
01261       try {
01262         DDS::ParticipantBuiltinTopicData key_data;
01263         DDS::InstanceHandle_t handle = participant->get_handle();
01264 
01265         DDS::ReturnCode_t retGetKey
01266         = bitParticipantDataWriter_->get_key_value(key_data,
01267                                                    handle);
01268 
01269         if (DDS::RETCODE_OK != retGetKey) {
01270           OpenDDS::DCPS::RepoIdConverter converter(participant->get_id());
01271           ACE_ERROR((LM_ERROR,
01272                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_participant_bit ")
01273                      ACE_TEXT("Unable to get_key_value for participant %C handle %d.\n"),
01274                      std::string(converter).c_str(),
01275                      handle));
01276         }
01277 
01278         DDS::ReturnCode_t retDispose =
01279           bitParticipantDataWriter_->dispose(key_data,
01280                                              handle);
01281 
01282         if (DDS::RETCODE_OK != retDispose) {
01283           OpenDDS::DCPS::RepoIdConverter converter(participant->get_id());
01284           ACE_ERROR((LM_ERROR,
01285                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_participant_bit ")
01286                      ACE_TEXT("Unable to dispose for participant %C handle %d.\n"),
01287                      std::string(converter).c_str(),
01288                      handle));
01289         }
01290 
01291       } catch (const CORBA::Exception& ex) {
01292         ex._tao_print_exception(
01293           "ERROR: Exception caught in DCPS_IR_Domain::dispose_participant_bit:");
01294       }
01295     }
01296   }
01297 
01298 #else
01299   ACE_UNUSED_ARG(participant);
01300 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01301 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Domain::dispose_publication_bit ( DCPS_IR_Publication publication  ) 

Dispose Publication in the Publication Built-In Topic.

Definition at line 1403 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_TEXT(), bitPublicationDataWriter_, DCPS_IR_Publication::get_handle(), DCPS_IR_Publication::is_bit(), LM_ERROR, DDS::RETCODE_OK, and useBIT_.

Referenced by DCPS_IR_Participant::remove_publication().

01404 {
01405 #if !defined (DDS_HAS_MINIMUM_BIT)
01406 
01407   if (useBIT_) {
01408     if (!publication->is_bit()) {
01409       try {
01410         DDS::PublicationBuiltinTopicData key_data;
01411         DDS::InstanceHandle_t handle = publication->get_handle();
01412 
01413         DDS::ReturnCode_t retGetKey
01414         = bitPublicationDataWriter_->get_key_value(key_data, handle);
01415 
01416         if (DDS::RETCODE_OK != retGetKey) {
01417           ACE_ERROR((LM_ERROR,
01418                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_publication_bit ")
01419                      ACE_TEXT("Unable to get_key_value for publication ptr 0x%x handle %d.  ")
01420                      ACE_TEXT("Call returned %d.\n"),
01421                      publication,
01422                      handle,
01423                      retGetKey));
01424         }
01425 
01426         DDS::ReturnCode_t retDispose =
01427           bitPublicationDataWriter_->dispose(key_data,
01428                                              handle);
01429 
01430         if (DDS::RETCODE_OK != retDispose) {
01431           ACE_ERROR((LM_ERROR,
01432                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_publication_bit ")
01433                      ACE_TEXT("Unable to dispose for publication ptr 0x%x handle %d.  ")
01434                      ACE_TEXT("Call returned %d.\n"),
01435                      publication,
01436                      handle,
01437                      retDispose));
01438         }
01439 
01440       } catch (const CORBA::Exception& ex) {
01441         ex._tao_print_exception(
01442           "(%P|%t) ERROR: Exception caught in DCPS_IR_Domain::dispose_publication_bit:");
01443       }
01444     }
01445   }
01446 
01447 #else
01448   ACE_UNUSED_ARG(publication);
01449 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01450 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Domain::dispose_subscription_bit ( DCPS_IR_Subscription subscription  ) 

Dispose Subscription in the Subscription Built-In Topic.

Definition at line 1353 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_TEXT(), bitSubscriptionDataWriter_, DCPS_IR_Subscription::get_handle(), DCPS_IR_Subscription::is_bit(), LM_ERROR, DDS::RETCODE_OK, and useBIT_.

Referenced by DCPS_IR_Participant::remove_subscription().

01354 {
01355 #if !defined (DDS_HAS_MINIMUM_BIT)
01356 
01357   if (useBIT_) {
01358     if (!subscription->is_bit()) {
01359       try {
01360         DDS::SubscriptionBuiltinTopicData key_data;
01361         DDS::InstanceHandle_t handle = subscription->get_handle();
01362 
01363         DDS::ReturnCode_t retGetKey
01364         = bitSubscriptionDataWriter_->get_key_value(key_data,
01365                                                     handle);
01366 
01367         if (DDS::RETCODE_OK != retGetKey) {
01368           ACE_ERROR((LM_ERROR,
01369                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_subscription_bit ")
01370                      ACE_TEXT("Unable to get_key_value for subscription ptr 0x%x handle %d.  ")
01371                      ACE_TEXT("Call returned %d.\n"),
01372                      subscription,
01373                      handle,
01374                      retGetKey));
01375         }
01376 
01377         DDS::ReturnCode_t retDispose =
01378           bitSubscriptionDataWriter_->dispose(key_data,
01379                                               handle);
01380 
01381         if (DDS::RETCODE_OK != retDispose) {
01382           ACE_ERROR((LM_ERROR,
01383                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_subscription_bit ")
01384                      ACE_TEXT("Unable to dispose for subscription ptr 0x%x handle %d.  ")
01385                      ACE_TEXT("Call returned %d.\n"),
01386                      subscription,
01387                      handle,
01388                      retDispose));
01389         }
01390 
01391       } catch (const CORBA::Exception& ex) {
01392         ex._tao_print_exception(
01393           "(%P|%t) ERROR: Exception caught in DCPS_IR_Domain::dispose_subscription_bit:");
01394       }
01395     }
01396   }
01397 
01398 #else
01399   ACE_UNUSED_ARG(subscription);
01400 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01401 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Domain::dispose_topic_bit ( DCPS_IR_Topic topic  ) 

Dispose Topic in the Topic Built-In Topic.

Definition at line 1303 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_TEXT(), bitTopicDataWriter_, DCPS_IR_Topic::get_handle(), DCPS_IR_Topic::is_bit(), LM_ERROR, DDS::RETCODE_OK, and useBIT_.

Referenced by remove_topic().

01304 {
01305 #if !defined (DDS_HAS_MINIMUM_BIT)
01306 
01307   if (useBIT_) {
01308     if (!topic->is_bit()) {
01309       try {
01310         DDS::TopicBuiltinTopicData key_data;
01311         DDS::InstanceHandle_t handle = topic->get_handle();
01312 
01313         DDS::ReturnCode_t retGetKey
01314         = bitTopicDataWriter_->get_key_value(key_data,
01315                                              handle);
01316 
01317         if (DDS::RETCODE_OK != retGetKey) {
01318           ACE_ERROR((LM_ERROR,
01319                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_topic_bit ")
01320                      ACE_TEXT("Unable to get_key_value for topic ptr 0x%x handle %d.  ")
01321                      ACE_TEXT("Call returned %d.\n"),
01322                      topic,
01323                      handle,
01324                      retGetKey));
01325         }
01326 
01327         DDS::ReturnCode_t retDispose =
01328           bitTopicDataWriter_->dispose(key_data,
01329                                        handle);
01330 
01331         if (DDS::RETCODE_OK != retDispose) {
01332           ACE_ERROR((LM_ERROR,
01333                      ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::dispose_topic_bit ")
01334                      ACE_TEXT("Unable to dispose for topic ptr 0x%x handle %d.  ")
01335                      ACE_TEXT("Call returned %d.\n"),
01336                      topic,
01337                      handle,
01338                      retDispose));
01339         }
01340 
01341       } catch (const CORBA::Exception& ex) {
01342         ex._tao_print_exception(
01343           "(%P|%t) ERROR: Exception caught in DCPS_IR_Domain::dispose_topic_bit:");
01344       }
01345     }
01346   }
01347 
01348 #else
01349   ACE_UNUSED_ARG(topic);
01350 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01351 }

Here is the call graph for this function:

Here is the caller graph for this function:

std::string DCPS_IR_Domain::dump_to_string ( const std::string &  prefix,
int  depth 
) const

Definition at line 1459 of file DCPS_IR_Domain.cpp.

References deadParticipants_, id_, participants_, str, topicDescriptions_, and useBIT_.

01460 {
01461   std::string str;
01462 #if !defined (OPENDDS_INFOREPO_REDUCED_FOOTPRINT)
01463   for (int i=0; i < depth; i++)
01464     str += prefix;
01465   std::string indent = str + prefix;
01466   std::ostringstream os;
01467   os << "DCPS_IR_Domain[" << id_ << "]";
01468   str += os.str();
01469   if (useBIT_)
01470     str += " BITS";
01471   str += "\n";
01472 
01473   str += indent + "Participants:\n";
01474   for (DCPS_IR_Participant_Map::const_iterator pm = participants_.begin();
01475        pm != participants_.end();
01476        pm++)
01477   {
01478     str += pm->second->dump_to_string(prefix, depth+1);
01479   }
01480 
01481   str += indent + "Dead Participants:\n";
01482   for (DCPS_IR_Participant_Set::const_iterator dp = deadParticipants_.begin();
01483        dp != deadParticipants_.end();
01484        dp++)
01485   {
01486     OpenDDS::DCPS::RepoIdConverter sub_converter((*dp)->get_id());
01487     str += indent + std::string(sub_converter);
01488     str += "\n";
01489   }
01490 
01491   str += indent + "Topic Descriptions:\n";
01492   for (DCPS_IR_Topic_Description_Set::const_iterator tdi = topicDescriptions_.begin();
01493        tdi != topicDescriptions_.end();
01494        tdi++)
01495   {
01496     str += tdi->second->dump_to_string(prefix, depth+1);
01497   }
01498 #endif // !defined (OPENDDS_INFOREPO_REDUCED_FOOTPRINT)
01499   return str;
01500 }

DCPS_IR_Topic * DCPS_IR_Domain::find_topic ( const OpenDDS::DCPS::RepoId id  ) 

Find a topic object reference using the topic Id value.

Definition at line 352 of file DCPS_IR_Domain.cpp.

References idToTopicMap_.

00353 {
00354   IdToTopicMap::const_iterator location = this->idToTopicMap_.find(id);
00355 
00356   if (location == this->idToTopicMap_.end()) {
00357     return 0;
00358   }
00359 
00360   return location->second.get();
00361 }

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::find_topic ( const char *  topicName,
DCPS_IR_Topic *&  topic 
)

Find the topic with the topic name Does NOT take ownership of any initial memory pointed to by topic Returns OpenDDS::DCPS::FOUND if exists and topic is changed, -1 otherwise

Definition at line 324 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::FOUND, DCPS_IR_Topic::get_id(), id_, LM_DEBUG, OpenDDS::DCPS::NOT_FOUND, and topicDescriptions_.

00325 {
00326   DCPS_IR_Topic_Description_Set::iterator which
00327   = this->topicDescriptions_.find(topicName);
00328 
00329   if (which != this->topicDescriptions_.end()) {
00330     // Extract the topic from the description.
00331     topic = which->second->get_first_topic();
00332 
00333     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00334       OpenDDS::DCPS::RepoId topicId = topic->get_id();
00335       OpenDDS::DCPS::RepoIdConverter converter(topicId);
00336       ACE_DEBUG((LM_DEBUG,
00337                  ACE_TEXT("(%P|%t) DCPS_IR_Domain::find_topic: ")
00338                  ACE_TEXT("located topic %C in domain %d.\n"),
00339                  std::string(converter).c_str(),
00340                  id_));
00341     }
00342 
00343     return OpenDDS::DCPS::FOUND;
00344 
00345   } else {
00346     // topic = 0;
00347     return OpenDDS::DCPS::NOT_FOUND;
00348   }
00349 }

Here is the call graph for this function:

int DCPS_IR_Domain::find_topic_description ( const char *  name,
const char *  dataTypeName,
DCPS_IR_Topic_Description *&  desc 
) [private]

Find the topic description with the name and data type name Does NOT take ownership of any initial memory pointed to by desc Returns 0 if found and desc is changed, -1 if not found and 1 if conflicting dataTypeName

Definition at line 412 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, LM_DEBUG, LM_NOTICE, ACE_OS::strcmp(), and topicDescriptions_.

Referenced by add_topic_description(), and add_topic_i().

00416 {
00417   DCPS_IR_Topic_Description_Set::iterator which
00418   = this->topicDescriptions_.find(name);
00419 
00420   if (which != this->topicDescriptions_.end()) {
00421     if (0 == ACE_OS::strcmp(dataTypeName, which->second->get_dataTypeName())) {
00422       if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00423         ACE_DEBUG((LM_DEBUG,
00424                    ACE_TEXT("(%P|%t) DCPS_IR_Domain::find_topic_description: ")
00425                    ACE_TEXT("located topic description %C/%C in domain %d.\n"),
00426                    name,
00427                    dataTypeName,
00428                    id_));
00429       }
00430 
00431       desc = which->second.get();
00432       return 0;
00433 
00434     } else {
00435       if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00436         ACE_DEBUG((LM_NOTICE,
00437                    ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Domain::find_topic_description: ")
00438                    ACE_TEXT("searching for topic description %C/%C, ")
00439                    ACE_TEXT("located topic description %C/%C instead in domain %d.\n"),
00440                    name,
00441                    dataTypeName,
00442                    which->second->get_name(),
00443                    which->second->get_dataTypeName(),
00444                    id_));
00445       }
00446 
00447       // desc = 0;
00448       return 1;
00449     }
00450 
00451   } else {
00452     // desc = 0;
00453     return -1;
00454   }
00455 }

Here is the call graph for this function:

Here is the caller graph for this function:

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::force_add_topic ( const OpenDDS::DCPS::RepoId topicId,
const char *  topicName,
const char *  dataTypeName,
const DDS::TopicQos qos,
DCPS_IR_Participant participantPtr 
)

Built-in Topic variables

Definition at line 172 of file DCPS_IR_Domain.cpp.

References add_topic_i(), status, and OpenDDS::DCPS::topicIsBIT().

00177 {
00178   OpenDDS::DCPS::RepoId topic_id = topicId;
00179   bool isBIT = OpenDDS::DCPS::topicIsBIT(topicName, dataTypeName);
00180   OpenDDS::DCPS::TopicStatus status = add_topic_i(topic_id, topicName
00181                                                   , dataTypeName
00182                                                   , qos, participantPtr, isBIT);
00183 
00184   return status;
00185 }

Here is the call graph for this function:

DDS::DomainId_t DCPS_IR_Domain::get_id ( void   ) 

Definition at line 979 of file DCPS_IR_Domain.cpp.

References id_.

Referenced by DCPS_IR_Participant::remove_all_dependents(), and DCPS_IR_Participant::takeOwnership().

00980 {
00981   return id_;
00982 }

Here is the caller graph for this function:

OpenDDS::DCPS::RepoId DCPS_IR_Domain::get_next_participant_id (  ) 

Next Entity Id value in sequence.

Definition at line 985 of file DCPS_IR_Domain.cpp.

References OpenDDS::DCPS::RepoIdGenerator::next(), and participantIdGenerator_.

Referenced by TAO_DDS_DCPSInfo_i::add_domain_participant().

00986 {
00987   return this->participantIdGenerator_.next();
00988 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Domain::init_built_in_topics ( bool  federated,
bool  persistent 
)

Initialize the Built-In Topic structures This needs to be called before the run begins Returns 0 (zero) if successful

Definition at line 458 of file DCPS_IR_Domain.cpp.

Referenced by TAO_DDS_DCPSInfo_i::domain().

00459 {
00460   return 1;
00461 }

Here is the caller graph for this function:

int DCPS_IR_Domain::init_built_in_topics_datawriters ( bool  federated  )  [private]

Built-in Topic variables

Definition at line 694 of file DCPS_IR_Domain.cpp.

00695 {
00696   return 1;
00697 }

int DCPS_IR_Domain::init_built_in_topics_topics (  )  [private]

work of initializing the built in topics is done in these private methods. They were broken up for readability.

Definition at line 559 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_TEXT(), bitParticipant_, bitParticipantTopic_, bitPublicationTopic_, bitSubscriptionTopic_, bitTopicTopic_, OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC, OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC_TYPE, OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC, OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC_TYPE, OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC, OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC_TYPE, OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC, OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC_TYPE, OpenDDS::DCPS::DEFAULT_STATUS_MASK, CORBA::is_nil(), LM_ERROR, and DDS::RETCODE_OK.

00560 {
00561 #if !defined (DDS_HAS_MINIMUM_BIT)
00562 
00563   try {
00564     DDS::TopicQos topic_qos;
00565     bitParticipant_->get_default_topic_qos(topic_qos);
00566 
00567     // Participant topic
00568     DDS::ParticipantBuiltinTopicDataTypeSupport_var
00569     participantTypeSupport(new DDS::ParticipantBuiltinTopicDataTypeSupportImpl());
00570 
00571     if (DDS::RETCODE_OK !=
00572         participantTypeSupport->register_type(bitParticipant_.in(),
00573                                               OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC_TYPE)) {
00574       ACE_ERROR((LM_ERROR,
00575                  ACE_TEXT("(%P|%t) ERROR: Failed to register the ParticipantBuiltinTopicDataTypeSupport.")));
00576       return 1;
00577     }
00578 
00579     bitParticipantTopic_ =
00580       bitParticipant_->create_topic(OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC,
00581                                     OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC_TYPE,
00582                                     topic_qos,
00583                                     DDS::TopicListener::_nil(),
00584                                     OpenDDS::DCPS::DEFAULT_STATUS_MASK);
00585 
00586     if (CORBA::is_nil(bitParticipantTopic_.in())) {
00587       ACE_ERROR_RETURN((LM_ERROR,
00588                         ACE_TEXT("(%P|%t) ERROR: ")
00589                         ACE_TEXT("Nil %C Topic from ")
00590                         ACE_TEXT("DCPS_IR_Domain::init_built_in_topics.\n"),
00591                         OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC),
00592                        1);
00593     }
00594 
00595     // Topic topic
00596     DDS::TopicBuiltinTopicDataTypeSupport_var
00597     topicTypeSupport(new DDS::TopicBuiltinTopicDataTypeSupportImpl());
00598 
00599     if (DDS::RETCODE_OK !=
00600         topicTypeSupport->register_type(bitParticipant_.in(),
00601                                         OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC_TYPE)) {
00602       ACE_ERROR((LM_ERROR,
00603                  ACE_TEXT("(%P|%t) ERROR: Failed to register the TopicBuiltinTopicDataTypeSupport.")));
00604       return 1;
00605     }
00606 
00607     bitTopicTopic_ =
00608       bitParticipant_->create_topic(OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC,
00609                                     OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC_TYPE,
00610                                     topic_qos,
00611                                     DDS::TopicListener::_nil(),
00612                                     OpenDDS::DCPS::DEFAULT_STATUS_MASK);
00613 
00614     if (CORBA::is_nil(bitTopicTopic_.in())) {
00615       ACE_ERROR_RETURN((LM_ERROR,
00616                         ACE_TEXT("(%P|%t) ERROR: ")
00617                         ACE_TEXT("Nil %C Topic from ")
00618                         ACE_TEXT("DCPS_IR_Domain::init_built_in_topics.\n"),
00619                         OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC),
00620                        1);
00621     }
00622 
00623     // Subscription topic
00624     DDS::SubscriptionBuiltinTopicDataTypeSupport_var
00625     subscriptionTypeSupport(new DDS::SubscriptionBuiltinTopicDataTypeSupportImpl());
00626 
00627     if (DDS::RETCODE_OK !=
00628         subscriptionTypeSupport->register_type(bitParticipant_.in(),
00629                                                OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC_TYPE)) {
00630       ACE_ERROR((LM_ERROR,
00631                  ACE_TEXT("(%P|%t) ERROR: Failed to register the SubscriptionBuiltinTopicDataTypeSupport.")));
00632       return 1;
00633     }
00634 
00635     bitSubscriptionTopic_ =
00636       bitParticipant_->create_topic(OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC,
00637                                     OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC_TYPE,
00638                                     topic_qos,
00639                                     DDS::TopicListener::_nil(),
00640                                     OpenDDS::DCPS::DEFAULT_STATUS_MASK);
00641 
00642     if (CORBA::is_nil(bitSubscriptionTopic_.in())) {
00643       ACE_ERROR_RETURN((LM_ERROR,
00644                         ACE_TEXT("(%P|%t) ERROR: ")
00645                         ACE_TEXT("Nil %C Topic from ")
00646                         ACE_TEXT("DCPS_IR_Domain::init_built_in_topics.\n"),
00647                         OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC),
00648                        1);
00649     }
00650 
00651     // Publication topic
00652     DDS::PublicationBuiltinTopicDataTypeSupport_var
00653     publicationTypeSupport(new DDS::PublicationBuiltinTopicDataTypeSupportImpl());
00654 
00655     if (DDS::RETCODE_OK !=
00656         publicationTypeSupport->register_type(bitParticipant_.in(),
00657                                               OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC_TYPE)) {
00658       ACE_ERROR((LM_ERROR,
00659                  ACE_TEXT("(%P|%t) ERROR: Failed to register the PublicationBuiltinTopicDataTypeSupport.")));
00660       return 1;
00661     }
00662 
00663     bitPublicationTopic_ =
00664       bitParticipant_->create_topic(OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC,
00665                                     OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC_TYPE,
00666                                     topic_qos,
00667                                     DDS::TopicListener::_nil(),
00668                                     OpenDDS::DCPS::DEFAULT_STATUS_MASK);
00669 
00670     if (CORBA::is_nil(bitPublicationTopic_.in())) {
00671       ACE_ERROR_RETURN((LM_ERROR,
00672                         ACE_TEXT("(%P|%t) ERROR: ")
00673                         ACE_TEXT("Nil %C Topic from ")
00674                         ACE_TEXT("DCPS_IR_Domain::init_built_in_topics.\n"),
00675                         OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC),
00676                        1);
00677     }
00678 
00679   } catch (const CORBA::Exception& ex) {
00680     ex._tao_print_exception(
00681       "ERROR: Exception caught in DCPS_IR_Domain::init_built_in_topics_topics:");
00682     return 1;
00683   }
00684 
00685   return 0;
00686 
00687 #else
00688 
00689   return 1;
00690 #endif // !defined (DDS_HAS_MINIMUM_BIT)
00691 }

Here is the call graph for this function:

int DCPS_IR_Domain::init_built_in_topics_transport ( bool  persistent  )  [private]

Built-in Topic variables

Definition at line 801 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_TEXT(), bitParticipant_, bitPublisher_, OpenDDS::DCPS::TransportRegistry::DEFAULT_INST_PREFIX, OpenDDS::DCPS::DEFAULT_STATUS_MASK, OpenDDS::DCPS::TransportRegistry::instance(), CORBA::is_nil(), LM_ERROR, PUBLISHER_QOS_DEFAULT, transportConfig_, and DDS::DataWriterQos::writer_data_lifecycle.

00802 {
00803 #if !defined (DDS_HAS_MINIMUM_BIT)
00804 
00805   try {
00806     std::string config_name =
00807       OpenDDS::DCPS::TransportRegistry::DEFAULT_INST_PREFIX
00808       + std::string("InfoRepoBITTransportConfig");
00809     transportConfig_ =
00810       OpenDDS::DCPS::TransportRegistry::instance()->get_config(config_name);
00811 
00812     // Create the Publisher
00813     bitPublisher_ =
00814       bitParticipant_->create_publisher(PUBLISHER_QOS_DEFAULT,
00815                                         DDS::PublisherListener::_nil(),
00816                                         OpenDDS::DCPS::DEFAULT_STATUS_MASK);
00817 
00818     if (CORBA::is_nil(bitPublisher_.in())) {
00819       ACE_ERROR_RETURN((LM_ERROR,
00820                         ACE_TEXT("(%P|%t) ERROR: ")
00821                         ACE_TEXT("Nil Publisher from ")
00822                         ACE_TEXT("DCPS_IR_Domain::init_built_in_topics.\n")),
00823                        1);
00824     }
00825 
00826     // If persistence is active, do not have remote readers autodispose data
00827     if (persistent) {
00828       DDS::DataWriterQos qos;
00829       bitPublisher_->get_default_datawriter_qos(qos);
00830       qos.writer_data_lifecycle.autodispose_unregistered_instances = false;
00831       bitPublisher_->set_default_datawriter_qos(qos);
00832     }
00833 
00834     // Attach the Publisher with the TransportImpl.
00835     OpenDDS::DCPS::TransportRegistry::instance()->bind_config(transportConfig_,
00836                                                               bitPublisher_.in());
00837 
00838   } catch (const CORBA::Exception& ex) {
00839     ex._tao_print_exception(
00840       "ERROR: Exception caught in DCPS_IR_Domain::init_built_in_topics_transport:");
00841     return 1;
00842   }
00843 
00844   return 0;
00845 #else
00846 
00847   return 1;
00848 #endif // !defined (DDS_HAS_MINIMUM_BIT)
00849 }

Here is the call graph for this function:

void DCPS_IR_Domain::last_participant_key ( long  key  ) 

Ensure no conflicts with sequence values from persistent storage.

Definition at line 991 of file DCPS_IR_Domain.cpp.

References OpenDDS::DCPS::RepoIdGenerator::last(), and participantIdGenerator_.

00992 {
00993   this->participantIdGenerator_.last(key);
00994 }

Here is the call graph for this function:

DCPS_IR_Participant * DCPS_IR_Domain::participant ( const OpenDDS::DCPS::RepoId id  )  const

Find the participant with the id.

Definition at line 56 of file DCPS_IR_Domain.cpp.

References participants_.

Referenced by TAO_DDS_DCPSInfo_i::add_domain_participant(), TAO_DDS_DCPSInfo_i::add_subscription(), and remove_participant().

00057 {
00058   DCPS_IR_Participant_Map::const_iterator where
00059   = this->participants_.find(id);
00060 
00061   if (where != this->participants_.end()) {
00062     return where->second.in();
00063 
00064   } else {
00065     return 0;
00066   }
00067 }

Here is the caller graph for this function:

const DCPS_IR_Participant_Map & DCPS_IR_Domain::participants (  )  const

Expose a readable reference to the participant map.

Definition at line 50 of file DCPS_IR_Domain.cpp.

References participants_.

Referenced by TAO_DDS_DCPSInfo_i::add_domain_participant().

00051 {
00052   return this->participants_;
00053 }

Here is the caller graph for this function:

void DCPS_IR_Domain::publish_participant_bit ( DCPS_IR_Participant participant  ) 

Publish Participant in the Participant Built-In Topic.

Definition at line 1009 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), bitParticipantDataWriter_, OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Participant::get_id(), DCPS_IR_Participant::get_qos(), DCPS_IR_Participant::isBitPublisher(), DDS::ParticipantBuiltinTopicData::key, LM_DEBUG, DCPS_IR_Participant::set_handle(), useBIT_, DDS::DomainParticipantQos::user_data, and DDS::ParticipantBuiltinTopicData::user_data.

Referenced by add_participant(), and DCPS_IR_Participant::set_qos().

01010 {
01011 #if !defined (DDS_HAS_MINIMUM_BIT)
01012 
01013   if (useBIT_ && !participant->isBitPublisher()) {
01014     try {
01015       const DDS::DomainParticipantQos* participantQos = participant->get_qos();
01016 
01017       DDS::ParticipantBuiltinTopicData data;
01018       get_BuiltinTopicKey(data.key, participant->get_id());
01019       data.user_data = participantQos->user_data;
01020 
01021       DDS::InstanceHandle_t handle
01022       = bitParticipantDataWriter_->register_instance(data);
01023 
01024       participant->set_handle(handle);
01025 
01026       if (OpenDDS::DCPS::DCPS_debug_level > 0) {
01027         ACE_DEBUG((LM_DEBUG,
01028                    "(%P|%t) DCPS_IR_Domain::publish_participant_bit: [ %d, 0x%x, 0x%x], handle %d.\n",
01029                    data.key.value[0], data.key.value[1], data.key.value[2], handle));
01030       }
01031 
01032       bitParticipantDataWriter_->write(data, handle);
01033 
01034     } catch (const CORBA::Exception& ex) {
01035       ex._tao_print_exception(
01036         "(%P|%t) ERROR: Exception caught in DCPS_IR_Domain::publish_participant_bit:");
01037     }
01038   }
01039 
01040 #else
01041   ACE_UNUSED_ARG(participant);
01042 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01043 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Domain::publish_publication_bit ( DCPS_IR_Publication publication  ) 

Publish Publication in the Publication Built-In Topic.

Definition at line 1174 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), bitPublicationDataWriter_, OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC_TYPE, OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC_TYPE, OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC_TYPE, OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC_TYPE, OpenDDS::DCPS::DCPS_debug_level, DDS::DataWriterQos::deadline, DDS::PublicationBuiltinTopicData::deadline, DDS::DataWriterQos::destination_order, DDS::PublicationBuiltinTopicData::destination_order, DDS::DataWriterQos::durability, DDS::PublicationBuiltinTopicData::durability, DDS::DataWriterQos::durability_service, DDS::PublicationBuiltinTopicData::durability_service, DCPS_IR_Topic_Description::get_dataTypeName(), DCPS_IR_Publication::get_datawriter_qos(), DCPS_IR_Publication::get_id(), DCPS_IR_Topic_Description::get_name(), DCPS_IR_Publication::get_participant_id(), DCPS_IR_Publication::get_publisher_qos(), DCPS_IR_Publication::get_topic(), DCPS_IR_Publication::get_topic_description(), DCPS_IR_Topic::get_topic_qos(), DDS::PublisherQos::group_data, DDS::PublicationBuiltinTopicData::group_data, DDS::PublicationBuiltinTopicData::key, DDS::DataWriterQos::latency_budget, DDS::PublicationBuiltinTopicData::latency_budget, DDS::DataWriterQos::lifespan, DDS::PublicationBuiltinTopicData::lifespan, DDS::DataWriterQos::liveliness, DDS::PublicationBuiltinTopicData::liveliness, LM_DEBUG, LM_ERROR, DDS::DataWriterQos::ownership, DDS::PublicationBuiltinTopicData::ownership, DDS::DataWriterQos::ownership_strength, DDS::PublicationBuiltinTopicData::ownership_strength, DDS::PublicationBuiltinTopicData::participant_key, DDS::PublisherQos::partition, DDS::PublicationBuiltinTopicData::partition, DDS::PublisherQos::presentation, DDS::PublicationBuiltinTopicData::presentation, DDS::DataWriterQos::reliability, DDS::PublicationBuiltinTopicData::reliability, DDS::RETCODE_OK, DCPS_IR_Publication::set_bit_status(), DCPS_IR_Publication::set_handle(), status, ACE_OS::strcmp(), DDS::TopicQos::topic_data, DDS::PublicationBuiltinTopicData::topic_data, DDS::PublicationBuiltinTopicData::topic_name, DDS::PublicationBuiltinTopicData::type_name, useBIT_, DDS::DataWriterQos::user_data, and DDS::PublicationBuiltinTopicData::user_data.

Referenced by DCPS_IR_Topic::add_publication_reference(), DCPS_IR_Publication::set_qos(), and DCPS_IR_Topic::set_topic_qos().

01175 {
01176 #if !defined (DDS_HAS_MINIMUM_BIT)
01177 
01178   if (useBIT_) {
01179 
01180     DCPS_IR_Topic_Description* desc =
01181       publication->get_topic_description();
01182 
01183     const char* dataTypeName = desc->get_dataTypeName();
01184 
01185     bool isNotBIT =
01186       ACE_OS::strcmp(dataTypeName, OpenDDS::DCPS::BUILT_IN_PARTICIPANT_TOPIC_TYPE) &&
01187       ACE_OS::strcmp(dataTypeName, OpenDDS::DCPS::BUILT_IN_TOPIC_TOPIC_TYPE) &&
01188       ACE_OS::strcmp(dataTypeName, OpenDDS::DCPS::BUILT_IN_SUBSCRIPTION_TOPIC_TYPE) &&
01189       ACE_OS::strcmp(dataTypeName, OpenDDS::DCPS::BUILT_IN_PUBLICATION_TOPIC_TYPE);
01190 
01191     if (isNotBIT) {
01192       try {
01193         const DDS::DataWriterQos* writerQos = publication->get_datawriter_qos();
01194         const DDS::PublisherQos* publisherQos = publication->get_publisher_qos();
01195 
01196         DCPS_IR_Topic* topic = publication->get_topic();
01197         const DDS::TopicQos* topicQos = topic->get_topic_qos();
01198 
01199         DDS::PublicationBuiltinTopicData data;
01200         get_BuiltinTopicKey(data.key, publication->get_id());
01201         get_BuiltinTopicKey(data.participant_key,
01202                             publication->get_participant_id());
01203         data.topic_name = desc->get_name();
01204         data.type_name = desc->get_dataTypeName();
01205         data.durability = writerQos->durability;
01206         data.durability_service = writerQos->durability_service;
01207         data.deadline = writerQos->deadline;
01208         data.latency_budget = writerQos->latency_budget;
01209         data.liveliness = writerQos->liveliness;
01210         data.reliability = writerQos->reliability;
01211         data.lifespan = writerQos->lifespan;
01212         data.user_data = writerQos->user_data;
01213         data.ownership = writerQos->ownership;
01214         data.ownership_strength = writerQos->ownership_strength;
01215         data.destination_order = writerQos->destination_order;
01216         data.presentation = publisherQos->presentation;
01217         data.partition = publisherQos->partition;
01218         data.topic_data = topicQos->topic_data;
01219         data.group_data = publisherQos->group_data;
01220 
01221         DDS::InstanceHandle_t handle
01222         = bitPublicationDataWriter_->register_instance(data);
01223 
01224         publication->set_handle(handle);
01225 
01226         if (OpenDDS::DCPS::DCPS_debug_level > 0) {
01227           ACE_DEBUG((LM_DEBUG,
01228                      "(%P|%t) DCPS_IR_Domain::publish_publication_bit: [ %d, 0x%x, 0x%x], handle %d.\n",
01229                      data.key.value[0], data.key.value[1], data.key.value[2], handle));
01230         }
01231 
01232         DDS::ReturnCode_t status = bitPublicationDataWriter_->write(data, handle);
01233         if (status != DDS::RETCODE_OK) {
01234           ACE_ERROR((LM_ERROR,
01235                        "(%P|%t) DCPS_IR_Domain::publish_publication_bit: write() status of %d\n",
01236                        status));
01237         }
01238 
01239       } catch (const CORBA::Exception& ex) {
01240         ex._tao_print_exception(
01241           "(%P|%t) ERROR: Exception caught in DCPS_IR_Domain::publish_publication_bit:");
01242       }
01243 
01244     } else {
01245       publication->set_bit_status(1);
01246     }
01247   }
01248 
01249 #else
01250   ACE_UNUSED_ARG(publication);
01251 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01252 
01253 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Domain::publish_subscription_bit ( DCPS_IR_Subscription subscription  ) 

Publish Subscription in the Subscription Built-In Topic.

Definition at line 1105 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), bitSubscriptionDataWriter_, OpenDDS::DCPS::DCPS_debug_level, DDS::DataReaderQos::deadline, DDS::SubscriptionBuiltinTopicData::deadline, DDS::DataReaderQos::destination_order, DDS::SubscriptionBuiltinTopicData::destination_order, DDS::DataReaderQos::durability, DDS::SubscriptionBuiltinTopicData::durability, DCPS_IR_Subscription::get_datareader_qos(), DCPS_IR_Topic_Description::get_dataTypeName(), DCPS_IR_Subscription::get_id(), DCPS_IR_Topic_Description::get_name(), DCPS_IR_Subscription::get_participant_id(), DCPS_IR_Subscription::get_subscriber_qos(), DCPS_IR_Subscription::get_topic(), DCPS_IR_Subscription::get_topic_description(), DCPS_IR_Topic::get_topic_qos(), DDS::SubscriberQos::group_data, DDS::SubscriptionBuiltinTopicData::group_data, DDS::SubscriptionBuiltinTopicData::key, DDS::DataReaderQos::latency_budget, DDS::SubscriptionBuiltinTopicData::latency_budget, DDS::DataReaderQos::liveliness, DDS::SubscriptionBuiltinTopicData::liveliness, LM_DEBUG, DDS::DataReaderQos::ownership, DDS::SubscriptionBuiltinTopicData::ownership, DDS::SubscriptionBuiltinTopicData::participant_key, DDS::SubscriberQos::partition, DDS::SubscriptionBuiltinTopicData::partition, DDS::SubscriberQos::presentation, DDS::SubscriptionBuiltinTopicData::presentation, DDS::DataReaderQos::reliability, DDS::SubscriptionBuiltinTopicData::reliability, DCPS_IR_Subscription::set_bit_status(), DCPS_IR_Subscription::set_handle(), DDS::DataReaderQos::time_based_filter, DDS::SubscriptionBuiltinTopicData::time_based_filter, DDS::TopicQos::topic_data, DDS::SubscriptionBuiltinTopicData::topic_data, DDS::SubscriptionBuiltinTopicData::topic_name, OpenDDS::DCPS::topicIsBIT(), DDS::SubscriptionBuiltinTopicData::type_name, useBIT_, DDS::DataReaderQos::user_data, and DDS::SubscriptionBuiltinTopicData::user_data.

Referenced by DCPS_IR_Topic_Description::add_subscription_reference(), DCPS_IR_Subscription::set_qos(), and DCPS_IR_Topic::set_topic_qos().

01106 {
01107 
01108 #if !defined (DDS_HAS_MINIMUM_BIT)
01109 
01110   if (useBIT_) {
01111     DCPS_IR_Topic_Description* desc =
01112       subscription->get_topic_description();
01113     const char* name = desc->get_name();
01114     const char* type = desc->get_dataTypeName();
01115 
01116     if (!OpenDDS::DCPS::topicIsBIT(name, type)) {
01117       try {
01118         const DDS::DataReaderQos* readerQos = subscription->get_datareader_qos();
01119         const DDS::SubscriberQos* publisherQos = subscription->get_subscriber_qos();
01120 
01121         DCPS_IR_Topic* topic = subscription->get_topic();
01122         const DDS::TopicQos* topicQos = topic->get_topic_qos();
01123 
01124         DDS::SubscriptionBuiltinTopicData data;
01125         get_BuiltinTopicKey(data.key, subscription->get_id());
01126         get_BuiltinTopicKey(data.participant_key,
01127                             subscription->get_participant_id());
01128         data.topic_name = name;
01129         data.type_name = type;
01130         data.durability = readerQos->durability;
01131         data.deadline = readerQos->deadline;
01132         data.latency_budget = readerQos->latency_budget;
01133         data.liveliness = readerQos->liveliness;
01134         data.reliability = readerQos->reliability;
01135         data.ownership = readerQos->ownership;
01136         data.destination_order = readerQos->destination_order;
01137         data.user_data = readerQos->user_data;
01138         data.time_based_filter = readerQos->time_based_filter;
01139         data.presentation = publisherQos->presentation;
01140         data.partition = publisherQos->partition;
01141         data.topic_data = topicQos->topic_data;
01142         data.group_data = publisherQos->group_data;
01143 
01144         DDS::InstanceHandle_t handle
01145         = bitSubscriptionDataWriter_->register_instance(data);
01146 
01147         subscription->set_handle(handle);
01148 
01149         if (OpenDDS::DCPS::DCPS_debug_level > 0) {
01150           ACE_DEBUG((LM_DEBUG,
01151                      "(%P|%t) DCPS_IR_Domain::publish_subscription_bit: [ %d, 0x%x, 0x%x], handle %d.\n",
01152                      data.key.value[0], data.key.value[1], data.key.value[2], handle));
01153         }
01154 
01155         bitSubscriptionDataWriter_->write(data,
01156                                           handle);
01157 
01158       } catch (const CORBA::Exception& ex) {
01159         ex._tao_print_exception(
01160           "(%P|%t) ERROR: Exception caught in DCPS_IR_Domain::publish_subscription_bit:");
01161       }
01162 
01163     } else {
01164       subscription->set_bit_status(1);
01165     }
01166   }
01167 
01168 #else
01169   ACE_UNUSED_ARG(subscription);
01170 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01171 
01172 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Domain::publish_topic_bit ( DCPS_IR_Topic topic  ) 

Publish Topic in the Topic Built-In Topic.

Definition at line 1045 of file DCPS_IR_Domain.cpp.

References CORBA::Exception::_tao_print_exception(), bitTopicDataWriter_, OpenDDS::DCPS::DCPS_debug_level, DDS::TopicQos::deadline, DDS::TopicBuiltinTopicData::deadline, DDS::TopicQos::destination_order, DDS::TopicBuiltinTopicData::destination_order, DDS::TopicQos::durability, DDS::TopicBuiltinTopicData::durability, DDS::TopicQos::durability_service, DDS::TopicBuiltinTopicData::durability_service, DCPS_IR_Topic_Description::get_dataTypeName(), DCPS_IR_Topic::get_id(), DCPS_IR_Topic_Description::get_name(), DCPS_IR_Topic::get_topic_description(), DCPS_IR_Topic::get_topic_qos(), DDS::TopicQos::history, DDS::TopicBuiltinTopicData::history, DDS::TopicBuiltinTopicData::key, DDS::TopicQos::latency_budget, DDS::TopicBuiltinTopicData::latency_budget, DDS::TopicQos::lifespan, DDS::TopicBuiltinTopicData::lifespan, DDS::TopicQos::liveliness, DDS::TopicBuiltinTopicData::liveliness, LM_DEBUG, DDS::TopicBuiltinTopicData::name, DDS::TopicQos::ownership, DDS::TopicBuiltinTopicData::ownership, DDS::TopicQos::reliability, DDS::TopicBuiltinTopicData::reliability, DDS::TopicQos::resource_limits, DDS::TopicBuiltinTopicData::resource_limits, DCPS_IR_Topic::set_bit_status(), DCPS_IR_Topic::set_handle(), DDS::TopicQos::topic_data, DDS::TopicBuiltinTopicData::topic_data, OpenDDS::DCPS::topicIsBIT(), DDS::TopicQos::transport_priority, DDS::TopicBuiltinTopicData::transport_priority, DDS::TopicBuiltinTopicData::type_name, and useBIT_.

Referenced by add_topic_i(), and DCPS_IR_Topic::set_topic_qos().

01046 {
01047 #if !defined (DDS_HAS_MINIMUM_BIT)
01048 
01049   if (useBIT_) {
01050     DCPS_IR_Topic_Description* desc =
01051       topic->get_topic_description();
01052     const char* name = desc->get_name();
01053     const char* type = desc->get_dataTypeName();
01054 
01055     if (!OpenDDS::DCPS::topicIsBIT(name, type)) {
01056       try {
01057         const DDS::TopicQos* topicQos = topic->get_topic_qos();
01058 
01059         DDS::TopicBuiltinTopicData data;
01060         get_BuiltinTopicKey(data.key, topic->get_id());
01061         data.name = name;
01062         data.type_name = type;
01063         data.durability = topicQos->durability;
01064         data.durability_service = topicQos->durability_service;
01065         data.deadline = topicQos->deadline;
01066         data.latency_budget = topicQos->latency_budget;
01067         data.liveliness = topicQos->liveliness;
01068         data.reliability = topicQos->reliability;
01069         data.transport_priority = topicQos->transport_priority;
01070         data.lifespan = topicQos->lifespan;
01071         data.destination_order = topicQos->destination_order;
01072         data.history = topicQos->history;
01073         data.resource_limits = topicQos->resource_limits;
01074         data.ownership = topicQos->ownership;
01075         data.topic_data = topicQos->topic_data;
01076 
01077         DDS::InstanceHandle_t handle =
01078           bitTopicDataWriter_->register_instance(data);
01079 
01080         topic->set_handle(handle);
01081 
01082         if (OpenDDS::DCPS::DCPS_debug_level > 0) {
01083           ACE_DEBUG((LM_DEBUG,
01084                      "(%P|%t) DCPS_IR_Domain::publish_topic_bit: [ %d, 0x%x, 0x%x], handle %d.\n",
01085                      data.key.value[0], data.key.value[1], data.key.value[2], handle));
01086         }
01087 
01088         bitTopicDataWriter_->write(data, handle);
01089 
01090       } catch (const CORBA::Exception& ex) {
01091         ex._tao_print_exception(
01092           "(%P|%t) ERROR: Exception caught in DCPS_IR_Domain::publish_topic_bit:");
01093       }
01094 
01095     } else {
01096       topic->set_bit_status(1);
01097     }
01098   }
01099 
01100 #else
01101   ACE_UNUSED_ARG(topic);
01102 #endif // !defined (DDS_HAS_MINIMUM_BIT)
01103 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Domain::reassociate_built_in_topic_pubs (  ) 

Reassociate the Built-In Topic datawriters This needs to be called after reincarnating from persistence and before the run begins Returns 0 (zero) if successful

Definition at line 525 of file DCPS_IR_Domain.cpp.

00526 {
00527   return 1;
00528 }

void DCPS_IR_Domain::remove_dead_participants (  ) 

Remove any participants currently marked as dead.

Definition at line 951 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), dead, deadParticipants_, OpenDDS::DCPS::RcHandle< T >::in(), LM_ERROR, and remove_participant().

Referenced by TAO_DDS_DCPSInfo_i::add_subscription().

00952 {
00953   if (0 < deadParticipants_.size()) {
00954     DCPS_IR_Participant_rch dead;
00955     DCPS_IR_Participant_Set::iterator iter = deadParticipants_.begin();
00956 
00957     // repeat end() due to the value possibly changing from additional dead
00958     // participants during notifications
00959     while (iter != deadParticipants_.end()) {
00960       dead = *iter;
00961       ++iter;
00962 
00963       OpenDDS::DCPS::RepoIdConverter converter(dead->get_id());
00964       ACE_ERROR((LM_ERROR,
00965                  ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::remove_dead_participants () ")
00966                  ACE_TEXT("Removing dead participant 0x%x id %C\n"),
00967                  dead.in(),
00968                  std::string(converter).c_str()));
00969       deadParticipants_.erase(dead);
00970 
00971       dead->set_alive(0);
00972 
00973       CORBA::Boolean notify_lost = 1;
00974       remove_participant(dead->get_id(), notify_lost);
00975     }
00976   }
00977 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Domain::remove_participant ( const OpenDDS::DCPS::RepoId particpantId,
CORBA::Boolean  notify_lost 
)

Remove the particpant The participant has been deleted if returns successful. Returns 0 if successful. The notify_lost parameter is passed to the remove_associations() See the comments of remove_associations() in DataWriterRemote.idl or DataReaderRemote.idl.

Definition at line 109 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, dispose_participant_bit(), OpenDDS::DCPS::RcHandle< T >::get(), id_, OpenDDS::DCPS::RcHandle< T >::in(), LM_DEBUG, LM_ERROR, participant(), and participants_.

Referenced by remove_dead_participants().

00111 {
00112   DCPS_IR_Participant_Map::iterator where
00113   = this->participants_.find(participantId);
00114 
00115   if (where != this->participants_.end()) {
00116     // Extract the participant from the map.
00117     DCPS_IR_Participant_rch participant = where->second;
00118 
00119     // make sure the participant has cleaned up all publications,
00120     // subscriptions, and any topic references
00121     participant->remove_all_dependents(notify_lost);
00122 
00123     // Then remove it from the map.
00124     this->participants_.erase(where);
00125 
00126     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00127       OpenDDS::DCPS::RepoIdConverter converter(participantId);
00128       ACE_DEBUG((LM_DEBUG,
00129                  ACE_TEXT("(%P|%t) DCPS_IR_Domain::remove_participant: ")
00130                  ACE_TEXT("removed participant %C at 0x%x from domain %d.\n"),
00131                  std::string(converter).c_str(),
00132                  participant.in(),
00133                  id_));
00134     }
00135 
00136     dispose_participant_bit(participant.get());
00137     return 0;
00138 
00139   } else {
00140     OpenDDS::DCPS::RepoIdConverter converter(participantId);
00141     ACE_ERROR((LM_ERROR,
00142                ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::remove_participant: ")
00143                ACE_TEXT("unable to find participant %C in domain %d.\n"),
00144                std::string(converter).c_str(),
00145                id_));
00146     return 1;
00147   }
00148 }

Here is the call graph for this function:

Here is the caller graph for this function:

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::remove_topic ( DCPS_IR_Participant part,
DCPS_IR_Topic *&  topic 
)

Remove the topic The topic has been deleted if returns successful Returns OpenDDS::DCPS::REMOVED if successful

Definition at line 363 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), dispose_topic_bit(), DCPS_IR_Topic_Description::get_dataTypeName(), DCPS_IR_Participant::get_id(), DCPS_IR_Topic::get_id(), DCPS_IR_Topic_Description::get_name(), DCPS_IR_Topic_Description::get_number_topics(), DCPS_IR_Topic::get_topic_description(), id_, LM_ERROR, DCPS_IR_Topic::release(), DCPS_IR_Topic_Description::remove_topic(), remove_topic_description(), DCPS_IR_Participant::remove_topic_reference(), and OpenDDS::DCPS::REMOVED.

Referenced by DCPS_IR_Participant::remove_all_dependents().

00365 {
00366   DCPS_IR_Topic_Description* description = topic->get_topic_description();
00367 
00368   if (description->remove_topic(topic) != 0) {
00369     // An unknown error means that the description may still
00370     // have the topic in its topic set.  We can't remove it.
00371     // The system is an inconsistent state!
00372     throw OpenDDS::DCPS::Invalid_Topic();
00373   }
00374 
00375   if (description->get_number_topics() == 0) {
00376     // Remove the topic description
00377     if (remove_topic_description(description) != 0) {
00378       // An unknown error means that the description may still
00379       // have the topic in its topic set.
00380       ACE_ERROR((LM_ERROR,
00381                  ACE_TEXT("(%P|%t) ERROR: Topic Description %C %C  ")
00382                  ACE_TEXT("was not correctly removed from Domain %d"),
00383                  description->get_name(),
00384                  description->get_dataTypeName(),
00385                  id_));
00386 
00387     }
00388   }
00389 
00390   // description variable is invalid after this point
00391 
00392   if (part->remove_topic_reference(topic->get_id(), topic) != 0) {
00393     OpenDDS::DCPS::RepoIdConverter part_converter(part->get_id());
00394     OpenDDS::DCPS::RepoIdConverter topic_converter(topic->get_id());
00395     ACE_ERROR((LM_ERROR,
00396                ACE_TEXT("(%P|%t) ERROR: Domain %d Topic %C ")
00397                ACE_TEXT("was not correctly removed from Participant %C"),
00398                id_,
00399                std::string(topic_converter).c_str(),
00400                std::string(part_converter).c_str()));
00401   }
00402 
00403   // Dispose the BIT information
00404   dispose_topic_bit(topic);
00405 
00406   topic->release(true);
00407   topic = 0;
00408   return OpenDDS::DCPS::REMOVED;
00409 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Domain::remove_topic_description ( DCPS_IR_Topic_Description desc  )  [private]

Returns 0 if successful.

Definition at line 927 of file DCPS_IR_Domain.cpp.

References ACE_TEXT(), DCPS_IR_Topic_Description::get_name(), id_, LM_ERROR, and topicDescriptions_.

Referenced by remove_topic().

00928 {
00929   DCPS_IR_Topic_Description_Set::iterator where
00930   = this->topicDescriptions_.find(desc->get_name());
00931 
00932   if (where != this->topicDescriptions_.end()) {
00933     this->topicDescriptions_.erase(where);
00934     return 0;
00935 
00936   } else {
00937     ACE_ERROR((LM_ERROR,
00938                ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::remove_topic_description: ")
00939                ACE_TEXT("unable to remove Topic Description 0x%x from domain %d.\n"),
00940                desc,
00941                id_));
00942     return -1;
00943   }
00944 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Domain::remove_topic_id_mapping ( const OpenDDS::DCPS::RepoId topicId  ) 

Remove the topic from the id to topic map. This method should only be called by the DCPS_IR_Topic when deleting the topic.

Definition at line 1452 of file DCPS_IR_Domain.cpp.

References idToTopicMap_.

Referenced by DCPS_IR_Topic::release().

01453 {
01454   IdToTopicMap::iterator map_entry = this->idToTopicMap_.find(topicId);
01455   if (map_entry != this->idToTopicMap_.end())
01456     idToTopicMap_.erase(map_entry);
01457 }

Here is the caller graph for this function:

bool DCPS_IR_Domain::useBIT (  )  const [inline]

Definition at line 176 of file DCPS_IR_Domain.h.

Referenced by TAO_DDS_DCPSInfo_i::domain().

00176 { return useBIT_; }

Here is the caller graph for this function:


Member Data Documentation

DDS::DomainParticipant_var DCPS_IR_Domain::bitParticipant_ [private]

Built-in Topic variables

Definition at line 245 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), init_built_in_topics_topics(), and init_built_in_topics_transport().

DDS::ParticipantBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitParticipantDataWriter_ [private]

Built-in Topic variables

Definition at line 253 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), dispose_participant_bit(), and publish_participant_bit().

DDS::DomainParticipantFactory_var DCPS_IR_Domain::bitParticipantFactory_ [private]

Built-in Topic variables

Definition at line 244 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics().

DDS::DomainParticipantListener_var DCPS_IR_Domain::bitParticipantListener_ [private]

Built-in Topic variables

Definition at line 246 of file DCPS_IR_Domain.h.

DDS::Topic_var DCPS_IR_Domain::bitParticipantTopic_ [private]

Built-in Topic variables

Definition at line 252 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), and init_built_in_topics_topics().

DDS::PublicationBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitPublicationDataWriter_ [private]

Built-in Topic variables

Definition at line 262 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), dispose_publication_bit(), and publish_publication_bit().

DDS::Topic_var DCPS_IR_Domain::bitPublicationTopic_ [private]

Built-in Topic variables

Definition at line 261 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), and init_built_in_topics_topics().

DDS::Publisher_var DCPS_IR_Domain::bitPublisher_ [private]

Built-in Topic variables

Definition at line 247 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), and init_built_in_topics_transport().

DDS::SubscriptionBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitSubscriptionDataWriter_ [private]

Built-in Topic variables

Definition at line 259 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), dispose_subscription_bit(), and publish_subscription_bit().

DDS::Topic_var DCPS_IR_Domain::bitSubscriptionTopic_ [private]

Built-in Topic variables

Definition at line 258 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), and init_built_in_topics_topics().

DDS::TopicBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitTopicDataWriter_ [private]

Built-in Topic variables

Definition at line 256 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), dispose_topic_bit(), and publish_topic_bit().

DDS::Topic_var DCPS_IR_Domain::bitTopicTopic_ [private]

Built-in Topic variables

Definition at line 255 of file DCPS_IR_Domain.h.

Referenced by cleanup_built_in_topics(), and init_built_in_topics_topics().

the dead participants dead participants exist in both this and participants_

Definition at line 226 of file DCPS_IR_Domain.h.

Referenced by add_dead_participant(), dump_to_string(), and remove_dead_participants().

Actual mapping of Id values to Topic object references.

Definition at line 237 of file DCPS_IR_Domain.h.

Referenced by add_topic_i(), find_topic(), and remove_topic_id_mapping().

Participant GUID Id generator. The remaining Entities have their values generated within the containing Participant.

Definition at line 219 of file DCPS_IR_Domain.h.

Referenced by get_next_participant_id(), and last_participant_key().

all the participants

Definition at line 222 of file DCPS_IR_Domain.h.

Referenced by add_participant(), dump_to_string(), participant(), participants(), and remove_participant().

Built-in Topic variables

Definition at line 250 of file DCPS_IR_Domain.h.

Referenced by init_built_in_topics_transport().

bool DCPS_IR_Domain::useBIT_ [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1