summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2009-07-22 11:46:52 +0000
committermsmit <msmit@remedy.nl>2009-07-22 11:46:52 +0000
commit2c32575fa6c837fe370be4194572a2b2304a1254 (patch)
tree2497632f9cd2c498269e82fa701af60c8c6a2457
parent819ed6ab80d3f0d02249b46495b95884dbb8e3c8 (diff)
downloadATCD-2c32575fa6c837fe370be4194572a2b2304a1254.tar.gz
Wed Jul 22 11:45:21 UTC 2009 Marcel Smit <msmit@remedy.nl>
* tests/AMI_CCM/ami_ccm.idl: * tests/AMI_CCM/ami_ccm.mpc: * tests/AMI_CCM/ami_ccm_i.h: * tests/AMI_CCM/ami_ccm_i.cpp: * tests/AMI_CCM/client.cpp: * tests/AMI_CCM/server.cpp: Changed naming convention of some of the interfaces/functions
-rw-r--r--modules/TAO/ChangeLog11
-rw-r--r--modules/TAO/tests/AMI_CCM/ami_ccm.idl6
-rw-r--r--modules/TAO/tests/AMI_CCM/ami_ccm.mpc12
-rw-r--r--modules/TAO/tests/AMI_CCM/ami_ccm_i.cpp10
-rw-r--r--modules/TAO/tests/AMI_CCM/ami_ccm_i.h16
-rw-r--r--modules/TAO/tests/AMI_CCM/client.cpp37
-rw-r--r--modules/TAO/tests/AMI_CCM/server.cpp14
7 files changed, 60 insertions, 46 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog
index dbf84852a30..0d5a9e5a8ec 100644
--- a/modules/TAO/ChangeLog
+++ b/modules/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Wed Jul 22 11:45:21 UTC 2009 Marcel Smit <msmit@remedy.nl>
+
+ * tests/AMI_CCM/ami_ccm.idl:
+ * tests/AMI_CCM/ami_ccm.mpc:
+ * tests/AMI_CCM/ami_ccm_i.h:
+ * tests/AMI_CCM/ami_ccm_i.cpp:
+ * tests/AMI_CCM/client.cpp:
+ * tests/AMI_CCM/server.cpp:
+ Changed naming convention of some of the
+ interfaces/functions
+
Wed Jul 22 11:13:50 UTC 2009 Marcel Smit <msmit@remedy.nl>
* tests/AMI_CCM/README:
diff --git a/modules/TAO/tests/AMI_CCM/ami_ccm.idl b/modules/TAO/tests/AMI_CCM/ami_ccm.idl
index 0964be442f0..7ce386b686e 100644
--- a/modules/TAO/tests/AMI_CCM/ami_ccm.idl
+++ b/modules/TAO/tests/AMI_CCM/ami_ccm.idl
@@ -1,7 +1,7 @@
//=============================================================================
/**
- * @file ami_msm.idl
+ * @file ami_ccm.idl
*
* $Id$
*
@@ -19,9 +19,9 @@ module A
string error;
};
- interface AMI_Msm
+ interface AMI_CCM
{
- void foo (in string hello, out string answer)
+ void asynch_foo (in string hello, out string answer)
raises (InternalError);
oneway void shutdown ();
diff --git a/modules/TAO/tests/AMI_CCM/ami_ccm.mpc b/modules/TAO/tests/AMI_CCM/ami_ccm.mpc
index 25fed969ce7..5dbdbdb37a7 100644
--- a/modules/TAO/tests/AMI_CCM/ami_ccm.mpc
+++ b/modules/TAO/tests/AMI_CCM/ami_ccm.mpc
@@ -3,7 +3,7 @@
project(*idl): taoidldefaults, ami {
IDL_Files {
- ami_msm.idl
+ ami_ccm.idl
}
custom_only = 1
}
@@ -11,9 +11,9 @@ project(*idl): taoidldefaults, ami {
project(*Server): taoserver, messaging, ami {
after += *idl
Source_Files {
- ami_msm_i.cpp
- ami_msmC.cpp
- ami_msmS.cpp
+ ami_ccm_i.cpp
+ ami_ccmC.cpp
+ ami_ccmS.cpp
server.cpp
}
IDL_Files {
@@ -25,8 +25,8 @@ project(*Client): messaging, taoserver, ami {
after += *idl
Source_Files {
client.cpp
- ami_msmS.cpp
- ami_msmC.cpp
+ ami_ccmS.cpp
+ ami_ccmC.cpp
}
IDL_Files {
}
diff --git a/modules/TAO/tests/AMI_CCM/ami_ccm_i.cpp b/modules/TAO/tests/AMI_CCM/ami_ccm_i.cpp
index 250747206b7..854a9f0ce16 100644
--- a/modules/TAO/tests/AMI_CCM/ami_ccm_i.cpp
+++ b/modules/TAO/tests/AMI_CCM/ami_ccm_i.cpp
@@ -1,23 +1,23 @@
-#include "ami_msm_i.h"
+#include "ami_ccm_i.h"
#include "tao/debug.h"
ACE_RCSID(AMI, ami_test_i, "$Id$")
-AMI_Msm_i::AMI_Msm_i (CORBA::ORB_ptr orb)
+AMI_CCM_i::AMI_CCM_i (CORBA::ORB_ptr orb)
: orb_ (CORBA::ORB::_duplicate (orb)),
answer_count_ (0)
{
}
void
-AMI_Msm_i::foo (const char* string, ::CORBA::String_out answer)
+AMI_CCM_i::asynch_foo (const char* string, ::CORBA::String_out answer)
{
try
{
ACE_OS::sleep (1);
++answer_count_;
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%N:%l:(%P:%t):AMI_Msm_i::foo: %d %C\n"),
+ ACE_TEXT ("%N:%l:(%P:%t):AMI_CCM_i::foo: %d %C\n"),
answer_count_,
string));
char tmp[255] = {0};
@@ -36,7 +36,7 @@ AMI_Msm_i::foo (const char* string, ::CORBA::String_out answer)
}
void
-AMI_Msm_i::shutdown (void)
+AMI_CCM_i::shutdown (void)
{
this->orb_->shutdown (0);
}
diff --git a/modules/TAO/tests/AMI_CCM/ami_ccm_i.h b/modules/TAO/tests/AMI_CCM/ami_ccm_i.h
index 9628838d78f..e709bc57333 100644
--- a/modules/TAO/tests/AMI_CCM/ami_ccm_i.h
+++ b/modules/TAO/tests/AMI_CCM/ami_ccm_i.h
@@ -1,7 +1,7 @@
//=============================================================================
/**
- * @file ami_test_i.h
+ * @file ami_ccm_i.h
*
* $Id$
*
@@ -10,19 +10,19 @@
//=============================================================================
-#ifndef TAO_AMI_MSM_I_H
-#define TAO_AMI_MSM_I_H
+#ifndef TAO_AMI_CCM_I_H
+#define TAO_AMI_CCM_I_H
-#include "ami_msmS.h"
+#include "ami_ccmS.h"
-class AMI_Msm_i : public POA_A::AMI_Msm
+class AMI_CCM_i : public POA_A::AMI_CCM
{
public:
/// ctor
- AMI_Msm_i (CORBA::ORB_ptr orb);
+ AMI_CCM_i (CORBA::ORB_ptr orb);
// The AMI_Test methods.
- void foo (const char* string, ::CORBA::String_out answer);
+ void asynch_foo (const char* string, ::CORBA::String_out answer);
void shutdown (void);
@@ -32,5 +32,5 @@ private:
long answer_count_;
};
-#endif /* TAO_AMI_TEST_I_H */
+#endif /* TAO_AMI_CCM_I_H */
diff --git a/modules/TAO/tests/AMI_CCM/client.cpp b/modules/TAO/tests/AMI_CCM/client.cpp
index 432547aa83b..50d5ea9f218 100644
--- a/modules/TAO/tests/AMI_CCM/client.cpp
+++ b/modules/TAO/tests/AMI_CCM/client.cpp
@@ -1,17 +1,18 @@
+// $Id$
#include "ace/Get_Opt.h"
#include "ace/Task.h"
-#include "ami_msmC.h"
-#include "ami_msmS.h"
+#include "ami_ccmC.h"
+#include "ami_ccmS.h"
ACE_RCSID (AMI,
client,
- "$")
+ "$Id$")
const ACE_TCHAR *ior = ACE_TEXT("file://test.ior");
const char * in_str = "Let's talk AMI.";
-const int nthreads_ = 1;
-const int niterations_ = 5;
+const int nthreads_ = 2;
+const int niterations_ = 10;
int number_of_replies_ = 0;
@@ -52,20 +53,20 @@ class Client : public ACE_Task_Base
{
public:
/// ctor
- Client (A::AMI_Msm_ptr server, int niterations);
+ Client (A::AMI_CCM_ptr server, int niterations);
/// The thread entry point.
virtual int svc (void);
// private:
- /// Var for the AMI_Msm object.
- A::AMI_Msm_var ami_test_var_;
+ /// Var for the AMI_CCM object.
+ A::AMI_CCM_var ami_test_var_;
/// The number of iterations on each client thread.
int niterations_;
- /// Var for AMI_AMI_Msm_ReplyHandler object.
- A::AMI_AMI_MsmHandler_var the_handler_var_;
+ /// Var for AMI_AMI_CCM_ReplyHandler object.
+ A::AMI_AMI_CCMHandler_var the_handler_var_;
};
@@ -78,7 +79,7 @@ public:
//+++++++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++++++++++++++++++
-class Handler : public POA_A::AMI_AMI_MsmHandler
+class Handler : public POA_A::AMI_AMI_CCMHandler
{
public:
Handler (void)
@@ -86,7 +87,7 @@ public:
};
//callback implementation
- void foo (const char * answer)
+ void asynch_foo (const char * answer)
{
--number_of_replies_;
@@ -96,7 +97,7 @@ public:
answer));
};
- void foo_excep (::Messaging::ExceptionHolder * excep_holder)
+ void asynch_foo_excep (::Messaging::ExceptionHolder * excep_holder)
{
ACE_DEBUG ((LM_DEBUG,
"Callback method <foo_excep> called:\n"));
@@ -128,11 +129,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (parse_args (argc, argv) != 0)
return 1;
- A::AMI_Msm_var server;
+ A::AMI_CCM_var server;
CORBA::Object_var object =
orb->string_to_object (ior);
- server = A::AMI_Msm::_narrow (object.in ());
+ server = A::AMI_CCM::_narrow (object.in ());
if (CORBA::is_nil (server.in ()))
{
@@ -214,9 +215,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
// ****************************************************************
-Client::Client (A::AMI_Msm_ptr server,
+Client::Client (A::AMI_CCM_ptr server,
int niterations)
- : ami_test_var_ (A::AMI_Msm::_duplicate (server)),
+ : ami_test_var_ (A::AMI_CCM::_duplicate (server)),
niterations_ (niterations)
{
the_handler_var_ = handler._this (/* */);
@@ -232,7 +233,7 @@ Client::svc (void)
ACE_DEBUG ((LM_DEBUG,
"(%P | %t):Start <%d>\n",
i));
- ami_test_var_->sendc_foo (the_handler_var_.in (), in_str);
+ ami_test_var_->sendc_asynch_foo (the_handler_var_.in (), in_str);
}
ACE_DEBUG ((LM_DEBUG,
"(%P | %t):<%d> Asynchronous methods issued\n",
diff --git a/modules/TAO/tests/AMI_CCM/server.cpp b/modules/TAO/tests/AMI_CCM/server.cpp
index 2c8587846b4..98730d9c632 100644
--- a/modules/TAO/tests/AMI_CCM/server.cpp
+++ b/modules/TAO/tests/AMI_CCM/server.cpp
@@ -1,4 +1,6 @@
-#include "ami_msm_i.h"
+// $Id$
+
+#include "ami_ccm_i.h"
#include "tao/debug.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Get_Opt.h"
@@ -57,18 +59,18 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (parse_args (argc, argv) != 0)
return 1;
- AMI_Msm_i ami_test_i (orb.in ());
+ AMI_CCM_i ami_ccm_i (orb.in ());
PortableServer::ObjectId_var id =
- root_poa->activate_object (&ami_test_i);
+ root_poa->activate_object (&ami_ccm_i);
CORBA::Object_var object = root_poa->id_to_reference (id.in ());
- A::AMI_Msm_var ami_test_var =
- A::AMI_Msm::_narrow (object.in ());
+ A::AMI_CCM_var ami_ccm_var =
+ A::AMI_CCM::_narrow (object.in ());
CORBA::String_var ior =
- orb->object_to_string (ami_test_var.in ());
+ orb->object_to_string (ami_ccm_var.in ());
ACE_DEBUG ((LM_DEBUG, "Activated as <%C>\n", ior.in ()));