• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

DDSHelper.h

Go to the documentation of this file.
00001 #ifndef _DDS_HELPER_H_
00002 #define _DDS_HELPER_H_
00003 
00004 #include <iostream>
00005 #include <string.h>
00006 #include <loggingACEMACROS.h>
00007 #include <dds/DCPS/Service_Participant.h>
00008 #include <dds/DCPS/Marked_Default_Qos.h>
00009 #include <dds/DCPS/transport/framework/TheTransportFactory.h>
00010 #include <dds/DCPS/transport/framework/TransportImpl.h>
00011 #include <dds/DCPS/transport/simpleTCP/SimpleTcpConfiguration.h>
00012 
00013 const unsigned int DOMAIN_ID=411;
00014 
00015 namespace ddsnc{
00016 
00027         class DDSHelper{
00028                 private:
00029                 void setTopicName(const char* topicName);
00030                 void init(const char* channelName, const char* DCPSInfoRepoLoc);
00031                 /*int argc;
00032                 const ACE_TCHAR* argv[];*/
00033 
00034                 protected:
00035                 DDS::DomainParticipantFactory_ptr dpf;
00036                 OpenDDS::DCPS::TransportIdType transport_impl_id;
00037                 DDS::DomainParticipant_var participant;
00038                 OpenDDS::DCPS::TransportImpl_rch transport_impl;
00039                 DDS::Topic_var topic;
00040                 char* partitionName;
00041                 char* topicName;
00042                 bool initialized; 
00053                 DDSHelper(CORBA::String_var channelName);
00054 
00064                 DDSHelper(const char* channelName, const char* DCPSInfoRepoLoc);                
00065                 
00073                 virtual ~DDSHelper();
00074                 int createParticipant();
00075 
00082                 //Maybe this method could generate a race condition. It's neccessary to
00083                 //test more.
00084                 void initializeTransport();
00085 
00096                 void initializeTopic(const char* topicName, CORBA::String_var typeName);
00097                 
00098                 void initializeTopic(CORBA::String_var typeName);
00099                 
00100                 void setPartitionName(const char* partitionName);
00101                 
00102                 public:
00113                 void disconnect();
00114                 DDS::TopicQos topicQos;
00115 
00116                 static void cleanUp();
00117                 CORBA::String_var getChannelName();
00118 
00119         };
00120 }
00121 
00122 #endif

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0