geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
DaemonImp.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef DAEMONIMP_HPP_INCLUDE
7 #define DAEMONIMP_HPP_INCLUDE
8 
9 #include <memory>
10 
11 #include "geopm/Daemon.hpp"
12 
13 namespace geopm
14 {
15  class Endpoint;
16  class PolicyStore;
17 
18  class DaemonImp : public Daemon
19  {
20  public:
21  DaemonImp(const std::string &endpoint_name,
22  const std::string &db_path);
23  DaemonImp(std::shared_ptr<Endpoint> endpoint,
24  std::shared_ptr<const PolicyStore> policystore);
25  DaemonImp(const DaemonImp &other) = delete;
26  DaemonImp &operator=(const DaemonImp &other) = delete;
27  virtual ~DaemonImp();
28 
29  void update_endpoint_from_policystore(double timeout) override;
30  void stop_wait_loop() override;
31  void reset_wait_loop() override;
32  private:
33  std::shared_ptr<Endpoint> m_endpoint;
34  std::shared_ptr<const PolicyStore> m_policystore;
35  };
36 }
37 
38 #endif
Definition: Daemon.hpp:18
Definition: DaemonImp.hpp:19
DaemonImp(const DaemonImp &other)=delete
void stop_wait_loop() override
Exits early from any ongoing wait loops in the Daemon, for example in a call to update_endpoint_from_...
Definition: Daemon.cpp:57
virtual ~DaemonImp()
Definition: Daemon.cpp:41
void update_endpoint_from_policystore(double timeout) override
Looks up a policy in the Daemon's PolicyStore given the attached Controller's agent and profile name,...
Definition: Daemon.cpp:46
DaemonImp(const std::string &endpoint_name, const std::string &db_path)
Definition: Daemon.cpp:25
DaemonImp & operator=(const DaemonImp &other)=delete
void reset_wait_loop() override
Resets the Daemon's endpoint to prepare for a future wait loop.
Definition: Daemon.cpp:62
Definition: Accumulator.cpp:12