Establishes communication with pfpdb python script and services its requests. More...
#include <DebuggerIPCServer.h>
Public Member Functions | |
DebuggerIPCServer (std::string url, DebugDataManager *dm) | |
Constructor. More... | |
~DebuggerIPCServer () | |
Destructor. | |
void | start () |
Starts the thread which services the requests from pfpdb. | |
void | waitForRunCommand () |
Called via the DebugObserver after SystemC elaboration to halt the simulation until the run command is sent. | |
std::mutex & | getBkptMutex () |
Get reference to mutex used to halt simulation when a breakpoint is hit. More... | |
std::mutex & | getStopMutex () |
Get reference to mutex used to halt DebuggerIPCServer while the simulation is running. More... | |
std::condition_variable & | getBkptConditionVariable () |
Get reference to condition variable used to notify the DebugObserver that a continue or next command has been received and thus th simulation may proceed. More... | |
std::condition_variable & | getStopConditionVariable () |
Get reference to condition variable used by the DebugObserver to notify the DebuggerIPCServer that the simulation has halted. More... | |
bool | getContinueCommand () const |
Get whether a continue command has been received. More... | |
void | setContinueCommand (bool b) |
Set the flag indicating if the continue command has been received. More... | |
bool | getStopped () const |
Get whether the simulation has stopped. More... | |
void | setStopped (bool b) |
Set flag that indicates if the simulation is stopped. More... | |
void | setReplyMessage (DebuggerMessage *message) |
Set the message that will be send to pfpdb the next time the simulation is halted. More... | |
void | registerCP (CPDebuggerInterface *cp_debug_if) |
Called via the DebugObserver to register a Control Plane module to the debugger so that pfpdb may interact with the Control Plane to insert, modify and delete table entries as well as obtain the current state of the tables. More... | |
Detailed Description
Establishes communication with pfpdb python script and services its requests.
The inter-process communication is accomplished via messages send using nanomsg.
Constructor & Destructor Documentation
pfp::core::db::DebuggerIPCServer::DebuggerIPCServer | ( | std::string | url, |
DebugDataManager * | dm | ||
) |
Constructor.
- Parameters
-
url URL for IPC communication. dm Pointer to the DebugDataManager.
Member Function Documentation
std::condition_variable & pfp::core::db::DebuggerIPCServer::getBkptConditionVariable | ( | ) |
Get reference to condition variable used to notify the DebugObserver that a continue or next command has been received and thus th simulation may proceed.
- Returns
- Reference to condition variable.
std::mutex & pfp::core::db::DebuggerIPCServer::getBkptMutex | ( | ) |
Get reference to mutex used to halt simulation when a breakpoint is hit.
- Returns
- Reference to mutex.
bool pfp::core::db::DebuggerIPCServer::getContinueCommand | ( | ) | const |
Get whether a continue command has been received.
- Returns
- True when a continue has been recevied, otherwise, false.
std::condition_variable & pfp::core::db::DebuggerIPCServer::getStopConditionVariable | ( | ) |
Get reference to condition variable used by the DebugObserver to notify the DebuggerIPCServer that the simulation has halted.
- Returns
- Reference to condition variable
std::mutex & pfp::core::db::DebuggerIPCServer::getStopMutex | ( | ) |
Get reference to mutex used to halt DebuggerIPCServer while the simulation is running.
- Returns
- Reference to mutex.
bool pfp::core::db::DebuggerIPCServer::getStopped | ( | ) | const |
Get whether the simulation has stopped.
- Returns
- True if the simulation is stopped, otherwise, false.
void pfp::core::db::DebuggerIPCServer::registerCP | ( | CPDebuggerInterface * | cp_debug_if | ) |
Called via the DebugObserver to register a Control Plane module to the debugger so that pfpdb may interact with the Control Plane to insert, modify and delete table entries as well as obtain the current state of the tables.
- Parameters
-
cp_debug_if Control Plane object.
void pfp::core::db::DebuggerIPCServer::setContinueCommand | ( | bool | b | ) |
Set the flag indicating if the continue command has been received.
- Parameters
-
b New value of flag.
void pfp::core::db::DebuggerIPCServer::setReplyMessage | ( | DebuggerMessage * | message | ) |
Set the message that will be send to pfpdb the next time the simulation is halted.
- Parameters
-
message Message object to send.
void pfp::core::db::DebuggerIPCServer::setStopped | ( | bool | b | ) |
Set flag that indicates if the simulation is stopped.
- Parameters
-
b New value of flag.
The documentation for this class was generated from the following files:
- /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/DebuggerIPCServer.h
- /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/DebuggerIPCServer.cpp