87 libs.push_back( lib );
88 return MakePin( lib, ELECTRICAL_PINTYPE::PT_POWER_IN, wxS(
"PWR1" ) );
95 libs.push_back( lib );
96 return MakePin( lib, ELECTRICAL_PINTYPE::PT_POWER_IN, wxS(
"PWR2" ) );
103 libs.push_back( lib );
104 return MakePin( lib, ELECTRICAL_PINTYPE::PT_OUTPUT, wxS(
"U1" ) );
110 pin->SetText( aText );
111 pin->SetShape( aShape );
131 SCH_LABEL* subset = MakeLabel( wxS(
"BUS[1..3]" ) );
132 SCH_LABEL* superset = MakeLabel( wxS(
"BUS[1..4]" ) );
134 subgraph.AddItem( subset );
135 subgraph.AddItem( superset );
137 subgraph.ResolveDrivers(
false );
139 subgraph.RemoveItem( subset );
142 subgraph.ResolveDrivers(
false );
144 subgraph.RemoveItem( superset );
147 subset = MakeLabel( wxS(
"BUS{ ONE TWO THREE }" ) );
148 superset = MakeLabel( wxS(
"BUS{ ONE TWO THREE FOUR }" ) );
150 subgraph.AddItem( subset );
151 subgraph.AddItem( superset );
153 subgraph.ResolveDrivers(
false );
159 SCH_PIN* regular = MakeRegularPin();
160 subgraph.AddItem( regular );
161 subgraph.ResolveDrivers(
false );
164 SCH_PIN* local = MakeLocalPowerPin();
165 subgraph.AddItem( local );
166 subgraph.ResolveDrivers(
false );
169 SCH_PIN* global = MakeGlobalPowerPin();
170 subgraph.AddItem( global );
171 subgraph.ResolveDrivers(
false );
177 SCH_LABEL* good = MakeLabel( wxS(
"VCC" ) );
178 SCH_LABEL* bad = MakeLabel( wxS(
"Net-Pad1" ) );
180 subgraph.AddItem( good );
181 subgraph.AddItem( bad );
183 subgraph.ResolveDrivers(
false );
189 SCH_LABEL* aaa = MakeLabel( wxS(
"AAA" ) );
190 SCH_LABEL* bbb = MakeLabel( wxS(
"BBB" ) );
192 subgraph.AddItem( aaa );
193 subgraph.AddItem( bbb );
195 subgraph.ResolveDrivers(
false );
204 subgraph.AddItem( input );
205 subgraph.AddItem( output );
207 subgraph.ResolveDrivers(
false );
Calculate the connectivity of a schematic and generates netlists.
A subgraph is a set of items that are electrically connected on a single sheet.
Define a library symbol object.
const LIB_ID & GetLibId() const override
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
SCH_LABEL * MakeLabel(const wxString &aText)
SCH_PIN * MakePin(LIB_SYMBOL *aLib, ELECTRICAL_PINTYPE aType, const wxString &aRef)
std::vector< SCH_SYMBOL * > symbols
SCH_PIN * MakeGlobalPowerPin()
RESOLVE_DRIVERS_FIXTURE()
std::vector< SCH_ITEM * > looseItems
SCH_PIN * MakeRegularPin()
std::vector< LIB_SYMBOL * > libs
SCH_SHEET_PIN * MakeSheetPin(const wxString &aText, LABEL_FLAG_SHAPE aShape)
SCH_PIN * MakeLocalPowerPin()
~RESOLVE_DRIVERS_FIXTURE()
CONNECTION_SUBGRAPH subgraph
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void ConfigureFromLabel(const wxString &aLabel)
Configures the connection given a label.
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_CONNECTION * GetOrInitConnection(const SCH_SHEET_PATH &aPath, CONNECTION_GRAPH *aGraph)
void SetNumber(const wxString &aNumber)
void SetName(const wxString &aName)
void SetPosition(const VECTOR2I &aPos) override
void SetType(ELECTRICAL_PINTYPE aType)
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void UpdatePins()
Updates the cache of SCH_PIN objects for each pin.
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
BOOST_CHECK_EQUAL(ret, c.m_exp_result)
BOOST_FIXTURE_TEST_CASE(BusSupersetPreference, RESOLVE_DRIVERS_FIXTURE)
VECTOR2< int32_t > VECTOR2I