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
6public:
7 typedef unsigned long long memory_t;
8 typedef double load_t;
9 static load_t maxLoadValue(void) { return DBL_MAX; }
10
12 LoadInformation(const LoadInformation& _other);
13 virtual ~LoadInformation();
14
16
17 load_t load(void) const;
18 bool updateSystemUsageValues(ot::JsonDocument& _jsonDocument);
19
20private:
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};
Definition LoadInformation.h:5
static load_t maxLoadValue(void)
Definition LoadInformation.h:9
load_t load(void) const
Definition LoadInformation.cpp:44
virtual ~LoadInformation()
Definition LoadInformation.cpp:27
bool updateSystemUsageValues(ot::JsonDocument &_jsonDocument)
Definition LoadInformation.cpp:51
LoadInformation & operator=(const LoadInformation &_other)
Definition LoadInformation.cpp:31
double load_t
Definition LoadInformation.h:8
unsigned long long memory_t
Definition LoadInformation.h:7
LoadInformation()
Definition LoadInformation.cpp:9
JSON document.
Definition JSON.h:276