OpenDDS::DCPS::LocalParticipant< EndpointManagerType > Class Template Reference

#include <DiscoveryBase.h>

Inheritance diagram for OpenDDS::DCPS::LocalParticipant< EndpointManagerType >:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::LocalParticipant< EndpointManagerType >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef EndpointManagerType::DiscoveredParticipantData DiscoveredParticipantData
typedef EndpointManagerType::TopicDetails TopicDetails

Public Member Functions

 LocalParticipant (const DDS::DomainParticipantQos &qos)
virtual ~LocalParticipant ()
DCPS::RepoId bit_key_to_repo_id (const char *bit_topic_name, const DDS::BuiltinTopicKey_t &key)
void ignore_domain_participant (const RepoId &ignoreId)
bool update_domain_participant_qos (const DDS::DomainParticipantQos &qos)
DCPS::TopicStatus assert_topic (DCPS::RepoId_out topicId, const char *topicName, const char *dataTypeName, const DDS::TopicQos &qos, bool hasDcpsKey)
DCPS::TopicStatus remove_topic (const RepoId &topicId, OPENDDS_STRING &name)
void ignore_topic (const RepoId &ignoreId)
bool update_topic_qos (const RepoId &topicId, const DDS::TopicQos &qos, OPENDDS_STRING &name)
RepoId add_publication (const RepoId &topicId, DCPS::DataWriterCallbacks *publication, const DDS::DataWriterQos &qos, const DCPS::TransportLocatorSeq &transInfo, const DDS::PublisherQos &publisherQos)
void remove_publication (const RepoId &publicationId)
void ignore_publication (const RepoId &ignoreId)
bool update_publication_qos (const RepoId &publicationId, const DDS::DataWriterQos &qos, const DDS::PublisherQos &publisherQos)
RepoId add_subscription (const 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)
void remove_subscription (const RepoId &subscriptionId)
void ignore_subscription (const RepoId &ignoreId)
bool update_subscription_qos (const RepoId &subscriptionId, const DDS::DataReaderQos &qos, const DDS::SubscriberQos &subscriberQos)
bool update_subscription_params (const RepoId &subId, const DDS::StringSeq &params)
void association_complete (const RepoId &localId, const RepoId &remoteId)
DDS::Subscriber_var bit_subscriber () const

Protected Types

typedef DiscoveredParticipantMap::iterator DiscoveredParticipantIter

Protected Member Functions

typedef OPENDDS_MAP_CMP (DCPS::RepoId, DiscoveredParticipant, DCPS::GUID_tKeyLessThan) DiscoveredParticipantMap
virtual EndpointManagerType & endpoint_manager ()=0
void remove_discovered_participant (DiscoveredParticipantIter iter)
DDS::ParticipantBuiltinTopicDataDataReaderImpl * part_bit ()

Protected Attributes

ACE_Thread_Mutex lock_
DDS::Subscriber_var bit_subscriber_
DDS::DomainParticipantQos qos_
DiscoveredParticipantMap participants_

Classes

struct  DiscoveredParticipant

Detailed Description

template<typename EndpointManagerType>
class OpenDDS::DCPS::LocalParticipant< EndpointManagerType >

Definition at line 912 of file DiscoveryBase.h.


Member Typedef Documentation

template<typename EndpointManagerType>
typedef EndpointManagerType::DiscoveredParticipantData OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::DiscoveredParticipantData

Definition at line 914 of file DiscoveryBase.h.

template<typename EndpointManagerType>
typedef DiscoveredParticipantMap::iterator OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::DiscoveredParticipantIter [protected]

Definition at line 1088 of file DiscoveryBase.h.

template<typename EndpointManagerType>
typedef EndpointManagerType::TopicDetails OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::TopicDetails

Definition at line 915 of file DiscoveryBase.h.


Constructor & Destructor Documentation

template<typename EndpointManagerType>
OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::LocalParticipant ( const DDS::DomainParticipantQos qos  )  [inline]

Definition at line 917 of file DiscoveryBase.h.

00918         : qos_(qos)
00919       { }

template<typename EndpointManagerType>
virtual OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::~LocalParticipant (  )  [inline, virtual]

Definition at line 921 of file DiscoveryBase.h.

00921 { }


Member Function Documentation

template<typename EndpointManagerType>
RepoId OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::add_publication ( const RepoId topicId,
DCPS::DataWriterCallbacks publication,
const DDS::DataWriterQos qos,
const DCPS::TransportLocatorSeq transInfo,
const DDS::PublisherQos publisherQos 
) [inline]

Definition at line 993 of file DiscoveryBase.h.

00998       {
00999         return endpoint_manager().add_publication(topicId, publication, qos,
01000                                                   transInfo, publisherQos);
01001       }

template<typename EndpointManagerType>
RepoId OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::add_subscription ( const 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]

Definition at line 1025 of file DiscoveryBase.h.

01033       {
01034         return endpoint_manager().add_subscription(topicId, subscription, qos, transInfo,
01035                                                    subscriberQos, filterClassName, filterExpr, params);
01036       }

template<typename EndpointManagerType>
DCPS::TopicStatus OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::assert_topic ( DCPS::RepoId_out  topicId,
const char *  topicName,
const char *  dataTypeName,
const DDS::TopicQos qos,
bool  hasDcpsKey 
) [inline]

Definition at line 957 of file DiscoveryBase.h.

00960       {
00961         if (std::strlen(topicName) > 256 || std::strlen(dataTypeName) > 256) {
00962           if (DCPS::DCPS_debug_level) {
00963             ACE_DEBUG((LM_ERROR, ACE_TEXT("(%P|%t) ERROR LocalParticipant::assert_topic() - ")
00964                        ACE_TEXT("topic or type name length limit (256) exceeded\n")));
00965           }
00966           return DCPS::PRECONDITION_NOT_MET;
00967         }
00968 
00969         return endpoint_manager().assert_topic(topicId, topicName, dataTypeName, qos, hasDcpsKey);
00970       }

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::association_complete ( const RepoId localId,
const RepoId remoteId 
) [inline]

Definition at line 1067 of file DiscoveryBase.h.

01068       {
01069         endpoint_manager().association_complete(localId, remoteId);
01070       }

template<typename EndpointManagerType>
DCPS::RepoId OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::bit_key_to_repo_id ( const char *  bit_topic_name,
const DDS::BuiltinTopicKey_t key 
) [inline]

Definition at line 923 of file DiscoveryBase.h.

00925       {
00926         if (0 == std::strcmp(bit_topic_name, DCPS::BUILT_IN_PARTICIPANT_TOPIC)) {
00927           RepoId guid;
00928           std::memcpy(guid.guidPrefix, key.value, sizeof(DDS::BuiltinTopicKeyValue));
00929           guid.entityId = ENTITYID_PARTICIPANT;
00930           return guid;
00931 
00932         } else {
00933           return endpoint_manager().bit_key_to_repo_id(bit_topic_name, key);
00934         }
00935       }

template<typename EndpointManagerType>
DDS::Subscriber_var OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::bit_subscriber (  )  const [inline]

Definition at line 1072 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::StaticEndpointManager::pub_bit(), OpenDDS::RTPS::Sedp::pub_bit(), OpenDDS::DCPS::StaticEndpointManager::sub_bit(), OpenDDS::RTPS::Sedp::sub_bit(), and OpenDDS::RTPS::Sedp::topic_bit().

01072 { return bit_subscriber_; }

template<typename EndpointManagerType>
virtual EndpointManagerType& OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::endpoint_manager (  )  [protected, pure virtual]

Implemented in OpenDDS::RTPS::Spdp, and OpenDDS::DCPS::StaticParticipant.

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::ignore_domain_participant ( const RepoId ignoreId  )  [inline]

Definition at line 937 of file DiscoveryBase.h.

00938       {
00939         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
00940         endpoint_manager().ignore(ignoreId);
00941 
00942         const DiscoveredParticipantIter iter = participants_.find(ignoreId);
00943         if (iter != participants_.end()) {
00944           remove_discovered_participant(iter);
00945         }
00946       }

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::ignore_publication ( const RepoId ignoreId  )  [inline]

Definition at line 1010 of file DiscoveryBase.h.

01011       {
01012         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
01013         return endpoint_manager().ignore(ignoreId);
01014       }

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::ignore_subscription ( const RepoId ignoreId  )  [inline]

Definition at line 1045 of file DiscoveryBase.h.

01046       {
01047         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
01048         return endpoint_manager().ignore(ignoreId);
01049       }

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::ignore_topic ( const RepoId ignoreId  )  [inline]

Definition at line 979 of file DiscoveryBase.h.

00980       {
00981         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
00982         endpoint_manager().ignore(ignoreId);
00983       }

template<typename EndpointManagerType>
typedef OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::OPENDDS_MAP_CMP ( DCPS::RepoId  ,
DiscoveredParticipant  ,
DCPS::GUID_tKeyLessThan   
) [protected]

template<typename EndpointManagerType>
DDS::ParticipantBuiltinTopicDataDataReaderImpl* OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::part_bit (  )  [inline, protected]

Reimplemented in OpenDDS::RTPS::Spdp.

Definition at line 1114 of file DiscoveryBase.h.

01115       {
01116         if (!bit_subscriber_.in())
01117           return 0;
01118 
01119         DDS::DataReader_var d =
01120           bit_subscriber_->lookup_datareader(DCPS::BUILT_IN_PARTICIPANT_TOPIC);
01121         return dynamic_cast<DDS::ParticipantBuiltinTopicDataDataReaderImpl*>(d.in());
01122       }

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::remove_discovered_participant ( DiscoveredParticipantIter  iter  )  [inline, protected]

Definition at line 1092 of file DiscoveryBase.h.

Referenced by OpenDDS::RTPS::Spdp::data_received(), OpenDDS::RTPS::Spdp::remove_expired_participants(), and OpenDDS::RTPS::Spdp::~Spdp().

01093       {
01094         bool removed = endpoint_manager().disassociate(iter->second.pdata_);
01095         if (removed) {
01096 #ifndef DDS_HAS_MINIMUM_BIT
01097           DDS::ParticipantBuiltinTopicDataDataReaderImpl* bit = part_bit();
01098           // bit may be null if the DomainParticipant is shutting down
01099           if (bit && iter->second.bit_ih_ != DDS::HANDLE_NIL) {
01100             bit->set_instance_state(iter->second.bit_ih_,
01101                                     DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE);
01102           }
01103 #endif /* DDS_HAS_MINIMUM_BIT */
01104           if (DCPS::DCPS_debug_level > 3) {
01105             DCPS::GuidConverter conv(iter->first);
01106             ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) LocalParticipant::remove_discovered_participant")
01107                        ACE_TEXT(" - erasing %C\n"), OPENDDS_STRING(conv).c_str()));
01108           }
01109           participants_.erase(iter);
01110         }
01111       }

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::remove_publication ( const RepoId publicationId  )  [inline]

Definition at line 1004 of file DiscoveryBase.h.

01005       {
01006         endpoint_manager().remove_publication(publicationId);
01007       }

template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::remove_subscription ( const RepoId subscriptionId  )  [inline]

Definition at line 1039 of file DiscoveryBase.h.

01040       {
01041         endpoint_manager().remove_subscription(subscriptionId);
01042       }

template<typename EndpointManagerType>
DCPS::TopicStatus OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::remove_topic ( const RepoId topicId,
OPENDDS_STRING &  name 
) [inline]

Definition at line 973 of file DiscoveryBase.h.

00974       {
00975         return endpoint_manager().remove_topic(topicId, name);
00976       }

template<typename EndpointManagerType>
bool OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::update_domain_participant_qos ( const DDS::DomainParticipantQos qos  )  [inline]

Definition at line 949 of file DiscoveryBase.h.

00950       {
00951         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, false);
00952         qos_ = qos;
00953         return true;
00954       }

template<typename EndpointManagerType>
bool OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::update_publication_qos ( const RepoId publicationId,
const DDS::DataWriterQos qos,
const DDS::PublisherQos publisherQos 
) [inline]

Definition at line 1017 of file DiscoveryBase.h.

01020       {
01021         return endpoint_manager().update_publication_qos(publicationId, qos, publisherQos);
01022       }

template<typename EndpointManagerType>
bool OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::update_subscription_params ( const RepoId subId,
const DDS::StringSeq params 
) [inline]

Definition at line 1060 of file DiscoveryBase.h.

01062       {
01063         return endpoint_manager().update_subscription_params(subId, params);
01064       }

template<typename EndpointManagerType>
bool OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::update_subscription_qos ( const RepoId subscriptionId,
const DDS::DataReaderQos qos,
const DDS::SubscriberQos subscriberQos 
) [inline]

Definition at line 1052 of file DiscoveryBase.h.

01055       {
01056         return endpoint_manager().update_subscription_qos(subscriptionId, qos, subscriberQos);
01057       }

template<typename EndpointManagerType>
bool OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::update_topic_qos ( const RepoId topicId,
const DDS::TopicQos qos,
OPENDDS_STRING &  name 
) [inline]

Definition at line 986 of file DiscoveryBase.h.

00988       {
00989         return endpoint_manager().update_topic_qos(topicId, qos, name);
00990       }


Member Data Documentation

template<typename EndpointManagerType>
DDS::Subscriber_var OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::bit_subscriber_ [protected]

Definition at line 1126 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::StaticParticipant::fini_bit(), OpenDDS::RTPS::Spdp::fini_bit(), OpenDDS::DCPS::StaticParticipant::init_bit(), OpenDDS::RTPS::Spdp::init_bit(), and OpenDDS::RTPS::Spdp::part_bit().

template<typename EndpointManagerType>
ACE_Thread_Mutex OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::lock_ [protected]

Definition at line 1125 of file DiscoveryBase.h.

Referenced by OpenDDS::RTPS::Spdp::data_received(), OpenDDS::RTPS::Spdp::remove_expired_participants(), OpenDDS::RTPS::Spdp::SpdpTransport::write(), OpenDDS::RTPS::Spdp::~Spdp(), and OpenDDS::RTPS::Spdp::SpdpTransport::~SpdpTransport().

template<typename EndpointManagerType>
DiscoveredParticipantMap OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::participants_ [protected]

Definition at line 1128 of file DiscoveryBase.h.

Referenced by OpenDDS::RTPS::Spdp::associated(), OpenDDS::RTPS::Spdp::data_received(), OpenDDS::RTPS::Spdp::get_discovered_participant_ids(), OpenDDS::RTPS::Spdp::has_discovered_participant(), OpenDDS::RTPS::Spdp::remove_expired_participants(), and OpenDDS::RTPS::Spdp::~Spdp().

template<typename EndpointManagerType>
DDS::DomainParticipantQos OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::qos_ [protected]

Definition at line 1127 of file DiscoveryBase.h.

Referenced by OpenDDS::RTPS::Spdp::SpdpTransport::write_i().


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