Public Member Functions | Public Attributes | Private Member Functions | Friends
DDSManager Class Reference

#include <ddsManager.h>

Inheritance diagram for DDSManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DataReader_ptr createReader (std::string domain_name, std::string partition_name, Topic_var topic)
Topic_var createTopic (std::string domain_name, const char *topic_name, const char *type_name)
DataWriter_ptr createWriter (std::string domain_name, std::string partition_name, Topic_var topic)
virtual bool lookupOrCreateParticipant (std::string domain_name)
bool lookupOrCreatePublisher (std::string domain_name, std::string partition_name)
bool lookupOrCreateSubscriber (std::string domain_name, std::string partition_name)
bool registerType (std::string domain_name, TypeSupport *ts)
virtual ~DDSManager ()

Public Attributes

DomainParticipantFactory_var m_dpf
 reference to the dds DomainParticipantFactory singelton
std::map< std::string,
DomainParticipant_var > 
m_participants
 a map holding the domain names and the corresponding dds domain participants
std::map< std::string,
std::map< std::string,
Publisher_var > > 
m_publishers
 a map of maps that holds the domain names, partition_names and the corresponding publishers
std::map< std::string, TopicQos > m_reliable_topic_qos
 a map holding the domain names and the corresponding default topic qos in this domain
std::map< std::string,
std::map< std::string,
Subscriber_var > > 
m_subscribers
 a map of maps that holds the domain names, partition_names and the corresponding subscribers

Private Member Functions

virtual bool createParticipant (std::string domain_name)
virtual bool createPublisher (std::string domain_name, std::string partition_name)
virtual bool createSubscriber (std::string domain_name, std::string partition_name)
 DDSManager ()
 DDSManager (const DDSManager &)

Friends

class Singleton< DDSManager >

Detailed Description

This class is a singleton and exists only once in each application. It creates a domain participant for each dds domain. Additionally it creates subscribes and publishers for each dds partition. You can also register types and topics using this class. Afterwards you can create data reades and writers for the registered topics and use it in your component.

Definition at line 21 of file ddsManager.h.


Constructor & Destructor Documentation

DDSManager::DDSManager ( ) [inline, private]

private constructor called by base singleton class.

Definition at line 31 of file ddsManager.h.

DDSManager::DDSManager ( const DDSManager ) [inline, private]

private constructor to prevent object creation without calling static instance function.

Definition at line 39 of file ddsManager.h.

virtual DDSManager::~DDSManager ( ) [inline, virtual]

destructer called if the application ends. clean up dds cloud

Definition at line 116 of file ddsManager.h.


Member Function Documentation

virtual bool DDSManager::createParticipant ( std::string  domain_name) [inline, private, virtual]

private method to create a dds domain participant. Called by lookupOrCreateParticipant if no domain participant was created yet for the given domain_name and stored in m_participants

Parameters:
domain_namethe name to create a participant for
Returns:
true if creation was successful

Definition at line 48 of file ddsManager.h.

virtual bool DDSManager::createPublisher ( std::string  domain_name,
std::string  partition_name 
) [inline, private, virtual]

private method to create a dds publisher. Called by lookupOrCreatePublisher if no publisher was created yet in the given domain_name for the given partition. The publisher is stored in m_publishers.

Parameters:
domain_namethe domain name in which the subscriber should be created
partition_namethe partition for the subscriber
Returns:
true if creation was successful

Definition at line 97 of file ddsManager.h.

DataReader_ptr DDSManager::createReader ( std::string  domain_name,
std::string  partition_name,
Topic_var  topic 
) [inline]

This method creates a reader for the given domain, partition and topic.

Parameters:
thedomain_name for the reader
thepartition of the reader
thetopic of the reader
Returns:
the reader

Definition at line 229 of file ddsManager.h.

virtual bool DDSManager::createSubscriber ( std::string  domain_name,
std::string  partition_name 
) [inline, private, virtual]

private method to create a dds subscriber. Called by lookupOrCreateSubscriber if no subscriber was created yet in the given domain_name for the given partition. The subscriber is stored in m_subscribers.

Parameters:
domain_namethe domain name in which the subscriber should be created
partition_namethe partition for the subscriber
Returns:
true if creation was successful

Definition at line 74 of file ddsManager.h.

Topic_var DDSManager::createTopic ( std::string  domain_name,
const char *  topic_name,
const char *  type_name 
) [inline]

This method creates a topic in the given domain_name.

Parameters:
thedomain_name for the type
topic_namethe name of the topic
type_namethe name of the topic
Returns:
true if creation was successful

Definition at line 197 of file ddsManager.h.

DataWriter_ptr DDSManager::createWriter ( std::string  domain_name,
std::string  partition_name,
Topic_var  topic 
) [inline]

This method creates a writer for the given domain, partition and topic.

Parameters:
thedomain_name for the writer
thepartition of the writer
thetopic of the writer
Returns:
the writer

Definition at line 247 of file ddsManager.h.

virtual bool DDSManager::lookupOrCreateParticipant ( std::string  domain_name) [inline, virtual]

This method is called to create a domain participant. If the participant already exists no additional participant is created. This ensures that only one domain participant exists per application for each domain.

Parameters:
domain_namethe name of the domain
Returns:
true on success

Definition at line 125 of file ddsManager.h.

bool DDSManager::lookupOrCreatePublisher ( std::string  domain_name,
std::string  partition_name 
) [inline]

This method is called to create a publisher in the given domain for the given partition. If the publisher already exists no additional publisher is created. This ensures that only one publisher exists for each domain and partition.

Parameters:
domain_namethe name of the subscriber domain
partition_namethe name of the publisher partition
Returns:
true on success

Definition at line 162 of file ddsManager.h.

bool DDSManager::lookupOrCreateSubscriber ( std::string  domain_name,
std::string  partition_name 
) [inline]

This method is called to create a subscriber in the given domain for the given partition. If the subscriber already exists no additional subscriber is created. This ensures that only one subscriber exists for each domain and partition.

Parameters:
domain_namethe name of the subscriber domain
partition_namethe name of the subscriber partition
Returns:
true on success

Definition at line 143 of file ddsManager.h.

bool DDSManager::registerType ( std::string  domain_name,
TypeSupport *  ts 
) [inline]

This method registeres the given type in the given domain.

Parameters:
thedomain_name for the type
Returns:
true if registration was successful

Definition at line 177 of file ddsManager.h.


Friends And Related Function Documentation

friend class Singleton< DDSManager > [friend]

Singleton class must be a friend, because only it can call protected constructor.

Definition at line 26 of file ddsManager.h.


Member Data Documentation

DomainParticipantFactory_var DDSManager::m_dpf

reference to the dds DomainParticipantFactory singelton

Definition at line 272 of file ddsManager.h.

std::map<std::string, DomainParticipant_var> DDSManager::m_participants

a map holding the domain names and the corresponding dds domain participants

Definition at line 277 of file ddsManager.h.

std::map< std::string, std::map< std::string, Publisher_var > > DDSManager::m_publishers

a map of maps that holds the domain names, partition_names and the corresponding publishers

Definition at line 281 of file ddsManager.h.

std::map<std::string, TopicQos> DDSManager::m_reliable_topic_qos

a map holding the domain names and the corresponding default topic qos in this domain

Definition at line 274 of file ddsManager.h.

std::map< std::string, std::map< std::string, Subscriber_var > > DDSManager::m_subscribers

a map of maps that holds the domain names, partition_names and the corresponding subscribers

Definition at line 279 of file ddsManager.h.


The documentation for this class was generated from the following file:


proxy_common
Author(s): Ronny Hartanto
autogenerated on Mon Oct 6 2014 06:54:18