KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SIMULATOR Class Referenceabstract

#include <simulator.h>

Inheritance diagram for SIMULATOR:
SPICE_SIMULATOR NGSPICE

Public Member Functions

 SIMULATOR ()
 
virtual ~SIMULATOR ()
 Create a simulator instance of particular type (currently only ngspice is handled)
 
std::mutex & GetMutex ()
 
virtual bool Attach (const std::shared_ptr< SIMULATION_MODEL > &aModel, const wxString &aSimCommand, unsigned aSimOptions, const wxString &aInputPath, REPORTER &aReporter)
 Point out the model that will be used in future simulations.
 
virtual bool Run ()=0
 Execute the simulation with currently loaded netlist.
 
virtual bool Stop ()=0
 Halt the simulation.
 
virtual bool IsRunning ()=0
 Check if simulation is running at the moment.
 
virtual void Clean ()=0
 Cleans simulation data (i.e.
 

Static Public Member Functions

static std::shared_ptr< SPICE_SIMULATORCreateInstance (const std::string &aName)
 

Protected Attributes

std::shared_ptr< SIMULATION_MODELm_simModel
 < Model that should be simulated.
 

Private Attributes

std::mutex m_mutex
 < For interprocess synchronisation.
 

Detailed Description

Definition at line 36 of file simulator.h.

Constructor & Destructor Documentation

◆ SIMULATOR()

SIMULATOR::SIMULATOR ( )
inline

Definition at line 39 of file simulator.h.

◆ ~SIMULATOR()

virtual SIMULATOR::~SIMULATOR ( )
inlinevirtual

Create a simulator instance of particular type (currently only ngspice is handled)

Definition at line 43 of file simulator.h.

Member Function Documentation

◆ Attach()

virtual bool SIMULATOR::Attach ( const std::shared_ptr< SIMULATION_MODEL > &  aModel,
const wxString &  aSimCommand,
unsigned  aSimOptions,
const wxString &  aInputPath,
REPORTER aReporter 
)
inlinevirtual

Point out the model that will be used in future simulations.

Returns
True in case of success, false otherwise.

Reimplemented in NGSPICE.

Definition at line 61 of file simulator.h.

References m_simModel.

Referenced by NGSPICE::Attach().

◆ Clean()

virtual void SIMULATOR::Clean ( )
pure virtual

Cleans simulation data (i.e.

all vectors)

Implemented in NGSPICE.

◆ CreateInstance()

std::shared_ptr< SPICE_SIMULATOR > SIMULATOR::CreateInstance ( const std::string &  aName)
static

Definition at line 33 of file spice_simulator.cpp.

References DisplayError().

Referenced by KIBIS_PIN::getKuKdFromFile(), and SIMULATOR_FRAME::SIMULATOR_FRAME().

◆ GetMutex()

std::mutex & SIMULATOR::GetMutex ( )
inline

Definition at line 51 of file simulator.h.

References m_mutex.

◆ IsRunning()

virtual bool SIMULATOR::IsRunning ( )
pure virtual

Check if simulation is running at the moment.

Returns
True if simulation is currently executed.

Implemented in NGSPICE.

◆ Run()

virtual bool SIMULATOR::Run ( )
pure virtual

Execute the simulation with currently loaded netlist.

Returns
True in case of success, false otherwise.

Implemented in NGSPICE.

◆ Stop()

virtual bool SIMULATOR::Stop ( )
pure virtual

Halt the simulation.

Returns
True in case of success, false otherwise.

Implemented in NGSPICE.

Member Data Documentation

◆ m_mutex

std::mutex SIMULATOR::m_mutex
private

< For interprocess synchronisation.

Definition at line 102 of file simulator.h.

Referenced by GetMutex().

◆ m_simModel

std::shared_ptr<SIMULATION_MODEL> SIMULATOR::m_simModel
protected

< Model that should be simulated.

Definition at line 98 of file simulator.h.

Referenced by Attach().


The documentation for this class was generated from the following files: