blob: 56a789a76a39d8effe63cfb8916a9cb8b6ba02ef (
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
|
// $Id$
//----------------------------------------------------------------------------------
/**
* @file MonitorCB.cpp
*
* @brief The Monitor Update class
*
* The class which updates the resource data
*
* @author Nilabja Roy <nilabjar@dre.vanderbilt.edu>
*/
//----------------------------------------------------------------------------------
#include "MonitorCB.h"
#include "CIAO_common.h"
CIAO::MonitorCB::MonitorCB (
CORBA::ORB_ptr orb,
Deployment::TargetManager_ptr target,
int interval) :
orb_ (orb),
target_mgr_ (target),
interval_ (interval)
{
}
int CIAO::MonitorCB::update_data (::Deployment::Domain& data)
{
CORBA::StringSeq elements;
elements.length (0);
// data to be updated ...
::Deployment::DomainUpdateKind update_kind
= ::Deployment::UpdateAvailable;
// The copy of the domain variable
::Deployment::Domain_var domain
= new ::Deployment::Domain (data);
try
{
if (CIAO::debug_level () > 20)
{
ACE_DEBUG ((LM_DEBUG , "CIAO::NM::MonitorCB::Making a call to update\n"));
}
target_mgr_->updateDomain (elements , domain , update_kind);
}
catch (CORBA::Exception& )
{
//ACE_DEBUG ((LM_DEBUG, "CIAO::NM::MonitorCB::Unknown Exception\n"));
//ex._tao_print_exception ("NM::MonitorCB::updateDomain");
}
catch (...)
{
// ignore
}
return 0;
}
|