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.

Classes

struct  DiscoveredParticipant

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)
virtual bool announce_domain_participant_qos ()
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
typedef
DiscoveredParticipantMap::const_iterator 
DiscoveredParticipantConstIter

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)
ParticipantBuiltinTopicDataDataReaderImplpart_bit ()

Protected Attributes

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

Detailed Description

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

Definition at line 1254 of file DiscoveryBase.h.


Member Typedef Documentation

template<typename EndpointManagerType>
typedef DiscoveredParticipantMap::const_iterator OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::DiscoveredParticipantConstIter [protected]

Definition at line 1492 of file DiscoveryBase.h.

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

Definition at line 1256 of file DiscoveryBase.h.

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

Definition at line 1490 of file DiscoveryBase.h.

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

Definition at line 1257 of file DiscoveryBase.h.


Constructor & Destructor Documentation

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

Definition at line 1259 of file DiscoveryBase.h.

01260         : qos_(qos)
01261       { }

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

Definition at line 1263 of file DiscoveryBase.h.

01263 { }


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 1341 of file DiscoveryBase.h.

01346       {
01347         return endpoint_manager().add_publication(topicId, publication, qos,
01348                                                   transInfo, publisherQos);
01349       }

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 1373 of file DiscoveryBase.h.

01381       {
01382         return endpoint_manager().add_subscription(topicId, subscription, qos, transInfo,
01383                                                    subscriberQos, filterClassName, filterExpr, params);
01384       }

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

Reimplemented in OpenDDS::RTPS::Spdp.

Definition at line 1291 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::LocalParticipant< Sedp >::update_domain_participant_qos().

01292       {
01293         return true;
01294       }

Here is the caller graph for this function:

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 1305 of file DiscoveryBase.h.

01308       {
01309         if (std::strlen(topicName) > 256 || std::strlen(dataTypeName) > 256) {
01310           if (DCPS::DCPS_debug_level) {
01311             ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR LocalParticipant::assert_topic() - ")
01312                        ACE_TEXT("topic or type name length limit (256) exceeded\n")));
01313           }
01314           return DCPS::PRECONDITION_NOT_MET;
01315         }
01316 
01317         return endpoint_manager().assert_topic(topicId, topicName, dataTypeName, qos, hasDcpsKey);
01318       }

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

Definition at line 1415 of file DiscoveryBase.h.

01416       {
01417         endpoint_manager().association_complete(localId, remoteId);
01418       }

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 1265 of file DiscoveryBase.h.

01267       {
01268         if (0 == std::strcmp(bit_topic_name, DCPS::BUILT_IN_PARTICIPANT_TOPIC)) {
01269           RepoId guid;
01270           std::memcpy(guid.guidPrefix, key.value, sizeof(DDS::BuiltinTopicKeyValue));
01271           guid.entityId = ENTITYID_PARTICIPANT;
01272           return guid;
01273 
01274         } else {
01275           return endpoint_manager().bit_key_to_repo_id(bit_topic_name, key);
01276         }
01277       }

template<typename EndpointManagerType>
DDS::Subscriber_var OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::bit_subscriber (  )  const [inline]
template<typename EndpointManagerType>
virtual EndpointManagerType& OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::endpoint_manager (  )  [protected, pure virtual]
template<typename EndpointManagerType>
void OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::ignore_domain_participant ( const RepoId ignoreId  )  [inline]

Definition at line 1279 of file DiscoveryBase.h.

01280       {
01281         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
01282         endpoint_manager().ignore(ignoreId);
01283 
01284         const DiscoveredParticipantIter iter = participants_.find(ignoreId);
01285         if (iter != participants_.end()) {
01286           remove_discovered_participant(iter);
01287         }
01288       }

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

Definition at line 1358 of file DiscoveryBase.h.

01359       {
01360         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
01361         return endpoint_manager().ignore(ignoreId);
01362       }

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

Definition at line 1393 of file DiscoveryBase.h.

01394       {
01395         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
01396         return endpoint_manager().ignore(ignoreId);
01397       }

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

Definition at line 1327 of file DiscoveryBase.h.

01328       {
01329         ACE_GUARD(ACE_Thread_Mutex, g, lock_);
01330         endpoint_manager().ignore(ignoreId);
01331       }

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

Reimplemented in OpenDDS::RTPS::Spdp.

Definition at line 1522 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::LocalParticipant< Sedp >::remove_discovered_participant().

01523       {
01524         if (!bit_subscriber_.in())
01525           return 0;
01526 
01527         DDS::DataReader_var d =
01528           bit_subscriber_->lookup_datareader(DCPS::BUILT_IN_PARTICIPANT_TOPIC);
01529         return dynamic_cast<ParticipantBuiltinTopicDataDataReaderImpl*>(d.in());
01530       }

Here is the caller graph for this function:

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

Definition at line 1500 of file DiscoveryBase.h.

Referenced by OpenDDS::DCPS::LocalParticipant< Sedp >::ignore_domain_participant().

01501       {
01502         bool removed = endpoint_manager().disassociate(iter->second.pdata_);
01503         if (removed) {
01504 #ifndef DDS_HAS_MINIMUM_BIT
01505           ParticipantBuiltinTopicDataDataReaderImpl* bit = part_bit();
01506           // bit may be null if the DomainParticipant is shutting down
01507           if (bit && iter->second.bit_ih_ != DDS::HANDLE_NIL) {
01508             bit->set_instance_state(iter->second.bit_ih_,
01509                                     DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE);
01510           }
01511 #endif /* DDS_HAS_MINIMUM_BIT */
01512           if (DCPS::DCPS_debug_level > 3) {
01513             DCPS::GuidConverter conv(iter->first);
01514             ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) LocalParticipant::remove_discovered_participant")
01515                        ACE_TEXT(" - erasing %C\n"), OPENDDS_STRING(conv).c_str()));
01516           }
01517           participants_.erase(iter);
01518         }
01519       }

Here is the caller graph for this function:

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

Definition at line 1352 of file DiscoveryBase.h.

01353       {
01354         endpoint_manager().remove_publication(publicationId);
01355       }

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

Definition at line 1387 of file DiscoveryBase.h.

01388       {
01389         endpoint_manager().remove_subscription(subscriptionId);
01390       }

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

Definition at line 1321 of file DiscoveryBase.h.

01322       {
01323         return endpoint_manager().remove_topic(topicId, name);
01324       }

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

Definition at line 1297 of file DiscoveryBase.h.

01298       {
01299         ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, false);
01300         qos_ = qos;
01301         return announce_domain_participant_qos();
01302       }

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 1365 of file DiscoveryBase.h.

01368       {
01369         return endpoint_manager().update_publication_qos(publicationId, qos, publisherQos);
01370       }

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

Definition at line 1408 of file DiscoveryBase.h.

01410       {
01411         return endpoint_manager().update_subscription_params(subId, params);
01412       }

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 1400 of file DiscoveryBase.h.

01403       {
01404         return endpoint_manager().update_subscription_qos(subscriptionId, qos, subscriberQos);
01405       }

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 1334 of file DiscoveryBase.h.

01336       {
01337         return endpoint_manager().update_topic_qos(topicId, qos, name);
01338       }


Member Data Documentation

template<typename EndpointManagerType>
DDS::Subscriber_var OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::bit_subscriber_ [protected]
template<typename EndpointManagerType>
ACE_Thread_Mutex OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::lock_ [mutable, protected]
template<typename EndpointManagerType>
DiscoveredParticipantMap OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::participants_ [protected]
template<typename EndpointManagerType>
DDS::DomainParticipantQos OpenDDS::DCPS::LocalParticipant< EndpointManagerType >::qos_ [protected]

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

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1