pfp::core::db::DebugObserver Class Reference

Observer for pfpdb. More...

#include <DebugObserver.h>

+ Inheritance diagram for pfp::core::db::DebugObserver:
+ Collaboration diagram for pfp::core::db::DebugObserver:

Public Member Functions

 DebugObserver ()
 Default Constructor.
 
 ~DebugObserver ()
 Destructor.
 
virtual void counter_added (const std::string &module_name, const std::string &counter_name, double simulation_time=0)
 Function called by the simulation when a counter is added to a module. More...
 
virtual void counter_removed (const std::string &module_name, const std::string &counter_name, double simulation_time=0)
 Function called by the simulation when a counter is removed from a module. More...
 
virtual void counter_updated (const std::string &module_name, const std::string &counter_name, std::size_t new_value, double simulation_time)
 Function called by the simulation when a counter is updated. More...
 
void data_written (const std::string &from_module, const std::shared_ptr< TrType > data, double simulation_time) override
 Function called by the simulation when data is written by a module. More...
 
void data_read (const std::string &to_module, const std::shared_ptr< TrType > data, double simulation_time) override
 Function called by the simulation when data is read by a module. More...
 
void data_dropped (const std::string &in_module, const std::shared_ptr< TrType > data, const std::string &drop_reason, double simulation_time) override
 Function called by the simulation when data is dropped in a module. More...
 
virtual void thread_begin (const std::string &teu_mod, const std::string &tec_mod, std::size_t thread_id, std::size_t packet_id, double simulation_time)
 Function called by the simulation when a TEU thread begins. More...
 
virtual void thread_end (const std::string &teu_mod, const std::string &tec_mod, std::size_t thread_id, std::size_t packet_id, double simulation_time)
 Function called by the simulation when a TEU thread ends. More...
 
virtual void thread_idle (const std::string &teu_mod, const std::string &tec_mod, std::size_t thread_id, std::size_t packet_id, double simulation_time)
 Function called by the simulation when a TEU thread starts idling. More...
 
virtual void core_busy (const std::string &teu_mod, const std::string &tec_mod, double simulation_time)
 
virtual void core_idle (const std::string &teu_mod, const std::string &tec_mod, double simulation_time)
 
void waitForRunCommand ()
 Called after SystemC elaboration to halt the simulation until the run command is sent.
 
void registerCP (CPDebuggerInterface *cp_debug_if)
 Register a Control Plane (which implements CPDebuggerInterface) to the debugger. More...
 
void enableDebugger ()
 Enables the debugger.
 

Additional Inherited Members

- Protected Member Functions inherited from pfp::core::PFPObserver
virtual ~PFPObserver ()=default
 Default destructor.
 

Detailed Description

Observer for pfpdb.

The observer gets notified of any events within the simulation and is responsible for maintaining relevant information for the debugger. This object should only be created if the user compiles the PFPSim with the appropriate debug flag. It is the user's responsibility to notify this observer appropriately.

Member Function Documentation

void pfp::core::db::DebugObserver::counter_added ( const std::string &  module_name,
const std::string &  counter_name,
double  simulation_time = 0 
)
virtual

Function called by the simulation when a counter is added to a module.

Parameters
module_nameModule name to which counter was added
counter_nameName of the counter
simulation_timeSimulation time at which counter was added (defaults to 0 since counters are typically added before simulation begins)

Implements pfp::core::PFPObserver.

+ Here is the call graph for this function:

void pfp::core::db::DebugObserver::counter_removed ( const std::string &  module_name,
const std::string &  counter_name,
double  simulation_time = 0 
)
virtual

Function called by the simulation when a counter is removed from a module.

Parameters
module_nameModule name from which counter was removed
counter_nameName of the counter
simulation_timeSimulation time at which counter was removed (defaults to 0 since counters are typically removed before simulation begins)

Implements pfp::core::PFPObserver.

+ Here is the call graph for this function:

void pfp::core::db::DebugObserver::counter_updated ( const std::string &  module_name,
const std::string &  counter_name,
std::size_t  new_value,
double  simulation_time 
)
virtual

Function called by the simulation when a counter is updated.

Parameters
module_nameModule containing updated counter
counter_nameName of the counter
new_valueCurrent value of the counter
simulation_timeSimulation time at which counter value was updated

Implements pfp::core::PFPObserver.

+ Here is the call graph for this function:

void pfp::core::db::DebugObserver::data_dropped ( const std::string &  in_module,
const std::shared_ptr< TrType data,
const std::string &  drop_reason,
double  simulation_time 
)
overridevirtual

Function called by the simulation when data is dropped in a module.

Parameters
in_moduleModule name in which data was dropped
dataJSON representation of data
simulation_timeSimulation time at which event occurred

Implements pfp::core::PFPObserver.

+ Here is the call graph for this function:

void pfp::core::db::DebugObserver::data_read ( const std::string &  to_module,
const std::shared_ptr< TrType data,
double  simulation_time 
)
overridevirtual

Function called by the simulation when data is read by a module.

Parameters
to_moduleModule name of the receiving module
dataJSON representation of data
simulation_timeSimulation time at which event occurred

Implements pfp::core::PFPObserver.

+ Here is the call graph for this function:

void pfp::core::db::DebugObserver::data_written ( const std::string &  from_module,
const std::shared_ptr< TrType data,
double  simulation_time 
)
overridevirtual

Function called by the simulation when data is written by a module.

Parameters
from_moduleModule name of the transmitting module
dataJSON representation of data
simulation_timeSimulation time at which event occurred

Implements pfp::core::PFPObserver.

+ Here is the call graph for this function:

void pfp::core::db::DebugObserver::registerCP ( CPDebuggerInterface cp_debug_if)

Register a Control Plane (which implements CPDebuggerInterface) to the debugger.

This gives the debugger the ability to insert, modify and delete table entries as well as obtain the state of the tables.

Parameters
cp_debug_ifControl Plane object.

+ Here is the call graph for this function:

void pfp::core::db::DebugObserver::thread_begin ( const std::string &  teu_mod,
const std::string &  tec_mod,
std::size_t  thread_id,
std::size_t  packet_id,
double  simulation_time 
)
virtual

Function called by the simulation when a TEU thread begins.

Parameters
teu_modTEU in which thread was started
tec_modTEC containing the TEU in which the thread was started
thread_idID number of the thread
simulation_timeSimulation time at which event occurred

Implements pfp::core::PFPObserver.

void pfp::core::db::DebugObserver::thread_end ( const std::string &  teu_mod,
const std::string &  tec_mod,
std::size_t  thread_id,
std::size_t  packet_id,
double  simulation_time 
)
virtual

Function called by the simulation when a TEU thread ends.

Parameters
teu_modTEU in which thread was ended
tec_modTEC containing the TEU in which the thread was ended
thread_idID number of the thread
simulation_timeSimulation time at which event occurred

Implements pfp::core::PFPObserver.

void pfp::core::db::DebugObserver::thread_idle ( const std::string &  teu_mod,
const std::string &  tec_mod,
std::size_t  thread_id,
std::size_t  packet_id,
double  simulation_time 
)
virtual

Function called by the simulation when a TEU thread starts idling.

Parameters
teu_modTEU in which thread is idling
tec_modTEC containing the TEU in which the thread is idling
thread_idID number of the thread
simulation_timeSimulation time at which event occurred

Implements pfp::core::PFPObserver.


The documentation for this class was generated from the following files:
  • /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/DebugObserver.h
  • /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/DebugObserver.cpp