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

ddsnc::DDSSubscriber Class Reference

#include <DDSSubscriber.h>

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

List of all members.

Public Member Functions

 DDSSubscriber (CORBA::String_var channel_name)
 ~DDSSubscriber ()
void consumerReady ()
template<class DRV , class DR , class D >
void addSubscription (void(*templateFunction)(D, void *), void *handlerParam=0)
template<class D , class TSV , class TSI >
void initialize ()

Public Attributes

DDS::DataReaderQos drQos

Protected Attributes

DDS::SubscriberQos subQos

Private Member Functions

int attachToTransport ()
int createSubscriber ()

Private Attributes

DDS::Subscriber_var sub
OpenDDS::DCPS::SubscriberImpl * sub_impl
DDS::DataReaderListener_var * listener

Detailed Description

The Subscriber implementation of ACS Notification Channel based on DDS

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

Constructor & Destructor Documentation

ddsnc::DDSSubscriber::DDSSubscriber ( CORBA::String_var  channel_name  ) 

Constructor of the class.

See also:
DDSHelper
ddsnc::DDSSubscriber::~DDSSubscriber (  )  [inline]

References listener.


Member Function Documentation

template<class DRV , class DR , class D >
void ddsnc::DDSSubscriber::addSubscription ( void(*)(D, void *)  templateFunction,
void *  handlerParam = 0 
) [inline]

The method maintains the name provided by the old acsnc API. Actually this function initializes the DataReader listener.

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.

Template Parameters:
D <type> struct
DR <type>DataReader class
DRV <type>DataReader_var class
Parameters:
(*templateFunction)(D,void *) callback function to handle data received by DataReaderListener
*handlerParam 

References listener.

int ddsnc::DDSSubscriber::attachToTransport (  )  [private]
void ddsnc::DDSSubscriber::consumerReady (  ) 

Initialize the DataReader with Qos. This method leaves the Subscriber initializated when is executed.

See also:
drQos
int ddsnc::DDSSubscriber::createSubscriber (  )  [private]

Creates the subscriber with default QoS or QoS with a partition

See also:
initialize();

Referenced by initialize().

template<class D , class TSV , class TSI >
void ddsnc::DDSSubscriber::initialize ( void   )  [inline]

Create the participant, initialize the subscriber with the partition provided in the channelName constructor parameter, if there is not partition, initialize the subscriber with default QoS properties, then initialize the transport for the participant, create the subscriber and initialize the topic with topicNanme provided as parameter of the constructor and with data type support defined by templates and finally initialize the data reader QoS with default values

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.

Template Parameters:
D <type> struct
TSV <type>TypeSupport_var class
TSI <type>TypeSupportImpl class

References ddsnc::DDSHelper::createParticipant(), createSubscriber(), drQos, ddsnc::DDSHelper::initializeTopic(), ddsnc::DDSHelper::initializeTransport(), NULL, ddsnc::DDSHelper::participant, ddsnc::DDSHelper::partitionName, sub, subQos, and ddsnc::DDSHelper::topic.


Member Data Documentation

DDS::DataReaderQos ddsnc::DDSSubscriber::drQos

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

See also:
consumerReady()
initialize()

Referenced by initialize().

DDS::DataReaderListener_var* ddsnc::DDSSubscriber::listener [private]

Referenced by addSubscription(), and ~DDSSubscriber().

DDS::Subscriber_var ddsnc::DDSSubscriber::sub [private]

Referenced by initialize().

OpenDDS::DCPS::SubscriberImpl* ddsnc::DDSSubscriber::sub_impl [private]
DDS::SubscriberQos ddsnc::DDSSubscriber::subQos [protected]

Referenced by initialize().


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