OpenDDS::DCPS::PeerDiscovery< Participant > Class Template Reference

#include <DiscoveryBase.h>

Inheritance diagram for OpenDDS::DCPS::PeerDiscovery< Participant >:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::PeerDiscovery< Participant >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Participant::TopicDetails TopicDetails

Public Member Functions

 PeerDiscovery (const RepoKey &key)
 ~PeerDiscovery ()
virtual DDS::Subscriber_ptr init_bit (DomainParticipantImpl *participant)
virtual void fini_bit (DCPS::DomainParticipantImpl *participant)
virtual OpenDDS::DCPS::RepoId bit_key_to_repo_id (DCPS::DomainParticipantImpl *participant, const char *bit_topic_name, const DDS::BuiltinTopicKey_t &key) const
virtual bool attach_participant (DDS::DomainId_t, const OpenDDS::DCPS::RepoId &)
virtual bool remove_domain_participant (DDS::DomainId_t domain_id, const OpenDDS::DCPS::RepoId &participantId)
virtual bool ignore_domain_participant (DDS::DomainId_t domain, const OpenDDS::DCPS::RepoId &myParticipantId, const OpenDDS::DCPS::RepoId &ignoreId)
virtual bool update_domain_participant_qos (DDS::DomainId_t domain, const OpenDDS::DCPS::RepoId &participant, const DDS::DomainParticipantQos &qos)
virtual DCPS::TopicStatus assert_topic (OpenDDS::DCPS::RepoId_out topicId, DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const char *topicName, const char *dataTypeName, const DDS::TopicQos &qos, bool hasDcpsKey)
virtual DCPS::TopicStatus find_topic (DDS::DomainId_t domainId, const char *topicName, CORBA::String_out dataTypeName, DDS::TopicQos_out qos, OpenDDS::DCPS::RepoId_out topicId)
virtual DCPS::TopicStatus remove_topic (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &topicId)
virtual bool ignore_topic (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &myParticipantId, const OpenDDS::DCPS::RepoId &ignoreId)
virtual bool update_topic_qos (const OpenDDS::DCPS::RepoId &topicId, DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const DDS::TopicQos &qos)
virtual OpenDDS::DCPS::RepoId add_publication (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &topicId, DCPS::DataWriterCallbacks *publication, const DDS::DataWriterQos &qos, const DCPS::TransportLocatorSeq &transInfo, const DDS::PublisherQos &publisherQos)
virtual bool remove_publication (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &publicationId)
virtual bool ignore_publication (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &ignoreId)
virtual bool update_publication_qos (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &partId, const OpenDDS::DCPS::RepoId &dwId, const DDS::DataWriterQos &qos, const DDS::PublisherQos &publisherQos)
virtual OpenDDS::DCPS::RepoId add_subscription (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &topicId, DCPS::DataReaderCallbacks *subscription, const DDS::DataReaderQos &qos, const DCPS::TransportLocatorSeq &transInfo, const DDS::SubscriberQos &subscriberQos, const char *filterClassName, const char *filterExpr, const DDS::StringSeq &params)
virtual bool remove_subscription (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &subscriptionId)
virtual bool ignore_subscription (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &ignoreId)
virtual bool update_subscription_qos (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &partId, const OpenDDS::DCPS::RepoId &drId, const DDS::DataReaderQos &qos, const DDS::SubscriberQos &subQos)
virtual bool update_subscription_params (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &partId, const OpenDDS::DCPS::RepoId &subId, const DDS::StringSeq &params)
virtual void association_complete (DDS::DomainId_t domainId, const OpenDDS::DCPS::RepoId &participantId, const OpenDDS::DCPS::RepoId &localId, const OpenDDS::DCPS::RepoId &remoteId)
ACE_Reactor * reactor ()

Protected Types

typedef DCPS::RcHandle< Participant > ParticipantHandle

Protected Member Functions

typedef OPENDDS_MAP_CMP (DCPS::RepoId, ParticipantHandle, DCPS::GUID_tKeyLessThan) ParticipantMap
typedef OPENDDS_MAP (DDS::DomainId_t, ParticipantMap) DomainParticipantMap
ParticipantHandle get_part (const DDS::DomainId_t domain_id, const OpenDDS::DCPS::RepoId &part_id) const
void create_bit_dr (DDS::TopicDescription_ptr topic, const char *type, DCPS::SubscriberImpl *sub, const DDS::DataReaderQos &qos)
 OPENDDS_MAP (DDS::DomainId_t, OPENDDS_MAP(OPENDDS_STRING, TopicDetails)) topics_
 OPENDDS_MAP (DDS::DomainId_t, OPENDDS_MAP(OPENDDS_STRING, unsigned int)) topic_use_

Protected Attributes

ACE_Thread_Mutex lock_
OpenDDS::DCPS::PeerDiscovery::ReactorRunner reactor_runner_
DomainParticipantMap participants_

Classes

struct  ReactorRunner

Detailed Description

template<typename Participant>
class OpenDDS::DCPS::PeerDiscovery< Participant >

Definition at line 1132 of file DiscoveryBase.h.


Member Typedef Documentation

template<typename Participant>
typedef DCPS::RcHandle<Participant> OpenDDS::DCPS::PeerDiscovery< Participant >::ParticipantHandle [protected]

Definition at line 1463 of file DiscoveryBase.h.

template<typename Participant>
typedef Participant::TopicDetails OpenDDS::DCPS::PeerDiscovery< Participant >::TopicDetails

Definition at line 1134 of file DiscoveryBase.h.


Constructor & Destructor Documentation

template<typename Participant>
OpenDDS::DCPS::PeerDiscovery< Participant >::PeerDiscovery ( const RepoKey key  )  [inline, explicit]

Definition at line 1136 of file DiscoveryBase.h.

01136 : Discovery(key) { }

template<typename Participant>
OpenDDS::DCPS::PeerDiscovery< Participant >::~PeerDiscovery (  )  [inline]

Definition at line 1138 of file DiscoveryBase.h.

01138                        {
01139         reactor_runner_.end();
01140       }


Member Function Documentation

template<typename Participant>
virtual OpenDDS::DCPS::RepoId OpenDDS::DCPS::PeerDiscovery< Participant >::add_publication ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId topicId,
DCPS::DataWriterCallbacks publication,
const DDS::DataWriterQos qos,
const DCPS::TransportLocatorSeq transInfo,
const DDS::PublisherQos publisherQos 
) [inline, virtual]

add the passed in publication into discovery. Discovery does not participate in memory management for the publication pointer, so it requires that the publication pointer remain valid until remove_publication is called.

Implements OpenDDS::DCPS::Discovery.

Definition at line 1357 of file DiscoveryBase.h.

01364       {
01365         return get_part(domainId, participantId)->add_publication(
01366                                                                   topicId, publication, qos, transInfo, publisherQos);
01367       }

template<typename Participant>
virtual OpenDDS::DCPS::RepoId OpenDDS::DCPS::PeerDiscovery< Participant >::add_subscription ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId topicId,
DCPS::DataReaderCallbacks subscription,
const DDS::DataReaderQos qos,
const DCPS::TransportLocatorSeq transInfo,
const DDS::SubscriberQos subscriberQos,
const char *  filterClassName,
const char *  filterExpr,
const DDS::StringSeq params 
) [inline, virtual]

add the passed in subscription into discovery. Discovery does not participate in memory management for the subscription pointer, so it requires that the subscription pointer remain valid until remove_subscription is called.

Implements OpenDDS::DCPS::Discovery.

Definition at line 1395 of file DiscoveryBase.h.

01405       {
01406         return get_part(domainId, participantId)->add_subscription(topicId, subscription, qos, transInfo, subscriberQos, filterClassName, filterExpr, params);
01407       }

template<typename Participant>
virtual DCPS::TopicStatus OpenDDS::DCPS::PeerDiscovery< Participant >::assert_topic ( OpenDDS::DCPS::RepoId_out  topicId,
DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const char *  topicName,
const char *  dataTypeName,
const DDS::TopicQos qos,
bool  hasDcpsKey 
) [inline, virtual]

Definition at line 1243 of file DiscoveryBase.h.

01250       {
01251         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, DCPS::INTERNAL_ERROR);
01252         typename OPENDDS_MAP(DDS::DomainId_t,
01253                              OPENDDS_MAP(OPENDDS_STRING, TopicDetails) )::iterator topic_it =
01254           topics_.find(domainId);
01255         if (topic_it != topics_.end()) {
01256           const typename OPENDDS_MAP(OPENDDS_STRING, TopicDetails)::iterator it =
01257             topic_it->second.find(topicName);
01258           if (it != topic_it->second.end()
01259               && it->second.data_type_ != dataTypeName) {
01260             topicId = GUID_UNKNOWN;
01261             return DCPS::CONFLICTING_TYPENAME;
01262           }
01263         }
01264 
01265         // Verified its safe to hold lock during call to assert_topic
01266         const DCPS::TopicStatus stat =
01267           participants_[domainId][participantId]->assert_topic(topicId, topicName,
01268                                                                dataTypeName, qos,
01269                                                                hasDcpsKey);
01270         if (stat == DCPS::CREATED || stat == DCPS::FOUND) { // qos change (FOUND)
01271           TopicDetails& td = topics_[domainId][topicName];
01272           td.data_type_ = dataTypeName;
01273           td.qos_ = qos;
01274           td.repo_id_ = topicId;
01275           ++topic_use_[domainId][topicName];
01276         }
01277         return stat;
01278       }

template<typename Participant>
virtual void OpenDDS::DCPS::PeerDiscovery< Participant >::association_complete ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId localId,
const OpenDDS::DCPS::RepoId remoteId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1442 of file DiscoveryBase.h.

01446       {
01447         get_part(domainId, participantId)->association_complete(localId, remoteId);
01448       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::attach_participant ( DDS::DomainId_t  ,
const OpenDDS::DCPS::RepoId  
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1198 of file DiscoveryBase.h.

01200       {
01201         return false; // This is just for DCPSInfoRepo?
01202       }

template<typename Participant>
virtual OpenDDS::DCPS::RepoId OpenDDS::DCPS::PeerDiscovery< Participant >::bit_key_to_repo_id ( DCPS::DomainParticipantImpl participant,
const char *  bit_topic_name,
const DDS::BuiltinTopicKey_t key 
) const [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1190 of file DiscoveryBase.h.

01193       {
01194         return get_part(participant->get_domain_id(), participant->get_id())
01195           ->bit_key_to_repo_id(bit_topic_name, key);
01196       }

template<typename Participant>
void OpenDDS::DCPS::PeerDiscovery< Participant >::create_bit_dr ( DDS::TopicDescription_ptr  topic,
const char *  type,
DCPS::SubscriberImpl sub,
const DDS::DataReaderQos qos 
) [inline, protected]

Definition at line 1483 of file DiscoveryBase.h.

01486       {
01487         using namespace DCPS;
01488         TopicDescriptionImpl* bit_topic_i =
01489           dynamic_cast<TopicDescriptionImpl*>(topic);
01490 
01491         DDS::DomainParticipant_var participant = sub->get_participant();
01492         DomainParticipantImpl* participant_i =
01493           dynamic_cast<DomainParticipantImpl*>(participant.in());
01494 
01495         TypeSupport_var type_support =
01496           Registered_Data_Types->lookup(participant, type);
01497 
01498         DDS::DataReader_var dr = type_support->create_datareader();
01499         OpenDDS::DCPS::DataReaderImpl* dri = dynamic_cast<OpenDDS::DCPS::DataReaderImpl*>(dr.in());
01500 
01501         dri->init(bit_topic_i, qos, 0 /*listener*/, 0 /*mask*/,
01502                   participant_i, sub, dr);
01503         dri->disable_transport();
01504         dri->enable();
01505       }

template<typename Participant>
virtual DCPS::TopicStatus OpenDDS::DCPS::PeerDiscovery< Participant >::find_topic ( DDS::DomainId_t  domainId,
const char *  topicName,
CORBA::String_out  dataTypeName,
DDS::TopicQos_out  qos,
OpenDDS::DCPS::RepoId_out  topicId 
) [inline, virtual]

Definition at line 1280 of file DiscoveryBase.h.

01283       {
01284         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, DCPS::INTERNAL_ERROR);
01285         typename OPENDDS_MAP(DDS::DomainId_t,
01286                              OPENDDS_MAP(OPENDDS_STRING, TopicDetails) )::iterator topic_it =
01287           topics_.find(domainId);
01288         if (topic_it == topics_.end()) {
01289           return DCPS::NOT_FOUND;
01290         }
01291         typename OPENDDS_MAP(OPENDDS_STRING, TopicDetails)::iterator iter =
01292           topic_it->second.find(topicName);
01293         if (iter == topic_it->second.end()) {
01294           return DCPS::NOT_FOUND;
01295         }
01296         TopicDetails& td = iter->second;
01297         dataTypeName = td.data_type_.c_str();
01298         qos = new DDS::TopicQos(td.qos_);
01299         topicId = td.repo_id_;
01300         ++topic_use_[domainId][topicName];
01301         return DCPS::FOUND;
01302       }

template<typename Participant>
virtual void OpenDDS::DCPS::PeerDiscovery< Participant >::fini_bit ( DCPS::DomainParticipantImpl participant  )  [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1185 of file DiscoveryBase.h.

01186       {
01187         get_part(participant->get_domain_id(), participant->get_id())->fini_bit();
01188       }

template<typename Participant>
ParticipantHandle OpenDDS::DCPS::PeerDiscovery< Participant >::get_part ( const DDS::DomainId_t  domain_id,
const OpenDDS::DCPS::RepoId part_id 
) const [inline, protected]

Definition at line 1468 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::StaticDiscovery::add_domain_participant(), and OpenDDS::RTPS::RtpsDiscovery::signal_liveliness().

01470       {
01471         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, ParticipantHandle());
01472         typename DomainParticipantMap::const_iterator domain = participants_.find(domain_id);
01473         if (domain == participants_.end()) {
01474           return ParticipantHandle();
01475         }
01476         typename ParticipantMap::const_iterator part = domain->second.find(part_id);
01477         if (part == domain->second.end()) {
01478           return ParticipantHandle();
01479         }
01480         return part->second;
01481       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::ignore_domain_participant ( DDS::DomainId_t  domain,
const OpenDDS::DCPS::RepoId myParticipantId,
const OpenDDS::DCPS::RepoId ignoreId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1228 of file DiscoveryBase.h.

01231       {
01232         get_part(domain, myParticipantId)->ignore_domain_participant(ignoreId);
01233         return true;
01234       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::ignore_publication ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId ignoreId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1377 of file DiscoveryBase.h.

01380       {
01381         get_part(domainId, participantId)->ignore_publication(ignoreId);
01382         return true;
01383       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::ignore_subscription ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId ignoreId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1417 of file DiscoveryBase.h.

01420       {
01421         get_part(domainId, participantId)->ignore_subscription(ignoreId);
01422         return true;
01423       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::ignore_topic ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId myParticipantId,
const OpenDDS::DCPS::RepoId ignoreId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1336 of file DiscoveryBase.h.

01338       {
01339         get_part(domainId, myParticipantId)->ignore_topic(ignoreId);
01340         return true;
01341       }

template<typename Participant>
virtual DDS::Subscriber_ptr OpenDDS::DCPS::PeerDiscovery< Participant >::init_bit ( DomainParticipantImpl participant  )  [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1142 of file DiscoveryBase.h.

01142                                                                              {
01143         using namespace DCPS;
01144         if (create_bit_topics(participant) != DDS::RETCODE_OK) {
01145           return 0;
01146         }
01147 
01148         DDS::Subscriber_var bit_subscriber =
01149           participant->create_subscriber(SUBSCRIBER_QOS_DEFAULT,
01150                                          DDS::SubscriberListener::_nil(),
01151                                          DEFAULT_STATUS_MASK);
01152         SubscriberImpl* sub = dynamic_cast<SubscriberImpl*>(bit_subscriber.in());
01153 
01154         DDS::DataReaderQos dr_qos;
01155         sub->get_default_datareader_qos(dr_qos);
01156         dr_qos.durability.kind = DDS::TRANSIENT_LOCAL_DURABILITY_QOS;
01157 
01158 #ifndef DDS_HAS_MINIMUM_BIT
01159         DDS::TopicDescription_var bit_part_topic =
01160           participant->lookup_topicdescription(BUILT_IN_PARTICIPANT_TOPIC);
01161         create_bit_dr(bit_part_topic, BUILT_IN_PARTICIPANT_TOPIC_TYPE,
01162                       sub, dr_qos);
01163 
01164         DDS::TopicDescription_var bit_topic_topic =
01165           participant->lookup_topicdescription(BUILT_IN_TOPIC_TOPIC);
01166         create_bit_dr(bit_topic_topic, BUILT_IN_TOPIC_TOPIC_TYPE,
01167                       sub, dr_qos);
01168 
01169         DDS::TopicDescription_var bit_pub_topic =
01170           participant->lookup_topicdescription(BUILT_IN_PUBLICATION_TOPIC);
01171         create_bit_dr(bit_pub_topic, BUILT_IN_PUBLICATION_TOPIC_TYPE,
01172                       sub, dr_qos);
01173 
01174         DDS::TopicDescription_var bit_sub_topic =
01175           participant->lookup_topicdescription(BUILT_IN_SUBSCRIPTION_TOPIC);
01176         create_bit_dr(bit_sub_topic, BUILT_IN_SUBSCRIPTION_TOPIC_TYPE,
01177                       sub, dr_qos);
01178 #endif /* DDS_HAS_MINIMUM_BIT */
01179 
01180         get_part(participant->get_domain_id(), participant->get_id())->init_bit(bit_subscriber);
01181 
01182         return bit_subscriber._retn();
01183       }

template<typename Participant>
OpenDDS::DCPS::PeerDiscovery< Participant >::OPENDDS_MAP ( DDS::DomainId_t  ,
OPENDDS_MAP(OPENDDS_STRING, unsigned int)   
) [protected]

template<typename Participant>
OpenDDS::DCPS::PeerDiscovery< Participant >::OPENDDS_MAP ( DDS::DomainId_t  ,
OPENDDS_MAP(OPENDDS_STRING, TopicDetails  
) [protected]

template<typename Participant>
typedef OpenDDS::DCPS::PeerDiscovery< Participant >::OPENDDS_MAP ( DDS::DomainId_t  ,
ParticipantMap   
) [protected]

template<typename Participant>
typedef OpenDDS::DCPS::PeerDiscovery< Participant >::OPENDDS_MAP_CMP ( DCPS::RepoId  ,
ParticipantHandle  ,
DCPS::GUID_tKeyLessThan   
) [protected]

template<typename Participant>
ACE_Reactor* OpenDDS::DCPS::PeerDiscovery< Participant >::reactor (  )  [inline]

Definition at line 1451 of file DiscoveryBase.h.

Referenced by OpenDDS::RTPS::Spdp::reactor().

01452       {
01453         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, reactor_runner_.mtx_, 0);
01454         if (!reactor_runner_.reactor_) {
01455           reactor_runner_.reactor_ = new ACE_Reactor(new ACE_Select_Reactor, true);
01456           reactor_runner_.activate();
01457         }
01458         return reactor_runner_.reactor_;
01459       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::remove_domain_participant ( DDS::DomainId_t  domain_id,
const OpenDDS::DCPS::RepoId participantId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1204 of file DiscoveryBase.h.

01206       {
01207         // Use reference counting to ensure participant
01208         // does not get deleted until lock as been released.
01209         ParticipantHandle participant;
01210         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, false);
01211         typename DomainParticipantMap::iterator domain = participants_.find(domain_id);
01212         if (domain == participants_.end()) {
01213           return false;
01214         }
01215         typename ParticipantMap::iterator part = domain->second.find(participantId);
01216         if (part == domain->second.end()) {
01217           return false;
01218         }
01219         participant = part->second;
01220         domain->second.erase(part);
01221         if (domain->second.empty()) {
01222           participants_.erase(domain);
01223         }
01224 
01225         return true;
01226       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::remove_publication ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId publicationId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1369 of file DiscoveryBase.h.

01372       {
01373         get_part(domainId, participantId)->remove_publication(publicationId);
01374         return true;
01375       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::remove_subscription ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId subscriptionId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1409 of file DiscoveryBase.h.

01412       {
01413         get_part(domainId, participantId)->remove_subscription(subscriptionId);
01414         return true;
01415       }

template<typename Participant>
virtual DCPS::TopicStatus OpenDDS::DCPS::PeerDiscovery< Participant >::remove_topic ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const OpenDDS::DCPS::RepoId topicId 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1304 of file DiscoveryBase.h.

01307       {
01308         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, DCPS::INTERNAL_ERROR);
01309         typename OPENDDS_MAP(DDS::DomainId_t,
01310                              OPENDDS_MAP(OPENDDS_STRING, TopicDetails) )::iterator topic_it =
01311           topics_.find(domainId);
01312         if (topic_it == topics_.end()) {
01313           return DCPS::NOT_FOUND;
01314         }
01315 
01316         OPENDDS_STRING name;
01317         // Safe to hold lock while calling remove topic
01318         const DCPS::TopicStatus stat =
01319           participants_[domainId][participantId]->remove_topic(topicId, name);
01320 
01321         if (stat == DCPS::REMOVED) {
01322           if (0 == --topic_use_[domainId][name]) {
01323             topic_use_[domainId].erase(name);
01324             if (topic_it->second.empty()) {
01325               topic_use_.erase(domainId);
01326             }
01327             topic_it->second.erase(name);
01328             if (topic_it->second.empty()) {
01329               topics_.erase(topic_it);
01330             }
01331           }
01332         }
01333         return stat;
01334       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::update_domain_participant_qos ( DDS::DomainId_t  domain,
const OpenDDS::DCPS::RepoId participant,
const DDS::DomainParticipantQos qos 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1236 of file DiscoveryBase.h.

01239       {
01240         return get_part(domain, participant)->update_domain_participant_qos(qos);
01241       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::update_publication_qos ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId partId,
const OpenDDS::DCPS::RepoId dwId,
const DDS::DataWriterQos qos,
const DDS::PublisherQos publisherQos 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1385 of file DiscoveryBase.h.

01390       {
01391         return get_part(domainId, partId)->update_publication_qos(dwId, qos,
01392                                                                   publisherQos);
01393       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::update_subscription_params ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId partId,
const OpenDDS::DCPS::RepoId subId,
const DDS::StringSeq params 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1434 of file DiscoveryBase.h.

01438       {
01439         return get_part(domainId, partId)->update_subscription_params(subId, params);
01440       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::update_subscription_qos ( DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId partId,
const OpenDDS::DCPS::RepoId drId,
const DDS::DataReaderQos qos,
const DDS::SubscriberQos subQos 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1425 of file DiscoveryBase.h.

01430       {
01431         return get_part(domainId, partId)->update_subscription_qos(drId, qos, subQos);
01432       }

template<typename Participant>
virtual bool OpenDDS::DCPS::PeerDiscovery< Participant >::update_topic_qos ( const OpenDDS::DCPS::RepoId topicId,
DDS::DomainId_t  domainId,
const OpenDDS::DCPS::RepoId participantId,
const DDS::TopicQos qos 
) [inline, virtual]

Implements OpenDDS::DCPS::Discovery.

Definition at line 1343 of file DiscoveryBase.h.

01345       {
01346         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, false);
01347         OPENDDS_STRING name;
01348         // Safe to hold lock while calling update_topic_qos
01349         if (participants_[domainId][participantId]->update_topic_qos(topicId,
01350                                                                      qos, name)) {
01351           topics_[domainId][name].qos_ = qos;
01352           return true;
01353         }
01354         return false;
01355       }


Member Data Documentation

template<typename Participant>
ACE_Thread_Mutex OpenDDS::DCPS::PeerDiscovery< Participant >::lock_ [mutable, protected]

Definition at line 1507 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::StaticDiscovery::add_domain_participant(), and OpenDDS::RTPS::RtpsDiscovery::add_domain_participant().

template<typename Participant>
DomainParticipantMap OpenDDS::DCPS::PeerDiscovery< Participant >::participants_ [protected]

Definition at line 1537 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::StaticDiscovery::add_domain_participant(), and OpenDDS::RTPS::RtpsDiscovery::add_domain_participant().

template<typename Participant>
OpenDDS::DCPS::PeerDiscovery::ReactorRunner OpenDDS::DCPS::PeerDiscovery< Participant >::reactor_runner_ [protected]


The documentation for this class was generated from the following file:
Generated on Fri Feb 12 20:06:15 2016 for OpenDDS by  doxygen 1.4.7