RAMSegment.h
Go to the documentation of this file.
1
#pragma once
2
3
// STD/STL
4
#include <iostream>
5
#include <csignal>
6
#include <memory>
7
#include <atomic>
8
#include <thread>
9
10
// System Monitor
11
#include "
LightweightSystemMonitor/linux_memoryload.hpp
"
12
#include "
LightweightSystemMonitor/linux_cpuload.hpp
"
13
#include "
LightweightSystemMonitor/linux_process_load.hpp
"
14
#include "
LightweightSystemMonitor/linux_networkload.hpp
"
15
#include "
LightweightSystemMonitor/linux_systemutil.hpp
"
16
#include "
LightweightSystemMonitor/util/record_value.hpp
"
17
#include "
LightweightSystemMonitor/util/timer.hpp
"
18
19
// BaseClass
20
#include <
RobotAPI/libraries/armem/server/segment/SpecializedProviderSegment.h
>
21
22
// ArmarX
23
#include <
ArmarXCore/core/services/tasks/PeriodicTask.h
>
24
25
namespace
armarx::armem::server::systemstate::segment
26
{
27
class
LightweightRamMonitorProviderSegment
:
public
armem::server::segment::SpecializedProviderSegment
28
{
29
using
Base
=
armem::server::segment::SpecializedProviderSegment
;
30
31
public
:
32
LightweightRamMonitorProviderSegment
(
armem::server::MemoryToIceAdapter
&
iceMemory
);
33
34
void
defineProperties
(
armarx::PropertyDefinitionsPtr
defs,
const
std::string& prefix =
""
)
override
;
35
void
init
()
override
;
36
37
private
:
38
void
loop();
39
40
private
:
41
float
pollFrequencyHz = 10;
42
std::unique_ptr<memoryLoad> memoryMonitoring = std::make_unique<memoryLoad>();
43
44
armarx::PeriodicTask<LightweightRamMonitorProviderSegment>::pointer_type
runningTask;
45
};
46
}
linux_memoryload.hpp
armarx::armem::server::MemoryToIceAdapter
Helps connecting a Memory server to the Ice interface.
Definition:
MemoryToIceAdapter.h:19
linux_cpuload.hpp
PeriodicTask.h
armarx::armem::server::segment::SpecializedProviderSegment
A base class for provider segments.
Definition:
SpecializedProviderSegment.h:20
linux_process_load.hpp
linux_systemutil.hpp
timer.hpp
armarx::armem::server::systemstate::segment::LightweightRamMonitorProviderSegment::LightweightRamMonitorProviderSegment
LightweightRamMonitorProviderSegment(armem::server::MemoryToIceAdapter &iceMemory)
Definition:
RAMSegment.cpp:16
armarx::armem::server::systemstate::segment::LightweightRamMonitorProviderSegment::init
void init() override
Definition:
RAMSegment.cpp:27
armarx::armem::server::segment::detail::SegmentBase< server::wm::ProviderSegment >
linux_networkload.hpp
armarx::armem::server::segment::detail::SegmentBase< server::wm::ProviderSegment >::iceMemory
MemoryToIceAdapter & iceMemory
Definition:
SpecializedSegment.h:60
IceUtil::Handle< class PropertyDefinitionContainer >
SpecializedProviderSegment.h
armarx::armem::server::systemstate::segment::LightweightRamMonitorProviderSegment
Definition:
RAMSegment.h:27
record_value.hpp
armarx::armem::server::systemstate::segment::LightweightRamMonitorProviderSegment::defineProperties
void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
Definition:
RAMSegment.cpp:22
armarx::armem::server::systemstate::segment
Definition:
CPUSegment.cpp:14
RobotAPI
libraries
armem_system_state
server
RAMSegment.h
Generated on Sat Oct 12 2024 09:14:09 for armarx_documentation by
1.8.17