geopm 3.1.1.dev456+g3ba31824
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
DomainControl.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 DOMAINCONTROL_HPP_INCLUDE
7#define DOMAINCONTROL_HPP_INCLUDE
8
9#include <vector>
10#include <memory>
11
12#include "Control.hpp"
13
14namespace geopm
15{
16 class DomainControl : public Control
17 {
18 public:
19 DomainControl(const std::vector<std::shared_ptr<Control> > &controls);
20 DomainControl(const DomainControl &other) = delete;
21 DomainControl &operator=(const DomainControl &other) = delete;
22 virtual ~DomainControl() = default;
23 void setup_batch(void) override;
24 void adjust(double value) override;
25 void write(double value) override;
26 void save(void) override;
27 void restore(void) override;
28 std::vector<std::shared_ptr<Control> > controls(void);
29 private:
30 std::vector<std::shared_ptr<Control> > m_controls;
31 bool m_is_batch_ready;
32 };
33}
34
35#endif
Definition Control.hpp:16
Definition DomainControl.hpp:17
void setup_batch(void) override
Prepare the control for being written through side effects by the owner's write_batch step....
Definition DomainControl.cpp:25
virtual ~DomainControl()=default
void write(double value) override
Write the value of the control without affecting any pushed batch controls.
Definition DomainControl.cpp:49
std::vector< std::shared_ptr< Control > > controls(void)
Definition DomainControl.cpp:73
DomainControl & operator=(const DomainControl &other)=delete
DomainControl(const DomainControl &other)=delete
void restore(void) override
Restore the setting stored by save().
Definition DomainControl.cpp:65
void adjust(double value) override
Store values to be written by the owner's write_batch step.
Definition DomainControl.cpp:37
void save(void) override
Store the current setting of the control for use by a future call to restore().
Definition DomainControl.cpp:57
Definition Agg.cpp:20