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

ddsnc::DDSPublisher Class Reference

#include <DDSPublisher.h>

Inheritance diagram for ddsnc::DDSPublisher:
Inheritance graph
[legend]
Collaboration diagram for ddsnc::DDSPublisher:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DDSPublisher (const char *channelName)
template<class D , class DW , class DWVAR , class TSV , class TSI >
void publishData (D data)
 ~DDSPublisher ()

Public Attributes

DDS::DataWriterQos dwQos

Protected Attributes

DDS::PublisherQos pubQos

Private Member Functions

int attachToTransport ()
void initialize ()
void initializeDataWriter ()
int createPublisher ()

Private Attributes

DDS::Publisher_var pub
OpenDDS::DCPS::PublisherImpl * pub_impl
DDS::DataWriter_var dw
DDS::InstanceHandle_t handler

Detailed Description

The Publisher implementation of ACS Notification Channel based on DDS.

The template requires the DataWriter_var class that is specific to the data type defined in the idl and registered in the topic.

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

Constructor & Destructor Documentation

ddsnc::DDSPublisher::DDSPublisher ( const char *  channelName  )  [inline]

Constructor for DDSPublisher class, initializes the common objects required by a DDS Publisher.

See also:
DDSHelper
initialize()
ddsnc::DDSPublisher::~DDSPublisher (  )  [inline]

Member Function Documentation

int ddsnc::DDSPublisher::attachToTransport (  )  [private]
int ddsnc::DDSPublisher::createPublisher (  )  [private]

Creates the publisher with default QoS or Qos with a partition

See also:
initialize()
void ddsnc::DDSPublisher::initialize (  )  [private]

Create the participant, initialize the publisher with the partition provided in the channelName constructor parameter, if there is not partition initialize the publisher with default QoS properties, initialize the transport for the participant and finally initilize the data writer QoS to default.

void ddsnc::DDSPublisher::initializeDataWriter (  )  [private]

Initialize the DataWriter with QoS

Template Parameters:
<type>DataWriter class
See also:
dwQos
template<class D , class DW , class DWVAR , class TSV , class TSI >
void ddsnc::DDSPublisher::publishData ( data  )  [inline]

Publish the data to be sended to the subscribers, the data type must be defined in the idl file. If the class has been not initialized, it are initialized at this moment and it set as initialized.

The <type> corresponds to the name of data type (without namespace) defined in the idl file, the classes required by the template are autogenerated by dcps_ts.pl tools and are specific to the data type defined.

Parameters:
data the data to be published
Template Parameters:
D <type> class
DW <type>DataWriter class
TSV <type>TypeSupport_var class
TSI <type>TypeSupportImpl class

Member Data Documentation

DDS::DataWriter_var ddsnc::DDSPublisher::dw [private]
DDS::DataWriterQos ddsnc::DDSPublisher::dwQos

Data Writer Qos, can be modified according OpenDDS API, the Qos properties will be applied when is called publishData for first time and they cannot be changed after that.

See also:
initializeDataWriter()
publishData(D data)
DDS::InstanceHandle_t ddsnc::DDSPublisher::handler [private]
DDS::Publisher_var ddsnc::DDSPublisher::pub [private]
OpenDDS::DCPS::PublisherImpl* ddsnc::DDSPublisher::pub_impl [private]
DDS::PublisherQos ddsnc::DDSPublisher::pubQos [protected]

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