Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions

ddsnc::DDSHelper Class Reference

#include <DDSHelper.h>

Inheritance diagram for ddsnc::DDSHelper:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void disconnect ()
CORBA::String_var getChannelName ()

Static Public Member Functions

static void cleanUp ()

Public Attributes

DDS::TopicQos topicQos

Protected Member Functions

 DDSHelper (CORBA::String_var channelName)
 DDSHelper (const char *channelName, const char *DCPSInfoRepoLoc)
virtual ~DDSHelper ()
int createParticipant ()
void initializeTransport ()
void initializeTopic (const char *topicName, CORBA::String_var typeName)
void initializeTopic (CORBA::String_var typeName)
void setPartitionName (const char *partitionName)

Protected Attributes

DDS::DomainParticipantFactory_ptr dpf
OpenDDS::DCPS::TransportIdType transport_impl_id
DDS::DomainParticipant_var participant
OpenDDS::DCPS::TransportImpl_rch transport_impl
DDS::Topic_var topic
char * partitionName
char * topicName
bool initialized

Private Member Functions

void setTopicName (const char *topicName)
void init (const char *channelName, const char *DCPSInfoRepoLoc)

Detailed Description

Base class for ACSNCDDS, this class contains all the common functionality offered by DDS publishers and DDS subscribers. If it wanted to use this class, it must be inherited.

Author:
Jorge Avarias <javarias[at]inf.utfsm.cl>
See also:
DDSPublisher
DDSSubscriber

Constructor & Destructor Documentation

ddsnc::DDSHelper::DDSHelper ( CORBA::String_var  channelName  )  [protected]

Constructor for DDSHelper, this constructor will be set the location of DCPSInfoRepo to corbaloc:iiop:127.0.0.1:3999/DCPSInfoRepo

Parameters:
channelName the name of the channel that will be mapped to a partition.
ddsnc::DDSHelper::DDSHelper ( const char *  channelName,
const char *  DCPSInfoRepoLoc 
) [protected]

Constructor for DDSHelper

Parameters:
channelName the name of the channel that will be mapped to a partition.
DCPSInfoRepoLoc address of the DCPSInfoRepo. The address must be a format supported by TAO
virtual ddsnc::DDSHelper::~DDSHelper (  )  [protected, virtual]

Destructor for DDSHelper before free the varibales it call to disconnect method, if disconnect method was called, the destructor only free the variables.

See also:
disconnect()

Member Function Documentation

static void ddsnc::DDSHelper::cleanUp (  )  [static]
int ddsnc::DDSHelper::createParticipant (  )  [protected]
void ddsnc::DDSHelper::disconnect (  ) 

Disconnect method will destroy all the DDS entities initilizated, it will release the trasport factory, shutdown the DDS participant service and set the status of the class as not initilizated. This method should be used when you want to destroy a Publisher or Subscriber object that inherit this class.

See also:
~DDSHelper()
CORBA::String_var ddsnc::DDSHelper::getChannelName (  ) 
void ddsnc::DDSHelper::init ( const char *  channelName,
const char *  DCPSInfoRepoLoc 
) [private]
void ddsnc::DDSHelper::initializeTopic ( const char *  topicName,
CORBA::String_var  typeName 
) [protected]

Initialize the topic and register the type supported by the topic, this method must be called after creation of the participant, initialization of the transport, creation of the Publisher or Subscriber and initialization of the type support

Parameters:
topicName the topicName
typeName the type to be registered in the topic, the topic must be in CORBA type name format

Referenced by ddsnc::DDSSubscriber::initialize().

void ddsnc::DDSHelper::initializeTopic ( CORBA::String_var  typeName  )  [protected]
void ddsnc::DDSHelper::initializeTransport (  )  [protected]

Locates a Transport id not in use and assign it to transport_impl_id. The transport configuration is automatically configured by TAO pluggable framework.

Referenced by ddsnc::DDSSubscriber::initialize().

void ddsnc::DDSHelper::setPartitionName ( const char *  partitionName  )  [protected]
void ddsnc::DDSHelper::setTopicName ( const char *  topicName  )  [private]

Member Data Documentation

DDS::DomainParticipantFactory_ptr ddsnc::DDSHelper::dpf [protected]

a flag that shows the initialization status of the class

DDS::DomainParticipant_var ddsnc::DDSHelper::participant [protected]
DDS::Topic_var ddsnc::DDSHelper::topic [protected]
char* ddsnc::DDSHelper::topicName [protected]
OpenDDS::DCPS::TransportImpl_rch ddsnc::DDSHelper::transport_impl [protected]
OpenDDS::DCPS::TransportIdType ddsnc::DDSHelper::transport_impl_id [protected]

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