diff --git a/eeschema/dialogs/dialog_sim_model.cpp b/eeschema/dialogs/dialog_sim_model.cpp index 2584b4a53c..f98d0122f5 100644 --- a/eeschema/dialogs/dialog_sim_model.cpp +++ b/eeschema/dialogs/dialog_sim_model.cpp @@ -409,8 +409,8 @@ bool DIALOG_SIM_MODEL::TransferDataFromWindow() wxString modelPinName = m_pinAssignmentsGrid->GetCellValue( row, PIN_COLUMN::MODEL ); wxString symbolPinName = m_sortedPartPins.at( row )->GetShownNumber(); - model.SetPinSymbolPinNumber( getModelPinIndex( modelPinName ), - std::string( symbolPinName.ToUTF8() ) ); + model.AssignSymbolPinNumberToModelPin( getModelPinIndex( modelPinName ), + std::string( symbolPinName.ToUTF8() ) ); } removeOrphanedPinAssignments( &model ); @@ -797,7 +797,7 @@ void DIALOG_SIM_MODEL::removeOrphanedPinAssignments( SIM_MODEL* aModel ) for( int i = 0; i < aModel->GetPinCount(); ++i ) { if( !m_symbol.GetPin( aModel->GetPin( i ).symbolPinNumber ) ) - aModel->SetPinSymbolPinNumber( i, "" ); + aModel->AssignSymbolPinNumberToModelPin( i, "" ); } } @@ -1127,16 +1127,16 @@ wxString DIALOG_SIM_MODEL::getSymbolPinString( int symbolPinIndex ) const template wxString DIALOG_SIM_MODEL::getModelPinString( SIM_MODEL* aModel, int aModelPinIndex ) const { - const wxString& pinName = aModel->GetPin( aModelPinIndex ).name; + const wxString& modelPinName = aModel->GetPin( aModelPinIndex ).modelPinName; LOCALE_IO toggle; - wxString pinNumber = wxString::Format( "%d", aModelPinIndex + 1 ); + wxString modelPinNumber = wxString::Format( "%d", aModelPinIndex + 1 ); - if( !pinName.IsEmpty() && pinName != pinNumber ) - pinNumber += wxString::Format( wxT( " (%s)" ), pinName ); + if( !modelPinName.IsEmpty() && modelPinName != modelPinNumber ) + modelPinNumber += wxString::Format( wxT( " (%s)" ), modelPinName ); - return pinNumber; + return modelPinNumber; } @@ -1144,7 +1144,7 @@ template int DIALOG_SIM_MODEL::getModelPinIndex( const wxString& aModelPinString ) const { if( aModelPinString == "Not Connected" ) - return SIM_MODEL::PIN::NOT_CONNECTED; + return SIM_MODEL_PIN::NOT_CONNECTED; int length = aModelPinString.Find( " " ); @@ -1423,13 +1423,14 @@ void DIALOG_SIM_MODEL::onPinAssignmentsGridCellChange( wxGridEvent& aEvent ) int oldModelPinIndex = getModelPinIndex( oldModelPinName ); int modelPinIndex = getModelPinIndex( modelPinName ); - if( oldModelPinIndex != SIM_MODEL::PIN::NOT_CONNECTED ) - curModel().SetPinSymbolPinNumber( oldModelPinIndex, "" ); + if( oldModelPinIndex != SIM_MODEL_PIN::NOT_CONNECTED ) + curModel().AssignSymbolPinNumberToModelPin( oldModelPinIndex, "" ); - if( modelPinIndex != SIM_MODEL::PIN::NOT_CONNECTED ) + if( modelPinIndex != SIM_MODEL_PIN::NOT_CONNECTED ) { - curModel().SetPinSymbolPinNumber( modelPinIndex, - std::string( m_sortedPartPins.at( symbolPinIndex )->GetShownNumber().ToUTF8() ) ); + SCH_PIN* symbolPin = m_sortedPartPins.at( symbolPinIndex ); + + curModel().AssignSymbolPinNumberToModelPin( modelPinIndex, symbolPin->GetShownNumber() ); } updatePinAssignments( &curModel(), FORCE_UPDATE_PINS ); diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index e8d7812600..d53e520f95 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1573,7 +1573,7 @@ void SCH_EDIT_FRAME::RefreshOperatingPointDisplay() for( const auto& modelPin : model.GetPins() ) { SCH_PIN* symbolPin = symbol->GetPin( modelPin.get().symbolPinNumber ); - wxString signalName = ref + wxS( ":" ) + modelPin.get().name; + wxString signalName = ref + wxS( ":" ) + modelPin.get().modelPinName; wxString op = m_schematic->GetOperatingPoint( signalName, settings.m_OPO_IPrecision, settings.m_OPO_IRange ); diff --git a/eeschema/sch_symbol.cpp b/eeschema/sch_symbol.cpp index 83787541ed..8bcee76276 100644 --- a/eeschema/sch_symbol.cpp +++ b/eeschema/sch_symbol.cpp @@ -1329,7 +1329,7 @@ bool SCH_SYMBOL::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, i { pin = pin.SubString( 1, -1 ); // Strip ':' from front - for( const std::reference_wrapper& modelPin : model.GetPins() ) + for( const std::reference_wrapper& modelPin : model.GetPins() ) { SCH_PIN* symbolPin = GetPin( modelPin.get().symbolPinNumber ); @@ -1341,7 +1341,7 @@ bool SCH_SYMBOL::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, i } else { - wxString signalName = spiceRef + wxS( ":" ) + modelPin.get().name; + wxString signalName = spiceRef + wxS( ":" ) + modelPin.get().modelPinName; *token = schematic->GetOperatingPoint( signalName, precision, range ); } diff --git a/eeschema/sim/sim_model.cpp b/eeschema/sim/sim_model.cpp index ad535d51eb..6e7212b1a2 100644 --- a/eeschema/sim/sim_model.cpp +++ b/eeschema/sim/sim_model.cpp @@ -693,15 +693,15 @@ void SIM_MODEL::SetFieldValue( std::vector& aFields, const wxString& SIM_MODEL::~SIM_MODEL() = default; -void SIM_MODEL::AddPin( const PIN& aPin ) +void SIM_MODEL::AddPin( const SIM_MODEL_PIN& aPin ) { - m_pins.push_back( aPin ); + m_modelPins.push_back( aPin ); } void SIM_MODEL::ClearPins() { - m_pins.clear(); + m_modelPins.clear(); } @@ -713,7 +713,7 @@ int SIM_MODEL::FindModelPinIndex( const std::string& aSymbolPinNumber ) return modelPinIndex; } - return PIN::NOT_CONNECTED; + return SIM_MODEL_PIN::NOT_CONNECTED; } @@ -736,9 +736,9 @@ void SIM_MODEL::SetBaseModel( const SIM_MODEL& aBaseModel ) } -std::vector> SIM_MODEL::GetPins() const +std::vector> SIM_MODEL::GetPins() const { - std::vector> pins; + std::vector> pins; for( int modelPinIndex = 0; modelPinIndex < GetPinCount(); ++modelPinIndex ) pins.emplace_back( GetPin( modelPinIndex ) ); @@ -746,19 +746,20 @@ std::vector> SIM_MODEL::GetPins() c return pins; } -void SIM_MODEL::SetPinSymbolPinNumber( int aPinIndex, const std::string& aSymbolPinNumber ) +void SIM_MODEL::AssignSymbolPinNumberToModelPin( int aModelPinIndex, + const wxString& aSymbolPinNumber ) { - if( aPinIndex >= 0 && aPinIndex < (int) m_pins.size() ) - m_pins.at( aPinIndex ).symbolPinNumber = aSymbolPinNumber; + if( aModelPinIndex >= 0 && aModelPinIndex < (int) m_modelPins.size() ) + m_modelPins.at( aModelPinIndex ).symbolPinNumber = aSymbolPinNumber; } -void SIM_MODEL::SetPinSymbolPinNumber( const std::string& aPinName, - const std::string& aSymbolPinNumber ) +void SIM_MODEL::AssignSymbolPinNumberToModelPin( const std::string& aModelPinName, + const wxString& aSymbolPinNumber ) { - for( PIN& pin : m_pins ) + for( SIM_MODEL_PIN& pin : m_modelPins ) { - if( pin.name == aPinName ) + if( pin.modelPinName == aModelPinName ) { pin.symbolPinNumber = aSymbolPinNumber; return; @@ -767,12 +768,12 @@ void SIM_MODEL::SetPinSymbolPinNumber( const std::string& aPinName, // If aPinName wasn't in fact a name, see if it's a raw (1-based) index. This is required // for legacy files which didn't use pin names. - int aPinIndex = (int) strtol( aPinName.c_str(), nullptr, 10 ); + int pinIndex = (int) strtol( aModelPinName.c_str(), nullptr, 10 ); - if( aPinIndex < 1 || aPinIndex > (int) m_pins.size() ) - THROW_IO_ERROR( wxString::Format( _( "Unknown simulation model pin '%s'" ), aPinName ) ); + if( pinIndex < 1 || pinIndex > (int) m_modelPins.size() ) + THROW_IO_ERROR( wxString::Format( _( "Unknown simulation model pin '%s'" ), aModelPinName ) ); - m_pins[ --aPinIndex /* convert to 0-based */ ].symbolPinNumber = aSymbolPinNumber; + m_modelPins[ --pinIndex /* convert to 0-based */ ].symbolPinNumber = aSymbolPinNumber; } diff --git a/eeschema/sim/sim_model.h b/eeschema/sim/sim_model.h index 5a43eace12..2642dd6c05 100644 --- a/eeschema/sim/sim_model.h +++ b/eeschema/sim/sim_model.h @@ -65,13 +65,21 @@ class REPORTER; #define SIM_LEGACY_LIBRARY_FIELD wxS( "Spice_Lib_File" ) +struct SIM_MODEL_PIN +{ + const std::string modelPinName; + wxString symbolPinNumber; + + static constexpr auto NOT_CONNECTED = -1; +}; + + class SIM_MODEL { public: friend class SPICE_GENERATOR; friend class NETLIST_EXPORTER_SPICE; - struct PIN; struct PARAM; // There's a trailing '_' because `DEVICE_TYPE` collides with something in Windows headers. @@ -303,15 +311,6 @@ public: }; - struct PIN - { - const std::string name; - std::string symbolPinNumber; - - static constexpr auto NOT_CONNECTED = -1; - }; - - struct PARAM { // MS Windows compilers complain about the names IN and OUT, so we prefix them. @@ -452,7 +451,7 @@ public: SPICE_INFO GetSpiceInfo() const { return SpiceInfo( GetType() ); } - void AddPin( const PIN& aPin ); + void AddPin( const SIM_MODEL_PIN& aPin ); void ClearPins(); int FindModelPinIndex( const std::string& aSymbolPinNumber ); @@ -469,14 +468,14 @@ public: virtual std::vector GetPinNames() const { return {}; } - int GetPinCount() const { return static_cast( m_pins.size() ); } - const PIN& GetPin( unsigned aIndex ) const { return m_pins.at( aIndex ); } + int GetPinCount() const { return static_cast( m_modelPins.size() ); } + const SIM_MODEL_PIN& GetPin( unsigned aIndex ) const { return m_modelPins.at( aIndex ); } - std::vector> GetPins() const; + std::vector> GetPins() const; - void SetPinSymbolPinNumber( int aPinIndex, const std::string& aSymbolPinNumber ); - virtual void SetPinSymbolPinNumber( const std::string& aPinName, - const std::string& aSymbolPinNumber ); + void AssignSymbolPinNumberToModelPin( int aPinIndex, const wxString& aSymbolPinNumber ); + virtual void AssignSymbolPinNumberToModelPin( const std::string& aPinName, + const wxString& aSymbolPinNumber ); int GetParamCount() const { return static_cast( m_params.size() ); } @@ -539,7 +538,7 @@ private: protected: std::vector m_params; - std::vector m_pins; + std::vector m_modelPins; const SIM_MODEL* m_baseModel; std::unique_ptr m_serializer; diff --git a/eeschema/sim/sim_model_kibis.cpp b/eeschema/sim/sim_model_kibis.cpp index ba4951f459..3d5c677b41 100644 --- a/eeschema/sim/sim_model_kibis.cpp +++ b/eeschema/sim/sim_model_kibis.cpp @@ -51,8 +51,8 @@ std::vector SPICE_GENERATOR_KIBIS::CurrentNames( const SPICE_ITEM& { std::vector currentNames; - for( const SIM_MODEL::PIN& pin : GetPins() ) - currentNames.push_back( fmt::format( "I({}:{})", ItemName( aItem ), pin.name ) ); + for( const SIM_MODEL_PIN& pin : GetPins() ) + currentNames.push_back( fmt::format( "I({}:{})", ItemName( aItem ), pin.modelPinName ) ); return currentNames; } diff --git a/eeschema/sim/sim_model_raw_spice.cpp b/eeschema/sim/sim_model_raw_spice.cpp index 312942a556..76e4f17d79 100644 --- a/eeschema/sim/sim_model_raw_spice.cpp +++ b/eeschema/sim/sim_model_raw_spice.cpp @@ -63,7 +63,7 @@ std::string SPICE_GENERATOR_RAW_SPICE::ItemPins( const SPICE_ITEM& aItem ) const if( !GetPins().empty() ) { - for( const SIM_MODEL::PIN& pin : GetPins() ) + for( const SIM_MODEL_PIN& pin : GetPins() ) { auto it = std::find( aItem.pinNumbers.begin(), aItem.pinNumbers.end(), pin.symbolPinNumber ); @@ -139,19 +139,19 @@ SIM_MODEL_RAW_SPICE::SIM_MODEL_RAW_SPICE( const std::string& aSpiceSource ) : } -void SIM_MODEL_RAW_SPICE::SetPinSymbolPinNumber( const std::string& aPinName, - const std::string& aSymbolPinNumber ) +void SIM_MODEL_RAW_SPICE::AssignSymbolPinNumberToModelPin( const std::string& aModelPinName, + const wxString& aSymbolPinNumber ) { - for( PIN& pin : m_pins ) - { - if( pin.name == aPinName ) - { - pin.symbolPinNumber = aSymbolPinNumber; - return; - } - } + // SPICE doesn't name model inputs so we have to assume they're indexes here. + int pinIndex = (int) strtol( aModelPinName.c_str(), nullptr, 10 ); - m_pins.push_back( { aPinName, aSymbolPinNumber } ); + if( pinIndex > 0 ) + { + while( m_modelPins.size() < pinIndex ) + m_modelPins.push_back( { fmt::format( "{}", m_modelPins.size() + 1 ), wxEmptyString } ); + + m_modelPins[ --pinIndex /* convert to 0-based */ ].symbolPinNumber = aSymbolPinNumber; + } } diff --git a/eeschema/sim/sim_model_raw_spice.h b/eeschema/sim/sim_model_raw_spice.h index fde9d2403c..1654efe5af 100644 --- a/eeschema/sim/sim_model_raw_spice.h +++ b/eeschema/sim/sim_model_raw_spice.h @@ -68,8 +68,8 @@ public: return m_spiceCode; } - void SetPinSymbolPinNumber( const std::string& aPinName, - const std::string& aSymbolPinNumber ) override; + void AssignSymbolPinNumberToModelPin( const std::string& aModelPinName, + const wxString& aSymbolPinNumber ) override; private: static std::vector makeParamInfos(); diff --git a/eeschema/sim/sim_model_serializer.cpp b/eeschema/sim/sim_model_serializer.cpp index 2c27ca305e..1eb921248b 100644 --- a/eeschema/sim/sim_model_serializer.cpp +++ b/eeschema/sim/sim_model_serializer.cpp @@ -123,29 +123,27 @@ std::string SIM_MODEL_SERIALIZER::GeneratePins() const { std::string result; - std::vector> pins = m_model.GetPins(); + std::vector> pins = m_model.GetPins(); // m_model.GetPins() returns pins in the order they appear in the model, but the keys in the // key=value pairs we create here are symbol pin numbers, so we sort the pins so that they are // ordered by the latter instead. std::sort( pins.begin(), pins.end(), - []( const SIM_MODEL::PIN& lhs, const SIM_MODEL::PIN& rhs ) + []( const SIM_MODEL_PIN& lhs, const SIM_MODEL_PIN& rhs ) { return StrNumCmp( lhs.symbolPinNumber, rhs.symbolPinNumber, true ) < 0; } ); - bool isFirst = true; - - for( const SIM_MODEL::PIN& pin : pins ) + for( const SIM_MODEL_PIN& pin : pins ) { - if( pin.symbolPinNumber != "" ) - { - if( !isFirst ) - result.append( " " ); - else - isFirst = false; + std::string symbolPinNumber( pin.symbolPinNumber.ToUTF8() ); - result.append( fmt::format( "{}={}", pin.symbolPinNumber, pin.name ) ); + if( symbolPinNumber != "" ) + { + if( !result.empty() ) + result.append( " " ); + + result.append( fmt::format( "{}={}", symbolPinNumber, pin.modelPinName ) ); } } @@ -275,9 +273,9 @@ void SIM_MODEL_SERIALIZER::ParsePins( const std::string& aPins ) for( const auto& node : root->children ) { std::string symbolPinNumber = node->children.at( 0 )->string(); - std::string pinName = node->children.at( 1 )->string(); + std::string modelPinName = node->children.at( 1 )->string(); - m_model.SetPinSymbolPinNumber( pinName, symbolPinNumber ); + m_model.AssignSymbolPinNumberToModelPin( modelPinName, symbolPinNumber ); } } catch( const tao::pegtl::parse_error& e ) diff --git a/eeschema/sim/sim_model_spice_fallback.cpp b/eeschema/sim/sim_model_spice_fallback.cpp index 814c5f60ee..320a44d99e 100644 --- a/eeschema/sim/sim_model_spice_fallback.cpp +++ b/eeschema/sim/sim_model_spice_fallback.cpp @@ -38,18 +38,18 @@ SIM_MODEL_SPICE_FALLBACK::SIM_MODEL_SPICE_FALLBACK( TYPE aType, const std::strin } -void SIM_MODEL_SPICE_FALLBACK::SetPinSymbolPinNumber( const std::string& aPinName, - const std::string& aSymbolPinNumber ) +void SIM_MODEL_SPICE_FALLBACK::AssignSymbolPinNumberToModelPin( const std::string& aModelPinName, + const wxString& aSymbolPinNumber ) { try { - SIM_MODEL::SetPinSymbolPinNumber( aPinName, aSymbolPinNumber ); + SIM_MODEL::AssignSymbolPinNumberToModelPin( aModelPinName, aSymbolPinNumber ); } catch( IO_ERROR& ) { // This is a fall-back, so we won't necessarily know the pin names. If we didn't find // it, then just create a new pin. - m_pins.push_back( { aPinName, aSymbolPinNumber } ); + m_modelPins.push_back( { aModelPinName, aSymbolPinNumber } ); } } diff --git a/eeschema/sim/sim_model_spice_fallback.h b/eeschema/sim/sim_model_spice_fallback.h index 0495fe0843..cf04ef03ee 100644 --- a/eeschema/sim/sim_model_spice_fallback.h +++ b/eeschema/sim/sim_model_spice_fallback.h @@ -32,8 +32,8 @@ class SIM_MODEL_SPICE_FALLBACK : public SIM_MODEL_SPICE public: SIM_MODEL_SPICE_FALLBACK( TYPE aType, const std::string& aRawSpiceCode = "" ); - void SetPinSymbolPinNumber( const std::string& aPinName, - const std::string& aSymbolPinNumber ) override; + void AssignSymbolPinNumberToModelPin( const std::string& aModelPinName, + const wxString& aSymbolPinNumber ) override; std::vector GetPinNames() const override; diff --git a/eeschema/sim/sim_model_subckt.cpp b/eeschema/sim/sim_model_subckt.cpp index 517d4cd1b7..68be2da010 100644 --- a/eeschema/sim/sim_model_subckt.cpp +++ b/eeschema/sim/sim_model_subckt.cpp @@ -59,8 +59,8 @@ std::vector SPICE_GENERATOR_SUBCKT::CurrentNames( const SPICE_ITEM& { std::vector currentNames; - for( const SIM_MODEL::PIN& pin : GetPins() ) - currentNames.push_back( fmt::format( "I({}:{})", ItemName( aItem ), pin.name ) ); + for( const SIM_MODEL_PIN& pin : GetPins() ) + currentNames.push_back( fmt::format( "I({}:{})", ItemName( aItem ), pin.modelPinName ) ); return currentNames; } @@ -147,7 +147,7 @@ void SIM_MODEL_SUBCKT::SetBaseModel( const SIM_MODEL& aBaseModel ) SIM_MODEL::SetBaseModel( aBaseModel ); // Pins aren't constant for subcircuits, so they need to be copied from the base model. - for( const PIN& pin : GetBaseModel()->GetPins() ) + for( const SIM_MODEL_PIN& pin : GetBaseModel()->GetPins() ) AddPin( pin ); // Same for parameters. diff --git a/eeschema/sim/sim_model_switch.cpp b/eeschema/sim/sim_model_switch.cpp index 088a87481b..f02dfe73b8 100644 --- a/eeschema/sim/sim_model_switch.cpp +++ b/eeschema/sim/sim_model_switch.cpp @@ -79,7 +79,7 @@ std::string SPICE_GENERATOR_SWITCH::ItemParams() const } -std::vector> SPICE_GENERATOR_SWITCH::GetPins() const +std::vector> SPICE_GENERATOR_SWITCH::GetPins() const { switch( m_model.GetType() ) { diff --git a/eeschema/sim/sim_model_switch.h b/eeschema/sim/sim_model_switch.h index bc8b033c48..51647f4f7f 100644 --- a/eeschema/sim/sim_model_switch.h +++ b/eeschema/sim/sim_model_switch.h @@ -36,7 +36,7 @@ public: std::string ItemLine( const SPICE_ITEM& aItem ) const override; std::string ItemParams() const override; - std::vector> GetPins() const override; + std::vector> GetPins() const override; }; diff --git a/eeschema/sim/spice_generator.cpp b/eeschema/sim/spice_generator.cpp index ec83de2278..68d3e51413 100644 --- a/eeschema/sim/spice_generator.cpp +++ b/eeschema/sim/spice_generator.cpp @@ -123,8 +123,8 @@ std::string SPICE_GENERATOR::ItemLine( const SPICE_ITEM& aItem ) const if( item.pinNetNames.empty() ) { - for( const SIM_MODEL::PIN& pin : GetPins() ) - item.pinNetNames.push_back( pin.name ); + for( const SIM_MODEL_PIN& pin : GetPins() ) + item.pinNetNames.push_back( pin.modelPinName ); } std::string result; @@ -151,7 +151,7 @@ std::string SPICE_GENERATOR::ItemPins( const SPICE_ITEM& aItem ) const std::string result; int ncCounter = 0; - for( const SIM_MODEL::PIN& pin : GetPins() ) + for( const SIM_MODEL_PIN& pin : GetPins() ) { auto it = std::find( aItem.pinNumbers.begin(), aItem.pinNumbers.end(), pin.symbolPinNumber ); diff --git a/eeschema/sim/spice_generator.h b/eeschema/sim/spice_generator.h index 791501e9b6..8062f50d39 100644 --- a/eeschema/sim/spice_generator.h +++ b/eeschema/sim/spice_generator.h @@ -65,7 +65,7 @@ public: virtual std::string Preview( const SPICE_ITEM& aItem ) const; protected: - virtual std::vector> GetPins() const + virtual std::vector> GetPins() const { return m_model.GetPins(); } diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 2fab669bf3..7a2f01fe14 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -602,7 +602,7 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent ) int modelPinIndex = model.FindModelPinIndex( pin->GetNumber().ToStdString() ); - if( modelPinIndex != SIM_MODEL::PIN::NOT_CONNECTED ) + if( modelPinIndex != SIM_MODEL_PIN::NOT_CONNECTED ) { wxString name = currentNames.at( modelPinIndex ); simFrame->AddCurrentTrace( name ); diff --git a/qa/tests/spice/test_library_spice.cpp b/qa/tests/spice/test_library_spice.cpp index 16f1bc351e..c19460383d 100644 --- a/qa/tests/spice/test_library_spice.cpp +++ b/qa/tests/spice/test_library_spice.cpp @@ -182,8 +182,8 @@ BOOST_AUTO_TEST_CASE( Subckts ) BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name, "PARAM1" ); BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue, "1" ); BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 ); - BOOST_CHECK_EQUAL( model.GetPin( 0 ).name, "1" ); - BOOST_CHECK_EQUAL( model.GetPin( 1 ).name, "2" ); + BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName, "1" ); + BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName, "2" ); break; case 2: @@ -192,8 +192,8 @@ BOOST_AUTO_TEST_CASE( Subckts ) BOOST_REQUIRE_EQUAL( model.GetParamCount(), 1 ); BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name, "PARAM1" ); BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue, "1.0" ); - BOOST_CHECK_EQUAL( model.GetPin( 0 ).name, "1" ); - BOOST_CHECK_EQUAL( model.GetPin( 1 ).name, "2" ); + BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName, "1" ); + BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName, "2" ); break; case 3: @@ -205,8 +205,8 @@ BOOST_AUTO_TEST_CASE( Subckts ) BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.name, "param2" ); BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.defaultValue, "2.2e+2" ); BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 ); - BOOST_CHECK_EQUAL( model.GetPin( 0 ).name, "1" ); - BOOST_CHECK_EQUAL( model.GetPin( 1 ).name, "2" ); + BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName, "1" ); + BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName, "2" ); break; case 4: @@ -218,8 +218,8 @@ BOOST_AUTO_TEST_CASE( Subckts ) BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.name, "param2" ); BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.defaultValue, "2.2E+2" ); BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 ); - BOOST_CHECK_EQUAL( model.GetPin( 0 ).name, "1" ); - BOOST_CHECK_EQUAL( model.GetPin( 1 ).name, "2" ); + BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName, "1" ); + BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName, "2" ); break; case 5: