geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
Public Types | Public Member Functions | List of all members
geopm::SSTSignal Class Reference

#include <SSTSignal.hpp>

Inheritance diagram for geopm::SSTSignal:
Inheritance graph
[legend]
Collaboration diagram for geopm::SSTSignal:
Collaboration graph
[legend]

Public Types

enum  SignalType { M_MBOX , M_MMIO }
 

Public Member Functions

 SSTSignal (std::shared_ptr< geopm::SSTIO > sstio, SignalType signal_type, int cpu_idx, uint16_t command, uint16_t subcommand, uint32_t subcommand_arg, uint32_t interface_parameter)
 Create an SSTIO Signal. More...
 
virtual ~SSTSignal ()=default
 
void setup_batch (void) override
 Prepare the signal for being updated through side effects by the owner's read_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call. More...
 
double sample (void) override
 Apply any conversions necessary to interpret the latest stored value as a double. More...
 
double read (void) const override
 Read directly the value of the signal without affecting any pushed batch signals. More...
 
- Public Member Functions inherited from geopm::Signal
virtual ~Signal ()=default
 
virtual void set_sample (double)
 Set the value to be returned by sample() More...
 
virtual bool is_sampled (void) const
 True if the signal has been sampled during this batch. More...
 

Detailed Description

This is the abstraction layer that exposes GEOPM signals from the SSTIO object.

Member Enumeration Documentation

◆ SignalType

Enumerator
M_MBOX 
M_MMIO 

Constructor & Destructor Documentation

◆ SSTSignal()

geopm::SSTSignal::SSTSignal ( std::shared_ptr< geopm::SSTIO sstio,
SignalType  signal_type,
int  cpu_idx,
uint16_t  command,
uint16_t  subcommand,
uint32_t  subcommand_arg,
uint32_t  interface_parameter 
)

Create an SSTIO Signal.

Parameters
[in]sstioInterface through which SST interactions are handled.
[in]signal_typeWhich SST interface to use.
[in]cpu_indexIndex of the CPU to which the mailbox read is being issued.
[in]commandWhich SST interface command to issue.
[in]subcommandWhich SST interface subcommand to issue
[in]subcommand_argWhich SST interface subcommand argument to use.
[in]interface_parameterWhich SST interface parameter to use.

◆ ~SSTSignal()

virtual geopm::SSTSignal::~SSTSignal ( )
virtualdefault

Member Function Documentation

◆ read()

double geopm::SSTSignal::read ( void  ) const
overridevirtual

Read directly the value of the signal without affecting any pushed batch signals.

Implements geopm::Signal.

◆ sample()

double geopm::SSTSignal::sample ( void  )
overridevirtual

Apply any conversions necessary to interpret the latest stored value as a double.

Implements geopm::Signal.

◆ setup_batch()

void geopm::SSTSignal::setup_batch ( void  )
overridevirtual

Prepare the signal for being updated through side effects by the owner's read_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call.

Implements geopm::Signal.


The documentation for this class was generated from the following files: