geopm 3.1.1.dev456+g3ba31824
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
SSTSignal.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 SSTSIGNAL_HPP_INCLUDE
7#define SSTSIGNAL_HPP_INCLUDE
8
9#include <memory>
10#include <cstdint>
11
12#include "Signal.hpp"
13
14namespace geopm
15{
16 class SSTIO;
17
20 class SSTSignal : public geopm::Signal
21 {
22 public:
24 {
25 M_MBOX, // SST Mailbox interface
26 M_MMIO // SST MMIO interface
27 };
28
40 SSTSignal(std::shared_ptr<geopm::SSTIO> sstio,
41 SignalType signal_type,
42 int cpu_idx,
43 uint16_t command,
44 uint16_t subcommand,
45 uint32_t subcommand_arg,
46 uint32_t interface_parameter);
47
48 virtual ~SSTSignal() = default;
49
50 void setup_batch(void) override;
51 double sample(void) override;
52 double read(void) const override;
53 private:
54 std::shared_ptr<geopm::SSTIO> m_sstio;
55 SignalType m_signal_type;
56 const int m_cpu_idx;
57 const uint16_t m_command;
58 const uint16_t m_subcommand;
59 const uint32_t m_subcommand_arg;
60
61 int m_batch_idx;
62 };
63
64}
65
66#endif
Definition SSTSignal.hpp:21
SignalType
Definition SSTSignal.hpp:24
@ M_MBOX
Definition SSTSignal.hpp:25
@ M_MMIO
Definition SSTSignal.hpp:26
double read(void) const override
Read directly the value of the signal without affecting any pushed batch signals.
Definition SSTSignal.cpp:46
virtual ~SSTSignal()=default
double sample(void) override
Apply any conversions necessary to interpret the latest stored value as a double.
Definition SSTSignal.cpp:41
void setup_batch(void) override
Prepare the signal for being updated through side effects by the owner's read_batch step....
Definition SSTSignal.cpp:28
Definition Signal.hpp:16
Definition Agg.cpp:20