geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
CombinedSignal.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 COMBINEDSIGNAL_HPP_INCLUDE
7 #define COMBINEDSIGNAL_HPP_INCLUDE
8 
9 #include <map>
10 #include <functional>
11 #include <vector>
12 
13 #include "geopm/CircularBuffer.hpp"
14 
15 namespace geopm
16 {
20  {
21  public:
23  CombinedSignal(std::function<double(const std::vector<double> &)>);
24  virtual ~CombinedSignal() = default;
27  virtual double sample(const std::vector<double> &values);
28  std::function<double(const std::vector<double> &)> m_agg_function;
29  };
30 }
31 
32 #endif
Used by PlatformIO to define a signal as a function of other signals.
Definition: CombinedSignal.hpp:20
virtual double sample(const std::vector< double > &values)
Sample all required signals and aggregate values to produce the combined signal.
Definition: CombinedSignal.cpp:29
virtual ~CombinedSignal()=default
CombinedSignal()
Definition: CombinedSignal.cpp:17
std::function< double(const std::vector< double > &)> m_agg_function
Definition: CombinedSignal.hpp:28
Definition: Agg.cpp:20