OpenDDS::DCPS::EndpointRegistry Class Reference

#include <StaticDiscovery.h>

List of all members.

Public Member Functions

typedef OPENDDS_MAP (OPENDDS_STRING, Topic) TopicMapType
typedef OPENDDS_MAP (OPENDDS_STRING, DDS::DataReaderQos) DataReaderQosMapType
typedef OPENDDS_MAP (OPENDDS_STRING, DDS::DataWriterQos) DataWriterQosMapType
typedef OPENDDS_MAP (OPENDDS_STRING, DDS::SubscriberQos) SubscriberQosMapType
typedef OPENDDS_MAP (OPENDDS_STRING, DDS::PublisherQos) PublisherQosMapType
typedef OPENDDS_SET_CMP (RepoId, GUID_tKeyLessThan) RepoIdSetType
typedef OPENDDS_MAP_CMP (RepoId, Reader, GUID_tKeyLessThan) ReaderMapType
typedef OPENDDS_MAP_CMP (RepoId, Writer, GUID_tKeyLessThan) WriterMapType
void match ()

Static Public Member Functions

static EntityId_t build_id (const unsigned char *entity_key, const unsigned char entity_kind)
static RepoId build_id (DDS::DomainId_t domain, const unsigned char *participant_id, const EntityId_t &entity_id)

Public Attributes

TopicMapType topic_map
DataReaderQosMapType datareaderqos_map
DataWriterQosMapType datawriterqos_map
SubscriberQosMapType subscriberqos_map
PublisherQosMapType publisherqos_map
ReaderMapType reader_map
WriterMapType writer_map

Classes

struct  Reader
struct  StaticDiscGuidDomainEqual
struct  StaticDiscGuidPartEqual
struct  Topic
struct  Writer


Detailed Description

Definition at line 33 of file StaticDiscovery.h.


Member Function Documentation

RepoId OpenDDS::DCPS::EndpointRegistry::build_id ( DDS::DomainId_t  domain,
const unsigned char *  participant_id,
const EntityId_t entity_id 
) [static]

Definition at line 634 of file StaticDiscovery.cpp.

References OpenDDS::DCPS::GUID_t::guidPrefix, and OpenDDS::DCPS::VENDORID_OCI.

00637 {
00638   RepoId id;
00639   id.guidPrefix[0] = VENDORID_OCI[0];
00640   id.guidPrefix[1] = VENDORID_OCI[1];
00641   // id.guidPrefix[2] = domain[0]
00642   // id.guidPrefix[3] = domain[1]
00643   // id.guidPrefix[4] = domain[2]
00644   // id.guidPrefix[5] = domain[3]
00645   DDS::DomainId_t netdom = ACE_HTONL(domain);
00646   ACE_OS::memcpy(&id.guidPrefix[2], &netdom, sizeof(DDS::DomainId_t));
00647   // id.guidPrefix[6] = participant[0]
00648   // id.guidPrefix[7] = participant[1]
00649   // id.guidPrefix[8] = participant[2]
00650   // id.guidPrefix[9] = participant[3]
00651   // id.guidPrefix[10] = participant[4]
00652   // id.guidPrefix[11] = participant[5]
00653   ACE_OS::memcpy(&id.guidPrefix[6], participant_id, 6);
00654   id.entityId = entity_id;
00655   return id;
00656 }

EntityId_t OpenDDS::DCPS::EndpointRegistry::build_id ( const unsigned char *  entity_key,
const unsigned char  entity_kind 
) [static]

Definition at line 622 of file StaticDiscovery.cpp.

References OpenDDS::DCPS::EntityId_t::entityKey, and OpenDDS::DCPS::EntityId_t::entityKind.

Referenced by OpenDDS::FaceTSS::config::build_id().

00624 {
00625   EntityId_t retval;
00626   retval.entityKey[0] = entity_key[0];
00627   retval.entityKey[1] = entity_key[1];
00628   retval.entityKey[2] = entity_key[2];
00629   retval.entityKind = entity_kind;
00630   return retval;
00631 }

void OpenDDS::DCPS::EndpointRegistry::match (  ) 

Definition at line 19 of file StaticDiscovery.cpp.

References DDS::BEST_EFFORT_RELIABILITY_QOS, OpenDDS::DCPS::compatibleQOS(), reader_map, DDS::RELIABLE_RELIABILITY_QOS, and writer_map.

Referenced by OpenDDS::DCPS::StaticDiscovery::load_configuration().

00020 {
00021   for (WriterMapType::iterator wp = writer_map.begin(), wp_limit = writer_map.end();
00022        wp != wp_limit;
00023        ++wp) {
00024     const RepoId& writerid = wp->first;
00025     Writer& writer = wp->second;
00026     for (ReaderMapType::iterator rp = reader_map.begin(), rp_limit = reader_map.end();
00027          rp != rp_limit;
00028          ++rp) {
00029       const RepoId& readerid = rp->first;
00030       Reader& reader = rp->second;
00031 
00032       if (StaticDiscGuidDomainEqual()(readerid.guidPrefix, writerid.guidPrefix) &&
00033           !StaticDiscGuidPartEqual()(readerid.guidPrefix, writerid.guidPrefix) &&
00034           reader.topic_name == writer.topic_name) {
00035         // Different participants, same topic.
00036         IncompatibleQosStatus writerStatus = {0, 0, 0, DDS::QosPolicyCountSeq()};
00037         IncompatibleQosStatus readerStatus = {0, 0, 0, DDS::QosPolicyCountSeq()};
00038         const TransportLocatorSeq& writer_trans_info = writer.trans_info;
00039         const TransportLocatorSeq& reader_trans_info = reader.trans_info;
00040         const DDS::DataWriterQos& writer_qos = writer.qos;
00041         const DDS::DataReaderQos& reader_qos = reader.qos;
00042         const DDS::PublisherQos& publisher_qos = writer.publisher_qos;
00043         const DDS::SubscriberQos& subscriber_qos = reader.subscriber_qos;
00044 
00045         if (compatibleQOS(&writerStatus, &readerStatus, writer_trans_info, reader_trans_info,
00046                           &writer_qos, &reader_qos, &publisher_qos, &subscriber_qos)) {
00047           switch (reader.qos.reliability.kind) {
00048           case DDS::BEST_EFFORT_RELIABILITY_QOS:
00049             writer.best_effort_readers.insert(readerid);
00050             reader.best_effort_writers.insert(writerid);
00051             break;
00052           case DDS::RELIABLE_RELIABILITY_QOS:
00053             writer.reliable_readers.insert(readerid);
00054             reader.reliable_writers.insert(writerid);
00055             break;
00056           }
00057         }
00058       }
00059     }
00060   }
00061 }

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_MAP ( OPENDDS_STRING  ,
DDS::PublisherQos   
)

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_MAP ( OPENDDS_STRING  ,
DDS::SubscriberQos   
)

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_MAP ( OPENDDS_STRING  ,
DDS::DataWriterQos   
)

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_MAP ( OPENDDS_STRING  ,
DDS::DataReaderQos   
)

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_MAP ( OPENDDS_STRING  ,
Topic   
)

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_MAP_CMP ( RepoId  ,
Writer  ,
GUID_tKeyLessThan   
)

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_MAP_CMP ( RepoId  ,
Reader  ,
GUID_tKeyLessThan   
)

typedef OpenDDS::DCPS::EndpointRegistry::OPENDDS_SET_CMP ( RepoId  ,
GUID_tKeyLessThan   
)


Member Data Documentation

DataReaderQosMapType OpenDDS::DCPS::EndpointRegistry::datareaderqos_map

Definition at line 43 of file StaticDiscovery.h.

Referenced by OpenDDS::DCPS::StaticDiscovery::parse_datareaderqos(), and OpenDDS::DCPS::StaticDiscovery::parse_endpoints().

DataWriterQosMapType OpenDDS::DCPS::EndpointRegistry::datawriterqos_map

Definition at line 46 of file StaticDiscovery.h.

Referenced by OpenDDS::DCPS::StaticDiscovery::parse_datawriterqos(), and OpenDDS::DCPS::StaticDiscovery::parse_endpoints().

PublisherQosMapType OpenDDS::DCPS::EndpointRegistry::publisherqos_map

Definition at line 52 of file StaticDiscovery.h.

Referenced by OpenDDS::DCPS::StaticDiscovery::parse_endpoints(), and OpenDDS::DCPS::StaticDiscovery::parse_publisherqos().

ReaderMapType OpenDDS::DCPS::EndpointRegistry::reader_map

Definition at line 76 of file StaticDiscovery.h.

Referenced by OpenDDS::DCPS::StaticEndpointManager::add_publication_i(), OpenDDS::DCPS::StaticEndpointManager::add_subscription_i(), OpenDDS::DCPS::StaticEndpointManager::assign_subscription_key(), OpenDDS::DCPS::StaticEndpointManager::init_bit(), match(), OpenDDS::DCPS::StaticDiscovery::parse_endpoints(), OpenDDS::DCPS::StaticDiscovery::pre_reader(), OpenDDS::DCPS::StaticEndpointManager::reader_does_not_exist(), OpenDDS::DCPS::StaticEndpointManager::reader_exists(), and OpenDDS::DCPS::StaticEndpointManager::remove_subscription_i().

SubscriberQosMapType OpenDDS::DCPS::EndpointRegistry::subscriberqos_map

Definition at line 49 of file StaticDiscovery.h.

Referenced by OpenDDS::DCPS::StaticDiscovery::parse_endpoints(), and OpenDDS::DCPS::StaticDiscovery::parse_subscriberqos().

TopicMapType OpenDDS::DCPS::EndpointRegistry::topic_map

Definition at line 40 of file StaticDiscovery.h.

Referenced by OpenDDS::DCPS::StaticEndpointManager::init_bit(), OpenDDS::DCPS::StaticDiscovery::parse_endpoints(), and OpenDDS::DCPS::StaticDiscovery::parse_topics().

WriterMapType OpenDDS::DCPS::EndpointRegistry::writer_map

Definition at line 99 of file StaticDiscovery.h.

Referenced by OpenDDS::DCPS::StaticEndpointManager::add_publication_i(), OpenDDS::DCPS::StaticEndpointManager::add_subscription_i(), OpenDDS::DCPS::StaticEndpointManager::assign_publication_key(), OpenDDS::DCPS::StaticEndpointManager::init_bit(), match(), OpenDDS::DCPS::StaticDiscovery::parse_endpoints(), OpenDDS::DCPS::StaticDiscovery::pre_writer(), OpenDDS::DCPS::StaticEndpointManager::remove_publication_i(), OpenDDS::DCPS::StaticEndpointManager::writer_does_not_exist(), and OpenDDS::DCPS::StaticEndpointManager::writer_exists().


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