Stores any data acquired from the simulation from the observer so that it may be fetched by the server and sent to the debugger. More...
#include <DebugDataManager.h>
Public Member Functions | |
DebugDataManager () | |
Default Constructor. | |
void | addCounter (std::string name) |
Add a counter. More... | |
void | removeCounter (std::string name) |
Remove a counter. More... | |
void | updateCounter (std::string name, int val) |
Update the value of a counter. More... | |
void | addBreakpoint (Breakpoint br) |
Add a Breakpoint. More... | |
void | removeBreakpoint (int identifier) |
Remove a Breakpoint. More... | |
void | enableBreakpoint (int id) |
Enable a Breakpoint. More... | |
void | disableBreakpoint (int id) |
Disable a Breakpoint. More... | |
void | updatePacket (int id, std::string module, double time_, bool read) |
Add a new packet or update an existing one. More... | |
void | removePacket (int id) |
Remove a packet. More... | |
void | addWatchpoint (Watchpoint wp) |
Add a Watchpoint. More... | |
void | removeWatchpoint (int id) |
Remove a Watchpoint. More... | |
void | enableWatchpoint (int id) |
Enable a Watchpoint. More... | |
void | disableWatchpoint (int id) |
Disable a Watchpoint. More... | |
int | whoami () |
Get the ID of the packet that is the debugger is currently following or focusing on. More... | |
void | set_whoami (int id) |
Set which packet is currently be followed or focused on. More... | |
void | addIgnoreModule (std::string mod) |
Add a module to ignore. More... | |
bool | checkIgnoreModules (std::string mod) |
Check if the given module is being ignored. More... | |
void | removeIgnoreModule (std::string mod) |
Remove a module from the list of ignored modules. More... | |
void | addDroppedPacket (int id, std::string module, std::string reason) |
Add a packet to the list of dropped packets. More... | |
void | setBreakOnPacketDrop (bool b) |
Set whether the debugger should break when a packet is dropped. More... | |
bool | getBreakOnPacketDrop () |
Check if the debugger is currently set to break when a packet is dropped. More... | |
int | getCounterValue (std::string name) |
Get the value of a counter. More... | |
std::map< std::string, int > | getCounters () |
Get map of counters and their values. More... | |
Breakpoint | getBreakpoint (int index) |
Get Breakpoint at given index from list of Breakpoints. More... | |
std::vector< Breakpoint > & | getBreakpointList () |
Get list of Breakpoints. More... | |
int | getNumberOfBreakpoints () |
Get number of Breakpoints in list. More... | |
double | getSimulationTime () |
Get current simulation time. More... | |
DebuggerPacket * | getPacket (int id) |
Get DebuggerPacket with given ID> More... | |
std::map< int, DebuggerPacket > & | getPacketList () |
Get the map containing the DebuggerPacket as the key and the DebuggerPacket object as the value. More... | |
std::vector< Watchpoint > & | getWatchpointList () |
Get list of Watchpoints. More... | |
std::vector< std::string > & | getIgnoreModuleList () |
Get list of modules that are being ignored. More... | |
std::vector< std::tuple< int, std::string, std::string > > & | getDroppedPacketList () |
Get vector of tuple representing a dropped packet. More... | |
void | setSimulationTime (double time_ns) |
Set the current simulation time. More... | |
Detailed Description
Stores any data acquired from the simulation from the observer so that it may be fetched by the server and sent to the debugger.
Member Function Documentation
void pfp::core::db::DebugDataManager::addBreakpoint | ( | Breakpoint | br | ) |
Add a Breakpoint.
- Parameters
-
br Breakpoint to add.
void pfp::core::db::DebugDataManager::addCounter | ( | std::string | name | ) |
Add a counter.
- Parameters
-
name Name of counter.
void pfp::core::db::DebugDataManager::addDroppedPacket | ( | int | id, |
std::string | module, | ||
std::string | reason | ||
) |
Add a packet to the list of dropped packets.
- Parameters
-
id ID of packet. module Module it was dropped in. reason Reason for which it was dropped.
void pfp::core::db::DebugDataManager::addIgnoreModule | ( | std::string | mod | ) |
Add a module to ignore.
Ignored modules will not appear in the output of certain debugger commands and the debugger will not break on these modules.
- Parameters
-
mod Name of module to ignore.
void pfp::core::db::DebugDataManager::addWatchpoint | ( | Watchpoint | wp | ) |
bool pfp::core::db::DebugDataManager::checkIgnoreModules | ( | std::string | mod | ) |
Check if the given module is being ignored.
- Parameters
-
mod Name of module to check.
- Returns
- true if the module is ignored, false if it is not.
void pfp::core::db::DebugDataManager::disableBreakpoint | ( | int | id | ) |
Disable a Breakpoint.
Does nothing if it is already disabled.
- Parameters
-
id ID of Breakpoint to disable.
void pfp::core::db::DebugDataManager::disableWatchpoint | ( | int | id | ) |
Disable a Watchpoint.
Does nothing if the Watchpoint is already disabled.
- Parameters
-
id ID of Watchpoint to disable.
void pfp::core::db::DebugDataManager::enableBreakpoint | ( | int | id | ) |
Enable a Breakpoint.
Does nothing if it is already enabled.
- Parameters
-
id ID of Breakpoint to enable.
void pfp::core::db::DebugDataManager::enableWatchpoint | ( | int | id | ) |
Enable a Watchpoint.
Does nothing if the Watchpoint is already enabled.
- Parameters
-
id ID of Watchpoint to enable.
bool pfp::core::db::DebugDataManager::getBreakOnPacketDrop | ( | ) |
Check if the debugger is currently set to break when a packet is dropped.
- Returns
- true if it is set to break, false if it is not.
Breakpoint pfp::core::db::DebugDataManager::getBreakpoint | ( | int | index | ) |
Get Breakpoint at given index from list of Breakpoints.
- Parameters
-
index Index in the list.
- Returns
- Breakpoint at given index.
std::vector< Breakpoint > & pfp::core::db::DebugDataManager::getBreakpointList | ( | ) |
Get list of Breakpoints.
- Returns
- Vector of Breakpoints.
std::map< std::string, int > pfp::core::db::DebugDataManager::getCounters | ( | ) |
Get map of counters and their values.
- Returns
- Map with counter name as the key and value of the counter as the value.
int pfp::core::db::DebugDataManager::getCounterValue | ( | std::string | name | ) |
Get the value of a counter.
- Parameters
-
name Name of counter.
- Returns
- Current value of counter.
std::vector< std::tuple< int, std::string, std::string > > & pfp::core::db::DebugDataManager::getDroppedPacketList | ( | ) |
Get vector of tuple representing a dropped packet.
The first element is the packet ID, the second element is the module in which the packet was dropped and the third element is the reason for which it was dropped.
- Returns
- Vector of dropped packets.
std::vector< std::string > & pfp::core::db::DebugDataManager::getIgnoreModuleList | ( | ) |
Get list of modules that are being ignored.
- Returns
- Vector containing the names of the modules being ignored.
int pfp::core::db::DebugDataManager::getNumberOfBreakpoints | ( | ) |
Get number of Breakpoints in list.
- Returns
- Number of Breakpoints.
DebuggerPacket * pfp::core::db::DebugDataManager::getPacket | ( | int | id | ) |
Get DebuggerPacket with given ID>
- Parameters
-
id ID of desired packet.
- Returns
- Packet with given ID. Returns NULL if it does not exist.
std::map< int, DebuggerPacket > & pfp::core::db::DebugDataManager::getPacketList | ( | ) |
Get the map containing the DebuggerPacket as the key and the DebuggerPacket object as the value.
- Returns
- Map of DebuggerPackets.
double pfp::core::db::DebugDataManager::getSimulationTime | ( | ) |
Get current simulation time.
- Returns
- Current simulation time.
std::vector< Watchpoint > & pfp::core::db::DebugDataManager::getWatchpointList | ( | ) |
Get list of Watchpoints.
- Returns
- Vector of Watchpoints.
void pfp::core::db::DebugDataManager::removeBreakpoint | ( | int | identifier | ) |
Remove a Breakpoint.
- Parameters
-
identifier ID of Breakpoint to remove.
void pfp::core::db::DebugDataManager::removeCounter | ( | std::string | name | ) |
Remove a counter.
- Parameters
-
name Name of counter.
void pfp::core::db::DebugDataManager::removeIgnoreModule | ( | std::string | mod | ) |
Remove a module from the list of ignored modules.
- Parameters
-
mod Name of module to stop ignoring.
void pfp::core::db::DebugDataManager::removePacket | ( | int | id | ) |
Remove a packet.
- Parameters
-
id ID of packet.
void pfp::core::db::DebugDataManager::removeWatchpoint | ( | int | id | ) |
Remove a Watchpoint.
- Parameters
-
id ID of Watchpoint to remove.
void pfp::core::db::DebugDataManager::set_whoami | ( | int | id | ) |
Set which packet is currently be followed or focused on.
- Parameters
-
id ID of packet.
void pfp::core::db::DebugDataManager::setBreakOnPacketDrop | ( | bool | b | ) |
Set whether the debugger should break when a packet is dropped.
- Parameters
-
b True will enable the breaking on drop packets. False will disable it.
void pfp::core::db::DebugDataManager::setSimulationTime | ( | double | time_ns | ) |
Set the current simulation time.
- Parameters
-
time_ns Current simulation time in nanoseconds.
void pfp::core::db::DebugDataManager::updateCounter | ( | std::string | name, |
int | val | ||
) |
Update the value of a counter.
- Parameters
-
name Name of counter. val New counter value.
void pfp::core::db::DebugDataManager::updatePacket | ( | int | id, |
std::string | module, | ||
double | time_, | ||
bool | read | ||
) |
Add a new packet or update an existing one.
- Parameters
-
id ID of packet. module Name of module the packet is currently in. time_ Time of update. read Indicates whether the update is for a read or a write. True = read, False = write.
int pfp::core::db::DebugDataManager::whoami | ( | ) |
Get the ID of the packet that is the debugger is currently following or focusing on.
- Returns
- ID of packet.
The documentation for this class was generated from the following files:
- /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/DebugDataManager.h
- /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/DebugDataManager.cpp