gem5  v20.1.0.0
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
FastModel::SignalReceiver Class Reference

#include <signal_receiver.hh>

Inheritance diagram for FastModel::SignalReceiver:

Public Types

typedef std::function< void(bool)> OnChangeFunc
 

Public Member Functions

 SignalReceiver (const std::string &name, OnChangeFunc on_change=nullptr)
 
 SignalReceiver (const char *name, OnChangeFunc on_change=nullptr)
 
void onChange (OnChangeFunc func)
 
void set_state (int export_id, const bool &new_state) override
 

Public Attributes

amba_pv::signal_slave_export< bool > signal_in
 

Private Attributes

bool _state
 
OnChangeFunc _onChange
 

Detailed Description

Definition at line 41 of file signal_receiver.hh.

Member Typedef Documentation

◆ OnChangeFunc

typedef std::function<void(bool)> FastModel::SignalReceiver::OnChangeFunc

Definition at line 44 of file signal_receiver.hh.

Constructor & Destructor Documentation

◆ SignalReceiver() [1/2]

FastModel::SignalReceiver::SignalReceiver ( const std::string &  name,
OnChangeFunc  on_change = nullptr 
)
inline

Definition at line 53 of file signal_receiver.hh.

◆ SignalReceiver() [2/2]

FastModel::SignalReceiver::SignalReceiver ( const char *  name,
OnChangeFunc  on_change = nullptr 
)
inline

Definition at line 57 of file signal_receiver.hh.

References signal_in.

Member Function Documentation

◆ onChange()

void FastModel::SignalReceiver::onChange ( OnChangeFunc  func)
inline

◆ set_state()

void FastModel::SignalReceiver::set_state ( int  export_id,
const bool &  new_state 
)
inlineoverride

Definition at line 67 of file signal_receiver.hh.

References _onChange, and _state.

Member Data Documentation

◆ _onChange

OnChangeFunc FastModel::SignalReceiver::_onChange
private

Definition at line 48 of file signal_receiver.hh.

Referenced by onChange(), and set_state().

◆ _state

bool FastModel::SignalReceiver::_state
private

Definition at line 47 of file signal_receiver.hh.

Referenced by set_state().

◆ signal_in

amba_pv::signal_slave_export<bool> FastModel::SignalReceiver::signal_in

Definition at line 51 of file signal_receiver.hh.

Referenced by SignalReceiver().


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

Generated on Wed Sep 30 2020 14:02:39 for gem5 by doxygen 1.8.17