Resource Tuner
Loading...
Searching...
No Matches
PulseMonitor.h
Go to the documentation of this file.
1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2// SPDX-License-Identifier: BSD-3-Clause-Clear
3
27#ifndef PULSE_MONITOR_H
28#define PULSE_MONITOR_H
29
30#include <mutex>
31#include <dirent.h>
32
33#include "Timer.h"
34#include "RequestManager.h"
35#include "CocoTable.h"
36#include "ClientDataManager.h"
38#include "ResourceTunerSettings.h"
39#include "Logger.h"
40
48private:
49 static std::shared_ptr<PulseMonitor> mPulseMonitorInstance;
50 Timer* mTimer;
51 uint32_t mPulseDuration;
52
54
55 int8_t checkForDeadClients();
56
57public:
59
70 void stopPulseMonitorDaemon();
71
72 static std::shared_ptr<PulseMonitor> getInstance() {
73 if(mPulseMonitorInstance == nullptr) {
74 mPulseMonitorInstance = std::shared_ptr<PulseMonitor>(new PulseMonitor());
75 }
76 return mPulseMonitorInstance;
77 }
78};
79
80ErrCode startPulseMonitorDaemon();
81void stopPulseMonitorDaemon();
82
83#endif
84
ErrCode
Custom Error Codes used by Resource Tuner APIs and Internal Functions.
Definition ErrCodes.h:17
Responsible for checking if all clients are alive after a certain time interval.
ErrCode startPulseMonitorDaemon()
Starts the Pulse Monitor.
Timer.
Definition Timer.h:20