summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation/NgspiceWidget.py
diff options
context:
space:
mode:
authorPranav P2023-05-25 14:44:03 +0530
committerPranav P2023-05-25 14:44:03 +0530
commit1129cf1035c1ac520d84c04b384f758e090be0c3 (patch)
tree0e0651fb3c97002f75c5d3a6dad08d120bceef2e /src/ngspiceSimulation/NgspiceWidget.py
parent86ddc4e9de1b957df7839be17c80643131dbd9ff (diff)
downloadeSim-1129cf1035c1ac520d84c04b384f758e090be0c3.tar.gz
eSim-1129cf1035c1ac520d84c04b384f758e090be0c3.tar.bz2
eSim-1129cf1035c1ac520d84c04b384f758e090be0c3.zip
Added sphinx docstring documentation to newly added functions and removed some unnecessary variables
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index 2c3b00f1..3e6882b5 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -67,6 +67,15 @@ class NgspiceWidget(QtWidgets.QWidget):
print(self.gawCommand)
def finishSimulation(self, exitCode, exitStatus):
+ """This function is intended to run when the ngspice simulation finishes.
+ It singals to the function that generates the plots and also writes in the
+ appropriate status of the simulation (Whether it was a success or not).
+
+ :param exitCode: The exit code signal of the qprocess that runs ngspice
+ :type exitCode: int
+ :param exitStatus: The exit status signal of the qprocess that runs ngspice
+ :type exitStatus: class:`QtCore.QProcess.ExitStatus`
+ """
self.checkChangeInPlotFile(self.currTime, exitStatus)
self.readyToPrintSimulationStatus = True
@@ -80,6 +89,9 @@ class NgspiceWidget(QtWidgets.QWidget):
self.currTime = time.time()
def writeSimulationStatus(self):
+ """This function writes status of the simulation (Success or Failure) to the
+ :class:`TerminalUi.Ui_Form` console.
+ """
if self.readyToPrintSimulationStatus is False:
return
@@ -96,6 +108,8 @@ class NgspiceWidget(QtWidgets.QWidget):
@QtCore.pyqtSlot()
def readyReadAll(self):
+ """Outputs the ngspice process standard output and standard error to :class:`TerminalUi.Ui_Form` console
+ """
self.terminalUi.simulationConsole.insertPlainText(
str(self.process.readAllStandardOutput().data(), encoding='utf-8')
)