Scopira
20080306
uptimeservice.h
1
2
/*
3
* Copyright (c) 2007-2010 National Research Council
4
*
5
* All rights reserved.
6
*
7
* This material is confidential and proprietary information of
8
* National Research Council Canada ("Confidential Information").
9
* This Confidential Information may only be used and reproduced
10
* in accordance with the terms of the license agreement.
11
*
12
*/
13
14
#ifndef __INCLUDED_SCOPIRA_AGENT_UPTIMESERVICE_H__
15
#define __INCLUDED_SCOPIRA_AGENT_UPTIMESERVICE_H__
16
17
#include <map>
18
19
#include <scopira/tool/uuid.h>
20
#include <scopira/agent/context.h>
21
#include <scopira/tool/export.h>
22
23
namespace
scopira
24
{
25
namespace
agent
26
{
27
class
uptime_service;
28
}
29
}
30
45
class
scopira::agent::uptime_service
46
{
47
public
:
49
SCOPIRA_EXPORT
uptime_service
(
scopira::agent::task_context
&ctx);
51
SCOPIRA_EXPORT
~uptime_service
();
52
60
SCOPIRA_EXPORT
void
update_uptime
(
void
);
61
63
inline
int
get_num_agents
(
void
) {
return
static_cast<
int
>
(dm_servers.
size
()); }
64
83
SCOPIRA_EXPORT
84
const
std::string &
get_value
(
int
agentnum,
const
std::string &key);
85
86
private
:
87
scopira::agent::task_context
&dm_ctx;
88
89
scopira::basekit::narray<scopira::tool::uuid>
dm_servers;
90
91
typedef
std::map<std::string, std::string> agent_values;
92
typedef
std::vector<agent_values> agent_list;
93
94
agent_list dm_values;
95
};
96
97
#endif
98
scopira::agent::uptime_service::uptime_service
uptime_service(scopira::agent::task_context &ctx)
constructor
scopira
Definition:
archiveflow.h:20
scopira::agent::task_context
Definition:
context.h:186
scopira::agent::uptime_service::get_num_agents
int get_num_agents(void)
returns the number of agents being monitored
Definition:
uptimeservice.h:63
scopira::basekit::narray::size
size_t size(void) const
gets the size (1D)
Definition:
narray.h:859
scopira::basekit::narray< scopira::tool::uuid >
scopira::agent::uptime_service::get_value
const std::string & get_value(int agentnum, const std::string &key)
scopira::agent::uptime_service
Definition:
uptimeservice.h:45
scopira::agent::uptime_service::update_uptime
void update_uptime(void)
scopira::agent::uptime_service::~uptime_service
~uptime_service()
destructor
scopira
agent
uptimeservice.h
Generated by
1.8.13