Observer for pfpdb. More...
#include <DebugObserver.h>
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
|
virtual |
Function called by the simulation when a counter is added to a module.
- Parameters
-
module_name Module name to which counter was added counter_name Name of the counter simulation_time Simulation time at which counter was added (defaults to 0 since counters are typically added before simulation begins)
Implements pfp::core::PFPObserver.
|
virtual |
Function called by the simulation when a counter is removed from a module.
- Parameters
-
module_name Module name from which counter was removed counter_name Name of the counter simulation_time Simulation time at which counter was removed (defaults to 0 since counters are typically removed before simulation begins)
Implements pfp::core::PFPObserver.
|
virtual |
Function called by the simulation when a counter is updated.
- Parameters
-
module_name Module containing updated counter counter_name Name of the counter new_value Current value of the counter simulation_time Simulation time at which counter value was updated
Implements pfp::core::PFPObserver.
|
overridevirtual |
Function called by the simulation when data is dropped in a module.
- Parameters
-
in_module Module name in which data was dropped data JSON representation of data simulation_time Simulation time at which event occurred
Implements pfp::core::PFPObserver.
|
overridevirtual |
Function called by the simulation when data is read by a module.
- Parameters
-
to_module Module name of the receiving module data JSON representation of data simulation_time Simulation time at which event occurred
Implements pfp::core::PFPObserver.
|
overridevirtual |
Function called by the simulation when data is written by a module.
- Parameters
-
from_module Module name of the transmitting module data JSON representation of data simulation_time Simulation time at which event occurred
Implements pfp::core::PFPObserver.
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_if Control Plane object.
|
virtual |
Function called by the simulation when a TEU thread begins.
- Parameters
-
teu_mod TEU in which thread was started tec_mod TEC containing the TEU in which the thread was started thread_id ID number of the thread simulation_time Simulation time at which event occurred
Implements pfp::core::PFPObserver.
|
virtual |
Function called by the simulation when a TEU thread ends.
- Parameters
-
teu_mod TEU in which thread was ended tec_mod TEC containing the TEU in which the thread was ended thread_id ID number of the thread simulation_time Simulation time at which event occurred
Implements pfp::core::PFPObserver.
|
virtual |
Function called by the simulation when a TEU thread starts idling.
- Parameters
-
teu_mod TEU in which thread is idling tec_mod TEC containing the TEU in which the thread is idling thread_id ID number of the thread simulation_time Simulation 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