KiCad PCB EDA Suite
|
The SIMULATOR_FRAME_UI holds the main user-interface for running simulations. More...
#include <simulator_frame_ui.h>
Public Member Functions | |
SIMULATOR_FRAME_UI (SIMULATOR_FRAME *aSimulatorFrame, SCH_EDIT_FRAME *aSchematicFrame) | |
~SIMULATOR_FRAME_UI () | |
SIM_TAB * | NewSimTab (const wxString &aSimCommand) |
Create a new simulation tab for a given simulation type. | |
std::vector< wxString > | SimPlotVectors () const |
std::vector< wxString > | Signals () const |
const std::map< int, wxString > & | UserDefinedSignals () |
void | SetUserDefinedSignals (const std::map< int, wxString > &aSignals) |
void | AddTrace (const wxString &aName, SIM_TRACE_TYPE aType) |
Add a new trace to the current plot. | |
SPICE_VALUE_FORMAT | GetCursorFormat (int aCursorId, int aValueCol) const |
Get/Set the number of significant digits and the range for formatting a cursor value. | |
void | SetCursorFormat (int aCursorId, int aValueCol, const SPICE_VALUE_FORMAT &aFormat) |
void | AddTuner (const SCH_SHEET_PATH &aSheetPath, SCH_SYMBOL *aSymbol) |
Add a tuner for a symbol. | |
void | RemoveTuner (TUNER_SLIDER *aTuner) |
Remove an existing tuner. | |
void | UpdateTunerValue (const SCH_SHEET_PATH &aSheetPath, const KIID &aSymbol, const wxString &aRef, const wxString &aValue) |
Safely update a field of the associated symbol without dereferencing the symbol. | |
void | AddMeasurement (const wxString &aCmd) |
Add a measurement to the measurements grid. | |
void | DeleteMeasurement (int aRow) |
Delete a row from the measurements grid. | |
SPICE_VALUE_FORMAT | GetMeasureFormat (int aRow) const |
Get/Set the format of a value in the measurements grid. | |
void | SetMeasureFormat (int aRow, const SPICE_VALUE_FORMAT &aFormat) |
void | UpdateMeasurement (int aRow) |
Update a measurement in the measurements grid. | |
void | DoFourier (const wxString &aSignal, const wxString &aFundamental) |
const SPICE_CIRCUIT_MODEL * | GetExporter () const |
Return the netlist exporter object used for simulations. | |
bool | DarkModePlots () const |
void | ToggleDarkModePlots () |
void | ShowChangedLanguage () |
void | InitWorkbook () |
Load the currently active workbook stored in the project settings. | |
bool | LoadWorkbook (const wxString &aPath) |
Load plot, signal, cursor, measurement, etc. | |
bool | SaveWorkbook (const wxString &aPath) |
Save plot, signal, cursor, measurement, etc. | |
void | LoadSettings (EESCHEMA_SETTINGS *aCfg) |
void | SaveSettings (EESCHEMA_SETTINGS *aCfg) |
void | ApplyPreferences (const SIM_PREFERENCES &aPrefs) |
Called when settings are changed via the common Preferences dialog. | |
void | SetSubWindowsSashSize () |
SIM_TAB * | GetCurrentSimTab () const |
Return the currently opened plot panel (or NULL if there is none). | |
SIM_TAB * | GetSimTab (SIM_TYPE aType) const |
int | GetSimTabIndex (SIM_TAB *aPlot) const |
void | OnPlotSettingsChanged () |
void | OnSimUpdate () |
void | OnSimReport (const wxString &aMsg) |
void | OnSimRefresh (bool aFinal) |
void | OnModify () |
void | m_splitterLeftRightOnIdle (wxIdleEvent &) |
void | m_splitterPlotAndConsoleOnIdle (wxIdleEvent &) |
void | m_splitterSignalsOnIdle (wxIdleEvent &) |
void | m_splitterCursorsOnIdle (wxIdleEvent &) |
void | m_splitterMeasurementsOnIdle (wxIdleEvent &) |
Public Attributes | |
int | m_SuppressGridEvents |
Protected Attributes | |
wxSplitterWindow * | m_splitterLeftRight |
wxPanel * | m_panelLeft |
wxBoxSizer * | m_sizer11 |
wxSplitterWindow * | m_splitterPlotAndConsole |
wxPanel * | m_plotPanel |
wxBoxSizer * | m_sizerPlot |
wxAuiNotebook * | m_plotNotebook |
wxPanel * | m_panelConsole |
wxBoxSizer * | m_sizerConsole |
wxTextCtrl * | m_simConsole |
wxPanel * | m_sidePanel |
wxBoxSizer * | m_sideSizer |
wxSplitterWindow * | m_splitterSignals |
wxPanel * | m_panelSignals |
wxSearchCtrl * | m_filter |
WX_GRID * | m_signalsGrid |
wxPanel * | m_panelCMT |
wxSplitterWindow * | m_splitterCursors |
wxPanel * | m_panelCursors |
WX_GRID * | m_cursorsGrid |
wxPanel * | m_panelMT |
wxSplitterWindow * | m_splitterMeasurements |
wxPanel * | m_panelMeasurements |
WX_GRID * | m_measurementsGrid |
wxPanel * | m_panelTuners |
wxBoxSizer * | m_sizerTuners |
Private Member Functions | |
wxString | vectorNameFromSignalName (SIM_PLOT_TAB *aPlotTab, const wxString &aSignalName, int *aTraceType) |
Get the simulator output vector name for a given signal name and type. | |
void | updateTrace (const wxString &aVectorName, int aTraceType, SIM_PLOT_TAB *aPlotTab, std::vector< double > *aDataX=nullptr, bool aClearData=false) |
Update a trace in a particular SIM_PLOT_TAB. | |
void | rebuildSignalsList () |
Rebuild the list of signals available from the netlist. | |
void | rebuildSignalsGrid (wxString aFilter) |
Rebuild the filtered list of signals in the signals grid. | |
void | updateSignalsGrid () |
Update the values in the signals grid. | |
void | updatePlotCursors () |
Update the cursor values (in the grid) and graphics (in the plot window). | |
void | applyUserDefinedSignals () |
Apply user-defined signals to the SPICE session. | |
void | rebuildMeasurementsGrid () |
Rebuild the measurements grid for the current plot. | |
void | updateMeasurementsFromGrid () |
void | applyTuners () |
Apply component values specified using tuner sliders to the current netlist. | |
SIM_TRACE_TYPE | getXAxisType (SIM_TYPE aType) const |
Return X axis for a given simulation type. | |
wxString | getNoiseSource () const |
void | parseTraceParams (SIM_PLOT_TAB *aPlotTab, TRACE *aTrace, const wxString &aSignalName, const wxString &aParams) |
std::shared_ptr< SPICE_SIMULATOR > | simulator () const |
std::shared_ptr< SPICE_CIRCUIT_MODEL > | circuitModel () const |
void | onPlotClose (wxAuiNotebookEvent &event) override |
void | onPlotClosed (wxAuiNotebookEvent &event) override |
void | onPlotChanging (wxAuiNotebookEvent &event) override |
void | onPlotChanged (wxAuiNotebookEvent &event) override |
void | onPlotDragged (wxAuiNotebookEvent &event) override |
void | OnFilterText (wxCommandEvent &aEvent) override |
void | OnFilterMouseMoved (wxMouseEvent &aEvent) override |
void | onSignalsGridCellChanged (wxGridEvent &aEvent) override |
void | onCursorsGridCellChanged (wxGridEvent &aEvent) override |
void | onMeasurementsGridCellChanged (wxGridEvent &aEvent) override |
void | OnUpdateUI (wxUpdateUIEvent &event) override |
bool | loadLegacyWorkbook (const wxString &aPath) |
bool | loadJsonWorkbook (const wxString &aPath) |
void | onPlotCursorUpdate (wxCommandEvent &aEvent) |
Private Attributes | |
SIMULATOR_FRAME * | m_simulatorFrame |
SCH_EDIT_FRAME * | m_schematicFrame |
std::vector< wxString > | m_signals |
std::map< int, wxString > | m_userDefinedSignals |
std::list< TUNER_SLIDER * > | m_tuners |
SPICE expressions need quoted versions of the netnames since KiCad allows '-' and '/' in netnames. | |
std::map< wxString, wxString > | m_quotedNetnames |
SPICE_VALUE_FORMAT | m_cursorFormats [3][2] |
int | m_splitterLeftRightSashPosition |
int | m_splitterPlotAndConsoleSashPosition |
int | m_splitterSignalsSashPosition |
int | m_splitterCursorsSashPosition |
int | m_splitterTuneValuesSashPosition |
bool | m_darkMode |
unsigned int | m_plotNumber |
wxTimer | m_refreshTimer |
SIM_PREFERENCES | m_preferences |
The SIMULATOR_FRAME_UI holds the main user-interface for running simulations.
It contains a workbook with multiple tabs, each tab holding a SIM_PLOT_TAB, a specific simulation command (.TRAN, .AC, etc.), and simulation settings (save all currents, etc.).
Each plot can have multiple TRACEs. While internally each TRACE can have multiple cursors, the GUI supports only two cursors (and a differential cursor) for each plot.
TRACEs are identified by a signal (V(OUT), I(R2), etc.) and a type (SPT_VOLTAGE, SPT_AC_PHASE, etc.).
The simulator outputs simple signals in a vector of the same name. Complex signals (such as V(OUT) / V(IN)) are stored in vectors of the format "user%d".
Definition at line 70 of file simulator_frame_ui.h.
SIMULATOR_FRAME_UI::SIMULATOR_FRAME_UI | ( | SIMULATOR_FRAME * | aSimulatorFrame, |
SCH_EDIT_FRAME * | aSchematicFrame | ||
) |
Definition at line 510 of file simulator_frame_ui.cpp.
References _, COL_CURSOR_NAME, COL_CURSOR_SIGNAL, COL_CURSOR_Y, COL_MEASUREMENT_VALUE, COL_SIGNAL_NAME, SCH_BASE_FRAME::eeconfig(), SIM_PLOT_COLORS::FillDefaultColorList(), SIMULATOR_FRAME::GetSimulator(), KIUI::GetStatusFont(), LoadSettings(), m_cursorFormats, SIMULATOR_FRAME_UI_BASE::m_cursorsGrid, m_darkMode, SIMULATOR_FRAME_UI_BASE::m_filter, SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, SIMULATOR_FRAME_UI_BASE::m_plotNotebook, m_refreshTimer, m_schematicFrame, SIMULATOR_FRAME_UI_BASE::m_signalsGrid, m_simulatorFrame, onPlotCursorUpdate(), OnSimRefresh(), and REFRESH_INTERVAL.
SIMULATOR_FRAME_UI::~SIMULATOR_FRAME_UI | ( | ) |
Definition at line 581 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_cursorsGrid, SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, and SIMULATOR_FRAME_UI_BASE::m_signalsGrid.
void SIMULATOR_FRAME_UI::AddMeasurement | ( | const wxString & | aCmd | ) |
Add a measurement to the measurements grid.
Definition at line 1510 of file simulator_frame_ui.cpp.
References COL_MEASUREMENT, GetCurrentSimTab(), SIM_TAB::GetSimType(), SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, OnModify(), simulator(), UpdateMeasurement(), and updateMeasurementsFromGrid().
Referenced by SIGNALS_GRID_TRICKS::doPopupSelection().
void SIMULATOR_FRAME_UI::AddTrace | ( | const wxString & | aName, |
SIM_TRACE_TYPE | aType | ||
) |
Add a new trace to the current plot.
aName | is the device/net name. |
aType | describes the type of trace. |
Definition at line 1569 of file simulator_frame_ui.cpp.
References _, SPICE_CIRCUIT_MODEL::CommandToSimType(), GetCurrentSimTab(), SIM_TAB::IsPlottable(), SIMULATOR_FRAME_UI_BASE::m_simConsole, OnModify(), SPT_AC_GAIN, SPT_AC_PHASE, ST_AC, ST_SP, ST_UNKNOWN, updateSignalsGrid(), and updateTrace().
Referenced by SIMULATOR_FRAME::AddCurrentTrace(), and SIMULATOR_FRAME::AddVoltageTrace().
void SIMULATOR_FRAME_UI::AddTuner | ( | const SCH_SHEET_PATH & | aSheetPath, |
SCH_SYMBOL * | aSymbol | ||
) |
Add a tuner for a symbol.
Definition at line 1430 of file simulator_frame_ui.cpp.
References DisplayErrorMessage(), NETLIST_EXPORTER_SPICE::FindItem(), GetCurrentSimTab(), GetExporter(), SCH_SYMBOL::GetRef(), SIM_MODEL::GetTunerParam(), SIMULATOR_FRAME_UI_BASE::m_panelTuners, SIMULATOR_FRAME_UI_BASE::m_sizerTuners, m_tuners, SPICE_ITEM::model, OnModify(), and KI_PARAM_ERROR::What().
Referenced by SIMULATOR_FRAME::AddTuner().
void SIMULATOR_FRAME_UI::ApplyPreferences | ( | const SIM_PREFERENCES & | aPrefs | ) |
Called when settings are changed via the common Preferences dialog.
Definition at line 653 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_plotNotebook, and m_preferences.
Referenced by SIMULATOR_FRAME::CommonSettingsChanged().
|
private |
Apply component values specified using tuner sliders to the current netlist.
Definition at line 1888 of file simulator_frame_ui.cpp.
References _, DisplayErrorMessage(), NETLIST_EXPORTER_SPICE::FindItem(), GetExporter(), SCH_SHEET_PATH::GetItem(), WX_STRING_REPORTER::GetMessages(), SIM_MODEL::GetTunerParam(), WX_STRING_REPORTER::HasMessage(), m_tuners, SPICE_ITEM::model, WX_STRING_REPORTER::Report(), simulator(), SIM_MODEL::SpiceGenerator(), and SPICE_GENERATOR::TunerCommand().
Referenced by OnSimUpdate().
|
private |
Apply user-defined signals to the SPICE session.
Definition at line 1867 of file simulator_frame_ui.cpp.
References m_quotedNetnames, m_userDefinedSignals, and simulator().
Referenced by OnSimRefresh(), and SetUserDefinedSignals().
|
private |
Definition at line 2522 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME::GetCircuitModel(), and m_simulatorFrame.
Referenced by GetExporter(), getNoiseSource(), InitWorkbook(), OnSimRefresh(), rebuildSignalsList(), and updateTrace().
|
inline |
Definition at line 164 of file simulator_frame_ui.h.
References m_darkMode.
Referenced by SIMULATOR_FRAME::setupUIConditions().
void SIMULATOR_FRAME_UI::DeleteMeasurement | ( | int | aRow | ) |
Delete a row from the measurements grid.
Definition at line 1237 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_measurementsGrid.
Referenced by MEASUREMENTS_GRID_TRICKS::doPopupSelection().
void SIMULATOR_FRAME_UI::DoFourier | ( | const wxString & | aSignal, |
const wxString & | aFundamental | ||
) |
Definition at line 1553 of file simulator_frame_ui.cpp.
References simulator().
Referenced by SIGNALS_GRID_TRICKS::doPopupSelection().
|
inline |
Return the currently opened plot panel (or NULL if there is none).
Definition at line 203 of file simulator_frame_ui.h.
References SIMULATOR_FRAME_UI_BASE::m_plotNotebook.
Referenced by AddMeasurement(), AddTrace(), AddTuner(), SIMULATOR_FRAME::EditAnalysis(), SIMULATOR_FRAME::GetCurrentOptions(), SIMULATOR_FRAME::GetCurrentSimCommand(), SIMULATOR_FRAME::GetCurrentSimTab(), getNoiseSource(), loadJsonWorkbook(), loadLegacyWorkbook(), onCursorsGridCellChanged(), onMeasurementsGridCellChanged(), onPlotChanged(), onPlotClosed(), onSignalsGridCellChanged(), OnSimRefresh(), OnSimUpdate(), OnUpdateUI(), rebuildMeasurementsGrid(), rebuildSignalsGrid(), SIGNALS_GRID_TRICKS::showPopupMenu(), SIMULATOR_FRAME::StartSimulation(), UpdateMeasurement(), updateMeasurementsFromGrid(), updatePlotCursors(), and updateSignalsGrid().
|
inline |
Get/Set the number of significant digits and the range for formatting a cursor value.
aValueCol | 0 indicates the X value column; 1 the Y value. |
Definition at line 102 of file simulator_frame_ui.h.
References m_cursorFormats.
Referenced by CURSORS_GRID_TRICKS::doPopupSelection().
const SPICE_CIRCUIT_MODEL * SIMULATOR_FRAME_UI::GetExporter | ( | ) | const |
Return the netlist exporter object used for simulations.
Definition at line 1563 of file simulator_frame_ui.cpp.
References circuitModel().
Referenced by AddTuner(), applyTuners(), and TUNER_SLIDER::TUNER_SLIDER().
SPICE_VALUE_FORMAT SIMULATOR_FRAME_UI::GetMeasureFormat | ( | int | aRow | ) | const |
Get/Set the format of a value in the measurements grid.
Definition at line 1223 of file simulator_frame_ui.cpp.
References COL_MEASUREMENT_FORMAT, SPICE_VALUE_FORMAT::FromString(), and SIMULATOR_FRAME_UI_BASE::m_measurementsGrid.
Referenced by MEASUREMENTS_GRID_TRICKS::doPopupSelection(), and UpdateMeasurement().
|
private |
Definition at line 2366 of file simulator_frame_ui.cpp.
References circuitModel(), GetCurrentSimTab(), and scale.
Referenced by vectorNameFromSignalName().
Definition at line 208 of file simulator_frame_ui.h.
References SIM_TAB::GetSimType(), and SIMULATOR_FRAME_UI_BASE::m_plotNotebook.
Referenced by SIMULATOR_FRAME::StartSimulation().
|
inline |
Definition at line 221 of file simulator_frame_ui.h.
References SIMULATOR_FRAME_UI_BASE::m_plotNotebook.
Referenced by SIMULATOR_FRAME::StartSimulation().
|
private |
Return X axis for a given simulation type.
Definition at line 2350 of file simulator_frame_ui.cpp.
References SPT_LIN_FREQUENCY, SPT_SWEEP, SPT_TIME, SPT_UNKNOWN, ST_AC, ST_DC, ST_FFT, ST_NOISE, ST_SP, and ST_TRAN.
Referenced by updateTrace().
void SIMULATOR_FRAME_UI::InitWorkbook | ( | ) |
Load the currently active workbook stored in the project settings.
If there is none, generate a filename for the currently active workbook and store it in the project settings.
Definition at line 668 of file simulator_frame_ui.cpp.
References circuitModel(), PROJECT::GetProjectPath(), SIMULATOR_FRAME::LoadSimulator(), LoadWorkbook(), SIMULATOR_FRAME_UI_BASE::m_filter, m_schematicFrame, m_simulatorFrame, NewSimTab(), NETLIST_EXPORTER_SPICE::OPTION_DEFAULT_FLAGS, KIWAY_HOLDER::Prj(), rebuildSignalsGrid(), rebuildSignalsList(), SIM_TAB::SetSimOptions(), and simulator().
|
private |
Definition at line 1969 of file simulator_frame_ui.cpp.
References mpWindow::AddLayer(), color, cursor, SIM_PLOT_TAB::EnsureThirdYAxisExists(), SPICE_VALUE_FORMAT::FromString(), GetCurrentSimTab(), SIM_PLOT_TAB::GetPlotWin(), SIMULATOR_FRAME::LoadSimulator(), mpWindow::LockY(), m_cursorFormats, SIMULATOR_FRAME_UI_BASE::m_plotNotebook, m_simulatorFrame, m_userDefinedSignals, SIM_PLOT_TAB::Measurements(), NewSimTab(), NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS, NETLIST_EXPORTER_SPICE::OPTION_ADJUST_PASSIVE_VALS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_CURRENTS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_DISSIPATIONS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_EVENTS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES, SIM_PLOT_TAB::SetDottedSecondary(), SIM_PLOT_TAB::SetLegendPosition(), mpWindow::SetMargins(), SIM_TAB::SetSimOptions(), TRACE::SetTraceColour(), SIM_PLOT_TAB::SetY1Scale(), SIM_PLOT_TAB::SetY2Scale(), SIM_PLOT_TAB::SetY3Scale(), SIM_PLOT_TAB::ShowGrid(), SIM_PLOT_TAB::ShowLegend(), traceSettings, and vectorNameFromSignalName().
Referenced by LoadWorkbook().
|
private |
Definition at line 112 of file legacy_workbook.cpp.
References _, EXPECTING, GetCurrentSimTab(), SIMULATOR_FRAME::LoadSimulator(), SIMULATOR_FRAME_UI_BASE::m_plotNotebook, m_simulatorFrame, m_userDefinedSignals, measurement, SIM_PLOT_TAB::Measurements(), name, NewSimTab(), NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS, NETLIST_EXPORTER_SPICE::OPTION_DEFAULT_FLAGS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_CURRENTS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_DISSIPATIONS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES, parseTraceParams(), SIM_TAB::SetLastSchTextSimCommand(), SIM_TAB::SetSimOptions(), SPT_UNKNOWN, UnescapeString(), and vectorNameFromSignalName().
Referenced by LoadWorkbook().
void SIMULATOR_FRAME_UI::LoadSettings | ( | EESCHEMA_SETTINGS * | aCfg | ) |
Definition at line 624 of file simulator_frame_ui.cpp.
References EESCHEMA_SETTINGS::SIMULATOR::VIEW::cursors_panel_height, m_darkMode, m_preferences, EESCHEMA_SETTINGS::m_Simulator, m_splitterCursorsSashPosition, m_splitterLeftRightSashPosition, m_splitterPlotAndConsoleSashPosition, m_splitterSignalsSashPosition, m_splitterTuneValuesSashPosition, EESCHEMA_SETTINGS::SIMULATOR::VIEW::measurements_panel_height, EESCHEMA_SETTINGS::SIMULATOR::VIEW::plot_panel_height, EESCHEMA_SETTINGS::SIMULATOR::VIEW::plot_panel_width, EESCHEMA_SETTINGS::SIMULATOR::preferences, EESCHEMA_SETTINGS::SIMULATOR::VIEW::signal_panel_height, EESCHEMA_SETTINGS::SIMULATOR::view, and EESCHEMA_SETTINGS::SIMULATOR::VIEW::white_background.
Referenced by SIMULATOR_FRAME::LoadSettings(), and SIMULATOR_FRAME_UI().
bool SIMULATOR_FRAME_UI::LoadWorkbook | ( | const wxString & | aPath | ) |
Load plot, signal, cursor, measurement, etc.
settings from a file.
Definition at line 1925 of file simulator_frame_ui.cpp.
References dummy, PROJECT::GetProjectPath(), loadJsonWorkbook(), loadLegacyWorkbook(), SIMULATOR_FRAME_UI_BASE::m_filter, SIMULATOR_FRAME_UI_BASE::m_plotNotebook, m_schematicFrame, m_userDefinedSignals, KIWAY_HOLDER::Prj(), rebuildMeasurementsGrid(), rebuildSignalsGrid(), rebuildSignalsList(), simulator(), updatePlotCursors(), and updateSignalsGrid().
Referenced by InitWorkbook(), and SIMULATOR_FRAME::LoadWorkbook().
|
inlineinherited |
Definition at line 104 of file simulator_frame_ui_base.h.
References SIMULATOR_FRAME_UI_BASE::m_splitterCursors, and SIMULATOR_FRAME_UI_BASE::m_splitterCursorsOnIdle().
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterCursorsOnIdle(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
inlineinherited |
Definition at line 86 of file simulator_frame_ui_base.h.
References SIMULATOR_FRAME_UI_BASE::m_splitterLeftRight, and SIMULATOR_FRAME_UI_BASE::m_splitterLeftRightOnIdle().
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterLeftRightOnIdle(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
inlineinherited |
Definition at line 110 of file simulator_frame_ui_base.h.
References SIMULATOR_FRAME_UI_BASE::m_splitterMeasurements, and SIMULATOR_FRAME_UI_BASE::m_splitterMeasurementsOnIdle().
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterMeasurementsOnIdle(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
inlineinherited |
Definition at line 92 of file simulator_frame_ui_base.h.
References SIMULATOR_FRAME_UI_BASE::m_splitterPlotAndConsole, and SIMULATOR_FRAME_UI_BASE::m_splitterPlotAndConsoleOnIdle().
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterPlotAndConsoleOnIdle(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
inlineinherited |
Definition at line 98 of file simulator_frame_ui_base.h.
References SIMULATOR_FRAME_UI_BASE::m_splitterSignals, and SIMULATOR_FRAME_UI_BASE::m_splitterSignalsOnIdle().
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterSignalsOnIdle(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
SIM_TAB * SIMULATOR_FRAME_UI::NewSimTab | ( | const wxString & | aSimCommand | ) |
Create a new simulation tab for a given simulation type.
aSimCommand | is requested simulation command. |
Definition at line 985 of file simulator_frame_ui.cpp.
References _, SIM_PLOT_TAB::ApplyPreferences(), SPICE_CIRCUIT_MODEL::CommandToSimType(), SIM_TAB::IsPlottable(), SIMULATOR_FRAME_UI_BASE::m_plotNotebook, m_plotNumber, m_preferences, and simulator().
Referenced by InitWorkbook(), loadJsonWorkbook(), loadLegacyWorkbook(), and SIMULATOR_FRAME::NewSimTab().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 1175 of file simulator_frame_ui.cpp.
References _, COL_CURSOR_NAME, COL_CURSOR_X, cursor, CURSOR::GetCoords(), GetCurrentSimTab(), SIM_PLOT_TAB::GetTraces(), SIMULATOR_FRAME_UI_BASE::m_cursorsGrid, m_SuppressGridEvents, name, OnModify(), CURSOR::SetCoordX(), text, SPICE_VALUE::ToDouble(), and updatePlotCursors().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 1016 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_filter.
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 1010 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_filter, and rebuildSignalsGrid().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 1244 of file simulator_frame_ui.cpp.
References COL_MEASUREMENT, GetCurrentSimTab(), SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, OnModify(), text, UpdateMeasurement(), and updateMeasurementsFromGrid().
void SIMULATOR_FRAME_UI::OnModify | ( | ) |
Definition at line 2929 of file simulator_frame_ui.cpp.
References m_simulatorFrame, and SIMULATOR_FRAME::OnModify().
Referenced by AddMeasurement(), AddTrace(), AddTuner(), MEASUREMENTS_GRID_TRICKS::doPopupSelection(), onCursorsGridCellChanged(), onMeasurementsGridCellChanged(), onPlotClose(), onPlotCursorUpdate(), onSignalsGridCellChanged(), OnUpdateUI(), RemoveTuner(), and SetUserDefinedSignals().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 2477 of file simulator_frame_ui.cpp.
References GetCurrentSimTab(), OnPlotSettingsChanged(), and simulator().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 2456 of file simulator_frame_ui.cpp.
References WX_GRID::ClearRows(), and SIMULATOR_FRAME_UI_BASE::m_measurementsGrid.
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 2409 of file simulator_frame_ui.cpp.
References OnModify().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 2415 of file simulator_frame_ui.cpp.
References SCHEMATIC::ClearOperatingPoints(), SCH_BASE_FRAME::GetCanvas(), GetCurrentSimTab(), SIM_TAB::GetSimType(), SIMULATOR_FRAME_UI_BASE::m_filter, m_schematicFrame, rebuildSignalsGrid(), rebuildSignalsList(), EDA_DRAW_PANEL_GAL::Refresh(), SCH_EDIT_FRAME::RefreshOperatingPointDisplay(), SCH_EDIT_FRAME::Schematic(), ST_OP, and updatePlotCursors().
|
private |
Definition at line 2683 of file simulator_frame_ui.cpp.
References OnModify(), and updatePlotCursors().
Referenced by SetCursorFormat(), and SIMULATOR_FRAME_UI().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 2511 of file simulator_frame_ui.cpp.
void SIMULATOR_FRAME_UI::OnPlotSettingsChanged | ( | ) |
Definition at line 2464 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_filter, SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, rebuildMeasurementsGrid(), rebuildSignalsGrid(), rebuildSignalsList(), UpdateMeasurement(), and updatePlotCursors().
Referenced by SIMULATOR_FRAME::EditAnalysis(), onPlotChanged(), and SIMULATOR_FRAME::StartSimulation().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 1098 of file simulator_frame_ui.cpp.
References COL_CURSOR_1, COL_CURSOR_2, COL_SIGNAL_COLOR, COL_SIGNAL_NAME, COL_SIGNAL_SHOW, color, SIM_PLOT_TAB::DeleteTrace(), SIM_PLOT_TAB::DisableCursor(), SIM_PLOT_TAB::EnableCursor(), GetCurrentSimTab(), SIM_PLOT_TAB::GetPlotWin(), SIM_PLOT_TAB::GetTrace(), SIM_PLOT_TAB::GetTraces(), TRACE::HasCursor(), SIMULATOR_FRAME_UI_BASE::m_signalsGrid, m_SuppressGridEvents, name, OnModify(), TRACE::SetTraceColour(), SPT_UNKNOWN, text, mpWindow::UpdateAll(), SIM_PLOT_TAB::UpdatePlotColors(), updatePlotCursors(), updateSignalsGrid(), updateTrace(), SIM_PLOT_TAB::UpdateTraceStyle(), and vectorNameFromSignalName().
void SIMULATOR_FRAME_UI::OnSimRefresh | ( | bool | aFinal | ) |
Definition at line 2738 of file simulator_frame_ui.cpp.
References _, applyUserDefinedSignals(), circuitModel(), SIM_PLOT_TAB::DeleteTrace(), mpWindow::Fit(), GetCurrentSimTab(), SIM_PLOT_TAB::GetPlotWin(), SIM_TAB::GetSimType(), SIM_PLOT_TAB::GetTrace(), SIM_PLOT_TAB::GetTraces(), info, SIM_TAB::IsPlottable(), SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, m_refreshTimer, m_schematicFrame, m_signals, SIMULATOR_FRAME_UI_BASE::m_simConsole, m_userDefinedSignals, name, SIM_PLOT_TAB::ResetScales(), SCH_EDIT_FRAME::Schematic(), SCHEMATIC::SetOperatingPoint(), SIM_TAB::SetSpicePlotName(), simulator(), SPT_AC_GAIN, SPT_AC_PHASE, SPT_CURRENT, SPT_POWER, SPT_SP_AMP, SPT_UNKNOWN, SPT_VOLTAGE, ST_AC, ST_NOISE, ST_OP, ST_PZ, ST_SP, SPICE_VALUE::ToSpiceString(), mpWindow::UpdateAll(), UpdateMeasurement(), updatePlotCursors(), updateSignalsGrid(), updateTrace(), and vectorNameFromSignalName().
Referenced by SIMULATOR_FRAME::onSimFinished(), SIMULATOR_FRAME_UI(), and SIMULATOR_FRAME::StartSimulation().
void SIMULATOR_FRAME_UI::OnSimReport | ( | const wxString & | aMsg | ) |
Definition at line 2704 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_simConsole.
Referenced by SIMULATOR_FRAME::onSimReport().
void SIMULATOR_FRAME_UI::OnSimUpdate | ( | ) |
Definition at line 2690 of file simulator_frame_ui.cpp.
References applyTuners(), GetCurrentSimTab(), m_refreshTimer, SIMULATOR_FRAME_UI_BASE::m_simConsole, and REFRESH_INTERVAL.
Referenced by SIMULATOR_FRAME::onUpdateSim(), and SIMULATOR_FRAME::StartSimulation().
|
overrideprivatevirtual |
Reimplemented from SIMULATOR_FRAME_UI_BASE.
Definition at line 1291 of file simulator_frame_ui.cpp.
References GetCurrentSimTab(), and OnModify().
|
private |
Definition at line 38 of file legacy_workbook.cpp.
References mpWindow::AddLayer(), color, cursor, SPICE_VALUE_FORMAT::FromString(), SIM_PLOT_TAB::GetPlotWin(), m_cursorFormats, TRACE::SetCursor(), SIM_PLOT_TAB::SetDottedSecondary(), TRACE::SetTraceColour(), SIM_PLOT_TAB::ShowGrid(), and SIM_PLOT_TAB::UpdateTraceStyle().
Referenced by loadLegacyWorkbook().
|
private |
Rebuild the measurements grid for the current plot.
Definition at line 2488 of file simulator_frame_ui.cpp.
References WX_GRID::ClearRows(), COL_MEASUREMENT, COL_MEASUREMENT_FORMAT, GetCurrentSimTab(), SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, measurement, ST_AC, ST_DC, ST_SP, and ST_TRAN.
Referenced by LoadWorkbook(), and OnPlotSettingsChanged().
|
private |
Rebuild the filtered list of signals in the signals grid.
Definition at line 729 of file simulator_frame_ui.cpp.
References _, WX_GRID::ClearRows(), COL_CURSOR_1, COL_CURSOR_2, COL_SIGNAL_COLOR, COL_SIGNAL_NAME, COL_SIGNAL_SHOW, color, CTX_SIGNAL, EDA_COMBINED_MATCHER::Find(), GetCurrentSimTab(), TRACE::GetCursor(), mpLayer::GetPen(), SIM_TAB::GetSimCommand(), SIM_TAB::GetSimType(), SIM_PLOT_TAB::GetTrace(), m_signals, SIMULATOR_FRAME_UI_BASE::m_signalsGrid, m_userDefinedSignals, sortSignals(), SPT_UNKNOWN, ST_AC, ST_FFT, ST_SP, and vectorNameFromSignalName().
Referenced by InitWorkbook(), LoadWorkbook(), OnFilterText(), onPlotClosed(), OnPlotSettingsChanged(), and SetUserDefinedSignals().
|
private |
Rebuild the list of signals available from the netlist.
Note: this is not the filtered list. See rebuildSignalsGrid() for that.
Definition at line 853 of file simulator_frame_ui.cpp.
References _, circuitModel(), NETLIST_EXPORTER_SPICE::ConvertToSpiceMarkup(), SIMULATOR_FRAME::GetCurrentOptions(), SIMULATOR_FRAME::GetCurrentSimType(), m_quotedNetnames, m_signals, m_simulatorFrame, name, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_CURRENTS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_DISSIPATIONS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES, ST_AC, ST_DC, ST_FFT, ST_NOISE, ST_SP, ST_TRAN, ST_UNKNOWN, SIM_VALUE::ToSpice(), and UnescapeString().
Referenced by InitWorkbook(), LoadWorkbook(), onPlotClosed(), OnPlotSettingsChanged(), and SetUserDefinedSignals().
void SIMULATOR_FRAME_UI::RemoveTuner | ( | TUNER_SLIDER * | aTuner | ) |
Remove an existing tuner.
Definition at line 1501 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_panelTuners, m_tuners, and OnModify().
Referenced by TUNER_SLIDER::onClose().
void SIMULATOR_FRAME_UI::SaveSettings | ( | EESCHEMA_SETTINGS * | aCfg | ) |
Definition at line 640 of file simulator_frame_ui.cpp.
References EESCHEMA_SETTINGS::SIMULATOR::VIEW::cursors_panel_height, m_darkMode, EESCHEMA_SETTINGS::m_Simulator, SIMULATOR_FRAME_UI_BASE::m_splitterCursors, SIMULATOR_FRAME_UI_BASE::m_splitterLeftRight, SIMULATOR_FRAME_UI_BASE::m_splitterMeasurements, SIMULATOR_FRAME_UI_BASE::m_splitterPlotAndConsole, SIMULATOR_FRAME_UI_BASE::m_splitterSignals, EESCHEMA_SETTINGS::SIMULATOR::VIEW::measurements_panel_height, EESCHEMA_SETTINGS::SIMULATOR::VIEW::plot_panel_height, EESCHEMA_SETTINGS::SIMULATOR::VIEW::plot_panel_width, EESCHEMA_SETTINGS::SIMULATOR::VIEW::signal_panel_height, EESCHEMA_SETTINGS::SIMULATOR::view, and EESCHEMA_SETTINGS::SIMULATOR::VIEW::white_background.
Referenced by SIMULATOR_FRAME::SaveSettings().
bool SIMULATOR_FRAME_UI::SaveWorkbook | ( | const wxString & | aPath | ) |
Save plot, signal, cursor, measurement, etc.
settings to a file.
Definition at line 2165 of file simulator_frame_ui.cpp.
References _, cursor, SIM_TAB::GetLastSchTextSimCommand(), mpWindow::GetMarginBottom(), mpWindow::GetMarginLeft(), mpWindow::GetMarginRight(), mpWindow::GetMarginTop(), PROJECT::GetProjectPath(), SIM_TAB::GetSimCommand(), SIM_TAB::GetSimOptions(), SIM_TAB::GetSimType(), m_cursorFormats, SIMULATOR_FRAME_UI_BASE::m_plotNotebook, m_schematicFrame, m_userDefinedSignals, measurement, name, NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_CURRENTS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_DISSIPATIONS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_EVENTS, NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES, KIWAY_HOLDER::Prj(), res, simulator(), KIGFX::COLOR4D::ToCSSString(), SPICE_VALUE_FORMAT::ToString(), SPICE_SIMULATOR::TypeToName(), updateMeasurementsFromGrid(), vectorNameFromSignalId(), and FILEEXT::WorkbookFileExtension.
Referenced by SIMULATOR_FRAME::SaveWorkbook().
|
inline |
Definition at line 107 of file simulator_frame_ui.h.
References dummy, m_cursorFormats, and onPlotCursorUpdate().
Referenced by CURSORS_GRID_TRICKS::doPopupSelection().
void SIMULATOR_FRAME_UI::SetMeasureFormat | ( | int | aRow, |
const SPICE_VALUE_FORMAT & | aFormat | ||
) |
Definition at line 1231 of file simulator_frame_ui.cpp.
References COL_MEASUREMENT_FORMAT, SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, and SPICE_VALUE_FORMAT::ToString().
Referenced by MEASUREMENTS_GRID_TRICKS::doPopupSelection(), and UpdateMeasurement().
void SIMULATOR_FRAME_UI::SetSubWindowsSashSize | ( | ) |
Definition at line 694 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME_UI_BASE::m_splitterCursors, m_splitterCursorsSashPosition, SIMULATOR_FRAME_UI_BASE::m_splitterLeftRight, m_splitterLeftRightSashPosition, SIMULATOR_FRAME_UI_BASE::m_splitterMeasurements, SIMULATOR_FRAME_UI_BASE::m_splitterPlotAndConsole, m_splitterPlotAndConsoleSashPosition, SIMULATOR_FRAME_UI_BASE::m_splitterSignals, m_splitterSignalsSashPosition, and m_splitterTuneValuesSashPosition.
void SIMULATOR_FRAME_UI::SetUserDefinedSignals | ( | const std::map< int, wxString > & | aSignals | ) |
Definition at line 1618 of file simulator_frame_ui.cpp.
References applyUserDefinedSignals(), SIM_PLOT_TAB::DeleteTrace(), SIM_TAB::GetSimType(), SIM_PLOT_TAB::GetTrace(), SIMULATOR_FRAME_UI_BASE::m_filter, SIMULATOR_FRAME_UI_BASE::m_plotNotebook, m_simulatorFrame, m_userDefinedSignals, OnModify(), rebuildSignalsGrid(), rebuildSignalsList(), SIMULATOR_FRAME::SimFinished(), SPT_AC_GAIN, SPT_AC_PHASE, SPT_SP_AMP, SPT_UNKNOWN, ST_AC, ST_SP, updatePlotCursors(), updateSignalsGrid(), and vectorNameFromSignalName().
Referenced by SIMULATOR_FRAME::SetUserDefinedSignals().
void SIMULATOR_FRAME_UI::ShowChangedLanguage | ( | ) |
Definition at line 590 of file simulator_frame_ui.cpp.
References _, COL_CURSOR_1, COL_CURSOR_2, COL_CURSOR_NAME, COL_CURSOR_SIGNAL, COL_CURSOR_X, COL_CURSOR_Y, COL_SIGNAL_COLOR, COL_SIGNAL_NAME, COL_SIGNAL_SHOW, SIMULATOR_FRAME_UI_BASE::m_cursorsGrid, SIMULATOR_FRAME_UI_BASE::m_filter, SIMULATOR_FRAME_UI_BASE::m_plotNotebook, SIMULATOR_FRAME_UI_BASE::m_signalsGrid, m_tuners, simulator(), and updatePlotCursors().
Referenced by SIMULATOR_FRAME::ShowChangedLanguage().
std::vector< wxString > SIMULATOR_FRAME_UI::Signals | ( | ) | const |
Definition at line 2722 of file simulator_frame_ui.cpp.
References m_signals, m_userDefinedSignals, and sortSignals().
Referenced by SIMULATOR_FRAME::Signals().
std::vector< wxString > SIMULATOR_FRAME_UI::SimPlotVectors | ( | ) | const |
Definition at line 2711 of file simulator_frame_ui.cpp.
References simulator().
Referenced by SIMULATOR_FRAME::SimPlotVectors().
|
private |
Definition at line 2516 of file simulator_frame_ui.cpp.
References SIMULATOR_FRAME::GetSimulator(), and m_simulatorFrame.
Referenced by AddMeasurement(), applyTuners(), applyUserDefinedSignals(), DoFourier(), InitWorkbook(), LoadWorkbook(), NewSimTab(), onPlotChanged(), OnSimRefresh(), SaveWorkbook(), ShowChangedLanguage(), SimPlotVectors(), UpdateMeasurement(), and updateTrace().
void SIMULATOR_FRAME_UI::ToggleDarkModePlots | ( | ) |
Definition at line 2387 of file simulator_frame_ui.cpp.
References SIM_PLOT_COLORS::FillDefaultColorList(), m_darkMode, SIMULATOR_FRAME_UI_BASE::m_plotNotebook, and SIM_PLOT_TAB::UpdatePlotColors().
Referenced by SIMULATOR_FRAME::ToggleDarkModePlots().
void SIMULATOR_FRAME_UI::UpdateMeasurement | ( | int | aRow | ) |
Update a measurement in the measurements grid.
The user measurement looks something like: MAX V(out)
We need to send ngspice a "MEAS" command with the analysis type, an output variable name, and the signal name. For our example above, this looks something like: MEAS TRAN meas_result_0 MAX V(out)
This is also a good time to harvest the signal name prefix so we know what units to show on the result. For instance, for: MAX P(out) we want to show: 15W
Definition at line 1318 of file simulator_frame_ui.cpp.
References COL_MEASUREMENT, COL_MEASUREMENT_VALUE, GetCurrentSimTab(), GetMeasureFormat(), SIM_TAB::GetSimType(), SIMULATOR_FRAME_UI_BASE::m_measurementsGrid, m_simulatorFrame, SetMeasureFormat(), SIMULATOR_FRAME::SimFinished(), simulator(), ST_AC, ST_DC, ST_DISTO, ST_FFT, ST_NOISE, ST_OP, ST_PZ, ST_SENS, ST_SP, ST_TF, ST_TRAN, text, SPICE_VALUE::ToString(), updateMeasurementsFromGrid(), and SPICE_VALUE_FORMAT::UpdateUnits().
Referenced by AddMeasurement(), MEASUREMENTS_GRID_TRICKS::doPopupSelection(), onMeasurementsGridCellChanged(), OnPlotSettingsChanged(), and OnSimRefresh().
|
private |
Definition at line 2436 of file simulator_frame_ui.cpp.
References COL_MEASUREMENT, COL_MEASUREMENT_FORMAT, GetCurrentSimTab(), and SIMULATOR_FRAME_UI_BASE::m_measurementsGrid.
Referenced by AddMeasurement(), onMeasurementsGridCellChanged(), SaveWorkbook(), and UpdateMeasurement().
|
private |
Update the cursor values (in the grid) and graphics (in the plot window).
Definition at line 2528 of file simulator_frame_ui.cpp.
References _, WX_GRID::ClearRows(), COL_CURSOR_NAME, COL_CURSOR_SIGNAL, COL_CURSOR_X, COL_CURSOR_Y, cursor, CURSOR::GetCoords(), GetCurrentSimTab(), SIM_PLOT_TAB::GetLabelX(), SIM_PLOT_TAB::GetLabelY1(), SIM_PLOT_TAB::GetLabelY2(), SIM_PLOT_TAB::GetLabelY3(), mpLayer::GetName(), SIM_TAB::GetSimType(), SIM_PLOT_TAB::GetTraces(), SIM_PLOT_TAB::GetUnitsX(), SIM_PLOT_TAB::GetUnitsY1(), SIM_PLOT_TAB::GetUnitsY2(), SIM_PLOT_TAB::GetUnitsY3(), m_cursorFormats, SIMULATOR_FRAME_UI_BASE::m_cursorsGrid, m_simulatorFrame, name, SIMULATOR_FRAME::SimFinished(), SPT_AC_PHASE, SPT_CURRENT, SPT_POWER, ST_AC, SPICE_VALUE::ToString(), and SPICE_VALUE_FORMAT::UpdateUnits().
Referenced by LoadWorkbook(), onCursorsGridCellChanged(), onPlotClosed(), onPlotCursorUpdate(), OnPlotSettingsChanged(), onSignalsGridCellChanged(), OnSimRefresh(), SetUserDefinedSignals(), and ShowChangedLanguage().
|
private |
Update the values in the signals grid.
Definition at line 1787 of file simulator_frame_ui.cpp.
References COL_CURSOR_1, COL_CURSOR_2, COL_SIGNAL_COLOR, COL_SIGNAL_NAME, COL_SIGNAL_SHOW, color, GetCurrentSimTab(), SIM_PLOT_TAB::GetTrace(), SIMULATOR_FRAME_UI_BASE::m_signalsGrid, SPT_UNKNOWN, and vectorNameFromSignalName().
Referenced by AddTrace(), LoadWorkbook(), onSignalsGridCellChanged(), OnSimRefresh(), and SetUserDefinedSignals().
|
private |
Update a trace in a particular SIM_PLOT_TAB.
If the panel does not contain the given trace, then add it.
aVectorName | is the SPICE vector name, such as "I(Net-C1-Pad1)". |
aTraceType | describes the type of plot. |
aPlotTab | is the tab that should receive the update. |
Definition at line 1689 of file simulator_frame_ui.cpp.
References circuitModel(), SPICE_CIRCUIT_MODEL::CommandToSimType(), SIM_PLOT_TAB::GetOrAddTrace(), SIM_TAB::GetSimCommand(), getXAxisType(), SIM_TAB::IsPlottable(), KiROUND(), SPICE_DC_PARAMS::m_source, SPICE_DC_PARAMS::m_vend, SPICE_DC_PARAMS::m_vincrement, SPICE_DC_PARAMS::m_vstart, SIM_PLOT_TAB::SetTraceData(), simulator(), SPT_AC_GAIN, SPT_AC_PHASE, SPT_POWER, SPT_SP_AMP, SPT_Y_AXIS_MASK, ST_AC, ST_DC, ST_FFT, ST_NOISE, ST_SP, ST_TRAN, and SPICE_VALUE::ToDouble().
Referenced by AddTrace(), onSignalsGridCellChanged(), and OnSimRefresh().
void SIMULATOR_FRAME_UI::UpdateTunerValue | ( | const SCH_SHEET_PATH & | aSheetPath, |
const KIID & | aSymbol, | ||
const wxString & | aRef, | ||
const wxString & | aValue | ||
) |
Safely update a field of the associated symbol without dereferencing the symbol.
aSymbol | id of the symbol needing updating |
aId | id of the symbol field |
aValue | new value of the symbol field |
Definition at line 1467 of file simulator_frame_ui.cpp.
References _, SIM_LIB_MGR::CreateModel(), DisplayErrorMessage(), SCH_SYMBOL::GetFields(), SCH_SHEET_PATH::GetItem(), SIM_MODEL::GetTunerParam(), SIM_MODEL::PARAM::info, m_schematicFrame, SIM_MODEL::PARAM::INFO::name, SCH_EDIT_FRAME::OnModify(), KIWAY_HOLDER::Prj(), SIM_MODEL::SetParamValue(), SCH_EDIT_FRAME::UpdateItem(), and SIM_MODEL::WriteFields().
Referenced by TUNER_SLIDER::onSave().
|
inline |
Definition at line 87 of file simulator_frame_ui.h.
References m_userDefinedSignals.
Referenced by SIMULATOR_FRAME::UserDefinedSignals().
|
private |
Get the simulator output vector name for a given signal name and type.
For user-defined signals we display the user-oriented signal name such as "V(out)-V(in)", but the simulator vector we actually have to plot will be "user0" or some-such.
Definition at line 1041 of file simulator_frame_ui.cpp.
References _, getNoiseSource(), SIM_TAB::GetSimType(), m_userDefinedSignals, name, SPT_AC_GAIN, SPT_AC_PHASE, SPT_CURRENT, SPT_POWER, SPT_SP_AMP, SPT_VOLTAGE, ST_NOISE, and vectorNameFromSignalId().
Referenced by loadJsonWorkbook(), loadLegacyWorkbook(), onSignalsGridCellChanged(), OnSimRefresh(), rebuildSignalsGrid(), SetUserDefinedSignals(), and updateSignalsGrid().
|
private |
Definition at line 340 of file simulator_frame_ui.h.
Referenced by GetCursorFormat(), loadJsonWorkbook(), parseTraceParams(), SaveWorkbook(), SetCursorFormat(), SIMULATOR_FRAME_UI(), and updatePlotCursors().
|
protectedinherited |
Definition at line 58 of file simulator_frame_ui_base.h.
Referenced by onCursorsGridCellChanged(), ShowChangedLanguage(), SIMULATOR_FRAME_UI(), SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE(), updatePlotCursors(), ~SIMULATOR_FRAME_UI(), and SIMULATOR_FRAME_UI_BASE::~SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 348 of file simulator_frame_ui.h.
Referenced by DarkModePlots(), LoadSettings(), SaveSettings(), SIMULATOR_FRAME_UI(), and ToggleDarkModePlots().
|
protectedinherited |
Definition at line 53 of file simulator_frame_ui_base.h.
Referenced by InitWorkbook(), LoadWorkbook(), OnFilterMouseMoved(), OnFilterText(), onPlotClosed(), OnPlotSettingsChanged(), SetUserDefinedSignals(), ShowChangedLanguage(), SIMULATOR_FRAME_UI(), SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE(), and SIMULATOR_FRAME_UI_BASE::~SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 62 of file simulator_frame_ui_base.h.
Referenced by AddMeasurement(), DeleteMeasurement(), GetMeasureFormat(), onMeasurementsGridCellChanged(), onPlotChanging(), OnPlotSettingsChanged(), OnSimRefresh(), rebuildMeasurementsGrid(), SetMeasureFormat(), SIMULATOR_FRAME_UI(), SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE(), UpdateMeasurement(), updateMeasurementsFromGrid(), ~SIMULATOR_FRAME_UI(), and SIMULATOR_FRAME_UI_BASE::~SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 55 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 46 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 57 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 40 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 61 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 59 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 52 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 63 of file simulator_frame_ui_base.h.
Referenced by AddTuner(), RemoveTuner(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 45 of file simulator_frame_ui_base.h.
Referenced by ApplyPreferences(), GetCurrentSimTab(), GetSimTab(), GetSimTabIndex(), loadJsonWorkbook(), loadLegacyWorkbook(), LoadWorkbook(), NewSimTab(), SaveWorkbook(), SetUserDefinedSignals(), ShowChangedLanguage(), SIMULATOR_FRAME_UI(), SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE(), ToggleDarkModePlots(), and SIMULATOR_FRAME_UI_BASE::~SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 349 of file simulator_frame_ui.h.
Referenced by NewSimTab().
|
protectedinherited |
Definition at line 43 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 351 of file simulator_frame_ui.h.
Referenced by ApplyPreferences(), LoadSettings(), and NewSimTab().
|
private |
Definition at line 338 of file simulator_frame_ui.h.
Referenced by applyUserDefinedSignals(), and rebuildSignalsList().
|
private |
Definition at line 350 of file simulator_frame_ui.h.
Referenced by OnSimRefresh(), OnSimUpdate(), and SIMULATOR_FRAME_UI().
|
private |
Definition at line 330 of file simulator_frame_ui.h.
Referenced by InitWorkbook(), LoadWorkbook(), onPlotClosed(), OnSimRefresh(), SaveWorkbook(), SIMULATOR_FRAME_UI(), and UpdateTunerValue().
|
protectedinherited |
Definition at line 49 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 50 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 332 of file simulator_frame_ui.h.
Referenced by OnSimRefresh(), rebuildSignalsGrid(), rebuildSignalsList(), and Signals().
|
protectedinherited |
Definition at line 54 of file simulator_frame_ui_base.h.
Referenced by onSignalsGridCellChanged(), rebuildSignalsGrid(), ShowChangedLanguage(), SIMULATOR_FRAME_UI(), SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE(), updateSignalsGrid(), ~SIMULATOR_FRAME_UI(), and SIMULATOR_FRAME_UI_BASE::~SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 48 of file simulator_frame_ui_base.h.
Referenced by AddTrace(), OnSimRefresh(), OnSimReport(), OnSimUpdate(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 329 of file simulator_frame_ui.h.
Referenced by circuitModel(), InitWorkbook(), loadJsonWorkbook(), loadLegacyWorkbook(), OnModify(), rebuildSignalsList(), SetUserDefinedSignals(), simulator(), SIMULATOR_FRAME_UI(), UpdateMeasurement(), and updatePlotCursors().
|
protectedinherited |
Definition at line 41 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 47 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 44 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 64 of file simulator_frame_ui_base.h.
Referenced by AddTuner(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 56 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterCursorsOnIdle(), SaveSettings(), SetSubWindowsSashSize(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 346 of file simulator_frame_ui.h.
Referenced by LoadSettings(), and SetSubWindowsSashSize().
|
protectedinherited |
Definition at line 39 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterLeftRightOnIdle(), SaveSettings(), SetSubWindowsSashSize(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 343 of file simulator_frame_ui.h.
Referenced by LoadSettings(), and SetSubWindowsSashSize().
|
protectedinherited |
Definition at line 60 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterMeasurementsOnIdle(), SaveSettings(), SetSubWindowsSashSize(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
protectedinherited |
Definition at line 42 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterPlotAndConsoleOnIdle(), SaveSettings(), SetSubWindowsSashSize(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 344 of file simulator_frame_ui.h.
Referenced by LoadSettings(), and SetSubWindowsSashSize().
|
protectedinherited |
Definition at line 51 of file simulator_frame_ui_base.h.
Referenced by SIMULATOR_FRAME_UI_BASE::m_splitterSignalsOnIdle(), SaveSettings(), SetSubWindowsSashSize(), and SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE().
|
private |
Definition at line 345 of file simulator_frame_ui.h.
Referenced by LoadSettings(), and SetSubWindowsSashSize().
|
private |
Definition at line 347 of file simulator_frame_ui.h.
Referenced by LoadSettings(), and SetSubWindowsSashSize().
int SIMULATOR_FRAME_UI::m_SuppressGridEvents |
Definition at line 326 of file simulator_frame_ui.h.
Referenced by onCursorsGridCellChanged(), onSignalsGridCellChanged(), SUPPRESS_GRID_CELL_EVENTS::SUPPRESS_GRID_CELL_EVENTS(), and SUPPRESS_GRID_CELL_EVENTS::~SUPPRESS_GRID_CELL_EVENTS().
|
private |
SPICE expressions need quoted versions of the netnames since KiCad allows '-' and '/' in netnames.
Definition at line 334 of file simulator_frame_ui.h.
Referenced by AddTuner(), applyTuners(), RemoveTuner(), and ShowChangedLanguage().
|
private |
Definition at line 333 of file simulator_frame_ui.h.
Referenced by applyUserDefinedSignals(), loadJsonWorkbook(), loadLegacyWorkbook(), LoadWorkbook(), OnSimRefresh(), rebuildSignalsGrid(), SaveWorkbook(), SetUserDefinedSignals(), Signals(), UserDefinedSignals(), and vectorNameFromSignalName().