OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
LoadInformation.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
OTCore/JSON.h
"
4
5
class
LoadInformation
{
6
public
:
7
typedef
unsigned
long
long
memory_t
;
8
typedef
double
load_t
;
9
static
load_t
maxLoadValue
(
void
) {
return
DBL_MAX; }
10
11
LoadInformation
();
12
LoadInformation
(
const
LoadInformation
& _other);
13
virtual
~LoadInformation
();
14
15
LoadInformation
&
operator =
(
const
LoadInformation
& _other);
16
17
load_t
load
(
void
)
const
;
18
bool
updateSystemUsageValues
(
ot::JsonDocument
& _jsonDocument);
19
20
private
:
21
load_t
calculateLoad(
memory_t
_total,
memory_t
_avail);
22
23
load_t
m_currentPhysicalMemoryLoad;
24
load_t
m_currentVirtualMemoryLoad;
25
26
memory_t
m_totalPhysicalMemory;
27
memory_t
m_availablePhysicalMemory;
28
memory_t
m_totalVirtualMemory;
29
memory_t
m_availableVirtualMemory;
30
};
JSON.h
LoadInformation
Definition
LoadInformation.h:5
LoadInformation::maxLoadValue
static load_t maxLoadValue(void)
Definition
LoadInformation.h:9
LoadInformation::load
load_t load(void) const
Definition
LoadInformation.cpp:44
LoadInformation::~LoadInformation
virtual ~LoadInformation()
Definition
LoadInformation.cpp:27
LoadInformation::updateSystemUsageValues
bool updateSystemUsageValues(ot::JsonDocument &_jsonDocument)
Definition
LoadInformation.cpp:51
LoadInformation::operator=
LoadInformation & operator=(const LoadInformation &_other)
Definition
LoadInformation.cpp:31
LoadInformation::load_t
double load_t
Definition
LoadInformation.h:8
LoadInformation::memory_t
unsigned long long memory_t
Definition
LoadInformation.h:7
LoadInformation::LoadInformation
LoadInformation()
Definition
LoadInformation.cpp:9
ot::JsonDocument
JSON document.
Definition
JSON.h:276
Services
GlobalDirectoryService
include
LoadInformation.h
Generated by
1.10.0