summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-26 16:47:15 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-26 16:47:15 +0000
commit87031834042a7296dc36051243d7722436051de6 (patch)
tree2406e2b4b940aa24d27fe2699bb61d3c52841338
parent16a7584ad56d0ce715a06df1f80b3c711df5fe34 (diff)
downloadATCD-87031834042a7296dc36051243d7722436051de6.tar.gz
Merged from CIAO-events-3 branch.
-rw-r--r--modules/CIAO/DAnCE/NodeManager/CIAO_Monitor.h16
-rw-r--r--modules/CIAO/DAnCE/NodeManager/MonitorController.cpp2
-rw-r--r--modules/CIAO/DAnCE/NodeManager/NAM_Map.cpp2
-rw-r--r--modules/CIAO/DAnCE/NodeManager/NAM_Map.h2
-rw-r--r--modules/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp19
-rw-r--r--modules/CIAO/DAnCE/NodeManager/Node_Manager.cpp25
-rw-r--r--modules/CIAO/DAnCE/NodeManager/README2
7 files changed, 36 insertions, 32 deletions
diff --git a/modules/CIAO/DAnCE/NodeManager/CIAO_Monitor.h b/modules/CIAO/DAnCE/NodeManager/CIAO_Monitor.h
index e317288b02a..62fd78da735 100644
--- a/modules/CIAO/DAnCE/NodeManager/CIAO_Monitor.h
+++ b/modules/CIAO/DAnCE/NodeManager/CIAO_Monitor.h
@@ -5,7 +5,8 @@
*
* @brief The Monitor class.
*
- * This class periodically records the loadavg value of the machine in which it
+ * This class periodically records the
+ * loadavg value of the machine in which it
* loaded
*
* @author Nilabja Roy <nilabjar@dre.vanderbilt.edu>
@@ -20,12 +21,15 @@
#include "ace/Auto_Ptr.h"
#include <memory>
+
+
/**
* @namespace CIAO
*
* @brief The top level CIAO namespace
*
*/
+
namespace CIAO
{
class ReceiverThread;
@@ -90,23 +94,25 @@ namespace CIAO
/// The TargetManager Object to be sent to the RSSSubscriber ..
::Deployment::TargetManager_ptr target_ptr_;
+
/// The interval after which update is to be returned.
int interval_;
/// The Domain data structure
auto_ptr <Deployment::Domain> current_domain_;
- /// The previous user cpu
+ ///The previous user cpu
long prev_user_cpu_;
- /// The previous user cpu low priority
+ ///The previous user cpu low priority
long prev_user_cpu_low_;
- /// The previous system cpu
+ ///The previous system cpu
long prev_sys_cpu_;
- /// The previous idle time
+ ///The previous idle time
long prev_idle_time_;
+
};
} // CIAO
diff --git a/modules/CIAO/DAnCE/NodeManager/MonitorController.cpp b/modules/CIAO/DAnCE/NodeManager/MonitorController.cpp
index cff6b86df1b..92d40b0b598 100644
--- a/modules/CIAO/DAnCE/NodeManager/MonitorController.cpp
+++ b/modules/CIAO/DAnCE/NodeManager/MonitorController.cpp
@@ -220,7 +220,7 @@ CIAO::MonitorController::terminate ()
guard,
lock_);
- terminate_flag_ = true;
+ terminate_flag_=1;
}
bool
diff --git a/modules/CIAO/DAnCE/NodeManager/NAM_Map.cpp b/modules/CIAO/DAnCE/NodeManager/NAM_Map.cpp
index f3aebb307a2..05d8cb179e4 100644
--- a/modules/CIAO/DAnCE/NodeManager/NAM_Map.cpp
+++ b/modules/CIAO/DAnCE/NodeManager/NAM_Map.cpp
@@ -11,7 +11,7 @@ namespace CIAO
}
bool
- NAM_Map::is_available (const ACE_CString &str) const
+ NAM_Map::is_available (const ACE_CString &str)
{
if (this->map_.find (str) == 0)
return true;
diff --git a/modules/CIAO/DAnCE/NodeManager/NAM_Map.h b/modules/CIAO/DAnCE/NodeManager/NAM_Map.h
index 4b398d51927..a3a6a7def5f 100644
--- a/modules/CIAO/DAnCE/NodeManager/NAM_Map.h
+++ b/modules/CIAO/DAnCE/NodeManager/NAM_Map.h
@@ -39,7 +39,7 @@ namespace CIAO
NAM_Map (void);
/// Determine if there is a NAM associated with a UUID
- bool is_available (const ACE_CString &str) const;
+ bool is_available (const ACE_CString &str);
/// Insert a NAM OID into the collection
bool insert_nam (const ACE_CString &str,
diff --git a/modules/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp b/modules/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp
index 4c3a7d3437c..1f74b9849ca 100644
--- a/modules/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp
+++ b/modules/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp
@@ -163,10 +163,10 @@ get_all_facets (ACE_CString & name)
Component_Facets_Map::ENTRY *entry = 0;
if (this->comp_facets_map_.find (name.c_str (), entry) != 0)
- ACE_ERROR ((LM_ERROR, "(%P|%t) - NodeManager_Impl_Base::get_all_facets - "
+ ACE_DEBUG ((LM_ERROR, "(%P|%t) - NodeManager_Impl_Base::get_all_facets - "
"No component with name [%s] was found in the NodeManager\n", name.c_str ()));
- CORBA::ULong const facet_len = entry->int_id_->length ();
+ CORBA::ULong facet_len = entry->int_id_->length ();
Components::FacetDescriptions_var retv;
ACE_NEW_RETURN (retv,
@@ -190,10 +190,10 @@ get_all_consumers (ACE_CString & name)
Component_Consumers_Map::ENTRY *entry = 0;
if (this->comp_consumers_map_.find (name.c_str (), entry) != 0)
- ACE_ERROR ((LM_ERROR, "(%P|%t) - NodeManager_Impl_Base::get_all_facets - "
+ ACE_DEBUG ((LM_ERROR, "(%P|%t) - NodeManager_Impl_Base::get_all_facets - "
"Component [%s] was not found in the NodeManager\n", name.c_str ()));
- CORBA::ULong const consumer_len = entry->int_id_->length ();
+ CORBA::ULong consumer_len = entry->int_id_->length ();
Components::ConsumerDescriptions_var retv;
ACE_NEW_RETURN (retv,
@@ -239,9 +239,9 @@ preparePlan (const Deployment::DeploymentPlan &plan
if (! this->validate_plan (plan))
{
- ACE_ERROR ((LM_ERROR, "(%P|%t) NodeManager <%s>:prepare_plan:Plan_Error.\n",
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) NodeManager <%s>:prepare_plan:Plan_Error.\n",
plan.instance[0].node.in ()));
- ACE_ERROR ((LM_ERROR, "(%P|%t) All component instances hosted in the "
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) All component instances hosted in the "
"same component server must have the "
"same \"resourceName\" defined.\n"));
@@ -289,8 +289,9 @@ preparePlan (const Deployment::DeploymentPlan &plan
plan.UUID.in ()));
}
- // Implementation undefined.
- CIAO::NodeApplicationManager_Impl_Base *node_app_mgr =
+ //Implementation undefined.
+ CIAO::NodeApplicationManager_Impl_Base *node_app_mgr;
+ node_app_mgr =
this->create_node_app_manager (this->orb_.in (), this->poa_.in ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -538,7 +539,7 @@ CIAO::NodeManager_Impl_Base::get_shared_components_i (void)
else
{
// should never happen
- ACE_ERROR ((LM_ERROR, "Component [%s] in the list of shared component, "
+ ACE_DEBUG ((LM_ERROR, "Component [%s] in the list of shared component, "
"was not found in the NodeManager ref count map.\n",
(*iter).c_str ()));
}
diff --git a/modules/CIAO/DAnCE/NodeManager/Node_Manager.cpp b/modules/CIAO/DAnCE/NodeManager/Node_Manager.cpp
index 86abfb8e49d..d2257e6ddc1 100644
--- a/modules/CIAO/DAnCE/NodeManager/Node_Manager.cpp
+++ b/modules/CIAO/DAnCE/NodeManager/Node_Manager.cpp
@@ -13,16 +13,15 @@
#include "ciao/CIAO_common.h"
const char *ior_file_name_ = "nodedaemon.ior";
-char *default_svcconf_ = 0;
-char *svcconf_config_ = 0;
char *nodeapp_location_ = 0;
-const char *nodeapp_options_ = 0;
const char *pid_file_name_ = 0;
-bool write_to_ior_ = false;
-bool register_with_ns_ = false;
+int write_to_ior_ = 0;
+int register_with_ns_ = 0;
int nodeapp_loc_ = 0;
int spawn_delay = 1;
+ACE_CString nodeapp_options_;
+
int
parse_args (int argc, char *argv[])
{
@@ -34,20 +33,18 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'z':
- nodeapp_options_ = "-ORBDebugLevel 10";
+ nodeapp_options_ += " -ORBDebugLevel ";
+ nodeapp_options_ += get_opts.opt_arg ();
break;
case 'o': // Get the file name to write to.
ior_file_name_ = get_opts.opt_arg ();
- write_to_ior_ = true;
+ write_to_ior_ = 1;
break;
case 'c': // Get the default svc.conf filename.
- default_svcconf_ = get_opts.opt_arg ();
- break;
-
- case 'm': // Get the svc.conf map configuration filename.
- svcconf_config_ = get_opts.opt_arg ();
+ nodeapp_options_ += " -ORBSvcConf ";
+ nodeapp_options_ += get_opts.opt_arg ();
break;
case 's': // Get the location to spawn the NodeApplication.
@@ -64,7 +61,7 @@ parse_args (int argc, char *argv[])
break;
case 'n':
- register_with_ns_ = true;
+ register_with_ns_ = 1;
break;
case 'p':
@@ -221,7 +218,7 @@ main (int argc, char *argv[])
orb.in (),
poa.in (),
nodeapp_location_,
- nodeapp_options_,
+ nodeapp_options_.c_str (),
spawn_delay),
-1);
diff --git a/modules/CIAO/DAnCE/NodeManager/README b/modules/CIAO/DAnCE/NodeManager/README
index dda9201e240..09f407f6a65 100644
--- a/modules/CIAO/DAnCE/NodeManager/README
+++ b/modules/CIAO/DAnCE/NodeManager/README
@@ -8,6 +8,6 @@ currently depend on starting the NodeApplicationManager process on
some port of all the hosts that have NodeApplication install to
function properly. The port to run this daemon can be set by using the
TAO ORB options command of -ORBEndpoint <port>. This replaces the
-earlier CIAO_Daemon implementation of CIAO as defined in the CCM
+earlier CIAO_Daemon implementation of CIAO as defined in the CCM
specification.
*/