OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
SigINTHandler Class Reference
Inheritance diagram for SigINTHandler:
Inheritance graph
Collaboration diagram for SigINTHandler:
Collaboration graph

Public Member Functions

 SigINTHandler (SimulatorFrontend &target)
 
virtual void execute (int, siginfo_t *)
 
- Public Member Functions inherited from Application::UnixSignalHandler
virtual ~UnixSignalHandler ()
 

Private Attributes

SimulatorFrontendtarget_
 Simulator frontend to use when stopping the simulation. More...
 

Detailed Description

A handler class for Ctrl-c signal.

Stops the simulation (if it's running).

Definition at line 51 of file TTASim.cc.

Constructor & Destructor Documentation

◆ SigINTHandler()

SigINTHandler::SigINTHandler ( SimulatorFrontend target)
inline

Constructor.

Parameters
targetThe target SimulatorFrontend instance.

Definition at line 58 of file TTASim.cc.

58  : target_(target) {
59  }

Member Function Documentation

◆ execute()

virtual void SigINTHandler::execute ( int  ,
siginfo_t *   
)
inlinevirtual

Stops the simulation.

Implements Application::UnixSignalHandler.

Definition at line 64 of file TTASim.cc.

References SimulatorFrontend::prepareToStop(), SRE_USER_REQUESTED, and target_.

Here is the call graph for this function:

Member Data Documentation

◆ target_

SimulatorFrontend& SigINTHandler::target_
private

Simulator frontend to use when stopping the simulation.

Definition at line 69 of file TTASim.cc.

Referenced by execute().


The documentation for this class was generated from the following file:
SRE_USER_REQUESTED
@ SRE_USER_REQUESTED
User requested the simulation to stop explicitly, e.g., by pressing ctrl-c in the CLI.
Definition: SimulatorConstants.hh:66
SigINTHandler::target_
SimulatorFrontend & target_
Simulator frontend to use when stopping the simulation.
Definition: TTASim.cc:69
SimulatorFrontend::prepareToStop
void prepareToStop(StopReason reason)
Definition: SimulatorFrontend.cc:1331