summaryrefslogtreecommitdiff
path: root/modules/CIAO/connectors/dds4ccm/impl
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/connectors/dds4ccm/impl')
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.cpp254
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.h140
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.cpp114
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.h64
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.cpp187
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.h104
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.cpp79
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.h66
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp517
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.h188
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp128
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.h67
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Duration_t.h35
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/InconsistentTopicStatus.h41
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandleSeq.h60
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandle_t.h41
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp54
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h60
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessChangedStatus.h55
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessLostStatus.h41
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/NDDS_Traits.h47
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedDeadlineMissedStatus.h47
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedIncompatibleQosStatus.h51
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.cpp57
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.h42
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/PublicationMatchedStatus.h55
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp247
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.h116
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.cpp82
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.h67
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/QosPolicyCountSeq.h34
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.cpp88
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.h74
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.cpp20
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.h17
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.cpp63
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.h63
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.cpp53
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.h40
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedDeadlineMissedStatus.h47
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedIncompatibleQosStatus.h51
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/SampleLostStatus.h28
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/SampleRejectedStatus.h51
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.cpp60
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.h61
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp255
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.h127
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.cpp120
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.h82
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriptionMatchedStatus.h56
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Time_t.h35
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.cpp117
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.h81
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.cpp55
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.h57
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp36
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.h27
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.h38
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.tpp105
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h58
-rw-r--r--modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc32
61 files changed, 5137 insertions, 0 deletions
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.cpp
new file mode 100644
index 00000000000..5949f4009b7
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.cpp
@@ -0,0 +1,254 @@
+// $Id$
+
+#include "DataReader.h"
+#include "DataReaderListener.h"
+#include "StatusCondition.h"
+#include "ReadCondition.h"
+#include "QueryCondition.h"
+#include "SampleLostStatus.h"
+#include "SubscriptionMatchedStatus.h"
+#include "RequestedDeadlineMissedStatus.h"
+#include "SampleRejectedStatus.h"
+#include "LivelinessChangedStatus.h"
+#include "RequestedIncompatibleQosStatus.h"
+#include "Duration_t.h"
+#include "InstanceHandle_t.h"
+#include "InstanceHandleSeq.h"
+#include "Subscriber.h"
+#include "TopicDescription.h"
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_DataReader_i::RTI_DataReader_i (DDSDataReader * dr)
+ : impl_ (dr)
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_DataReader_i::~RTI_DataReader_i (void)
+ {
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::enable (void)
+ {
+ return this->impl_->enable ();
+ }
+
+ ::DDS::StatusCondition_ptr
+ RTI_DataReader_i::get_statuscondition (void)
+ {
+ DDSStatusCondition* sc = this->impl_->get_statuscondition ();
+ ::DDS::StatusCondition_var retval = new RTI_StatusCondition_i (sc);
+ return retval._retn ();
+ }
+
+ ::DDS::StatusMask
+ RTI_DataReader_i::get_status_changes (void)
+ {
+ return this->impl_->get_status_changes ();
+ }
+
+ ::DDS::InstanceHandle_t
+ RTI_DataReader_i::get_instance_handle (void)
+ {
+ ::DDS_InstanceHandle_t const rtihandle = this->impl_->get_instance_handle ();
+ ::DDS::InstanceHandle_t handle;
+ handle <<= rtihandle;
+ return handle;
+ }
+
+ ::DDS::ReadCondition_ptr
+ RTI_DataReader_i::create_readcondition (
+ ::DDS::SampleStateMask sample_states,
+ ::DDS::ViewStateMask view_states,
+ ::DDS::InstanceStateMask instance_states)
+ {
+ DDSReadCondition* rc = this->impl_->create_readcondition (sample_states, view_states, instance_states);
+ ::DDS::ReadCondition_var retval = new RTI_ReadCondition_i (rc);
+ return retval._retn ();
+ }
+
+ ::DDS::QueryCondition_ptr
+ RTI_DataReader_i::create_querycondition (
+ ::DDS::SampleStateMask /*sample_states*/,
+ ::DDS::ViewStateMask /*view_states*/,
+ ::DDS::InstanceStateMask /*instance_states*/,
+ const char * /*query_expression*/,
+ const ::DDS::StringSeq & /*query_parameters*/)
+ {
+ DDSQueryCondition* qc = 0; // @todo = this->impl_->create_querycondition (sample_states, view_states, instance_states, query_expression, query_parameters);
+ ::DDS::QueryCondition_var retval = new RTI_QueryCondition_i (qc);
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::delete_readcondition (
+ ::DDS::ReadCondition_ptr a_condition)
+ {
+ RTI_ReadCondition_i *rc = dynamic_cast< RTI_ReadCondition_i *> (a_condition);
+ if (!rc)
+ {
+ return ::DDS::RETCODE_BAD_PARAMETER;
+ }
+ return this->impl_->delete_readcondition (rc->get_readcondition ());
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::delete_contained_entities (void)
+ {
+ return this->impl_->delete_contained_entities ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::set_qos (
+ const ::DDS::DataReaderQos & /*qos*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_qos (
+ ::DDS::DataReaderQos & /*qos*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::set_listener (
+ ::DDS::DataReaderListener_ptr a_listener,
+ ::DDS::StatusMask mask)
+ {
+ RTI_DataReaderListener_i* rti_impl_list = new RTI_DataReaderListener_i (a_listener);
+ return this->impl_->set_listener (rti_impl_list, mask);
+ }
+
+ ::DDS::DataReaderListener_ptr
+ RTI_DataReader_i::get_listener (void)
+ {
+ //::DDSDataReaderListener* reader = this->impl_->get_listener ();
+// ::DDS::DataReaderListener_var dds_reader = new RTI_DataReaderListener_i (reader);
+ //return dds_reader._retn ();
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::TopicDescription_ptr
+ RTI_DataReader_i::get_topicdescription (void)
+ {
+ ::DDSTopicDescription* reader = this->impl_->get_topicdescription ();
+ ::DDS::TopicDescription_var dds_td = new RTI_TopicDescription_i (reader);
+ return dds_td._retn ();
+ }
+
+ ::DDS::Subscriber_ptr
+ RTI_DataReader_i::get_subscriber (void)
+ {
+ ::DDSSubscriber* subscriber = this->impl_->get_subscriber ();
+ ::DDS::Subscriber_var dds_td = new RTI_Subscriber_i (subscriber);
+ return dds_td._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_sample_rejected_status (
+ ::DDS::SampleRejectedStatus & status)
+ {
+ DDS_SampleRejectedStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_sample_rejected_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_liveliness_changed_status (
+ ::DDS::LivelinessChangedStatus & status)
+ {
+ DDS_LivelinessChangedStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_liveliness_changed_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_requested_deadline_missed_status (
+ ::DDS::RequestedDeadlineMissedStatus & status)
+ {
+ DDS_RequestedDeadlineMissedStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_requested_deadline_missed_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_requested_incompatible_qos_status (
+ ::DDS::RequestedIncompatibleQosStatus & status)
+ {
+ DDS_RequestedIncompatibleQosStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_requested_incompatible_qos_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_subscription_matched_status (
+ ::DDS::SubscriptionMatchedStatus & status)
+ {
+ ::DDS_SubscriptionMatchedStatus ddsstatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_subscription_matched_status (ddsstatus);
+ ddsstatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_sample_lost_status (
+ ::DDS::SampleLostStatus & status)
+ {
+ DDS_SampleLostStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_sample_lost_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::wait_for_historical_data (
+ const ::DDS::Duration_t & max_wait)
+ {
+ ::DDS_Duration_t rtiduration;
+ rtiduration <<= max_wait;
+ return this->impl_->wait_for_historical_data (rtiduration);
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_matched_publications (
+ ::DDS::InstanceHandleSeq & publication_handles)
+ {
+ ::DDS_InstanceHandleSeq rtiseq;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_matched_publications (rtiseq);
+ rtiseq >>= publication_handles;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataReader_i::get_matched_publication_data (
+ ::DDS::PublicationBuiltinTopicData & /*publication_data*/,
+ const ::DDS::InstanceHandle_t & /*publication_handle*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ DDSDataReader *
+ RTI_DataReader_i::get_datareader (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.h
new file mode 100644
index 00000000000..eecde2749ec
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReader.h
@@ -0,0 +1,140 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_DATAREADER_H
+#define CIAO_RTI_DATAREADER_H
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+#include "tao/LocalObject.h"
+
+#include "ndds/ndds_cpp.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_DataReader_i
+ : public virtual ::DDS::CCM_DataReader,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_DataReader_i (DDSDataReader *dr);
+
+ // Destructor
+ virtual ~RTI_DataReader_i (void);
+
+ virtual ::DDS::ReturnCode_t
+ enable (void);
+
+ virtual ::DDS::StatusCondition_ptr
+ get_statuscondition (void);
+
+ virtual ::DDS::StatusMask
+ get_status_changes (void);
+
+ virtual ::DDS::InstanceHandle_t
+ get_instance_handle (void);
+
+ virtual ::DDS::ReadCondition_ptr
+ create_readcondition (
+ ::DDS::SampleStateMask sample_states,
+ ::DDS::ViewStateMask view_states,
+ ::DDS::InstanceStateMask instance_states);
+
+ virtual ::DDS::QueryCondition_ptr
+ create_querycondition (
+ ::DDS::SampleStateMask sample_states,
+ ::DDS::ViewStateMask view_states,
+ ::DDS::InstanceStateMask instance_states,
+ const char * query_expression,
+ const ::DDS::StringSeq & query_parameters);
+
+ virtual ::DDS::ReturnCode_t
+ delete_readcondition (
+ ::DDS::ReadCondition_ptr a_condition);
+
+ virtual ::DDS::ReturnCode_t
+ delete_contained_entities (void);
+
+ virtual ::DDS::ReturnCode_t
+ set_qos (
+ const ::DDS::DataReaderQos & qos);
+
+ virtual ::DDS::ReturnCode_t
+ get_qos (
+ ::DDS::DataReaderQos & qos);
+
+ virtual ::DDS::ReturnCode_t
+ set_listener (
+ ::DDS::DataReaderListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual ::DDS::DataReaderListener_ptr
+ get_listener (void);
+
+ virtual ::DDS::TopicDescription_ptr
+ get_topicdescription (void);
+
+ virtual ::DDS::Subscriber_ptr
+ get_subscriber (void);
+
+ virtual ::DDS::ReturnCode_t
+ get_sample_rejected_status (
+ ::DDS::SampleRejectedStatus & status);
+
+ virtual ::DDS::ReturnCode_t
+ get_liveliness_changed_status (
+ ::DDS::LivelinessChangedStatus & status);
+
+ virtual ::DDS::ReturnCode_t
+ get_requested_deadline_missed_status (
+ ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual ::DDS::ReturnCode_t
+ get_requested_incompatible_qos_status (
+ ::DDS::RequestedIncompatibleQosStatus & status);
+
+ virtual ::DDS::ReturnCode_t
+ get_subscription_matched_status (
+ ::DDS::SubscriptionMatchedStatus & status);
+
+ virtual ::DDS::ReturnCode_t
+ get_sample_lost_status (
+ ::DDS::SampleLostStatus & status);
+
+ virtual ::DDS::ReturnCode_t
+ wait_for_historical_data (
+ const ::DDS::Duration_t & max_wait);
+
+ virtual ::DDS::ReturnCode_t
+ get_matched_publications (
+ ::DDS::InstanceHandleSeq & publication_handles);
+
+ virtual ::DDS::ReturnCode_t
+ get_matched_publication_data (
+ ::DDS::PublicationBuiltinTopicData & publication_data,
+ const ::DDS::InstanceHandle_t & publication_handle);
+
+ DDSDataReader * get_datareader (void);
+
+ private:
+ DDSDataReader * impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.cpp
new file mode 100644
index 00000000000..707ca497c2b
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.cpp
@@ -0,0 +1,114 @@
+// $Id$
+
+#include "DataReaderListener.h"
+#include "DataReader.h"
+#include "SampleLostStatus.h"
+#include "SubscriptionMatchedStatus.h"
+#include "RequestedDeadlineMissedStatus.h"
+#include "SampleRejectedStatus.h"
+#include "LivelinessChangedStatus.h"
+#include "RequestedIncompatibleQosStatus.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_DataReaderListener_i::RTI_DataReaderListener_i (::DDS::DataReaderListener_ptr p)
+ : impl_ (::DDS::DataReaderListener::_duplicate (p))
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_DataReaderListener_i::~RTI_DataReaderListener_i (void)
+ {
+ }
+
+ void
+ RTI_DataReaderListener_i::on_requested_deadline_missed (
+ ::DDSDataReader* the_reader,
+ const ::DDS_RequestedDeadlineMissedStatus & status)
+ {
+ ::DDS::RequestedDeadlineMissedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_requested_deadline_missed (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataReaderListener_i::on_requested_incompatible_qos (
+ ::DDSDataReader* the_reader,
+ const ::DDS_RequestedIncompatibleQosStatus & status)
+ {
+ ::DDS::RequestedIncompatibleQosStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_requested_incompatible_qos (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataReaderListener_i::on_sample_rejected (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SampleRejectedStatus & status)
+ {
+ ::DDS::SampleRejectedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_sample_rejected (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataReaderListener_i::on_liveliness_changed (
+ ::DDSDataReader* the_reader,
+ const ::DDS_LivelinessChangedStatus & status)
+ {
+ ::DDS::LivelinessChangedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_liveliness_changed (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataReaderListener_i::on_data_available(::DDSDataReader *reader)
+ {
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (reader);
+ this->impl_->on_data_available (dds_reader.in ());
+ }
+
+ void
+ RTI_DataReaderListener_i::on_subscription_matched (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SubscriptionMatchedStatus & status)
+ {
+ ::DDS::SubscriptionMatchedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_subscription_matched (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataReaderListener_i::on_sample_lost (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SampleLostStatus & status)
+ {
+ ::DDS::SampleLostStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_sample_lost (dds_reader.in (), ddsstatus);
+ }
+
+ ::DDS::DataReaderListener_ptr
+ RTI_DataReaderListener_i::get_datareaderlistener (void)
+ {
+ return ::DDS::DataReaderListener::_duplicate (this->impl_.in ());
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.h
new file mode 100644
index 00000000000..adf47e57b4e
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataReaderListener.h
@@ -0,0 +1,64 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_DATAREADERLISTENER_H
+#define CIAO_RTI_DATAREADERLISTENER_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_DataReaderListener_i :
+ public virtual ::DDSDataReaderListener
+ {
+ public:
+ // Constructor
+ RTI_DataReaderListener_i (::DDS::DataReaderListener_ptr p);
+
+ // Destructor
+ virtual ~RTI_DataReaderListener_i (void);
+
+ virtual void on_requested_deadline_missed(::DDSDataReader* reader,
+ const ::DDS_RequestedDeadlineMissedStatus& status);
+
+ virtual void on_liveliness_changed(::DDSDataReader* reader,
+ const ::DDS_LivelinessChangedStatus& status);
+
+ virtual void on_requested_incompatible_qos(::DDSDataReader* reader,
+ const ::DDS_RequestedIncompatibleQosStatus& status);
+
+ virtual void on_sample_rejected(::DDSDataReader* reader,
+ const ::DDS_SampleRejectedStatus& status);
+
+ virtual void on_data_available(::DDSDataReader* reader);
+
+ virtual void on_sample_lost(::DDSDataReader* reader,
+ const ::DDS_SampleLostStatus& status);
+
+ virtual void on_subscription_matched(::DDSDataReader* reader,
+ const ::DDS_SubscriptionMatchedStatus& status);
+
+ ::DDS::DataReaderListener_ptr get_datareaderlistener (void);
+ private:
+ ::DDS::DataReaderListener_var impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.cpp
new file mode 100644
index 00000000000..4cc5674e91f
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.cpp
@@ -0,0 +1,187 @@
+// $Id$
+
+#include "DataWriter.h"
+#include "StatusCondition.h"
+#include "Publisher.h"
+#include "DataWriterListener.h"
+#include "Topic.h"
+#include "Duration_t.h"
+#include "InstanceHandle_t.h"
+#include "PublicationMatchedStatus.h"
+#include "LivelinessLostStatus.h"
+#include "OfferedIncompatibleQosStatus.h"
+#include "OfferedDeadlineMissedStatus.h"
+#include "InstanceHandleSeq.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_DataWriter_i::RTI_DataWriter_i (DDSDataWriter * dw)
+ : impl_ (dw)
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_DataWriter_i::~RTI_DataWriter_i (void)
+ {
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::set_qos (const ::DDS::DataWriterQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_DataWriter_i::set_qos");
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::get_qos (::DDS::DataWriterQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_DataWriter_i::get_qos");
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::set_listener (::DDS::DataWriterListener_ptr a_listener,
+ ::DDS::StatusMask mask)
+ {
+ RTI_DataWriterListener_i* rti_impl_list = new RTI_DataWriterListener_i (a_listener);
+ return this->impl_->set_listener (rti_impl_list, mask);
+ }
+
+ ::DDS::DataWriterListener_ptr
+ RTI_DataWriter_i::get_listener (void)
+ {
+ DDSDataWriterListener* wr = this->impl_->get_listener ();
+ RTI_DataWriterListener_i *dwl = dynamic_cast< RTI_DataWriterListener_i *> (wr);
+ return dwl->get_datawriterlistener ();
+ }
+
+ ::DDS::Topic_ptr
+ RTI_DataWriter_i::get_topic (void)
+ {
+ DDSTopic* t = this->impl_->get_topic ();
+ ::DDS::Topic_var retval = new RTI_Topic_i (t);
+ return retval._retn ();
+ }
+
+ ::DDS::Publisher_ptr
+ RTI_DataWriter_i::get_publisher (void)
+ {
+ DDSPublisher* p = this->impl_->get_publisher ();
+ ::DDS::Publisher_var retval = new RTI_Publisher_i (p);
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::wait_for_acknowledgments (const ::DDS::Duration_t & max_wait)
+ {
+ ::DDS_Duration_t rtiduration;
+ rtiduration <<= max_wait;
+ return this->impl_->wait_for_acknowledgments (rtiduration);
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::get_liveliness_lost_status (::DDS::LivelinessLostStatus & status)
+ {
+ ::DDS_LivelinessLostStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_liveliness_lost_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::get_offered_deadline_missed_status (::DDS::OfferedDeadlineMissedStatus & status)
+ {
+ ::DDS_OfferedDeadlineMissedStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_offered_deadline_missed_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::get_offered_incompatible_qos_status (::DDS::OfferedIncompatibleQosStatus & status)
+ {
+ ::DDS_OfferedIncompatibleQosStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_offered_incompatible_qos_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::get_publication_matched_status (::DDS::PublicationMatchedStatus & status)
+ {
+ ::DDS_PublicationMatchedStatus rtistatus;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_publication_matched_status (rtistatus);
+ rtistatus >>= status;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::assert_liveliness (void)
+ {
+ return this->impl_->assert_liveliness ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::get_matched_subscriptions (::DDS::InstanceHandleSeq & subscription_handles)
+ {
+ ::DDS_InstanceHandleSeq rtiseq;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_matched_subscriptions (rtiseq);
+ rtiseq >>= subscription_handles;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::get_matched_subscription_data (::DDS::SubscriptionBuiltinTopicData & /*subscription_data*/,
+ const ::DDS::InstanceHandle_t & /*subscription_handle*/)
+ {
+ CIAO_TRACE ("RTI_DataWriter_i::get_matched_subscription_data");
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DataWriter_i::enable (void)
+ {
+ return this->impl_->enable ();
+ }
+
+ ::DDS::StatusCondition_ptr
+ RTI_DataWriter_i::get_statuscondition (void)
+ {
+ DDSStatusCondition* sc = this->impl_->get_statuscondition ();
+ ::DDS::StatusCondition_var retval = new RTI_StatusCondition_i (sc);
+ return retval._retn ();
+ }
+
+ ::DDS::StatusMask
+ RTI_DataWriter_i::get_status_changes (void)
+ {
+ return this->impl_->get_status_changes ();
+ }
+
+ ::DDS::InstanceHandle_t
+ RTI_DataWriter_i::get_instance_handle (void)
+ {
+ ::DDS_InstanceHandle_t const rtihandle = this->impl_->get_instance_handle ();
+ ::DDS::InstanceHandle_t handle;
+ handle <<= rtihandle;
+ return handle;
+ }
+
+ DDSDataWriter *
+ RTI_DataWriter_i::get_datawriter (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.h
new file mode 100644
index 00000000000..8f251ca84fd
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriter.h
@@ -0,0 +1,104 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_DATAWRITER_H
+#define CIAO_RTI_DATAWRITER_H
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+#include "tao/LocalObject.h"
+
+#include "ndds/ndds_cpp.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_DataWriter_i
+ : public virtual ::DDS::CCM_DataWriter,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_DataWriter_i (::DDSDataWriter *dw);
+
+ // Destructor
+ virtual ~RTI_DataWriter_i (void);
+
+ virtual
+ ::DDS::ReturnCode_t set_qos (const ::DDS::DataWriterQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_qos (::DDS::DataWriterQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t set_listener (::DDS::DataWriterListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::DataWriterListener_ptr get_listener (void);
+
+ virtual
+ ::DDS::Topic_ptr get_topic (void);
+
+ virtual
+ ::DDS::Publisher_ptr get_publisher (void);
+
+ virtual
+ ::DDS::ReturnCode_t wait_for_acknowledgments (const ::DDS::Duration_t & max_wait);
+
+ virtual
+ ::DDS::ReturnCode_t get_liveliness_lost_status (::DDS::LivelinessLostStatus & status);
+
+ virtual
+ ::DDS::ReturnCode_t get_offered_deadline_missed_status (::DDS::OfferedDeadlineMissedStatus & status);
+
+ virtual
+ ::DDS::ReturnCode_t get_offered_incompatible_qos_status (::DDS::OfferedIncompatibleQosStatus & status);
+
+ virtual
+ ::DDS::ReturnCode_t get_publication_matched_status (::DDS::PublicationMatchedStatus & status);
+
+ virtual
+ ::DDS::ReturnCode_t assert_liveliness (void);
+
+ virtual
+ ::DDS::ReturnCode_t get_matched_subscriptions (::DDS::InstanceHandleSeq & subscription_handles);
+
+ virtual
+ ::DDS::ReturnCode_t get_matched_subscription_data (::DDS::SubscriptionBuiltinTopicData & subscription_data,
+ const ::DDS::InstanceHandle_t & subscription_handle);
+
+ virtual
+ ::DDS::ReturnCode_t enable (void);
+
+ virtual
+ ::DDS::StatusCondition_ptr get_statuscondition (void);
+
+ virtual
+ ::DDS::StatusMask get_status_changes (void);
+
+ virtual
+ ::DDS::InstanceHandle_t get_instance_handle (void);
+
+ DDSDataWriter * get_datawriter (void);
+
+ private:
+ DDSDataWriter * impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.cpp
new file mode 100644
index 00000000000..7c66b260ab7
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.cpp
@@ -0,0 +1,79 @@
+// $Id$
+
+#include "DataWriterListener.h"
+#include "DataWriter.h"
+#include "PublicationMatchedStatus.h"
+#include "LivelinessLostStatus.h"
+#include "OfferedIncompatibleQosStatus.h"
+#include "OfferedDeadlineMissedStatus.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_DataWriterListener_i::RTI_DataWriterListener_i (::DDS::DataWriterListener_ptr s)
+ : impl_ (::DDS::DataWriterListener::_duplicate (s))
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_DataWriterListener_i::~RTI_DataWriterListener_i (void)
+ {
+ }
+
+ void
+ RTI_DataWriterListener_i::on_offered_deadline_missed (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_OfferedDeadlineMissedStatus & status)
+ {
+ ::DDS::OfferedDeadlineMissedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (the_writer);
+ this->impl_->on_offered_deadline_missed (dds_writer.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataWriterListener_i::on_offered_incompatible_qos (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_OfferedIncompatibleQosStatus & status)
+ {
+ ::DDS::OfferedIncompatibleQosStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (the_writer);
+ this->impl_->on_offered_incompatible_qos (dds_writer.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataWriterListener_i::on_liveliness_lost (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_LivelinessLostStatus & status)
+ {
+ ::DDS::LivelinessLostStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (the_writer);
+ this->impl_->on_liveliness_lost (dds_writer.in (), ddsstatus);
+ }
+
+ void
+ RTI_DataWriterListener_i::on_publication_matched (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_PublicationMatchedStatus & status)
+ {
+ ::DDS::PublicationMatchedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (the_writer);
+ this->impl_->on_publication_matched (dds_writer.in (), ddsstatus);
+ }
+
+ ::DDS::DataWriterListener_ptr
+ RTI_DataWriterListener_i::get_datawriterlistener (void)
+ {
+ return ::DDS::DataWriterListener::_duplicate (this->impl_.in ());
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.h
new file mode 100644
index 00000000000..22501f92e9d
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DataWriterListener.h
@@ -0,0 +1,66 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_DATAWRITERLISTENER_H
+#define CIAO_RTI_DATAWRITERLISTENER_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_DataWriterListener_i :
+ public virtual ::DDSDataWriterListener
+ {
+ public:
+ // Constructor
+ RTI_DataWriterListener_i (::DDS::DataWriterListener_ptr p);
+
+ // Destructor
+ virtual ~RTI_DataWriterListener_i (void);
+
+ virtual void
+ on_offered_deadline_missed (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_OfferedDeadlineMissedStatus & status);
+
+ virtual void
+ on_offered_incompatible_qos (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_OfferedIncompatibleQosStatus & status);
+
+ virtual void
+ on_liveliness_lost (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_LivelinessLostStatus & status);
+
+ virtual void
+ on_publication_matched (
+ ::DDSDataWriter *the_writer,
+ const ::DDS_PublicationMatchedStatus & status);
+
+ ::DDS::DataWriterListener_ptr get_datawriterlistener (void);
+ private:
+ ::DDS::DataWriterListener_var impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp
new file mode 100644
index 00000000000..78d726ab6b1
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp
@@ -0,0 +1,517 @@
+// $Id$
+
+#include "DomainParticipant.h"
+#include "Subscriber.h"
+#include "Publisher.h"
+#include "Topic.h"
+#include "TopicDescription.h"
+#include "Utils.h"
+#include "StatusCondition.h"
+#include "InstanceHandle_t.h"
+#include "Duration_t.h"
+#include "Time_t.h"
+#include "InstanceHandleSeq.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_DomainParticipant_i::RTI_DomainParticipant_i (DDSDomainParticipant *part)
+ : impl_ (part)
+ {
+ CIAO_TRACE ("RTI_DomainParticipant_i::RTI_DomainParticipant_i");
+ }
+
+ // Implementation skeleton destructor
+ RTI_DomainParticipant_i::~RTI_DomainParticipant_i (void)
+ {
+ CIAO_TRACE ("RTI_DomainParticipant_i::~RTI_DomainParticipant_i");
+ }
+
+ ::DDS::Publisher_ptr
+ RTI_DomainParticipant_i::create_publisher (const ::DDS::PublisherQos & /*qos*/,
+ ::DDS::PublisherListener_ptr /*a_listener*/,
+ ::DDS::StatusMask mask)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::create_publisher");
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_DomainParticipant_i::create_publisher - "
+ "Creating Publisher\n"));
+
+ DDSPublisher * rti_pub =
+ this->impl_->create_publisher (DDS_PUBLISHER_QOS_DEFAULT,
+ 0,
+ mask);
+
+ if (!rti_pub)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipant_i::create_publisher - "
+ "Error: Unable to create Participant\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0);
+ }
+
+ CIAO_DEBUG ((LM_INFO, CLINFO "RTI_DomainParticipant_i::create_publisher - "
+ "Successfully created a DDSPublisher\n"));
+
+ ::DDS::Publisher_var retval = new RTI_Publisher_i (rti_pub);
+
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::delete_publisher (::DDS::Publisher_ptr p)
+ {
+ RTI_Publisher_i *rti_pub = dynamic_cast < RTI_Publisher_i * > (p);
+
+ if (!rti_pub)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipant_i::delete_publisher - "
+ "Unable to cast provided object refence to servant pointer.\n"));
+ return ::DDS::RETCODE_ERROR;
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_DomainParticipant_i::delete_publisher - "
+ "Successfully casted provided object refence to RTI_Publisher_i\n"));
+
+ DDS_ReturnCode_t retval = this->impl_->delete_publisher (rti_pub->get_publisher ());
+
+ if (retval != DDS_RETCODE_OK)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipant_i::delete_publisher - "
+ "Error: RTI delete_publisher returned non-ok error code %c\n",
+ translate_retcode (retval)));
+ }
+ else CIAO_DEBUG ((LM_INFO, CLINFO "RTI_DomainParticipant_i::delete_publisher - "
+ "Provided publisher successfully created\n"));
+
+ return retval;
+ }
+
+ ::DDS::Subscriber_ptr
+ RTI_DomainParticipant_i::create_subscriber (const ::DDS::SubscriberQos & /*qos*/,
+ ::DDS::SubscriberListener_ptr /*a_listener*/,
+ ::DDS::StatusMask mask)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::create_subscriber");
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_DomainParticipant_i::create_subscriber - "
+ "Creating Subscriber\n"));
+
+ DDSSubscriber * rti_sub =
+ this->impl_->create_subscriber (DDS_SUBSCRIBER_QOS_DEFAULT,
+ 0,
+ mask);
+
+ if (!rti_sub)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipant_i::create_subscriber - "
+ "Error: Unable to create Subscriber\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0);
+ }
+
+ CIAO_DEBUG ((LM_INFO, CLINFO "RTI_DomainParticipant_i::create_subscriber - "
+ "Successfully created a DDSSubscriber\n"));
+
+ ::DDS::Subscriber_var retval = new RTI_Subscriber_i (rti_sub);
+
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::delete_subscriber (::DDS::Subscriber_ptr s)
+ {
+ RTI_Subscriber_i *rti_sub = dynamic_cast < RTI_Subscriber_i * > (s);
+
+ if (!rti_sub)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipant_i::delete_subscriber - "
+ "Unable to cast provided object refence to servant pointer.\n"));
+ return ::DDS::RETCODE_ERROR;
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_DomainParticipant_i::delete_subscriber - "
+ "Successfully casted provided object refence to RTI_Subscriber_i\n"));
+
+ return this->impl_->delete_subscriber (rti_sub->get_subscriber ());
+ }
+
+ ::DDS::Subscriber_ptr
+ RTI_DomainParticipant_i::get_builtin_subscriber (void)
+ {
+ DDSSubscriber* rti_sub = this->impl_->get_builtin_subscriber ();
+ ::DDS::Subscriber_var retval = new RTI_Subscriber_i (rti_sub);
+ return retval._retn ();
+ }
+
+ ::DDS::Topic_ptr
+ RTI_DomainParticipant_i::create_topic (const char * impl_name,
+ const char * type_name,
+ const ::DDS::TopicQos & /*qos*/,
+ ::DDS::TopicListener_ptr /*a_listener*/,
+ ::DDS::StatusMask mask)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::create_topic");
+
+ if (impl_name == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "DDS_DomainParticipant_i::create_topic - "
+ "Error: provided nil topic name\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_BAD_PARAMETER,
+ 0);
+ }
+
+ if (type_name == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "DDS_DomainParticipant_i::create_topic - "
+ "Error: provided nil type name\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_BAD_PARAMETER,
+ 0);
+ }
+
+ CIAO_DEBUG ((LM_DEBUG, CLINFO "DDS_DomainParticipant_i::create_topic - "
+ "Attempting to create topic with name %C and type %C\n",
+ impl_name, type_name));
+
+ DDSTopic *rti_topic = this->impl_->create_topic (impl_name,
+ type_name,
+ DDS_TOPIC_QOS_DEFAULT,
+ 0,
+ mask);
+
+ if (rti_topic == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "DDS_DomainParticipant_i::create_topic - "
+ "Error: RTI DDS returned a nil topic\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0);
+ }
+
+ CIAO_DEBUG ((LM_INFO, CLINFO "DDS_DomainParticipant_i::create_topic - "
+ "Successfully created topic with name %C and type %C\n",
+ impl_name, type_name));
+
+ ::DDS::Topic_var retval = new RTI_Topic_i (rti_topic);
+
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::delete_topic (::DDS::Topic_ptr a_topic)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::delete_topic");
+
+ RTI_Topic_i *top = dynamic_cast< RTI_Topic_i *> (a_topic);
+
+ if (top == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipant_i::delete_topic - "
+ "Unable to cast provided object reference to servant.\n"));
+ return ::DDS::RETCODE_BAD_PARAMETER;
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_DomainParticipant_i::delete_topic - "
+ "Successfully casted provided object reference to servant.\n"));
+
+ DDS_ReturnCode_t retval = this->impl_->delete_topic (top->get_topic ());
+
+ if (retval != DDS_RETCODE_OK)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipant_i::delete_topic - "
+ "Error: RTI delete_topic returned non-ok error code %c\n",
+ translate_retcode (retval)));
+ }
+ else CIAO_DEBUG ((LM_INFO, CLINFO "RTI_DomainParticipant_i::delete_topic - "
+ "Provided topic successfully deleted\n"));
+
+ return retval;
+ }
+
+ ::DDS::Topic_ptr
+ RTI_DomainParticipant_i::find_topic (const char * impl_name,
+ const ::DDS::Duration_t & timeout)
+ {
+ ::DDS_Duration_t ddstimeout;
+ ddstimeout <<= timeout;
+ ::DDSTopic* rti_topic = this->impl_->find_topic (impl_name, ddstimeout);
+ ::DDS::Topic_var retval = new RTI_Topic_i (rti_topic);
+ return retval._retn ();
+ }
+
+ ::DDS::TopicDescription_ptr
+ RTI_DomainParticipant_i::lookup_topicdescription (const char * name)
+ {
+ ::DDSTopicDescription* rti_topic = this->impl_->lookup_topicdescription (name);
+ ::DDS::TopicDescription_var retval = new RTI_TopicDescription_i (rti_topic);
+ return retval._retn ();
+ }
+
+ ::DDS::ContentFilteredTopic_ptr
+ RTI_DomainParticipant_i::create_contentfilteredtopic (const char * /*name*/,
+ ::DDS::Topic_ptr /*related_topic*/,
+ const char * /*filter_expression*/,
+ const ::DDS::StringSeq & /*expression_parameters*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::create_contentfilteredtopic");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::delete_contentfilteredtopic (::DDS::ContentFilteredTopic_ptr /*a_contentfilteredtopic*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::delete_contentfilteredtopic");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::MultiTopic_ptr
+ RTI_DomainParticipant_i::create_multitopic (const char * /*name*/,
+ const char * /*type_name*/,
+ const char * /*subscription_expression*/,
+ const ::DDS::StringSeq & /*expression_parameters*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::create_multitopic");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::delete_multitopic (::DDS::MultiTopic_ptr /*a_multitopic*/)
+ {
+ //this->impl_->delete_multitopic (
+ CIAO_TRACE ("DDS_DomainParticipant_i::delete_multitopic");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::delete_contained_entities (void)
+ {
+ return this->impl_->delete_contained_entities ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::set_qos (const ::DDS::DomainParticipantQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::set_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_qos (::DDS::DomainParticipantQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::get_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::set_listener (::DDS::DomainParticipantListener_ptr /*a_listener*/,
+ ::DDS::StatusMask /*mask*/)
+ {
+// RTI_DomainParticipantListener_i* rti_impl_list = new RTI_DomainParticipantListener_i (a_listener);
+ //return this->impl_->set_listener (rti_impl_list, mask);
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::DomainParticipantListener_ptr
+ RTI_DomainParticipant_i::get_listener (void)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::get_listener");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::ignore_participant (const ::DDS::InstanceHandle_t & handle)
+ {
+ ::DDS_InstanceHandle_t rti_handle;
+ rti_handle <<= handle;
+ return this->impl_->ignore_participant (rti_handle);
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::ignore_topic (const ::DDS::InstanceHandle_t & handle)
+ {
+ ::DDS_InstanceHandle_t rti_handle;
+ rti_handle <<= handle;
+ return this->impl_->ignore_topic (rti_handle);
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::ignore_publication (const ::DDS::InstanceHandle_t & handle)
+ {
+ ::DDS_InstanceHandle_t rti_handle;
+ rti_handle <<= handle;
+ return this->impl_->ignore_publication (rti_handle);
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::ignore_subscription (const ::DDS::InstanceHandle_t & handle)
+ {
+ ::DDS_InstanceHandle_t rti_handle;
+ rti_handle <<= handle;
+ return this->impl_->ignore_subscription (rti_handle);
+ }
+
+ ::DDS::DomainId_t
+ RTI_DomainParticipant_i::get_domain_id (void)
+ {
+ return this->impl_->get_domain_id ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::assert_liveliness (void)
+ {
+ return this->impl_->assert_liveliness ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::set_default_publisher_qos (const ::DDS::PublisherQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::set_default_publisher_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_default_publisher_qos (::DDS::PublisherQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::get_default_publisher_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::set_default_subscriber_qos (const ::DDS::SubscriberQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::set_default_subscriber_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_default_subscriber_qos (::DDS::SubscriberQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::get_default_subscriber_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::set_default_topic_qos (const ::DDS::TopicQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::set_default_topic_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_default_topic_qos (::DDS::TopicQos & /*qos*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::get_default_topic_qos");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_discovered_participants (::DDS::InstanceHandleSeq & impl_handles)
+ {
+ ::DDS_InstanceHandleSeq rtiseq;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_discovered_participants (rtiseq);
+ rtiseq >>= impl_handles;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_discovered_participant_data (::DDS::ParticipantBuiltinTopicData & /*impl_data*/,
+ const ::DDS::InstanceHandle_t & /*impl_handle*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::get_discovered_participant_data");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_discovered_topics (::DDS::InstanceHandleSeq & impl_handles)
+ {
+ ::DDS_InstanceHandleSeq rtiseq;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_discovered_topics (rtiseq);
+ rtiseq >>= impl_handles;
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_discovered_topic_data (::DDS::TopicBuiltinTopicData & /*impl_data*/,
+ const ::DDS::InstanceHandle_t & /*impl_handle*/)
+ {
+ CIAO_TRACE ("DDS_DomainParticipant_i::get_discovered_topic_data");
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::CORBA::Boolean
+ RTI_DomainParticipant_i::contains_entity (const ::DDS::InstanceHandle_t & a_handle)
+ {
+ ::DDS_InstanceHandle_t rti_handle;
+ rti_handle <<= a_handle;
+ return this->impl_->contains_entity (rti_handle);
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::get_current_time (::DDS::Time_t & current_time)
+ {
+ DDS_Time_t rti_time;
+ ::DDS::ReturnCode_t const retval = this->impl_->get_current_time (rti_time);
+ rti_time >>= current_time;
+ return retval;
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipant_i::enable (void)
+ {
+ return this->impl_->enable ();
+ }
+
+ ::DDS::StatusCondition_ptr
+ RTI_DomainParticipant_i::get_statuscondition (void)
+ {
+ DDSStatusCondition* sc = this->impl_->get_statuscondition ();
+ ::DDS::StatusCondition_var retval = new RTI_StatusCondition_i (sc);
+ return retval._retn ();
+ }
+
+ ::DDS::StatusMask
+ RTI_DomainParticipant_i::get_status_changes (void)
+ {
+ return this->impl_->get_status_changes ();
+ }
+
+ ::DDS::InstanceHandle_t
+ RTI_DomainParticipant_i::get_instance_handle (void)
+ {
+ ::DDS_InstanceHandle_t const rtihandle = this->impl_->get_instance_handle ();
+ ::DDS::InstanceHandle_t handle;
+ handle <<= rtihandle;
+ return handle;
+ }
+
+ DDSDomainParticipant *
+ RTI_DomainParticipant_i::get_participant (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.h
new file mode 100644
index 00000000000..986c8e4eab6
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.h
@@ -0,0 +1,188 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_NDDS_PARTICIPANT_H
+#define CIAO_NDDS_PARTICIPANT_H
+
+#include "tao/LocalObject.h"
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_DomainParticipant_i :
+ public virtual ::DDS::CCM_DomainParticipant,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_DomainParticipant_i (DDSDomainParticipant *p);
+
+ // Destructor
+ virtual ~RTI_DomainParticipant_i (void);
+
+ virtual
+ ::DDS::Publisher_ptr create_publisher (const ::DDS::PublisherQos & qos,
+ ::DDS::PublisherListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::ReturnCode_t delete_publisher (::DDS::Publisher_ptr p);
+
+ virtual
+ ::DDS::Subscriber_ptr create_subscriber (const ::DDS::SubscriberQos & qos,
+ ::DDS::SubscriberListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::ReturnCode_t delete_subscriber (::DDS::Subscriber_ptr s);
+
+ virtual
+ ::DDS::Subscriber_ptr get_builtin_subscriber (void);
+
+ virtual
+ ::DDS::Topic_ptr create_topic (const char * impl_name,
+ const char * type_name,
+ const ::DDS::TopicQos & qos,
+ ::DDS::TopicListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::ReturnCode_t delete_topic (::DDS::Topic_ptr a_topic);
+
+ virtual
+ ::DDS::Topic_ptr find_topic (const char * impl_name,
+ const ::DDS::Duration_t & timeout);
+
+ virtual
+ ::DDS::TopicDescription_ptr lookup_topicdescription (const char * name);
+
+ virtual
+ ::DDS::ContentFilteredTopic_ptr create_contentfilteredtopic (const char * name,
+ ::DDS::Topic_ptr related_topic,
+ const char * filter_expression,
+ const ::DDS::StringSeq & expression_parameters);
+
+ virtual
+ ::DDS::ReturnCode_t delete_contentfilteredtopic (::DDS::ContentFilteredTopic_ptr a_contentfilteredtopic);
+
+ virtual
+ ::DDS::MultiTopic_ptr create_multitopic (const char * name,
+ const char * type_name,
+ const char * subscription_expression,
+ const ::DDS::StringSeq & expression_parameters);
+
+ virtual
+ ::DDS::ReturnCode_t delete_multitopic (::DDS::MultiTopic_ptr a_multitopic);
+
+ virtual
+ ::DDS::ReturnCode_t delete_contained_entities (void);
+
+ virtual
+ ::DDS::ReturnCode_t set_qos (const ::DDS::DomainParticipantQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_qos (::DDS::DomainParticipantQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t set_listener (::DDS::DomainParticipantListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::DomainParticipantListener_ptr get_listener (void);
+
+ virtual
+ ::DDS::ReturnCode_t ignore_participant (const ::DDS::InstanceHandle_t & handle);
+
+ virtual
+ ::DDS::ReturnCode_t ignore_topic (const ::DDS::InstanceHandle_t & handle);
+
+ virtual
+ ::DDS::ReturnCode_t ignore_publication (const ::DDS::InstanceHandle_t & handle);
+
+ virtual
+ ::DDS::ReturnCode_t ignore_subscription (const ::DDS::InstanceHandle_t & handle);
+
+ virtual
+ ::DDS::DomainId_t get_domain_id (void);
+
+ virtual
+ ::DDS::ReturnCode_t assert_liveliness (void);
+
+ virtual
+ ::DDS::ReturnCode_t set_default_publisher_qos (const ::DDS::PublisherQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_default_publisher_qos (::DDS::PublisherQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t set_default_subscriber_qos (const ::DDS::SubscriberQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_default_subscriber_qos (::DDS::SubscriberQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t set_default_topic_qos (const ::DDS::TopicQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_default_topic_qos (::DDS::TopicQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_discovered_participants (::DDS::InstanceHandleSeq & impl_handles);
+
+ virtual
+ ::DDS::ReturnCode_t get_discovered_participant_data (::DDS::ParticipantBuiltinTopicData & impl_data,
+ const ::DDS::InstanceHandle_t & impl_handle);
+
+ virtual
+ ::DDS::ReturnCode_t get_discovered_topics (::DDS::InstanceHandleSeq & impl_handles);
+
+ virtual
+ ::DDS::ReturnCode_t get_discovered_topic_data (::DDS::TopicBuiltinTopicData & impl_data,
+ const ::DDS::InstanceHandle_t & impl_handle);
+
+ virtual
+ ::CORBA::Boolean contains_entity (const ::DDS::InstanceHandle_t & a_handle);
+
+ virtual
+ ::DDS::ReturnCode_t get_current_time (::DDS::Time_t & current_time);
+
+ virtual
+ ::DDS::ReturnCode_t enable (void);
+
+ virtual
+ ::DDS::StatusCondition_ptr get_statuscondition (void);
+
+ virtual
+ ::DDS::StatusMask get_status_changes (void);
+
+ virtual
+ ::DDS::InstanceHandle_t get_instance_handle (void);
+
+ DDSDomainParticipant * get_participant (void);
+
+ protected:
+ DDSDomainParticipant *impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp
new file mode 100644
index 00000000000..defdfafe9e7
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp
@@ -0,0 +1,128 @@
+// $Id$
+
+#include "DomainParticipantFactory.h"
+#include "DomainParticipant.h"
+#include "Utils.h"
+
+#include "ciao/Logger/Log_Macros.h"
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ RTI_DomainParticipantFactory_i::RTI_DomainParticipantFactory_i (void)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::RTI_DomainParticipantFactory_i");
+ }
+
+ RTI_DomainParticipantFactory_i::~RTI_DomainParticipantFactory_i (void)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::~RTI_DomainParticipantFactory_i");
+ }
+
+ ::DDS::DomainParticipant_ptr
+ RTI_DomainParticipantFactory_i::create_participant (::DDS::DomainId_t domain_id,
+ const ::DDS::DomainParticipantQos & /*qos*/,
+ ::DDS::DomainParticipantListener_ptr /*a_listener*/,
+ ::DDS::StatusMask mask)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::create_participant");
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_DomainParticipantFactory_i::create_participant - "
+ "Creating domain participant\n"));
+ DDSDomainParticipant *part = DDSDomainParticipantFactory::get_instance ()->
+ create_participant (domain_id,
+ DDS_PARTICIPANT_QOS_DEFAULT,
+ 0,
+ mask);
+
+ if (!part)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipantFactory_i::create_participant - "
+ "Error: Unable to create DomainParticipant\n"));
+ throw CCM_DDS::InternalError (1, 0);
+ }
+
+ ::DDS::DomainParticipant_var retval = new RTI_DomainParticipant_i (part);
+
+ return retval._retn ();
+ }
+
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipantFactory_i::delete_participant (::DDS::DomainParticipant_ptr a_participant)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::delete_participant");
+
+ RTI_DomainParticipant_i *part = dynamic_cast< RTI_DomainParticipant_i * > (a_participant);
+
+ if (!part)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipantFactory_i::delete_participant - "
+ "Unable to cast provided object reference to servant type, bailing.\n"));
+ return DDS::RETCODE_ERROR;
+ }
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_DomainParticipantFactory_i::delete_participant - "
+ "Successfully casted provided object reference to servant type.\n"));
+
+ DDS_ReturnCode_t retval = DDSDomainParticipantFactory::get_instance ()->
+ delete_participant (part->get_participant ());
+
+ if (retval != DDS_RETCODE_OK)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_DomainParticipantFactory_i::delete_participant - "
+ "RTI delete_participant returned non-ok error code %c\n",
+ translate_retcode (retval)));
+ }
+ else CIAO_DEBUG ((LM_INFO, CLINFO "RTI_DomainParticipantFactory_i::delete_participant - "
+ "Successfully deleted provided participant.\n"));
+
+ return retval;
+ }
+
+ ::DDS::DomainParticipant_ptr
+ RTI_DomainParticipantFactory_i::lookup_participant (::DDS::DomainId_t domain_id)
+ {
+ DDSDomainParticipant* dp = DDSDomainParticipantFactory::get_instance ()->lookup_participant (domain_id);
+ ::DDS::DomainParticipant_var retval = new RTI_DomainParticipant_i (dp);
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipantFactory_i::set_default_participant_qos (const ::DDS::DomainParticipantQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::set_default_participant_qos");
+
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipantFactory_i::get_default_participant_qos (::DDS::DomainParticipantQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::get_default_participant_qos");
+
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipantFactory_i::set_qos (const ::DDS::DomainParticipantFactoryQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::set_qos");
+
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_DomainParticipantFactory_i::get_qos (::DDS::DomainParticipantFactoryQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_DomainParticipantFactory_i::get_qos");
+
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ }
+ }
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.h
new file mode 100644
index 00000000000..04b42655796
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.h
@@ -0,0 +1,67 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef DDS_RTI_PARTICIPANTFACTORY_H
+#define DDS_RTI_PARTICIPANTFACTORY_H
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_DomainParticipantFactory_i :
+ public virtual ::DDS::CCM_DomainParticipantFactory,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_DomainParticipantFactory_i (void);
+
+ // Destructor
+ virtual ~RTI_DomainParticipantFactory_i (void);
+
+ virtual
+ ::DDS::DomainParticipant_ptr create_participant (::DDS::DomainId_t domain_id,
+ const ::DDS::DomainParticipantQos & qos,
+ ::DDS::DomainParticipantListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::ReturnCode_t delete_participant (::DDS::DomainParticipant_ptr a_participant);
+
+ virtual
+ ::DDS::DomainParticipant_ptr lookup_participant (::DDS::DomainId_t domain_id);
+
+ virtual
+ ::DDS::ReturnCode_t set_default_participant_qos (const ::DDS::DomainParticipantQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_default_participant_qos (::DDS::DomainParticipantQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t set_qos (const ::DDS::DomainParticipantFactoryQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_qos (::DDS::DomainParticipantFactoryQos & qos);
+ };
+ }
+ }
+}
+
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Duration_t.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Duration_t.h
new file mode 100644
index 00000000000..594e7d90d66
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Duration_t.h
@@ -0,0 +1,35 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_DURATION_T_H
+#define CIAO_RTI_DURATION_T_H
+
+inline void
+operator<<= (::DDS::Duration_t &ddsstatus, const ::DDS_Duration_t & status)
+{
+ ddsstatus.sec = status.sec;
+ ddsstatus.nanosec = status.nanosec;
+}
+
+inline void
+operator<<= (::DDS_Duration_t &ddsstatus, const ::DDS::Duration_t & status)
+{
+ ddsstatus.sec = status.sec;
+ ddsstatus.nanosec = status.nanosec;
+}
+
+inline void
+operator>>= (const ::DDS_Duration_t &status, ::DDS::Duration_t & ddsstatus)
+{
+ ddsstatus.sec = status.sec;
+ ddsstatus.nanosec = status.nanosec;
+}
+
+#endif /* CIAO_RTI_DURATION_T_H */
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/InconsistentTopicStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/InconsistentTopicStatus.h
new file mode 100644
index 00000000000..31585e1a0d5
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/InconsistentTopicStatus.h
@@ -0,0 +1,41 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_INCONSISTENTTOPICSTATUS_H
+#define CIAO_RTI_INCONSISTENTTOPICSTATUS_H
+
+inline void
+operator<<= (::DDS::InconsistentTopicStatus &ddsstatus, const ::DDS_InconsistentTopicStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+inline void
+operator<<= (::DDS_InconsistentTopicStatus &ddsstatus, const ::DDS::InconsistentTopicStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+inline void
+operator>>= (const ::DDS_InconsistentTopicStatus &status, ::DDS::InconsistentTopicStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+inline void
+operator>>= (const ::DDS::InconsistentTopicStatus &status, ::DDS_InconsistentTopicStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+#endif /* CIAO_RTI_INCONSISTENTTOPICSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandleSeq.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandleSeq.h
new file mode 100644
index 00000000000..e3916285d14
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandleSeq.h
@@ -0,0 +1,60 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_INSTANCEHANDLESEQ_H
+#define CIAO_RTI_INSTANCEHANDLESEQ_H
+
+#include "InstanceHandle_t.h"
+
+template <typename corbaseq, typename ddsseq>
+void convert_dds_to_corba_sequence(corbaseq & target, const ddsseq& source) {
+ target.length (source.length ());
+ for (::DDS_Long index = 0; index < source.length (); index++)
+ {
+ target[index] <<= source[index];
+ }
+}
+
+inline void
+operator<<= (::DDS::InstanceHandleSeq &ddsinstancehandleseqseq, const ::DDS_InstanceHandleSeq & instancehandleseq)
+{
+ convert_dds_to_corba_sequence (ddsinstancehandleseqseq, instancehandleseq);
+}
+
+inline void
+operator<<= (::DDS_InstanceHandleSeq &ddsinstancehandleseqseq, const ::DDS::InstanceHandleSeq & instancehandleseq)
+{
+ ddsinstancehandleseqseq.length (instancehandleseq.length ());
+ for (::DDS::InstanceHandleSeq::size_type index = 0; index < instancehandleseq.length (); index++)
+ {
+ ddsinstancehandleseqseq[index] <<= instancehandleseq[index];
+ }
+}
+
+inline void
+operator>>= (const ::DDS_InstanceHandleSeq &instancehandle, ::DDS::InstanceHandleSeq & ddsinstancehandleseqseq)
+{
+ ddsinstancehandleseqseq.length (instancehandle.length ());
+ for (::DDS_Long index = 0; index < instancehandle.length (); index++)
+ {
+ ddsinstancehandleseqseq[index] <<= instancehandle[index];
+ }
+}
+
+inline void
+operator>>= (const ::DDS::InstanceHandleSeq &instancehandle, ::DDS_InstanceHandleSeq & ddsinstancehandleseqseq)
+{
+ ddsinstancehandleseqseq.length (instancehandle.length ());
+ for (::DDS::InstanceHandleSeq::size_type index = 0; index < instancehandle.length (); index++)
+ {
+ ddsinstancehandleseqseq[index] <<= instancehandle[index];
+ }
+}
+
+#endif /* CIAO_RTI_INSTANCEHANDLESEQ_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandle_t.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandle_t.h
new file mode 100644
index 00000000000..f92e4722994
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/InstanceHandle_t.h
@@ -0,0 +1,41 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_INSTANCEHANDLE_T_H
+#define CIAO_RTI_INSTANCEHANDLE_T_H
+
+inline void
+operator<<= (::DDS::InstanceHandle_t &ddsinstancehandle, const ::DDS_InstanceHandle_t & instancehandle)
+{
+ ACE_OS::memcpy (ddsinstancehandle.value, instancehandle.keyHash.value, MIG_RTPS_KEY_HASH_MAX_LENGTH);
+ ddsinstancehandle.length = instancehandle.keyHash.length;
+}
+
+inline void
+operator<<= (::DDS_InstanceHandle_t &ddsinstancehandle, const ::DDS::InstanceHandle_t & instancehandle)
+{
+ ACE_OS::memcpy (ddsinstancehandle.keyHash.value, instancehandle.value, MIG_RTPS_KEY_HASH_MAX_LENGTH);
+ ddsinstancehandle.keyHash.length = instancehandle.length;
+}
+
+inline void
+operator>>= (const ::DDS_InstanceHandle_t &instancehandle, ::DDS::InstanceHandle_t & ddsinstancehandle)
+{
+ ACE_OS::memcpy (ddsinstancehandle.value, instancehandle.keyHash.value, MIG_RTPS_KEY_HASH_MAX_LENGTH);
+ ddsinstancehandle.length = instancehandle.keyHash.length;
+}
+
+inline void
+operator>>= (const ::DDS::InstanceHandle_t &instancehandle, ::DDS_InstanceHandle_t & ddsinstancehandle)
+{
+ ACE_OS::memcpy (ddsinstancehandle.keyHash.value, instancehandle.value, MIG_RTPS_KEY_HASH_MAX_LENGTH);
+ ddsinstancehandle.keyHash.length = instancehandle.length;
+}
+
+#endif /* CIAO_RTI_INSTANCEHANDLE_T_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp
new file mode 100644
index 00000000000..1f0b4e95321
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler v1.6.9 ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:1422
+
+#include "dds4ccm_ListnerControlI.h"
+
+// Implementation skeleton constructor
+CCM_DDS_ListenerControl_i::CCM_DDS_ListenerControl_i (void)
+{
+}
+
+// Implementation skeleton destructor
+CCM_DDS_ListenerControl_i::~CCM_DDS_ListenerControl_i (void)
+{
+}
+
+::CORBA::Boolean CCM_DDS_ListenerControl_i::enabled (void)
+{
+ // Add your implementation here
+}
+
+void CCM_DDS_ListenerControl_i::enabled (
+ ::CORBA::Boolean enabled)
+{
+ // Add your implementation here
+}
+
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h
new file mode 100644
index 00000000000..a698d55a0ed
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler v1.6.9 ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:1364
+
+#ifndef DDS4CCM_LISTNERCONTROLI_H_
+#define DDS4CCM_LISTNERCONTROLI_H_
+
+#include "dds4ccm_ListnerControlS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class CCM_DDS_ListenerControl_i
+ : public virtual POA_CCM_DDS::ListenerControl
+{
+public:
+ // Constructor
+ CCM_DDS_ListenerControl_i (void);
+
+ // Destructor
+ virtual ~CCM_DDS_ListenerControl_i (void);
+
+ virtual
+ ::CORBA::Boolean enabled (void);
+
+ virtual
+ void enabled (
+ ::CORBA::Boolean enabled);
+};
+
+
+#endif /* DDS4CCM_LISTNERCONTROLI_H_ */
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessChangedStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessChangedStatus.h
new file mode 100644
index 00000000000..4215f1bd160
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessChangedStatus.h
@@ -0,0 +1,55 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_LIVELINESSCHANGEDSTATUS_H
+#define CIAO_RTI_LIVELINESSCHANGEDSTATUS_H
+
+#include "InstanceHandle_t.h"
+
+inline void
+operator<<= (::DDS::LivelinessChangedStatus &ddsstatus, const ::DDS_LivelinessChangedStatus & status)
+{
+ ddsstatus.alive_count = status.alive_count;
+ ddsstatus.not_alive_count = status.not_alive_count;
+ ddsstatus.alive_count_change = status.alive_count_change;
+ ddsstatus.not_alive_count_change = status.not_alive_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+inline void
+operator<<= (::DDS_LivelinessChangedStatus &ddsstatus, const ::DDS::LivelinessChangedStatus & status)
+{
+ ddsstatus.alive_count = status.alive_count;
+ ddsstatus.not_alive_count = status.not_alive_count;
+ ddsstatus.alive_count_change = status.alive_count_change;
+ ddsstatus.not_alive_count_change = status.not_alive_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+inline void
+operator>>= (const ::DDS_LivelinessChangedStatus &status, ::DDS::LivelinessChangedStatus & ddsstatus)
+{
+ ddsstatus.alive_count = status.alive_count;
+ ddsstatus.not_alive_count = status.not_alive_count;
+ ddsstatus.alive_count_change = status.alive_count_change;
+ ddsstatus.not_alive_count_change = status.not_alive_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+inline void
+operator>>= (const ::DDS::LivelinessChangedStatus &status, ::DDS_LivelinessChangedStatus & ddsstatus)
+{
+ ddsstatus.alive_count = status.alive_count;
+ ddsstatus.not_alive_count = status.not_alive_count;
+ ddsstatus.alive_count_change = status.alive_count_change;
+ ddsstatus.not_alive_count_change = status.not_alive_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+#endif /* CIAO_RTI_LIVELINESSCHANGEDSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessLostStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessLostStatus.h
new file mode 100644
index 00000000000..926e39d8f08
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/LivelinessLostStatus.h
@@ -0,0 +1,41 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_LIVELINESSLOSTSTATUS_H
+#define CIAO_RTI_LIVELINESSLOSTSTATUS_H
+
+inline void
+operator<<= (::DDS::LivelinessLostStatus &ddsstatus, const ::DDS_LivelinessLostStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+inline void
+operator<<= (::DDS_LivelinessLostStatus &ddsstatus, const ::DDS::LivelinessLostStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+inline void
+operator>>= (const ::DDS_LivelinessLostStatus &status, ::DDS::LivelinessLostStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+inline void
+operator>>= (const ::DDS::LivelinessLostStatus &status, ::DDS_LivelinessLostStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+#endif /* CIAO_RTI_LIVELINESSLOSTSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/NDDS_Traits.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/NDDS_Traits.h
new file mode 100644
index 00000000000..7634f4b6db9
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/NDDS_Traits.h
@@ -0,0 +1,47 @@
+/**
+ * @file NDDS_Traits.h
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ *
+ * $Id$
+ *
+ * Traits necessary for various bits and pieces of the DDS4CCM infrastructure.
+ */
+
+#include "ndds/ndds_cpp.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ /**
+ * @struct Type_Traits
+ * @brief Convenience traits struct.
+ *
+ * This is a convenience struct that is used by most of the
+ * DDS4CCM infrastructure; it is not necessary to use this exact
+ * struct, so long as all of the needed fields are filled in.
+ */
+ template <typename VALUE_TYPE,
+ typename SEQ_TYPE,
+ typename TYPE_SUPPORT,
+ typename DATA_WRITER,
+ typename DATA_READER>
+ struct Type_Traits
+ {
+ typedef VALUE_TYPE value_type;
+ typedef SEQ_TYPE seq_type;
+ typedef TYPE_SUPPORT type_support;
+ typedef DATA_WRITER data_writer;
+ typedef DATA_READER data_reader;
+ };
+
+ typedef Type_Traits < const char *,
+ DDS_StringSeq,
+ DDSStringTypeSupport,
+ DDSStringDataWriter,
+ DDSStringDataReader > String_Traits;
+ }
+ }
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedDeadlineMissedStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedDeadlineMissedStatus.h
new file mode 100644
index 00000000000..255b22b4c71
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedDeadlineMissedStatus.h
@@ -0,0 +1,47 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_OFFEREDDEADLINEMISSEDSTATUS_H
+#define CIAO_RTI_OFFEREDDEADLINEMISSEDSTATUS_H
+
+#include "InstanceHandle_t.h"
+
+inline void
+operator<<= (::DDS::OfferedDeadlineMissedStatus &ddsstatus, const ::DDS_OfferedDeadlineMissedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator<<= (::DDS_OfferedDeadlineMissedStatus &ddsstatus, const ::DDS::OfferedDeadlineMissedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator>>= (const ::DDS_OfferedDeadlineMissedStatus &status, ::DDS::OfferedDeadlineMissedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator>>= (const ::DDS::OfferedDeadlineMissedStatus &status, ::DDS_OfferedDeadlineMissedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+#endif /* CIAO_RTI_OFFEREDDEADLINEMISSEDSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedIncompatibleQosStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedIncompatibleQosStatus.h
new file mode 100644
index 00000000000..3021d2ff935
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/OfferedIncompatibleQosStatus.h
@@ -0,0 +1,51 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_OFFEREDINCOMPATIBLEQOSSTATUS_H
+#define CIAO_RTI_OFFEREDINCOMPATIBLEQOSSTATUS_H
+
+#include "QosPolicyCountSeq.h"
+
+inline void
+operator<<= (::DDS::OfferedIncompatibleQosStatus &ddsstatus, const ::DDS_OfferedIncompatibleQosStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = status.last_policy_id;
+ ddsstatus.policies <<= status.policies;
+}
+
+inline void
+operator<<= (::DDS_OfferedIncompatibleQosStatus &ddsstatus, const ::DDS::OfferedIncompatibleQosStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = static_cast <DDS_QosPolicyId_t>(status.last_policy_id);
+ ddsstatus.policies <<= status.policies;
+}
+
+inline void
+operator>>= (const ::DDS_OfferedIncompatibleQosStatus &status, ::DDS::OfferedIncompatibleQosStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = status.last_policy_id;
+ ddsstatus.policies <<= status.policies;
+}
+
+inline void
+operator>>= (const ::DDS::OfferedIncompatibleQosStatus &status, ::DDS_OfferedIncompatibleQosStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = static_cast <DDS_QosPolicyId_t>(status.last_policy_id);
+ ddsstatus.policies <<= status.policies;
+}
+
+#endif /* CIAO_RTI_OFFEREDINCOMPATIBLEQOSSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.cpp
new file mode 100644
index 00000000000..ec4c56c2974
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.cpp
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler v1.6.9 ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:1422
+
+#include "PortStatusListener.h"
+
+// Implementation skeleton constructor
+CCM_DDS_PortStatusListener_i::CCM_DDS_PortStatusListener_i (void)
+{
+}
+
+// Implementation skeleton destructor
+CCM_DDS_PortStatusListener_i::~CCM_DDS_PortStatusListener_i (void)
+{
+}
+
+void CCM_DDS_PortStatusListener_i::on_requested_deadline_missed (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status)
+{
+ // Add your implementation here
+}
+
+void CCM_DDS_PortStatusListener_i::on_sample_lost (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status)
+{
+ // Add your implementation here
+}
+
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.h
new file mode 100644
index 00000000000..9f6273a4683
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/PortStatusListener.h
@@ -0,0 +1,42 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef DDS4CCM_PORTSTATUSLISTENERI_H_
+#define DDS4CCM_PORTSTATUSLISTENERI_H_
+
+#include "dds4ccm_PortStatusListenerS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class CCM_DDS_PortStatusListener_i
+ : public virtual ::POA_CCM_DDS::PortStatusListener
+{
+public:
+ // Constructor
+ CCM_DDS_PortStatusListener_i (void);
+
+ // Destructor
+ virtual ~CCM_DDS_PortStatusListener_i (void);
+
+ virtual
+ void on_requested_deadline_missed (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+};
+
+
+#endif /* DDS4CCM_PORTSTATUSLISTENERI_H_ */
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/PublicationMatchedStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/PublicationMatchedStatus.h
new file mode 100644
index 00000000000..fa967fcbee8
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/PublicationMatchedStatus.h
@@ -0,0 +1,55 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_PUBLICATIONMATCHEDSTATUS_H
+#define CIAO_RTI_PUBLICATIONMATCHEDSTATUS_H
+
+#include "InstanceHandle_t.h"
+
+inline void
+operator<<= (::DDS::PublicationMatchedStatus &ddsstatus, const ::DDS_PublicationMatchedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_subscription_handle <<= status.last_subscription_handle;
+}
+
+inline void
+operator<<= (::DDS_PublicationMatchedStatus &ddsstatus, const ::DDS::PublicationMatchedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_subscription_handle <<= status.last_subscription_handle;
+}
+
+inline void
+operator>>= (const ::DDS_PublicationMatchedStatus &status, ::DDS::PublicationMatchedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_subscription_handle <<= status.last_subscription_handle;
+}
+
+inline void
+operator>>= (const ::DDS::PublicationMatchedStatus &status, ::DDS_PublicationMatchedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_subscription_handle <<= status.last_subscription_handle;
+}
+
+#endif /* CIAO_RTI_PUBLICATIONMATCHEDSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp
new file mode 100644
index 00000000000..eac22517a2f
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp
@@ -0,0 +1,247 @@
+// $Id$
+
+#include "Publisher.h"
+#include "PublisherListener.h"
+#include "Topic.h"
+#include "DataWriter.h"
+#include "StatusCondition.h"
+#include "Utils.h"
+#include "Duration_t.h"
+#include "InstanceHandle_t.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_Publisher_i::RTI_Publisher_i (DDSPublisher *p)
+ : impl_ (p)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::RTI_Publisher_i");
+ }
+
+ // Implementation skeleton destructor
+ RTI_Publisher_i::~RTI_Publisher_i (void)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::~RTI_Publisher_i");
+ }
+
+ ::DDS::DataWriter_ptr
+ RTI_Publisher_i::create_datawriter (::DDS::Topic_ptr a_topic,
+ const ::DDS::DataWriterQos & /*qos*/,
+ ::DDS::DataWriterListener_ptr /*a_listener*/,
+ ::DDS::StatusMask mask)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::create_datawriter");
+
+ RTI_Topic_i * topic = dynamic_cast < RTI_Topic_i * > (a_topic);
+
+ if (!topic)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Publisher_i::create_datawriter - "
+ "Error: Unable to cast provided topic to its servant.\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_BAD_PARAMETER, 0);
+ }
+
+ DDSTopic *rti_topic = topic->get_topic ();
+
+ DDSDataWriter *rti_dw = this->impl_->create_datawriter (rti_topic,
+ DDS_DATAWRITER_QOS_DEFAULT,
+ 0,
+ mask);
+
+ if (rti_dw == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Publisher_i::create_datawriter - "
+ "Error: RTI Topic returned a nil datawriter.\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0);
+ }
+
+ ::DDS::DataWriter_var retval = new RTI_DataWriter_i (rti_dw);
+
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::delete_datawriter (::DDS::DataWriter_ptr a_datawriter)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::delete_datawriter");
+
+ RTI_DataWriter_i *top = dynamic_cast< RTI_DataWriter_i *> (a_datawriter);
+
+ if (top == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Publisher_i::delete_datawriter - "
+ "Unable to cast provided object reference to servant.\n"));
+ return ::DDS::RETCODE_BAD_PARAMETER;
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_Publisher_i::delete_datawriter - "
+ "Successfully casted provided object reference to servant.\n"));
+
+ DDS_ReturnCode_t retval = this->impl_->delete_datawriter (top->get_datawriter ());
+
+ if (retval != DDS_RETCODE_OK)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Publisher_i::delete_datawriter - "
+ "Error: RTI delete_datawriter returned non-ok error code %c\n",
+ translate_retcode (retval)));
+ }
+ else CIAO_DEBUG ((LM_INFO, CLINFO "RTI_Publisher_i::delete_datawriter - "
+ "Provided datawriter successfully deleted\n"));
+
+ return retval;
+ }
+
+ ::DDS::DataWriter_ptr
+ RTI_Publisher_i::lookup_datawriter (const char * impl_name)
+ {
+ DDSDataWriter* dw = this->impl_->lookup_datawriter (impl_name);
+ ::DDS::DataWriter_var retval = new RTI_DataWriter_i (dw);
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::delete_contained_entities (void)
+ {
+ return this->impl_->delete_contained_entities ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::set_qos (const ::DDS::PublisherQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::set_qos");
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::get_qos (::DDS::PublisherQos & /* qos*/)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::get_qos");
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::set_listener (::DDS::PublisherListener_ptr a_listener,
+ ::DDS::StatusMask mask)
+ {
+ RTI_PublisherListener_i* rti_impl_list = new RTI_PublisherListener_i (a_listener);
+ return this->impl_->set_listener (rti_impl_list, mask);
+ }
+
+ ::DDS::PublisherListener_ptr
+ RTI_Publisher_i::get_listener (void)
+ {
+ // DDSPublisherListener* pl = this->impl_->get_listener ();
+// ::DDS::PublisherListener_var retval = new RTI_PublisherListener_i (pl);
+ //return retval._retn ();
+ throw CORBA::NO_IMPLEMENT ();
+
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::suspend_publications (void)
+ {
+ return this->impl_->suspend_publications ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::resume_publications (void)
+ {
+ return this->impl_->resume_publications ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::begin_coherent_changes (void)
+ {
+ return this->impl_->begin_coherent_changes ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::end_coherent_changes (void)
+ {
+ return this->impl_->end_coherent_changes ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::wait_for_acknowledgments (const ::DDS::Duration_t & max_wait)
+ {
+ DDS_Duration_t rti_dds_duration;
+ rti_dds_duration <<= max_wait;
+ return this->impl_->wait_for_acknowledgments (rti_dds_duration);
+ }
+
+ ::DDS::DomainParticipant_ptr
+ RTI_Publisher_i::get_participant (void)
+ {
+ DDSDomainParticipant* p = this->impl_->get_participant ();
+ ::DDS::DomainParticipant_var retval = new RTI_DomainParticipant_i (p);
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::set_default_datawriter_qos (const ::DDS::DataWriterQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::set_default_datawriter_qos");
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::get_default_datawriter_qos (::DDS::DataWriterQos & /*qos*/)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::get_default_datawriter_qos");
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::copy_from_topic_qos (::DDS::DataWriterQos & /*a_dataimpl_qos*/,
+ const ::DDS::TopicQos & /*a_impl_qos*/)
+ {
+ CIAO_TRACE ("RTI_Publisher_i::copy_from_topic_qos");
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Publisher_i::enable (void)
+ {
+ return this->impl_->enable ();
+ }
+
+ ::DDS::StatusCondition_ptr
+ RTI_Publisher_i::get_statuscondition (void)
+ {
+ DDSStatusCondition* sc = this->impl_->get_statuscondition ();
+ ::DDS::StatusCondition_var retval = new RTI_StatusCondition_i (sc);
+ return retval._retn ();
+ }
+
+ ::DDS::StatusMask
+ RTI_Publisher_i::get_status_changes (void)
+ {
+ return this->impl_->get_status_changes ();
+ }
+
+ ::DDS::InstanceHandle_t
+ RTI_Publisher_i::get_instance_handle (void)
+ {
+ ::DDS_InstanceHandle_t const rtihandle = this->impl_->get_instance_handle ();
+ ::DDS::InstanceHandle_t handle;
+ handle <<= rtihandle;
+ return handle;
+ }
+
+ DDSPublisher *
+ RTI_Publisher_i::get_publisher (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.h
new file mode 100644
index 00000000000..f1c4e3584a1
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Publisher.h
@@ -0,0 +1,116 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_PUBLISHER_H
+#define CIAO_RTI_PUBLISHER_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_Publisher_i :
+ public virtual ::DDS::CCM_Publisher,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_Publisher_i (DDSPublisher *p);
+
+ // Destructor
+ virtual ~RTI_Publisher_i (void);
+
+ virtual
+ ::DDS::DataWriter_ptr create_datawriter (::DDS::Topic_ptr a_topic,
+ const ::DDS::DataWriterQos & qos,
+ ::DDS::DataWriterListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::ReturnCode_t delete_datawriter (::DDS::DataWriter_ptr a_datawriter);
+
+ virtual
+ ::DDS::DataWriter_ptr lookup_datawriter (const char * impl_name);
+
+ virtual
+ ::DDS::ReturnCode_t delete_contained_entities (void);
+
+ virtual
+ ::DDS::ReturnCode_t set_qos (const ::DDS::PublisherQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_qos (::DDS::PublisherQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t set_listener (::DDS::PublisherListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::PublisherListener_ptr get_listener (void);
+
+ virtual
+ ::DDS::ReturnCode_t suspend_publications (void);
+
+ virtual
+ ::DDS::ReturnCode_t resume_publications (void);
+
+ virtual
+ ::DDS::ReturnCode_t begin_coherent_changes (void);
+
+ virtual
+ ::DDS::ReturnCode_t end_coherent_changes (void);
+
+ virtual
+ ::DDS::ReturnCode_t wait_for_acknowledgments (const ::DDS::Duration_t & max_wait);
+
+ virtual
+ ::DDS::DomainParticipant_ptr get_participant (void);
+
+ virtual
+ ::DDS::ReturnCode_t set_default_datawriter_qos (const ::DDS::DataWriterQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_default_datawriter_qos (::DDS::DataWriterQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t copy_from_topic_qos (::DDS::DataWriterQos & a_dataimpl_qos,
+ const ::DDS::TopicQos & a_impl_qos);
+
+ virtual
+ ::DDS::ReturnCode_t enable (void);
+
+ virtual
+ ::DDS::StatusCondition_ptr get_statuscondition (void);
+
+ virtual
+ ::DDS::StatusMask get_status_changes (void);
+
+ virtual
+ ::DDS::InstanceHandle_t get_instance_handle (void);
+
+ DDSPublisher * get_publisher (void);
+ private:
+ DDSPublisher *impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.cpp
new file mode 100644
index 00000000000..10e9ce5980c
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.cpp
@@ -0,0 +1,82 @@
+// $Id$
+
+#include "PublisherListener.h"
+#include "Publisher.h"
+#include "DataWriter.h"
+#include "PublicationMatchedStatus.h"
+#include "LivelinessLostStatus.h"
+#include "OfferedIncompatibleQosStatus.h"
+#include "OfferedDeadlineMissedStatus.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_PublisherListener_i::RTI_PublisherListener_i ( ::DDS::PublisherListener_ptr p)
+ : impl_ (::DDS::PublisherListener::_duplicate (p))
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_PublisherListener_i::~RTI_PublisherListener_i (void)
+ {
+ }
+
+ void
+ RTI_PublisherListener_i::on_offered_deadline_missed (
+ ::DDSDataWriter* writer,
+ const ::DDS_OfferedDeadlineMissedStatus & status)
+ {
+ ::DDS::OfferedDeadlineMissedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (writer);
+ this->impl_->on_offered_deadline_missed (dds_writer.in (), ddsstatus);
+ }
+
+ void
+ RTI_PublisherListener_i::on_offered_incompatible_qos (
+ ::DDSDataWriter* writer,
+ const ::DDS_OfferedIncompatibleQosStatus & status)
+ {
+ ::DDS::OfferedIncompatibleQosStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (writer);
+ this->impl_->on_offered_incompatible_qos (dds_writer.in (), ddsstatus);
+ }
+
+ void
+ RTI_PublisherListener_i::on_liveliness_lost (
+ ::DDSDataWriter* writer,
+ const ::DDS_LivelinessLostStatus & status)
+ {
+ ::DDS::LivelinessLostStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (writer);
+ this->impl_->on_liveliness_lost (dds_writer.in (), ddsstatus);
+ }
+
+ void
+ RTI_PublisherListener_i::on_publication_matched (
+ ::DDSDataWriter* writer,
+ const ::DDS_PublicationMatchedStatus & status)
+ {
+ ::DDS::PublicationMatchedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataWriter_var dds_writer = new RTI_DataWriter_i (writer);
+ this->impl_->on_publication_matched (dds_writer.in (), ddsstatus);
+ }
+
+ ::DDS::PublisherListener_ptr
+ RTI_PublisherListener_i::get_publisher_listener (void)
+ {
+ return ::DDS::PublisherListener::_duplicate (this->impl_.in ());
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.h
new file mode 100644
index 00000000000..edad2f0a620
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/PublisherListener.h
@@ -0,0 +1,67 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_PUBLISHERLISTENER_H
+#define CIAO_RTI_PUBLISHERLISTENER_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_PublisherListener_i :
+ public virtual ::DDSPublisherListener
+ {
+ public:
+ // Constructor
+ RTI_PublisherListener_i (::DDS::PublisherListener_ptr p);
+
+ // Destructor
+ virtual ~RTI_PublisherListener_i (void);
+
+ virtual void
+ on_offered_deadline_missed (
+ ::DDSDataWriter *writer,
+ const ::DDS_OfferedDeadlineMissedStatus & status);
+
+ virtual void
+ on_offered_incompatible_qos (
+ ::DDSDataWriter *writer,
+ const ::DDS_OfferedIncompatibleQosStatus & status);
+
+ virtual void
+ on_liveliness_lost (
+ ::DDSDataWriter* writer,
+ const ::DDS_LivelinessLostStatus & status);
+
+ virtual void
+ on_publication_matched (
+ ::DDSDataWriter *writer,
+ const ::DDS_PublicationMatchedStatus & status);
+
+ ::DDS::PublisherListener_ptr get_publisher_listener (void);
+ private:
+ ::DDS::PublisherListener_var impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/QosPolicyCountSeq.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/QosPolicyCountSeq.h
new file mode 100644
index 00000000000..a54eb46faf6
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/QosPolicyCountSeq.h
@@ -0,0 +1,34 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_QOSPOLICYCOUNTSEQ_H
+#define CIAO_RTI_QOSPOLICYCOUNTSEQ_H
+
+inline void
+operator<<= (::DDS::QosPolicyCountSeq &/*ddsstatus*/, const ::DDS_QosPolicyCountSeq & /*status*/)
+{
+ // todo
+}
+
+inline void
+operator<<= (::DDS_QosPolicyCountSeq &/*ddsstatus*/, const ::DDS::QosPolicyCountSeq & /*status*/)
+{
+}
+
+inline void
+operator>>= (const ::DDS_QosPolicyCountSeq &/*status*/, ::DDS::QosPolicyCountSeq & /*ddsstatus*/)
+{
+}
+
+inline void
+operator>>= (const ::DDS::QosPolicyCountSeq &/*status*/, ::DDS_QosPolicyCountSeq & /*ddsstatus*/)
+{
+}
+
+#endif /* CIAO_RTI_QOSPOLICYCOUNTSEQ_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.cpp
new file mode 100644
index 00000000000..ddd28d90346
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.cpp
@@ -0,0 +1,88 @@
+// $Id$
+
+#include "QueryCondition.h"
+#include "Subscriber.h"
+#include "DataReader.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_QueryCondition_i::RTI_QueryCondition_i ( ::DDSQueryCondition *sc)
+ : impl_ (sc)
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_QueryCondition_i::~RTI_QueryCondition_i (void)
+ {
+ }
+
+ ::CORBA::Boolean
+ RTI_QueryCondition_i::get_trigger_value (void)
+ {
+ return this->impl_->get_trigger_value ();
+ }
+
+ ::DDS::SampleStateMask
+ RTI_QueryCondition_i::get_sample_state_mask (void)
+ {
+ return this->impl_->get_sample_state_mask ();
+ }
+
+ ::DDS::ViewStateMask
+ RTI_QueryCondition_i::get_view_state_mask (void)
+ {
+ return this->impl_->get_view_state_mask ();
+ }
+
+ ::DDS::InstanceStateMask
+ RTI_QueryCondition_i::get_instance_state_mask (void)
+ {
+ return this->impl_->get_instance_state_mask ();
+ }
+
+ ::DDS::DataReader_ptr
+ RTI_QueryCondition_i::get_datareader (void)
+ {
+ ::DDSDataReader* reader = this->impl_->get_datareader ();
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (reader);
+ return dds_reader._retn ();
+ }
+
+ char *
+ RTI_QueryCondition_i::get_query_expression (void)
+ {
+ return ::CORBA::string_dup (this->impl_->get_query_expression ());
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_QueryCondition_i::get_query_parameters (
+ ::DDS::StringSeq & /*query_parameters*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_QueryCondition_i::set_query_parameters (
+ const ::DDS::StringSeq & /*query_parameters*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ DDSQueryCondition *
+ RTI_QueryCondition_i::get_query_condition (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.h
new file mode 100644
index 00000000000..62e41e5623c
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/QueryCondition.h
@@ -0,0 +1,74 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_QUERYCONDITION_H
+#define CIAO_RTI_QUERYCONDITION_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_QueryCondition_i :
+ public virtual ::DDS::CCM_QueryCondition,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_QueryCondition_i (DDSQueryCondition *sc);
+
+ // Destructor
+ virtual ~RTI_QueryCondition_i (void);
+
+ virtual ::CORBA::Boolean
+ get_trigger_value (void);
+
+ virtual ::DDS::SampleStateMask
+ get_sample_state_mask (void);
+
+ virtual ::DDS::ViewStateMask
+ get_view_state_mask (void);
+
+ virtual ::DDS::InstanceStateMask
+ get_instance_state_mask (void);
+
+ virtual ::DDS::DataReader_ptr
+ get_datareader (void);
+
+ virtual char *
+ get_query_expression (void);
+
+ virtual ::DDS::ReturnCode_t
+ get_query_parameters (
+ ::DDS::StringSeq & query_parameters);
+
+ virtual ::DDS::ReturnCode_t
+ set_query_parameters (
+ const ::DDS::StringSeq & query_parameters);
+
+ DDSQueryCondition * get_query_condition (void);
+ private:
+ DDSQueryCondition *impl_;
+ };
+ }
+ }
+}
+
+#endif /* CIAO_RTI_QUERYCONDITION_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.cpp
new file mode 100644
index 00000000000..2212ec3557d
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.cpp
@@ -0,0 +1,20 @@
+// $Id$
+
+#include "RawListener.h"
+
+// Implementation skeleton constructor
+CCM_DDS_string_RawListener_i::CCM_DDS_string_RawListener_i (void)
+{
+}
+
+// Implementation skeleton destructor
+CCM_DDS_string_RawListener_i::~CCM_DDS_string_RawListener_i (void)
+{
+}
+
+void CCM_DDS_string_RawListener_i::on_data (
+ const char * an_instance,
+ const ::CCM_DDS::ReadInfo & info)
+{
+ // Add your implementation here
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.h
new file mode 100644
index 00000000000..17cd4acbfa3
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/RawListener.h
@@ -0,0 +1,17 @@
+// $Id$
+
+class CCM_DDS_string_RawListener_i
+ : public virtual POA_CCM_DDS::string_RawListener
+{
+public:
+ // Constructor
+ CCM_DDS_string_RawListener_i (void);
+
+ // Destructor
+ virtual ~CCM_DDS_string_RawListener_i (void);
+
+ virtual
+ void on_data (
+ const char * an_instance,
+ const ::CCM_DDS::ReadInfo & info);
+};
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.cpp
new file mode 100644
index 00000000000..55f8ae929ea
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.cpp
@@ -0,0 +1,63 @@
+// $Id$
+
+#include "ReadCondition.h"
+#include "DataReader.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_ReadCondition_i::RTI_ReadCondition_i (DDSReadCondition *rc)
+ : impl_ (rc)
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_ReadCondition_i::~RTI_ReadCondition_i (void)
+ {
+ }
+
+ ::CORBA::Boolean
+ RTI_ReadCondition_i::get_trigger_value (void)
+ {
+ return this->impl_->get_trigger_value ();
+ }
+
+ ::DDS::SampleStateMask
+ RTI_ReadCondition_i::get_sample_state_mask (void)
+ {
+ return this->impl_->get_sample_state_mask ();
+ }
+
+ ::DDS::ViewStateMask
+ RTI_ReadCondition_i::get_view_state_mask (void)
+ {
+ return this->impl_->get_view_state_mask ();
+ }
+
+ ::DDS::InstanceStateMask
+ RTI_ReadCondition_i::get_instance_state_mask (void)
+ {
+ return this->impl_->get_instance_state_mask ();
+ }
+
+ ::DDS::DataReader_ptr
+ RTI_ReadCondition_i::get_datareader (void)
+ {
+ DDSDataReader* rd = this->impl_->get_datareader ();
+ ::DDS::DataReader_var retval = new RTI_DataReader_i (rd);
+ return retval._retn ();
+ }
+
+ DDSReadCondition *
+ RTI_ReadCondition_i::get_readcondition (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.h
new file mode 100644
index 00000000000..71c7847311c
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ReadCondition.h
@@ -0,0 +1,63 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_READCONDITION_H
+#define CIAO_RTI_READCONDITION_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_ReadCondition_i :
+ public virtual ::DDS::CCM_ReadCondition,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_ReadCondition_i (DDSReadCondition *rc);
+
+ // Destructor
+ virtual ~RTI_ReadCondition_i (void);
+
+ virtual ::CORBA::Boolean
+ get_trigger_value (void);
+
+ virtual ::DDS::SampleStateMask
+ get_sample_state_mask (void);
+
+ virtual ::DDS::ViewStateMask
+ get_view_state_mask (void);
+
+ virtual ::DDS::InstanceStateMask
+ get_instance_state_mask (void);
+
+ virtual ::DDS::DataReader_ptr
+ get_datareader (void);
+
+ DDSReadCondition * get_readcondition (void);
+ private:
+ DDSReadCondition *impl_;
+ };
+ }
+ }
+}
+
+#endif /* CIAO_RTI_READCONDITION_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.cpp
new file mode 100644
index 00000000000..1dc38146250
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.cpp
@@ -0,0 +1,53 @@
+// $Id$
+
+#include "Reader.h"
+
+// Implementation skeleton constructor
+CCM_DDS_string_Reader_i::CCM_DDS_string_Reader_i (void)
+{
+}
+
+// Implementation skeleton destructor
+CCM_DDS_string_Reader_i::~CCM_DDS_string_Reader_i (void)
+{
+}
+
+void CCM_DDS_string_Reader_i::read_all (
+ ::CCM_DDS::string_Reader::stringSeq_out instances,
+ ::CCM_DDS::ReadInfoSeq_out infos)
+{
+ // Add your implementation here
+}
+
+void CCM_DDS_string_Reader_i::read_all_history (
+ ::CCM_DDS::string_Reader::stringSeq_out instances,
+ ::CCM_DDS::ReadInfoSeq_out infos)
+{
+ // Add your implementation here
+}
+
+void CCM_DDS_string_Reader_i::read_one (
+ char *& an_instance,
+ ::CCM_DDS::ReadInfo_out info)
+{
+ // Add your implementation here
+}
+
+void CCM_DDS_string_Reader_i::read_one_history (
+ const char * an_instance,
+ ::CCM_DDS::string_Reader::stringSeq_out instances,
+ ::CCM_DDS::ReadInfoSeq_out infos)
+{
+ // Add your implementation here
+}
+
+::CCM_DDS::QueryFilter * CCM_DDS_string_Reader_i::filter (void)
+{
+ // Add your implementation here
+}
+
+void CCM_DDS_string_Reader_i::filter (
+ const ::CCM_DDS::QueryFilter & filter)
+{
+ // Add your implementation here
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.h
new file mode 100644
index 00000000000..15358976d0c
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Reader.h
@@ -0,0 +1,40 @@
+// $Id$
+
+class CCM_DDS_string_Reader_i
+ : public virtual POA_CCM_DDS::string_Reader
+{
+public:
+ // Constructor
+ CCM_DDS_string_Reader_i (void);
+
+ // Destructor
+ virtual ~CCM_DDS_string_Reader_i (void);
+
+ virtual
+ void read_all (
+ ::CCM_DDS::string_Reader::stringSeq_out instances,
+ ::CCM_DDS::ReadInfoSeq_out infos);
+
+ virtual
+ void read_all_history (
+ ::CCM_DDS::string_Reader::stringSeq_out instances,
+ ::CCM_DDS::ReadInfoSeq_out infos);
+
+ virtual
+ void read_one (
+ char *& an_instance,
+ ::CCM_DDS::ReadInfo_out info);
+
+ virtual
+ void read_one_history (
+ const char * an_instance,
+ ::CCM_DDS::string_Reader::stringSeq_out instances,
+ ::CCM_DDS::ReadInfoSeq_out infos);
+
+ virtual
+ ::CCM_DDS::QueryFilter * filter (void);
+
+ virtual
+ void filter (
+ const ::CCM_DDS::QueryFilter & filter);
+};
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedDeadlineMissedStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedDeadlineMissedStatus.h
new file mode 100644
index 00000000000..9d9f203c649
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedDeadlineMissedStatus.h
@@ -0,0 +1,47 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_REQUESTEDDEADLINEMISSEDSTATUS_H
+#define CIAO_RTI_REQUESTEDDEADLINEMISSEDSTATUS_H
+
+#include "InstanceHandle_t.h"
+
+inline void
+operator<<= (::DDS::RequestedDeadlineMissedStatus &ddsstatus, const ::DDS_RequestedDeadlineMissedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator<<= (::DDS_RequestedDeadlineMissedStatus &ddsstatus, const ::DDS::RequestedDeadlineMissedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator>>= (const ::DDS_RequestedDeadlineMissedStatus &status, ::DDS::RequestedDeadlineMissedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator>>= (const ::DDS::RequestedDeadlineMissedStatus &status, ::DDS_RequestedDeadlineMissedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+#endif /* CIAO_RTI_REQUESTEDDEADLINEMISSEDSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedIncompatibleQosStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedIncompatibleQosStatus.h
new file mode 100644
index 00000000000..b657de7c1fc
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/RequestedIncompatibleQosStatus.h
@@ -0,0 +1,51 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_REQUESTEDINCOMPATIBLEQOSSTATUS_H
+#define CIAO_RTI_REQUESTEDINCOMPATIBLEQOSSTATUS_H
+
+#include "QosPolicyCountSeq.h"
+
+inline void
+operator<<= (::DDS::RequestedIncompatibleQosStatus &ddsstatus, const ::DDS_RequestedIncompatibleQosStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = status.last_policy_id;
+ ddsstatus.policies <<= status.policies;
+}
+
+inline void
+operator<<= (::DDS_RequestedIncompatibleQosStatus &ddsstatus, const ::DDS::RequestedIncompatibleQosStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = static_cast <DDS_QosPolicyId_t>(status.last_policy_id);
+ ddsstatus.policies <<= status.policies;
+}
+
+inline void
+operator>>= (const ::DDS_RequestedIncompatibleQosStatus &status, ::DDS::RequestedIncompatibleQosStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = status.last_policy_id;
+ ddsstatus.policies <<= status.policies;
+}
+
+inline void
+operator>>= (const ::DDS::RequestedIncompatibleQosStatus &status, ::DDS_RequestedIncompatibleQosStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_policy_id = static_cast <DDS_QosPolicyId_t>(status.last_policy_id);
+ ddsstatus.policies <<= status.policies;
+}
+
+#endif /* CIAO_RTI_REQUESTEDINCOMPATIBLEQOSSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/SampleLostStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/SampleLostStatus.h
new file mode 100644
index 00000000000..4e51ef3e61a
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/SampleLostStatus.h
@@ -0,0 +1,28 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_SAMPLELOSTSTATUS_H
+#define CIAO_RTI_SAMPLELOSTSTATUS_H
+
+inline void
+operator<<= (::DDS::SampleLostStatus &ddsstatus, const ::DDS_SampleLostStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+inline void
+operator>>= (const ::DDS_SampleLostStatus &status, ::DDS::SampleLostStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+}
+
+#endif /* CIAO_RTI_SAMPLELOSTSTATUS_H */
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/SampleRejectedStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/SampleRejectedStatus.h
new file mode 100644
index 00000000000..09bee568910
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/SampleRejectedStatus.h
@@ -0,0 +1,51 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_SAMPLEREJECTEDSTATUS_H
+#define CIAO_RTI_SAMPLEREJECTEDSTATUS_H
+
+#include "InstanceHandle_t.h"
+
+inline void
+operator<<= (::DDS::SampleRejectedStatus &ddsstatus, const ::DDS_SampleRejectedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_reason = static_cast < ::DDS::SampleRejectedStatusKind> (status.last_reason);
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator<<= (::DDS_SampleRejectedStatus &ddsstatus, const ::DDS::SampleRejectedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_reason = static_cast < ::DDS_SampleRejectedStatusKind> (status.last_reason);
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator>>= (const ::DDS_SampleRejectedStatus &status, ::DDS::SampleRejectedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_reason = static_cast < ::DDS::SampleRejectedStatusKind> (status.last_reason);
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+inline void
+operator>>= (const ::DDS::SampleRejectedStatus &status, ::DDS_SampleRejectedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.last_reason = static_cast < ::DDS_SampleRejectedStatusKind> (status.last_reason);
+ ddsstatus.last_instance_handle <<= status.last_instance_handle;
+}
+
+#endif /* CIAO_RTI_SAMPLEREJECTEDSTATUS_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.cpp
new file mode 100644
index 00000000000..c632e85ed71
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.cpp
@@ -0,0 +1,60 @@
+// $Id$
+
+#include "StatusCondition.h"
+#include "Subscriber.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_StatusCondition_i::RTI_StatusCondition_i (DDSStatusCondition *sc)
+ : impl_ (sc)
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_StatusCondition_i::~RTI_StatusCondition_i (void)
+ {
+ }
+
+ ::CORBA::Boolean
+ RTI_StatusCondition_i::get_trigger_value (void)
+ {
+ return this->impl_->get_trigger_value ();
+ }
+
+ ::DDS::StatusMask
+ RTI_StatusCondition_i::get_enabled_statuses (void)
+ {
+ return this->impl_->get_enabled_statuses ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_StatusCondition_i::set_enabled_statuses (
+ ::DDS::StatusMask mask)
+ {
+ return this->impl_->set_enabled_statuses (mask);
+ }
+
+ ::DDS::Entity_ptr
+ RTI_StatusCondition_i::get_entity (void)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ DDSStatusCondition *
+ RTI_StatusCondition_i::get_status_condition (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.h
new file mode 100644
index 00000000000..720b2430dbf
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/StatusCondition.h
@@ -0,0 +1,61 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_STATUSCONDITION_H
+#define CIAO_RTI_STATUSCONDITION_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_StatusCondition_i :
+ public virtual ::DDS::CCM_StatusCondition,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_StatusCondition_i (DDSStatusCondition *sc);
+
+ // Destructor
+ virtual ~RTI_StatusCondition_i (void);
+
+ virtual ::CORBA::Boolean
+ get_trigger_value (void);
+
+ virtual ::DDS::StatusMask
+ get_enabled_statuses (void);
+
+ virtual ::DDS::ReturnCode_t
+ set_enabled_statuses (
+ ::DDS::StatusMask mask);
+
+ virtual ::DDS::Entity_ptr
+ get_entity (void);
+
+ DDSStatusCondition * get_status_condition (void);
+ private:
+ DDSStatusCondition *impl_;
+ };
+ }
+ }
+}
+
+#endif /* CIAO_RTI_STATUSCONDITION_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp
new file mode 100644
index 00000000000..91764d8856d
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp
@@ -0,0 +1,255 @@
+// $Id$
+
+#include "Subscriber.h"
+#include "SubscriberListener.h"
+#include "Topic.h"
+#include "DataReader.h"
+#include "DataReaderListener.h"
+#include "Utils.h"
+#include "StatusCondition.h"
+#include "InstanceHandle_t.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_Subscriber_i::RTI_Subscriber_i (DDSSubscriber *s)
+ : impl_ (s)
+ {
+ CIAO_TRACE ("RTI_Subscriber_i::RTI_Subscriber_i");
+ }
+
+ // Implementation skeleton destructor
+ RTI_Subscriber_i::~RTI_Subscriber_i (void)
+ {
+ CIAO_TRACE ("RTI_Subscriber_i::~RTI_Subscriber_i");
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::enable (void)
+ {
+ return this->impl_->enable ();
+ }
+
+ ::DDS::StatusCondition_ptr
+ RTI_Subscriber_i::get_statuscondition (void)
+ {
+ DDSStatusCondition* sc = this->impl_->get_statuscondition ();
+ ::DDS::StatusCondition_var retval = new RTI_StatusCondition_i (sc);
+ return retval._retn ();
+ }
+
+ ::DDS::StatusMask
+ RTI_Subscriber_i::get_status_changes (void)
+ {
+ return this->impl_->get_status_changes ();
+ }
+
+ ::DDS::InstanceHandle_t
+ RTI_Subscriber_i::get_instance_handle (void)
+ {
+ ::DDS_InstanceHandle_t const rtihandle = this->impl_->get_instance_handle ();
+ ::DDS::InstanceHandle_t handle;
+ handle <<= rtihandle;
+ return handle;
+ }
+
+ ::DDS::DataReader_ptr
+ RTI_Subscriber_i::create_datareader (
+ ::DDS::TopicDescription_ptr a_topic,
+ const ::DDS::DataReaderQos & /*qos*/,
+ ::DDS::DataReaderListener_ptr a_listener,
+ ::DDS::StatusMask mask)
+ {
+ RTI_Topic_i * topic = dynamic_cast < RTI_Topic_i * > (a_topic);
+ if (!topic)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Subscriber_i::create_datareader - "
+ "Error: Unable to cast provided topic to its servant.\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_BAD_PARAMETER, 0);
+ }
+ DDSTopic *rti_topic = topic->get_topic ();
+// DDSDataReaderListener *rti_drl = drl->get_datareaderlistener ();
+// todo leak
+ DDSDataReaderListener *rti_drl = new RTI_DataReaderListener_i (a_listener);
+ DDSDataReader *rti_dr = this->impl_->create_datareader (rti_topic,
+ DDS_DATAREADER_QOS_DEFAULT,
+ rti_drl,
+ mask);
+ if (!rti_dr)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Subscriber_i::create_datareader - "
+ "Error: RTI Topic returned a nil datareader.\n"));
+ throw CCM_DDS::InternalError (::DDS::RETCODE_ERROR, 0);
+ }
+
+ ::DDS::DataReader_var retval = new RTI_DataReader_i (rti_dr);
+
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::delete_datareader (
+ ::DDS::DataReader_ptr a_datareader)
+ {
+ RTI_DataReader_i *top = dynamic_cast< RTI_DataReader_i *> (a_datareader);
+ if (!top)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Subscriber_i::delete_datareader - "
+ "Unable to cast provided object reference to servant.\n"));
+ return ::DDS::RETCODE_BAD_PARAMETER;
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "RTI_Subscriber_i::delete_datareader - "
+ "Successfully casted provided object reference to servant.\n"));
+
+ DDS_ReturnCode_t retval = this->impl_->delete_datareader (top->get_datareader ());
+
+ if (retval != DDS_RETCODE_OK)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "RTI_Subscriber_i::delete_datareader - "
+ "Error: Returned non-ok error code %c\n",
+ translate_retcode (retval)));
+ }
+ else CIAO_DEBUG ((LM_INFO, CLINFO "RTI_Subscriber_i::delete_datareader - "
+ "Successfully deleted\n"));
+
+ return retval;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::delete_contained_entities (void)
+ {
+ return this->impl_->delete_contained_entities ();
+ }
+
+ ::DDS::DataReader_ptr
+ RTI_Subscriber_i::lookup_datareader (
+ const char * impl_name)
+ {
+ DDSDataReader* dr = this->impl_->lookup_datareader (impl_name);
+ ::DDS::DataReader_var retval = new RTI_DataReader_i (dr);
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::get_datareaders (
+ ::DDS::DataReaderSeq & /*readers*/,
+ ::DDS::SampleStateMask /*sample_states*/,
+ ::DDS::ViewStateMask /*view_states*/,
+ ::DDS::InstanceStateMask /*instance_states*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::notify_datareaders (void)
+ {
+ return this->impl_->notify_datareaders ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::set_qos (
+ const ::DDS::SubscriberQos & /*qos*/)
+ {
+ DDS_SubscriberQos rti_impl_qos;
+/* rti_impl_qos.presentation = qos.presentation;
+ rti_impl_qos.partition = qos.partition;
+ rti_impl_qos.group_data = qos.group_data;
+ rti_impl_qos.entity_factory = qos.entity_factory;*/
+ return this->impl_->set_qos (rti_impl_qos);
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::get_qos (
+ ::DDS::SubscriberQos & /*qos*/)
+ {
+ DDS_SubscriberQos rti_impl_qos;
+ DDS_ReturnCode_t const rti_retcode = this->impl_->get_qos (rti_impl_qos);
+ /*qos.presentation = rti_impl_qos.presentation;
+ qos.partition = rti_impl_qos.partition;
+ qos.group_data = rti_impl_qos.group_data;
+ qos.entity_factory = rti_impl_qos.entity_factory;*/
+ return rti_retcode;
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::set_listener (
+ ::DDS::SubscriberListener_ptr a_listener,
+ ::DDS::StatusMask mask)
+ {
+ RTI_SubscriberListener_i* rti_impl_list = new RTI_SubscriberListener_i (a_listener);
+ return this->impl_->set_listener (rti_impl_list, mask);
+ }
+
+ ::DDS::SubscriberListener_ptr
+ RTI_Subscriber_i::get_listener (void)
+ {
+// DDSSubscriberListener* rti_impl_list = this->impl_->get_listener ();
+// ::DDS::SubscriberListener_var retval = new RTI_SubscriberListener_i (rti_impl_list);
+// return retval._retn ();
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::begin_access (void)
+ {
+ return this->impl_->begin_access ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::end_access (void)
+ {
+ return this->impl_->end_access ();
+ }
+
+ ::DDS::DomainParticipant_ptr
+ RTI_Subscriber_i::get_participant (void)
+ {
+ DDSDomainParticipant* p = this->impl_->get_participant ();
+ ::DDS::DomainParticipant_var retval = new RTI_DomainParticipant_i (p);
+ return retval._retn ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::set_default_datareader_qos (
+ const ::DDS::DataReaderQos & /*qos*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::get_default_datareader_qos (
+ ::DDS::DataReaderQos & /*qos*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Subscriber_i::copy_from_topic_qos (
+ ::DDS::DataReaderQos & /*a_datareader_qos*/,
+ const ::DDS::TopicQos & /*a_impl_qos*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ // Add your implementation here
+ }
+
+ DDSSubscriber *
+ RTI_Subscriber_i::get_subscriber (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.h
new file mode 100644
index 00000000000..cf35349ed28
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.h
@@ -0,0 +1,127 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_SUBSCRIBER_H
+#define CIAO_RTI_SUBSCRIBER_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_Subscriber_i :
+ public virtual ::DDS::CCM_Subscriber,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_Subscriber_i (DDSSubscriber *p);
+
+ // Destructor
+ virtual ~RTI_Subscriber_i (void);
+
+ virtual ::DDS::ReturnCode_t
+ enable (void);
+
+ virtual ::DDS::StatusCondition_ptr
+ get_statuscondition (void);
+
+ virtual ::DDS::StatusMask
+ get_status_changes (void);
+
+ virtual ::DDS::InstanceHandle_t
+ get_instance_handle (void);
+
+ virtual ::DDS::DataReader_ptr
+ create_datareader (
+ ::DDS::TopicDescription_ptr a_topic,
+ const ::DDS::DataReaderQos & qos,
+ ::DDS::DataReaderListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual ::DDS::ReturnCode_t
+ delete_datareader (
+ ::DDS::DataReader_ptr a_datareader);
+
+ virtual ::DDS::ReturnCode_t
+ delete_contained_entities (void);
+
+ virtual ::DDS::DataReader_ptr
+ lookup_datareader (
+ const char * impl_name);
+
+ virtual ::DDS::ReturnCode_t
+ get_datareaders (
+ ::DDS::DataReaderSeq & readers,
+ ::DDS::SampleStateMask sample_states,
+ ::DDS::ViewStateMask view_states,
+ ::DDS::InstanceStateMask instance_states);
+
+ virtual ::DDS::ReturnCode_t
+ notify_datareaders (void);
+
+ virtual ::DDS::ReturnCode_t
+ set_qos (
+ const ::DDS::SubscriberQos & qos);
+
+ virtual ::DDS::ReturnCode_t
+ get_qos (
+ ::DDS::SubscriberQos & qos);
+
+ virtual ::DDS::ReturnCode_t
+ set_listener (
+ ::DDS::SubscriberListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual ::DDS::SubscriberListener_ptr
+ get_listener (void);
+
+ virtual ::DDS::ReturnCode_t
+ begin_access (void);
+
+ virtual ::DDS::ReturnCode_t
+ end_access (void);
+
+ virtual ::DDS::DomainParticipant_ptr
+ get_participant (void);
+
+ virtual ::DDS::ReturnCode_t
+ set_default_datareader_qos (
+ const ::DDS::DataReaderQos & qos);
+
+ virtual ::DDS::ReturnCode_t
+ get_default_datareader_qos (
+ ::DDS::DataReaderQos & qos);
+
+ virtual ::DDS::ReturnCode_t
+ copy_from_topic_qos (
+ ::DDS::DataReaderQos & a_datareader_qos,
+ const ::DDS::TopicQos & a_impl_qos);
+
+ DDSSubscriber * get_subscriber (void);
+ private:
+ DDSSubscriber *impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.cpp
new file mode 100644
index 00000000000..1a894786c21
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.cpp
@@ -0,0 +1,120 @@
+// $Id$
+
+#include "SubscriberListener.h"
+#include "Subscriber.h"
+#include "DataReader.h"
+#include "SampleLostStatus.h"
+#include "SubscriptionMatchedStatus.h"
+#include "RequestedDeadlineMissedStatus.h"
+#include "SampleRejectedStatus.h"
+#include "LivelinessChangedStatus.h"
+#include "RequestedIncompatibleQosStatus.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_SubscriberListener_i::RTI_SubscriberListener_i (::DDS::SubscriberListener_ptr p)
+ : impl_ ( ::DDS::SubscriberListener::_duplicate (p))
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_SubscriberListener_i::~RTI_SubscriberListener_i (void)
+ {
+ }
+
+ void
+ RTI_SubscriberListener_i::on_data_on_readers (
+ ::DDSSubscriber* the_subscriber)
+ {
+ ::DDS::Subscriber_var sub = new RTI_Subscriber_i (the_subscriber);
+ this->impl_->on_data_on_readers (sub.in ());
+ }
+
+ void
+ RTI_SubscriberListener_i::on_requested_deadline_missed (
+ ::DDSDataReader* the_reader,
+ const ::DDS_RequestedDeadlineMissedStatus & status)
+ {
+ ::DDS::RequestedDeadlineMissedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_requested_deadline_missed (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_SubscriberListener_i::on_requested_incompatible_qos (
+ ::DDSDataReader* the_reader,
+ const ::DDS_RequestedIncompatibleQosStatus & status)
+ {
+ ::DDS::RequestedIncompatibleQosStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_requested_incompatible_qos (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_SubscriberListener_i::on_sample_rejected (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SampleRejectedStatus & status)
+ {
+ ::DDS::SampleRejectedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_sample_rejected (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_SubscriberListener_i::on_liveliness_changed (
+ ::DDSDataReader* the_reader,
+ const ::DDS_LivelinessChangedStatus & status)
+ {
+ ::DDS::LivelinessChangedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_liveliness_changed (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_SubscriberListener_i::on_data_available (
+ ::DDSDataReader* the_reader)
+ {
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_data_available (dds_reader.in ());
+ }
+
+ void
+ RTI_SubscriberListener_i::on_subscription_matched (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SubscriptionMatchedStatus & status)
+ {
+ ::DDS::SubscriptionMatchedStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_subscription_matched (dds_reader.in (), ddsstatus);
+ }
+
+ void
+ RTI_SubscriberListener_i::on_sample_lost (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SampleLostStatus & status)
+ {
+ ::DDS::SampleLostStatus ddsstatus;
+ ddsstatus <<= status;
+ ::DDS::DataReader_var dds_reader = new RTI_DataReader_i (the_reader);
+ this->impl_->on_sample_lost (dds_reader.in (), ddsstatus);
+ }
+
+ ::DDS::SubscriberListener_ptr
+ RTI_SubscriberListener_i::get_subscriber_listener (void)
+ {
+ return ::DDS::SubscriberListener::_duplicate (this->impl_.in ());
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.h
new file mode 100644
index 00000000000..6f552d234e9
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriberListener.h
@@ -0,0 +1,82 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_SUBSCRIBERLISTENER_H
+#define CIAO_RTI_SUBSCRIBERLISTENER_H
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_SubscriberListener_i :
+ public virtual ::DDSSubscriberListener
+ {
+ public:
+ // Constructor
+ RTI_SubscriberListener_i ( ::DDS::SubscriberListener_ptr s);
+
+ // Destructor
+ virtual ~RTI_SubscriberListener_i (void);
+
+ virtual void
+ on_requested_deadline_missed (
+ ::DDSDataReader* the_reader,
+ const ::DDS_RequestedDeadlineMissedStatus & status);
+
+ virtual void
+ on_requested_incompatible_qos (
+ ::DDSDataReader* the_reader,
+ const ::DDS_RequestedIncompatibleQosStatus & status);
+
+ virtual void
+ on_sample_rejected (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SampleRejectedStatus & status);
+
+ virtual void
+ on_liveliness_changed (
+ ::DDSDataReader* the_reader,
+ const ::DDS_LivelinessChangedStatus & status);
+
+ virtual void
+ on_data_available (
+ ::DDSDataReader* the_reader);
+
+ virtual void
+ on_subscription_matched (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SubscriptionMatchedStatus & status);
+
+ virtual void
+ on_sample_lost (
+ ::DDSDataReader* the_reader,
+ const ::DDS_SampleLostStatus & status);
+
+ virtual void
+ on_data_on_readers (
+ ::DDSSubscriber* the_subscriber);
+
+ ::DDS::SubscriberListener_ptr get_subscriber_listener (void);
+ private:
+ ::DDS::SubscriberListener_var impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriptionMatchedStatus.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriptionMatchedStatus.h
new file mode 100644
index 00000000000..0bfbfdbab4f
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/SubscriptionMatchedStatus.h
@@ -0,0 +1,56 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_SUBSCRIPTIONMATCHEDSTATUS_H
+#define CIAO_RTI_SUBSCRIPTIONMATCHEDSTATUS_H
+
+#include "InstanceHandle_t.h"
+
+inline void
+operator<<= (::DDS::SubscriptionMatchedStatus &ddsstatus, const ::DDS_SubscriptionMatchedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+inline void
+operator<<= (::DDS_SubscriptionMatchedStatus &ddsstatus, const ::DDS::SubscriptionMatchedStatus & status)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+inline void
+operator>>= (const ::DDS_SubscriptionMatchedStatus &status, ::DDS::SubscriptionMatchedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+inline void
+operator>>= (const ::DDS::SubscriptionMatchedStatus &status, ::DDS_SubscriptionMatchedStatus & ddsstatus)
+{
+ ddsstatus.total_count = status.total_count;
+ ddsstatus.total_count_change = status.total_count_change;
+ ddsstatus.current_count = status.current_count;
+ ddsstatus.current_count_change = status.current_count_change;
+ ddsstatus.last_publication_handle <<= status.last_publication_handle;
+}
+
+#endif /* CIAO_RTI_SUBSCRIPTIONMATCHEDSTATUS_H */
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Time_t.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Time_t.h
new file mode 100644
index 00000000000..a6385b25756
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Time_t.h
@@ -0,0 +1,35 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_TIME_T_H
+#define CIAO_RTI_TIME_T_H
+
+inline void
+operator<<= (::DDS::Time_t &ddsstatus, const ::DDS_Time_t & status)
+{
+ ddsstatus.sec = status.sec;
+ ddsstatus.nanosec = status.nanosec;
+}
+
+inline void
+operator<<= (::DDS_Time_t &ddsstatus, const ::DDS::Time_t & status)
+{
+ ddsstatus.sec = status.sec;
+ ddsstatus.nanosec = status.nanosec;
+}
+
+inline void
+operator>>= (const ::DDS_Time_t &status, ::DDS::Time_t & ddsstatus)
+{
+ ddsstatus.sec = status.sec;
+ ddsstatus.nanosec = status.nanosec;
+}
+
+#endif /* CIAO_RTI_TIME_T_H */
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.cpp
new file mode 100644
index 00000000000..aa8ed0c686f
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.cpp
@@ -0,0 +1,117 @@
+// $Id$
+
+#include "Topic.h"
+#include "StatusCondition.h"
+#include "InstanceHandle_t.h"
+#include "InconsistentTopicStatus.h"
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_Topic_i::RTI_Topic_i (DDSTopic * top)
+ : impl_ (top)
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_Topic_i::~RTI_Topic_i (void)
+ {
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Topic_i::set_qos (const ::DDS::TopicQos & /*qos*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Topic_i::get_qos (::DDS::TopicQos & /*qos*/)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Topic_i::set_listener (::DDS::TopicListener_ptr /*a_listener*/,
+ ::DDS::StatusMask /*mask*/)
+ {
+ //RTI_TopicListener_i* rti_impl_list = new RTI_TopicListener_i (a_listener);
+ //return this->impl_->set_listener (rti_impl_list, mask);
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::TopicListener_ptr
+ RTI_Topic_i::get_listener (void)
+ {
+ throw CORBA::NO_IMPLEMENT ();
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Topic_i::get_inconsistent_topic_status (::DDS::InconsistentTopicStatus & a_status)
+ {
+ DDS_InconsistentTopicStatus ddsstatus;
+ ddsstatus <<= a_status;
+ return this->impl_->get_inconsistent_topic_status (ddsstatus);
+ }
+
+ ::DDS::ReturnCode_t
+ RTI_Topic_i::enable (void)
+ {
+ return this->impl_->enable ();
+ }
+
+ ::DDS::StatusCondition_ptr
+ RTI_Topic_i::get_statuscondition (void)
+ {
+ DDSStatusCondition* sc = this->impl_->get_statuscondition ();
+ ::DDS::StatusCondition_var retval = new RTI_StatusCondition_i (sc);
+ return retval._retn ();
+ }
+
+ ::DDS::StatusMask
+ RTI_Topic_i::get_status_changes (void)
+ {
+ return this->impl_->get_status_changes ();
+ }
+
+ ::DDS::InstanceHandle_t
+ RTI_Topic_i::get_instance_handle (void)
+ {
+ ::DDS_InstanceHandle_t const rtihandle = this->impl_->get_instance_handle ();
+ ::DDS::InstanceHandle_t handle;
+ handle <<= rtihandle;
+ return handle;
+ }
+
+ char *
+ RTI_Topic_i::get_type_name (void)
+ {
+ return CORBA::string_dup (this->impl_->get_type_name ());
+ }
+
+ char *
+ RTI_Topic_i::get_name (void)
+ {
+ return CORBA::string_dup (this->impl_->get_name ());
+ }
+
+ ::DDS::DomainParticipant_ptr
+ RTI_Topic_i::get_participant (void)
+ {
+ DDSDomainParticipant* p = this->impl_->get_participant ();
+ ::DDS::DomainParticipant_var retval = new RTI_DomainParticipant_i (p);
+ return retval._retn ();
+ }
+
+ DDSTopic *
+ RTI_Topic_i::get_topic (void)
+ {
+ return impl_;
+ }
+ }
+ }
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.h
new file mode 100644
index 00000000000..af0ff15fdeb
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Topic.h
@@ -0,0 +1,81 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_NDDS_TOPIC_H
+#define CIAO_NDDS_TOPIC_H
+#include "NDDS_Traits.h"
+#include "DomainParticipant.h"
+
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_Topic_i :
+ public virtual ::DDS::CCM_Topic,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_Topic_i (DDSTopic *);
+
+ // Destructor
+ virtual ~RTI_Topic_i (void);
+
+ virtual
+ ::DDS::ReturnCode_t set_qos (const ::DDS::TopicQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t get_qos (::DDS::TopicQos & qos);
+
+ virtual
+ ::DDS::ReturnCode_t set_listener (::DDS::TopicListener_ptr a_listener,
+ ::DDS::StatusMask mask);
+
+ virtual
+ ::DDS::TopicListener_ptr get_listener (void);
+
+ virtual
+ ::DDS::ReturnCode_t get_inconsistent_topic_status (::DDS::InconsistentTopicStatus & a_status);
+
+ virtual
+ ::DDS::ReturnCode_t enable (void);
+
+ virtual
+ ::DDS::StatusCondition_ptr get_statuscondition (void);
+
+ virtual
+ ::DDS::StatusMask get_status_changes (void);
+
+ virtual
+ ::DDS::InstanceHandle_t get_instance_handle (void);
+
+ virtual
+ char * get_type_name (void);
+
+ virtual
+ char * get_name (void);
+
+ virtual
+ ::DDS::DomainParticipant_ptr get_participant (void);
+
+ DDSTopic * get_topic (void);
+
+ private:
+ DDSTopic * impl_;
+ };
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.cpp
new file mode 100644
index 00000000000..2950ec89dc0
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.cpp
@@ -0,0 +1,55 @@
+// $Id$
+
+#include "TopicDescription.h"
+#include "DomainParticipant.h"
+
+#include "dds4ccm/idl/dds4ccm_BaseC.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ // Implementation skeleton constructor
+ RTI_TopicDescription_i::RTI_TopicDescription_i (DDSTopicDescription *td)
+ : impl_ (td)
+ {
+ }
+
+ // Implementation skeleton destructor
+ RTI_TopicDescription_i::~RTI_TopicDescription_i (void)
+ {
+ }
+
+ char *
+ RTI_TopicDescription_i::get_type_name (void)
+ {
+ return CORBA::string_dup (this->impl_->get_type_name ());
+ }
+
+ char *
+ RTI_TopicDescription_i::get_name (void)
+ {
+ return CORBA::string_dup (this->impl_->get_name ());
+ }
+
+ ::DDS::DomainParticipant_ptr
+ RTI_TopicDescription_i::get_participant (void)
+ {
+ DDSDomainParticipant* p = this->impl_->get_participant ();
+ ::DDS::DomainParticipant_var retval = new RTI_DomainParticipant_i (p);
+ return retval._retn ();
+ }
+
+ DDSTopicDescription *
+ RTI_TopicDescription_i::get_topicdescription (void)
+ {
+ return this->impl_;
+ }
+ }
+ }
+}
+
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.h
new file mode 100644
index 00000000000..cbd4c84433c
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/TopicDescription.h
@@ -0,0 +1,57 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#ifndef CIAO_RTI_TOPICDESCRIPTION_H
+#define CIAO_RTI_TOPICDESCRIPTION_H
+
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsEC.h"
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h"
+
+#include "ndds/ndds_cpp.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ class DDS4CCM_NDDS_IMPL_Export RTI_TopicDescription_i :
+ public virtual ::DDS::CCM_TopicDescription,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ // Constructor
+ RTI_TopicDescription_i (DDSTopicDescription *td);
+
+ // Destructor
+ virtual ~RTI_TopicDescription_i (void);
+
+ virtual char *
+ get_type_name (void);
+
+ virtual char *
+ get_name (void);
+
+ virtual ::DDS::DomainParticipant_ptr
+ get_participant (void);
+
+ DDSTopicDescription * get_topicdescription (void);
+ private:
+ DDSTopicDescription *impl_;
+ };
+ }
+ }
+}
+
+#endif /* CIAO_RTI_TOPICDESCRIPTION_H */
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp
new file mode 100644
index 00000000000..cd1f279d7ac
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp
@@ -0,0 +1,36 @@
+// $Id$
+
+#include "Utils.h"
+#include "ndds/ndds_cpp.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ const char * translate_retcode (DDS_ReturnCode_t ret)
+ {
+#define RTI_DDS_RETCODE(X) case X: return #X
+ switch (ret)
+ {
+ RTI_DDS_RETCODE (DDS_RETCODE_OK);
+ RTI_DDS_RETCODE (DDS_RETCODE_ERROR);
+ RTI_DDS_RETCODE (DDS_RETCODE_UNSUPPORTED);
+ RTI_DDS_RETCODE (DDS_RETCODE_BAD_PARAMETER);
+ RTI_DDS_RETCODE (DDS_RETCODE_PRECONDITION_NOT_MET);
+ RTI_DDS_RETCODE (DDS_RETCODE_OUT_OF_RESOURCES);
+ RTI_DDS_RETCODE (DDS_RETCODE_NOT_ENABLED);
+ RTI_DDS_RETCODE (DDS_RETCODE_IMMUTABLE_POLICY);
+ RTI_DDS_RETCODE (DDS_RETCODE_INCONSISTENT_POLICY);
+ RTI_DDS_RETCODE (DDS_RETCODE_ALREADY_DELETED);
+ RTI_DDS_RETCODE (DDS_RETCODE_TIMEOUT);
+ RTI_DDS_RETCODE (DDS_RETCODE_NO_DATA);
+ RTI_DDS_RETCODE (DDS_RETCODE_ILLEGAL_OPERATION);
+ }
+ return "***Unknown enum value, update RTI::translate_retcode()";
+#undef RTI_DDS_RETCODE
+ }
+ }
+ }
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.h
new file mode 100644
index 00000000000..dbc687f6e7b
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Utils.h
@@ -0,0 +1,27 @@
+/**
+ * @file Utils.h
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ *
+ * $Id$
+ *
+ * Misc utility classes for NDDS.
+ */
+
+#ifndef NDDS_UTILS_H
+#define NDDS_UTILS_H
+
+#include "ndds/ndds_cpp.h"
+#include "dds4ccm_ndds_impl_export.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ DDS4CCM_NDDS_IMPL_Export const char * translate_retcode (DDS_ReturnCode_t ret);
+ }
+ }
+}
+
+#endif
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.h
new file mode 100644
index 00000000000..afdab67e31d
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.h
@@ -0,0 +1,38 @@
+/**
+ * @author William R. Otte <wotte@dre.vanderbilt.edu>
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ * $Id$
+ *
+ * Wrapper facade for NDDS.
+ */
+
+#include "dds4ccm/idl/dds_rtf2_dcpsC.h"
+
+namespace CIAO
+{
+ namespace DDS4CCM
+ {
+ namespace RTI
+ {
+ template <typename NDDS_TYPE, typename BASE>
+ class Writer_T
+ {
+ public:
+ // Constructor
+ Writer_T (::DDS::DataWriter_ptr dw);
+
+ // Destructor
+ virtual ~Writer_T (void);
+
+ virtual void write (const typename NDDS_TYPE::value_type& an_instance);
+
+ virtual void write (const typename NDDS_TYPE::seq_type& instances, bool coherent_write);
+ private:
+ typename NDDS_TYPE::data_writer *impl_;
+ };
+ }
+ }
+}
+
+#include "dds4ccm/impl/ndds/Writer.tpp"
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.tpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.tpp
new file mode 100644
index 00000000000..86d46402509
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/Writer.tpp
@@ -0,0 +1,105 @@
+// $Id$
+#include "dds4ccm/impl/ndds/DataWriter.h"
+#include "dds4ccm/impl/ndds/Utils.h"
+
+#include "ciao/Logger/Log_Macros.h"
+
+// Implementation skeleton constructor
+template <typename NDDS_TYPE, typename BASE >
+CIAO::DDS4CCM::RTI::Writer_T<NDDS_TYPE, BASE>::Writer_T (::DDS::DataWriter_ptr writer)
+ : impl_ (0)
+{
+ CIAO_TRACE ("CIAO::DDS4CCM::RTI::Writer_T::Writer_T");
+
+ RTI_DataWriter_i *rdw = dynamic_cast <RTI_DataWriter_i *> (writer);
+
+ if (rdw == 0)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::Writer_T - "
+ "Unable to cast provided DataWriter to servant\n"));
+ throw CORBA::INTERNAL ();
+ }
+
+ impl_ = NDDS_TYPE::data_writer::narrow (rdw->get_datawriter ());
+
+ if (!impl_)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::Writer_T - "
+ "Unable to narrow the provided writer entity to the specific "
+ "type necessary to publish messages\n"));
+ throw CORBA::INTERNAL ();
+ }
+}
+
+// Implementation skeleton destructor
+template <typename NDDS_TYPE, typename BASE >
+CIAO::DDS4CCM::RTI::Writer_T<NDDS_TYPE, BASE>::~Writer_T (void)
+{
+ CIAO_TRACE ("CIAO::DDS4CCM::RTI::Writer_T::~Writer_T");
+}
+
+template <typename NDDS_TYPE, typename BASE >
+void
+CIAO::DDS4CCM::RTI::Writer_T<NDDS_TYPE, BASE>::write (const typename NDDS_TYPE::value_type & an_instance)
+{
+ CIAO_TRACE ("CIAO::DDS4CCM::RTI::Writer_T::write");
+
+ if (an_instance == 0)
+ {
+ CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::write - "
+ "Write was provided a null instance to write\n"));
+ return;
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::write - "
+ "Preparing to write to DDS\n"));
+ DDS_ReturnCode_t retval = this->impl_->write (an_instance,
+ DDS_HANDLE_NIL);
+
+ if (retval != DDS_RETCODE_OK)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::write - "
+ "Write unsuccessful, received error code %C\n",
+ translate_retcode (retval)));
+ throw CCM_DDS::InternalError (retval, 0);
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::write - "
+ "Write successful\n"));
+}
+
+template <typename NDDS_TYPE, typename BASE >
+void
+CIAO::DDS4CCM::RTI::Writer_T<NDDS_TYPE, BASE>::write (const typename NDDS_TYPE::seq_type& instances, bool coherent_write)
+{
+ CIAO_TRACE ("CIAO::DDS4CCM::RTI::Writer_T::write");
+
+ if (coherent_write)
+ {
+ this->impl_->get_publisher()->begin_coherent_changes ();
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::write - "
+ "Preparing to write to DDS\n"));
+ for (::DDS_Long index = 0; index < instances.length(); index++)
+ {
+ DDS_ReturnCode_t retval = this->impl_->write (instances[index],
+ DDS_HANDLE_NIL);
+
+ if (retval != DDS_RETCODE_OK)
+ {
+ CIAO_ERROR ((LM_ERROR, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::write - "
+ "Write unsuccessful, received error code %C\n",
+ translate_retcode (retval)));
+ throw CCM_DDS::InternalError (retval, index);
+ }
+ }
+
+ if (coherent_write)
+ {
+ this->impl_->get_publisher()->end_coherent_changes ();
+ }
+
+ CIAO_DEBUG ((LM_TRACE, CLINFO "CIAO::DDS4CCM::RTI::Writer_T::write - "
+ "Write successful\n"));
+}
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h
new file mode 100644
index 00000000000..7ca68d771eb
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h
@@ -0,0 +1,58 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl DDS4CCM_NDDS_IMPL
+// ------------------------------
+#ifndef DDS4CCM_NDDS_IMPL_EXPORT_H
+#define DDS4CCM_NDDS_IMPL_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (ACE_AS_STATIC_LIBS) && !defined (DDS4CCM_NDDS_IMPL_HAS_DLL)
+# define DDS4CCM_NDDS_IMPL_HAS_DLL 0
+#endif /* ACE_AS_STATIC_LIBS && DDS4CCM_NDDS_IMPL_HAS_DLL */
+
+#if !defined (DDS4CCM_NDDS_IMPL_HAS_DLL)
+# define DDS4CCM_NDDS_IMPL_HAS_DLL 1
+#endif /* ! DDS4CCM_NDDS_IMPL_HAS_DLL */
+
+#if defined (DDS4CCM_NDDS_IMPL_HAS_DLL) && (DDS4CCM_NDDS_IMPL_HAS_DLL == 1)
+# if defined (DDS4CCM_NDDS_IMPL_BUILD_DLL)
+# define DDS4CCM_NDDS_IMPL_Export ACE_Proper_Export_Flag
+# define DDS4CCM_NDDS_IMPL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define DDS4CCM_NDDS_IMPL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* DDS4CCM_NDDS_IMPL_BUILD_DLL */
+# define DDS4CCM_NDDS_IMPL_Export ACE_Proper_Import_Flag
+# define DDS4CCM_NDDS_IMPL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define DDS4CCM_NDDS_IMPL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* DDS4CCM_NDDS_IMPL_BUILD_DLL */
+#else /* DDS4CCM_NDDS_IMPL_HAS_DLL == 1 */
+# define DDS4CCM_NDDS_IMPL_Export
+# define DDS4CCM_NDDS_IMPL_SINGLETON_DECLARATION(T)
+# define DDS4CCM_NDDS_IMPL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* DDS4CCM_NDDS_IMPL_HAS_DLL == 1 */
+
+// Set DDS4CCM_NDDS_IMPL_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (DDS4CCM_NDDS_IMPL_NTRACE)
+# if (ACE_NTRACE == 1)
+# define DDS4CCM_NDDS_IMPL_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define DDS4CCM_NDDS_IMPL_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !DDS4CCM_NDDS_IMPL_NTRACE */
+
+#if (DDS4CCM_NDDS_IMPL_NTRACE == 1)
+# define DDS4CCM_NDDS_IMPL_TRACE(X)
+#else /* (DDS4CCM_NDDS_IMPL_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define DDS4CCM_NDDS_IMPL_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (DDS4CCM_NDDS_IMPL_NTRACE == 1) */
+
+#endif /* DDS4CCM_NDDS_IMPL_EXPORT_H */
+
+// End of auto generated file.
diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc b/modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc
new file mode 100644
index 00000000000..9fbe81b294b
--- /dev/null
+++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc
@@ -0,0 +1,32 @@
+// $Id$
+
+project(CIAO_DDS4CCM_NDDS_Impl) : dds4ccm_skel, taolib, ciao_output, nddslib, ccm_stub {
+
+ after += DDS4CCM_lem_stub
+ libs += DDS4CCM_lem_stub
+
+ dynamicflags = DDS4CCM_NDDS_IMPL_BUILD_DLL
+ macros += BUILDING_NDDS_LIB
+ Header_Files {
+ *.h
+ }
+
+ Source_Files {
+ DataWriter.cpp
+ DataWriterListener.cpp
+ DataReader.cpp
+ DataReaderListener.cpp
+ DomainParticipant.cpp
+ DomainParticipantFactory.cpp
+ Topic.cpp
+ TopicDescription.cpp
+ Publisher.cpp
+ PublisherListener.cpp
+ Subscriber.cpp
+ SubscriberListener.cpp
+ StatusCondition.cpp
+ ReadCondition.cpp
+ QueryCondition.cpp
+ Utils.cpp
+ }
+}