blob: d6f15d068029b1d880f5f11ba37fee188d014fdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
// $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"
#include <memory>
/**
* @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 ();
/** @function initialize_params
* @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.
* @description This function is called by the controller to initialize
* parameters.
*/
virtual int initialize_params (
::Deployment::Domain& domain,
::Deployment::TargetManager_ptr target_manager,
int interval
);
/**
* @function Destructor
*/
virtual ~CIAO_Monitor ();
/** @function start.
* @brief 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);
/**
* @function stop.
* @brief This method will starts up the Monitor
* in this case
* @return -1 on error
*/
int stop ();
/**
* @function get_current_date.
* @brief 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_;
};
} // CIAO
#endif /* CIAO_MONITORH */
|