blob: 5d4f2d8a58ac766536973206ddeb90735a6ba63b (
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
|
// $Id$
//==============================================================
/**
* @file MonitorCB.h
*
* @brief The Monitor Callback Function
*
* This class updates data back to the Target Manager
*
* @author Nilabja Roy <nilabjar.vanderbilt.edu>
*/
//==============================================================
#ifndef MONITOR_CBH
#define MONITOR_CBH
#include "DAnCE/Deployment/Deployment_TargetManagerC.h"
/**
* @namespace CIAO
*
* @brief The top level CIAO namespace
*
*/
namespace CIAO
{
/**
* @class MonitorCB
*
* @brief Updates data back to the TM.
*
*/
class MonitorCB
{
public:
/**
* @param orb The ORB pointer
* @param target The TargetManager reference
* @param interval The time interval to sent update
*/
MonitorCB (CORBA::ORB_ptr orb, Deployment::TargetManager_ptr target, int interval);
/**
* This function is called by the monitor to
* update Domain data, which is then sent to
* TM.
* @param data Contains the updated Domain data
* @return int indicates success.
* @todo Check return value, seems not used at this moment
*/
int update_data (::Deployment::Domain& data);
private:
/// The ORB pointer
/// @todo Make this a _var
CORBA::ORB_ptr orb_;
/// The Target Manager pointer to send back the
/// update
/// @todo Make this a _var
::Deployment::TargetManager_ptr target_mgr_;
/// The interval after which updates need to be send
int interval_;
};
/// The Callback function pointer
typedef int (MonitorCB::*CallBack) (::Deployment::Domain &);
} // CIAO namespace
#endif /* MONITOR_CBH */
|