summaryrefslogtreecommitdiff
path: root/CIAO/DAnCE/NodeManager/CIAO_Monitor.h
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2007-03-18 22:23:37 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2007-03-18 22:23:37 +0000
commit06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b (patch)
tree8815ce3b3a85c3c4285429295f338e00ea4497f4 /CIAO/DAnCE/NodeManager/CIAO_Monitor.h
parentd66fcc9b4aaec8e88eeb83fc578fdf8a3cc963de (diff)
downloadATCD-06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b.tar.gz
Diffstat (limited to 'CIAO/DAnCE/NodeManager/CIAO_Monitor.h')
-rw-r--r--CIAO/DAnCE/NodeManager/CIAO_Monitor.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/CIAO/DAnCE/NodeManager/CIAO_Monitor.h b/CIAO/DAnCE/NodeManager/CIAO_Monitor.h
new file mode 100644
index 00000000000..5a134538701
--- /dev/null
+++ b/CIAO/DAnCE/NodeManager/CIAO_Monitor.h
@@ -0,0 +1,107 @@
+// $Id$
+//==========================================================================
+/**
+ * @file CIAO_Monitor.h
+ *
+ * @brief The Monitor class.
+ *
+ * This class periodically records the loadavg value of the machine in which it
+ * loaded
+ *
+ * @author Nilabja Roy <nilabjar@dre.vanderbilt.edu>
+ */
+//==========================================================================
+
+
+#ifndef CIAO_MONITORH
+#define CIAO_MONITORH
+
+#include "BaseMonitor.h"
+#include "ace/Auto_Ptr.h"
+
+/**
+ * @namespace CIAO
+ *
+ * @brief The top level CIAO namespace
+ *
+ */
+namespace CIAO
+{
+ class ReceiverThread;
+
+ /**
+ * @class CIAO_Monitor
+ *
+ * @brief The Monitor class
+ *
+ */
+ class CIAO_Monitor : public MonitorBase
+ {
+ public:
+
+ /** @function Constructor
+ */
+ CIAO_Monitor ();
+
+ /**
+ * This function is called by the controller to initialize
+ * parameters.
+ * @param domain The Initial Domain for this host
+ * @param target_manager TargetManager_ptr
+ * @param interval The time interval after whic updates need to be send.
+ */
+ virtual int initialize_params (
+ ::Deployment::Domain& domain,
+ ::Deployment::TargetManager_ptr target_manager,
+ int interval
+ );
+ /**
+ * Destructor
+ */
+ virtual ~CIAO_Monitor ();
+
+ /**
+ * This method will starts up the Monitor in this case,
+ * @param orb The orb needed for resolving.
+ * @return -1 on error
+ */
+ int start (CORBA::ORB_ptr orb);
+
+ /**
+ * This method will stop the Monitor in this case
+ * @return -1 on error
+ */
+ int stop ();
+
+ /**
+ * This function retrieves the current Domain data
+ * @return -1 on error
+ */
+ ::Deployment::Domain* get_current_data ();
+
+ protected:
+
+ /// 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
+ long prev_user_cpu_;
+
+ /// The previous user cpu low priority
+ long prev_user_cpu_low_;
+
+ /// The previous system cpu
+ long prev_sys_cpu_;
+
+ /// The previous idle time
+ long prev_idle_time_;
+ };
+
+} // CIAO
+#endif /* CIAO_MONITORH */