summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2010-01-27 08:40:15 +0000
committermsmit <msmit@remedy.nl>2010-01-27 08:40:15 +0000
commita4ecd3831235e57a4ca1955b4aa2f06110914721 (patch)
tree672140c7e6b60cec53271e697ff66af216198fb2
parentdd21ca1441db6dc1ec1a2491e0a7c2bda02e5202 (diff)
downloadATCD-a4ecd3831235e57a4ca1955b4aa2f06110914721.tar.gz
Wed Jan 27 08:34:36 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/CSLSampleRejected/Sender/CSL_SRTest_Sender_exec.cpp: * connectors/dds4ccm/tests/CSLUnexpStat/Sender/CSL_USTest_Sender_exec.cpp: * connectors/dds4ccm/tests/CSLDeadline/Sender/CSL_DeadlineTest_Sender_exec.cpp: * connectors/dds4ccm/tests/On_Inconsistent_Topic/Sender/ConnectorStatusListener_Test_Sender_exec.cpp: * connectors/dds4ccm/tests/PSLDeadline/Sender/PSL_DeadlineTest_Sender_exec.cpp: * connectors/dds4ccm/tests/PSLSampleLost/Sender/PSL_SampleLost_Sender_exec.cpp: Updated value of the keys. * connectors/dds4ccm/impl/ndds/TimeUtilities.h: * connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.cpp: * connectors/dds4ccm/tests/KeyedSamples/Receiver/Keyed_Test_Receiver_exec.cpp: * connectors/dds4ccm/tests/PSLDeadline/Receiver/PSL_DeadlineTest_Receiver_exec.cpp: * connectors/dds4ccm/tests/PSLSampleLost/Receiver/PSL_SampleLost_Receiver_exec.cpp: * connectors/dds4ccm/tests/SLDisabled/Receiver/SL_Disabled_Receiver_exec.cpp: * connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp: * connectors/dds4ccm/tests/SLOneByOne/Receiver/SL_OneByOne_Receiver_exec.cpp: * connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp: Added operators in order to convert DDS::Time_T to ACE_Time_Value and vice versa. The logging now uses ACE_Time_Value to print the timestamp.
-rw-r--r--CIAO/ChangeLog22
-rw-r--r--CIAO/connectors/dds4ccm/impl/ndds/TimeUtilities.h59
-rw-r--r--CIAO/connectors/dds4ccm/tests/CSLDeadline/Sender/CSL_DeadlineTest_Sender_exec.cpp4
-rw-r--r--CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.cpp12
-rw-r--r--CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Sender/CSL_SRTest_Sender_exec.cpp4
-rw-r--r--CIAO/connectors/dds4ccm/tests/CSLUnexpStat/Sender/CSL_USTest_Sender_exec.cpp4
-rw-r--r--CIAO/connectors/dds4ccm/tests/KeyedSamples/Receiver/Keyed_Test_Receiver_exec.cpp14
-rw-r--r--CIAO/connectors/dds4ccm/tests/On_Inconsistent_Topic/Sender/ConnectorStatusListener_Test_Sender_exec.cpp4
-rw-r--r--CIAO/connectors/dds4ccm/tests/PSLDeadline/Receiver/PSL_DeadlineTest_Receiver_exec.cpp30
-rw-r--r--CIAO/connectors/dds4ccm/tests/PSLDeadline/Sender/PSL_DeadlineTest_Sender_exec.cpp4
-rw-r--r--CIAO/connectors/dds4ccm/tests/PSLSampleLost/Receiver/PSL_SampleLost_Receiver_exec.cpp12
-rw-r--r--CIAO/connectors/dds4ccm/tests/PSLSampleLost/Sender/PSL_SampleLost_Sender_exec.cpp4
-rw-r--r--CIAO/connectors/dds4ccm/tests/SLDisabled/Receiver/SL_Disabled_Receiver_exec.cpp23
-rw-r--r--CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp60
-rw-r--r--CIAO/connectors/dds4ccm/tests/SLOneByOne/Receiver/SL_OneByOne_Receiver_exec.cpp47
-rw-r--r--CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp12
16 files changed, 187 insertions, 128 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 723cc7160ba..400dea8f929 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,25 @@
+Wed Jan 27 08:34:36 UTC 2010 Marcel Smit <msmit@remedy.nl>
+
+ * connectors/dds4ccm/tests/CSLSampleRejected/Sender/CSL_SRTest_Sender_exec.cpp:
+ * connectors/dds4ccm/tests/CSLUnexpStat/Sender/CSL_USTest_Sender_exec.cpp:
+ * connectors/dds4ccm/tests/CSLDeadline/Sender/CSL_DeadlineTest_Sender_exec.cpp:
+ * connectors/dds4ccm/tests/On_Inconsistent_Topic/Sender/ConnectorStatusListener_Test_Sender_exec.cpp:
+ * connectors/dds4ccm/tests/PSLDeadline/Sender/PSL_DeadlineTest_Sender_exec.cpp:
+ * connectors/dds4ccm/tests/PSLSampleLost/Sender/PSL_SampleLost_Sender_exec.cpp:
+ Updated value of the keys.
+
+ * connectors/dds4ccm/impl/ndds/TimeUtilities.h:
+ * connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.cpp:
+ * connectors/dds4ccm/tests/KeyedSamples/Receiver/Keyed_Test_Receiver_exec.cpp:
+ * connectors/dds4ccm/tests/PSLDeadline/Receiver/PSL_DeadlineTest_Receiver_exec.cpp:
+ * connectors/dds4ccm/tests/PSLSampleLost/Receiver/PSL_SampleLost_Receiver_exec.cpp:
+ * connectors/dds4ccm/tests/SLDisabled/Receiver/SL_Disabled_Receiver_exec.cpp:
+ * connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp:
+ * connectors/dds4ccm/tests/SLOneByOne/Receiver/SL_OneByOne_Receiver_exec.cpp:
+ * connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp:
+ Added operators in order to convert DDS::Time_T to ACE_Time_Value and
+ vice versa. The logging now uses ACE_Time_Value to print the timestamp.
+
Wed Jan 27 06:47:27 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Bug_3817_Regression/Bar.idl:
diff --git a/CIAO/connectors/dds4ccm/impl/ndds/TimeUtilities.h b/CIAO/connectors/dds4ccm/impl/ndds/TimeUtilities.h
new file mode 100644
index 00000000000..f72f34c8c52
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/impl/ndds/TimeUtilities.h
@@ -0,0 +1,59 @@
+// $Id$
+
+//=============================================================================
+/**
+ * @file Time_Utilities.h
+ *
+ * $Id$
+ *
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+//=============================================================================
+
+
+#ifndef DDS4CCM_TIME_UTILITIES_H
+#define DDS4CCM_TIME_UTILITIES_H
+
+#include "ace/Time_Value.h"
+
+/*
+ TIME_T
+ long sec;
+ unsigned long nanosec;
+
+ ACE_TIME_VALUE
+ time_t sec,
+ suseconds_t usec );
+*/
+
+inline void
+operator<<= (::DDS::Time_t & dds_time, const ::ACE_Time_Value & ace_time)
+{
+ dds_time.sec = ace_time.sec ();
+ dds_time.nanosec = ace_time.usec () * 1000;
+}
+
+inline void
+operator<<= (::ACE_Time_Value & ace_time, const ::DDS::Time_t &dds_time)
+{
+ ace_time.sec (dds_time.sec);
+ ace_time.usec (dds_time.nanosec/1000);
+}
+
+inline void
+operator>>= (const ::DDS::Time_t & dds_time, ::ACE_Time_Value & ace_time)
+{
+ ace_time.sec (dds_time.sec);
+ ace_time.usec (dds_time.nanosec/1000);
+}
+
+inline void
+operator>>= (const ::ACE_Time_Value & ace_time, ::DDS::Time_t &dds_time)
+{
+ dds_time.sec = ace_time.sec ();
+ dds_time.nanosec = ace_time.usec () * 1000;
+}
+
+
+
+#endif /* DDS4CCM_TIME_UTILITIES_H */
diff --git a/CIAO/connectors/dds4ccm/tests/CSLDeadline/Sender/CSL_DeadlineTest_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/CSLDeadline/Sender/CSL_DeadlineTest_Sender_exec.cpp
index 9b3b77829f4..4845d972418 100644
--- a/CIAO/connectors/dds4ccm/tests/CSLDeadline/Sender/CSL_DeadlineTest_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/CSLDeadline/Sender/CSL_DeadlineTest_Sender_exec.cpp
@@ -135,8 +135,8 @@ namespace CIAO_CSL_DeadlineTest_Sender_Impl
Sender_exec_i::ccm_activate (void)
{
//add 2 different instances of topic
- this->add_instance_of_topic ("EEN",1);
- this->add_instance_of_topic ("TWEE",2);
+ this->add_instance_of_topic ("ONE",1);
+ this->add_instance_of_topic ("TWO",2);
//write the instances once for the test
this->write();
diff --git a/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.cpp
index 7069242a6f8..297554ab094 100644
--- a/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.cpp
@@ -10,6 +10,7 @@
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
#include "dds4ccm/impl/ndds/Utils.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_CSL_SRTest_Receiver_Impl
{
@@ -182,14 +183,11 @@ namespace CIAO_CSL_SRTest_Receiver_Impl
this->reader_->read_all(TestTopic_infos.out(), readinfoseq.out());
for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i)
{
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i)
{
diff --git a/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Sender/CSL_SRTest_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Sender/CSL_SRTest_Sender_exec.cpp
index 858668e8006..7958530c24e 100644
--- a/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Sender/CSL_SRTest_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/CSLSampleRejected/Sender/CSL_SRTest_Sender_exec.cpp
@@ -175,8 +175,8 @@ namespace CIAO_CSL_SRTest_Sender_Impl
Sender_exec_i::ccm_activate (void)
{
//add 2 different instances of topic
- this->add_instance_of_topic ("EEN",1);
- this->add_instance_of_topic ("TWEE",2);
+ this->add_instance_of_topic ("ONE",1);
+ this->add_instance_of_topic ("TWO",2);
this->start ();
}
diff --git a/CIAO/connectors/dds4ccm/tests/CSLUnexpStat/Sender/CSL_USTest_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/CSLUnexpStat/Sender/CSL_USTest_Sender_exec.cpp
index 0e7c1746640..88c136904ed 100644
--- a/CIAO/connectors/dds4ccm/tests/CSLUnexpStat/Sender/CSL_USTest_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/CSLUnexpStat/Sender/CSL_USTest_Sender_exec.cpp
@@ -115,8 +115,8 @@ namespace CIAO_CSL_USTest_Sender_Impl
Sender_exec_i::ccm_activate (void)
{
//add 2 different instances of topic
- this->add_instance_of_topic ("EEN",1);
- this->add_instance_of_topic ("TWEE",2);
+ this->add_instance_of_topic ("ONE",1);
+ this->add_instance_of_topic ("TWO",2);
}
void
diff --git a/CIAO/connectors/dds4ccm/tests/KeyedSamples/Receiver/Keyed_Test_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/KeyedSamples/Receiver/Keyed_Test_Receiver_exec.cpp
index e9bd49872d7..2b96a657ed9 100644
--- a/CIAO/connectors/dds4ccm/tests/KeyedSamples/Receiver/Keyed_Test_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/KeyedSamples/Receiver/Keyed_Test_Receiver_exec.cpp
@@ -6,6 +6,7 @@
#include "ciao/Logger/Log_Macros.h"
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_Keyed_Test_Receiver_Impl
{
@@ -78,14 +79,13 @@ namespace CIAO_Keyed_Test_Receiver_Impl
keyedtest_info.key = CORBA::string_dup (key);
::CCM_DDS::ReadInfo readinfo;
this->reader_->read_one_last (keyedtest_info, readinfo, ::DDS::HANDLE_NIL);
- time_t tim = readinfo.source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+
+ ACE_Time_Value tv;
+ tv <<= readinfo.source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ONE Read_Info ")
- ACE_TEXT (" -> date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfo.source_timestamp.nanosec));
+ ACE_TEXT (" -> date =%#T\n"),
+ &tv));
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ ONE keyed test info : ")
ACE_TEXT ("received keyedtest_info for <%C> at %u\n"),
keyedtest_info.key.in (),
diff --git a/CIAO/connectors/dds4ccm/tests/On_Inconsistent_Topic/Sender/ConnectorStatusListener_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/On_Inconsistent_Topic/Sender/ConnectorStatusListener_Test_Sender_exec.cpp
index ec92d40db5f..5a2613c5fb0 100644
--- a/CIAO/connectors/dds4ccm/tests/On_Inconsistent_Topic/Sender/ConnectorStatusListener_Test_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/On_Inconsistent_Topic/Sender/ConnectorStatusListener_Test_Sender_exec.cpp
@@ -108,8 +108,8 @@ void
Sender_exec_i::ccm_activate (void)
{
//add 2 different instances of topic
- this->add_instance_of_sec_topic ("EEN",1);
- this->add_instance_of_sec_topic ("TWEE",2);
+ this->add_instance_of_sec_topic ("ONE",1);
+ this->add_instance_of_sec_topic ("TWO",2);
}
void
diff --git a/CIAO/connectors/dds4ccm/tests/PSLDeadline/Receiver/PSL_DeadlineTest_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/PSLDeadline/Receiver/PSL_DeadlineTest_Receiver_exec.cpp
index 07a39f72e0e..4895eaca806 100644
--- a/CIAO/connectors/dds4ccm/tests/PSLDeadline/Receiver/PSL_DeadlineTest_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/PSLDeadline/Receiver/PSL_DeadlineTest_Receiver_exec.cpp
@@ -11,6 +11,7 @@
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
#include "dds4ccm/impl/ndds/Utils.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_PSL_DeadlineTest_Receiver_Impl
{
@@ -20,11 +21,11 @@ namespace CIAO_PSL_DeadlineTest_Receiver_Impl
ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i (void)
{
}
-
+
ConnectorStatusListener_exec_i::~ConnectorStatusListener_exec_i (void)
{
}
-
+
// Operations from ::CCM_DDS::ConnectorStatusListener
void ConnectorStatusListener_exec_i::on_inconsistent_topic(
::DDS::Topic_ptr /*the_topic*/,
@@ -55,7 +56,7 @@ namespace CIAO_PSL_DeadlineTest_Receiver_Impl
::DDS::Entity_ptr /*the_entity*/,
::DDS::StatusKind /*status_kind*/) {
}
-
+
read_action_Generator::read_action_Generator (Receiver_exec_i &callback)
: pulse_callback_ (callback)
{
@@ -175,14 +176,11 @@ namespace CIAO_PSL_DeadlineTest_Receiver_Impl
this->reader_->read_all(TestTopic_infos.out(), readinfoseq.out());
for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i)
{
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i)
{
@@ -239,13 +237,13 @@ namespace CIAO_PSL_DeadlineTest_Receiver_Impl
throw ::CORBA::INTERNAL ();
}
}
-
+
void
Receiver_exec_i::configuration_complete (void)
{
this->reader_ = this->context_->get_connection_info_out_data();
}
-
+
void
Receiver_exec_i::ccm_activate (void)
{
@@ -282,11 +280,11 @@ namespace CIAO_PSL_DeadlineTest_Receiver_Impl
Receiver_exec_i::ccm_remove (void)
{
if(!this->deadline_port_1_.value () || !this->deadline_port_2_.value ())
- {
-
+ {
+
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did not receive the expected ")
ACE_TEXT (" error 'on_requested_deadline_missed' on DDS_Listen and/or DDS_GET port in Receiver")
- ));
+ ));
}
else
{
@@ -295,7 +293,7 @@ namespace CIAO_PSL_DeadlineTest_Receiver_Impl
));
}
}
-
+
extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_PSL_DeadlineTest_Receiver_Impl (void)
{
diff --git a/CIAO/connectors/dds4ccm/tests/PSLDeadline/Sender/PSL_DeadlineTest_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/PSLDeadline/Sender/PSL_DeadlineTest_Sender_exec.cpp
index a4024121c9e..6d201dc7136 100644
--- a/CIAO/connectors/dds4ccm/tests/PSLDeadline/Sender/PSL_DeadlineTest_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/PSLDeadline/Sender/PSL_DeadlineTest_Sender_exec.cpp
@@ -168,8 +168,8 @@ namespace CIAO_PSL_DeadlineTest_Sender_Impl
Sender_exec_i::ccm_activate (void)
{
//add 2 different instances of topic
- this->add_instance_of_topic ("EEN",1);
- this->add_instance_of_topic ("TWEE",2);
+ this->add_instance_of_topic ("ONE",1);
+ this->add_instance_of_topic ("TWO",2);
this->start ();
}
diff --git a/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Receiver/PSL_SampleLost_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Receiver/PSL_SampleLost_Receiver_exec.cpp
index c28bb245c77..697f437ee81 100644
--- a/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Receiver/PSL_SampleLost_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Receiver/PSL_SampleLost_Receiver_exec.cpp
@@ -9,6 +9,7 @@
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
#include "dds4ccm/impl/ndds/Utils.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_PSL_SampleLost_Receiver_Impl
{
@@ -173,14 +174,11 @@ namespace CIAO_PSL_SampleLost_Receiver_Impl
this->reader_->read_all(TestTopic_infos.out(), readinfoseq.out());
for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i)
{
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i)
{
diff --git a/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Sender/PSL_SampleLost_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Sender/PSL_SampleLost_Sender_exec.cpp
index 0663943286c..7e4a938cd28 100644
--- a/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Sender/PSL_SampleLost_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/PSLSampleLost/Sender/PSL_SampleLost_Sender_exec.cpp
@@ -162,8 +162,8 @@ namespace CIAO_PSL_SampleLost_Sender_Impl
Sender_exec_i::ccm_activate (void)
{
//add 2 different instances of topic
- this->add_instance_of_topic ("EEN",1);
- this->add_instance_of_topic ("TWEE",2);
+ this->add_instance_of_topic ("ONE",1);
+ this->add_instance_of_topic ("TWO",2);
this->start ();
}
diff --git a/CIAO/connectors/dds4ccm/tests/SLDisabled/Receiver/SL_Disabled_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/SLDisabled/Receiver/SL_Disabled_Receiver_exec.cpp
index c01636a8cd9..13bbd647a98 100644
--- a/CIAO/connectors/dds4ccm/tests/SLDisabled/Receiver/SL_Disabled_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/SLDisabled/Receiver/SL_Disabled_Receiver_exec.cpp
@@ -9,6 +9,7 @@
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
#include "dds4ccm/impl/ndds/Utils.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_SL_Disabled_Receiver_Impl
{
@@ -135,14 +136,11 @@ namespace CIAO_SL_Disabled_Receiver_Impl
for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i)
{
this->updater_data_ = true;
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i)
{
@@ -152,7 +150,6 @@ namespace CIAO_SL_Disabled_Receiver_Impl
TestTopic_infos[i].key.in (),
TestTopic_infos[i].x));
}
-
}
catch (const CCM_DDS::InternalError& )
{
@@ -204,7 +201,7 @@ namespace CIAO_SL_Disabled_Receiver_Impl
ACE_ERROR ((LM_INFO, ACE_TEXT ("Error: Listener control receptacle is null!\n")));
throw CORBA::INTERNAL ();
}
-
+
lc->mode (::CCM_DDS::NOT_ENABLED);
// calculate the interval time
long usec = 1000000 / this->rate_;
@@ -229,13 +226,13 @@ namespace CIAO_SL_Disabled_Receiver_Impl
Receiver_exec_i::ccm_remove (void)
{
if(!this->no_operation_.value ()|| !this->updater_data_.value())
- {
-
+ {
+
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did receive an unexpected ")
ACE_TEXT (" operation from StateListener or Updater doesn't work in Receiver")
- ));
+ ));
}
-
+
else
{
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK : Haven't received tan unexpected ")
diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp
index 13912a82d72..5c88a833d24 100644
--- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp
@@ -9,6 +9,7 @@
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
#include "dds4ccm/impl/ndds/Utils.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_SL_ManyByMany_Receiver_Impl
{
@@ -65,22 +66,19 @@ namespace CIAO_SL_ManyByMany_Receiver_Impl
const ::CCM_DDS::ReadInfo & readinfo)
{
this->on_creation_ = true;
-
- time_t tim = readinfo.source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfo.source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfo.source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Statelistener:on_creation : ")
ACE_TEXT ("Received datum for <%C> at %u\n"),
data.key.in (),
data.x));
//one of the data must have the key 'KEY_1' with x == 1
if((strcmp(data.key.in() ,"KEY_1")==0) && (data.x == 1L))
- {
+ {
this->create_data_ = true;
}
}
@@ -107,14 +105,11 @@ namespace CIAO_SL_ManyByMany_Receiver_Impl
));
}
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < data.length(); ++i)
{
@@ -123,7 +118,7 @@ namespace CIAO_SL_ManyByMany_Receiver_Impl
i,
data[i].key.in (),
data[i].x));
- //one of the data must have the key 'KEY_1' with x == 2
+ //one of the data must have the key 'KEY_1' with x == 2
if((strcmp(data[i].key,"KEY_1")==0 ) && (data[i].x == 2L))
{
this->update_data_ = true;
@@ -140,11 +135,11 @@ namespace CIAO_SL_ManyByMany_Receiver_Impl
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did not receive the expected info.instance_status ")
ACE_TEXT ("'CCM_DDS::INSTANCE_DELETED'")
ACE_TEXT (" with operation 'on_deletion' from StateListener in Receiver\n")
- ));
+ ));
}
if((!datum.key.in()==0) && (info.instance_status == CCM_DDS::INSTANCE_DELETED))
- {
+ {
this->on_deletion_ = true;
}
}
@@ -209,14 +204,11 @@ namespace CIAO_SL_ManyByMany_Receiver_Impl
this->reader_->read_all(TestTopic_infos.out(), readinfoseq.out());
for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i)
{
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i)
{
@@ -284,7 +276,7 @@ namespace CIAO_SL_ManyByMany_Receiver_Impl
ACE_ERROR ((LM_INFO, ACE_TEXT ("Error: Listener control receptacle is null!\n")));
throw CORBA::INTERNAL ();
}
-
+
lc->mode (::CCM_DDS::MANY_BY_MANY);
// calculate the interval time
long usec = 1000000 / this->rate_;
@@ -310,49 +302,49 @@ namespace CIAO_SL_ManyByMany_Receiver_Impl
{
CORBA::Boolean no_error = true;
if(!this->no_operation_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did receive an unexpected ")
ACE_TEXT (" operation 'on_one_update' from StateListener in Receiver\n")
));
}
if(!this->on_creation_ .value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ")
ACE_TEXT (" operation 'on_creation' from StateListener in Receiver\n")
));
}
if(!this->create_data_ .value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ")
ACE_TEXT (" data with 'on_creation' from StateListener in Receiver\n")
));
}
if(!this->on_many_update_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR:didn't receive the expected ")
ACE_TEXT (" operation 'on_many_updates' from StateListener in Receiver\n")
));
}
if(!this->update_data_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR:didn't receive the expected ")
ACE_TEXT (" data with 'on_many_updates' from StateListener in Receiver\n")
));
}
if(!this->on_deletion_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ")
ACE_TEXT (" operation 'on_deletion' from StateListener in Receiver\n")
));
}
if(this->reader_data_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did receive unexpected ")
ACE_TEXT (" data on the Reader in combination with StateListener in Receiver\n")
diff --git a/CIAO/connectors/dds4ccm/tests/SLOneByOne/Receiver/SL_OneByOne_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/SLOneByOne/Receiver/SL_OneByOne_Receiver_exec.cpp
index d21eef594c3..06c67eee60a 100644
--- a/CIAO/connectors/dds4ccm/tests/SLOneByOne/Receiver/SL_OneByOne_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/SLOneByOne/Receiver/SL_OneByOne_Receiver_exec.cpp
@@ -9,6 +9,7 @@
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
#include "dds4ccm/impl/ndds/Utils.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_SL_OneByOne_Receiver_Impl
{
@@ -61,7 +62,7 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
const ::CCM_DDS::ReadInfo & info)
{
if((!datum.key.in()==0) && (info.instance_status == CCM_DDS::INSTANCE_CREATED))
- {
+ {
this->on_creation_ = true;
}
}
@@ -79,7 +80,7 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
}
if((!datum.key.in()==0) && (info.instance_status == CCM_DDS::INSTANCE_UPDATED))
- {
+ {
this->on_one_update_ = true;
}
}
@@ -100,7 +101,7 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did not receive the expected info.status ")
ACE_TEXT ("'CCM_DDS::INSTANCE_DELETED'")
ACE_TEXT (" with operation 'on_deletion' from StateListener in Receiver\n")
- ));
+ ));
}
if((!datum.key.in()==0) && (info.instance_status == CCM_DDS::INSTANCE_DELETED))
@@ -169,14 +170,11 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i)
{
this->updater_data_ = true;
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i)
{
@@ -186,7 +184,6 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
TestTopic_infos[i].key.in (),
TestTopic_infos[i].x));
}
-
}
catch (const CCM_DDS::InternalError& )
{
@@ -206,9 +203,9 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
::CCM_DDS::TestTopic::CCM_StateListener_ptr
Receiver_exec_i::get_info_out_data_listener (void)
{
- return new StateListener_exec_i(this->no_operation_,
- this->on_creation_,
- this->on_one_update_,
+ return new StateListener_exec_i(this->no_operation_,
+ this->on_creation_,
+ this->on_one_update_,
this->on_deletion_);
}
@@ -242,7 +239,7 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
ACE_ERROR ((LM_INFO, ACE_TEXT ("Error: Listener control receptacle is null!\n")));
throw CORBA::INTERNAL ();
}
-
+
lc->mode (::CCM_DDS::ONE_BY_ONE);
// calculate the interval time
long usec = 1000000 / this->rate_;
@@ -268,34 +265,34 @@ namespace CIAO_SL_OneByOne_Receiver_Impl
{
CORBA::Boolean no_error = true;
if(!this->no_operation_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did receive an unexpected ")
ACE_TEXT (" operation 'on_many_updates' from StateListener in Receiver\n")
- ));
+ ));
}
if(!this->on_creation_ .value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ")
ACE_TEXT (" operation 'on_creation' from StateListener in Receiver\n")
- ));
+ ));
}
if(!this->on_one_update_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR:didn't receive the expected ")
ACE_TEXT (" operation 'on_one_update' from StateListener in Receiver\n")
- ));
+ ));
}
if(!this->on_deletion_.value ())
- {
+ {
no_error = false;
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ")
ACE_TEXT (" operation 'on_deletion' from StateListener in Receiver\n")
- ));
+ ));
}
-
+
if(no_error==true)
{
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK : Have received the expected ")
diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp
index e7adf9cb5d2..22cfe953976 100644
--- a/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp
@@ -8,6 +8,7 @@
#include "tao/ORB_Core.h"
#include "ace/OS_NS_time.h"
#include "dds4ccm/impl/ndds/Utils.h"
+#include "dds4ccm/impl/ndds/TimeUtilities.h"
namespace CIAO_Updater_Receiver_Impl
{
@@ -121,14 +122,11 @@ namespace CIAO_Updater_Receiver_Impl
this->reader_->read_all(TestTopic_infos.out(), readinfoseq.out());
for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i)
{
- time_t tim = readinfoseq[i].source_timestamp.sec;
- tm* time = ACE_OS::localtime(&tim);
+ ACE_Time_Value tv;
+ tv <<= readinfoseq[i].source_timestamp;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ")
- ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"),
- time ? time->tm_hour : 0,
- time ? time->tm_min : 0,
- time ? time->tm_sec : 0,
- readinfoseq[i].source_timestamp.nanosec));
+ ACE_TEXT ("-> UTC date =%#T\n"),
+ &tv));
}
for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i)
{