KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sim_model_multiunit.cpp File Reference
#include <sim/sim_model_multiunit.h>
#include <cstdint>
#include <map>
#include <set>
#include <utility>
#include <fmt/core.h>
#include <ki_exception.h>
#include <wx/intl.h>
#include <wx/tokenzr.h>

Go to the source code of this file.

Functions

std::vector< std::pair< wxString, wxString > > ParseSimPinsTokens (const wxString &aPins, const wxString &aRef)
 Parse one unit's Sim.Pins text into (symbolPinNumber -> modelPinName) pairs, preserving the written order.
 
static wxString encodeIdentifier (const wxString &aRaw)
 
static wxString nodeName (const wxString &aSymbolPin)
 
static uint64_t stableHash64 (const std::string &aText)
 

Function Documentation

◆ encodeIdentifier()

static wxString encodeIdentifier ( const wxString & aRaw)
static

Definition at line 141 of file sim_model_multiunit.cpp.

Referenced by SIM_MODEL_MULTIUNIT::computeSignature(), and nodeName().

◆ nodeName()

◆ ParseSimPinsTokens()

std::vector< std::pair< wxString, wxString > > ParseSimPinsTokens ( const wxString & aPins,
const wxString & aRef )

Parse one unit's Sim.Pins text into (symbolPinNumber -> modelPinName) pairs, preserving the written order.

Parameters
aPinsThe raw Sim.Pins field value (whitespace-separated num=name tokens).
aRefThe owning symbol reference, used only for error messages.
Exceptions
IO_ERRORon a malformed token (missing/edge =) or a within-unit conflict (the same symbol pin mapped to two different model pins). Mapping different symbol pins to the same model pin within a unit is allowed.

Definition at line 95 of file sim_model_multiunit.cpp.

References _, and THROW_IO_ERROR.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and NETLIST_EXPORTER_SPICE::collectUnitPinMaps().

◆ stableHash64()

static uint64_t stableHash64 ( const std::string & aText)
static

Definition at line 168 of file sim_model_multiunit.cpp.

Referenced by SIM_MODEL_MULTIUNIT::computeSignature().