KiCad PCB EDA Suite
Loading...
Searching...
No Matches
erc_item.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20
21#include "wx/html/m_templ.h"
22#include "wx/html/styleparams.h"
23#include <erc/erc.h>
24#include <eda_draw_frame.h>
25#include <marker_base.h>
26#include <schematic.h>
27#include <sch_edit_frame.h>
28#include <i18n_utility.h>
29#include <units_provider.h>
30
31
32// These, being statically-defined, require specialized I18N handling.
33// We don't translate on initialization and instead do it in the getters.
34
35// NOTE: Avoid changing the settings key for an ERC item after it has been created
36
37ERC_ITEM ERC_ITEM::heading_connections( 0, _HKI( "Connections" ), "" );
38ERC_ITEM ERC_ITEM::heading_conflicts( 0, _HKI( "Conflicts" ), "" );
39ERC_ITEM ERC_ITEM::heading_misc( 0, _HKI( "Miscellaneous" ), "" );
41
43 _HKI( "Duplicate sheet names within a given sheet" ),
44 wxT( "duplicate_sheet_names" ) );
45
47 _HKI( "Symbol pin or wire end off connection grid" ),
48 wxT( "endpoint_off_grid" ) );
49
51 _HKI( "Pin not connected" ),
52 wxT( "pin_not_connected" ) );
53
55 _HKI( "Input pin not driven by any Output pins" ),
56 wxT( "pin_not_driven" ) );
57
59 _HKI( "Input Power pin not driven by any Output Power pins" ),
60 wxT( "power_pin_not_driven" ) );
61
63 _HKI( "Duplicate pins with different nets" ),
64 wxT( "duplicate_pins" ) );
65
67 _HKI( "Conflict problem between pins" ),
68 wxT( "pin_to_pin" ) );
69
71 _HKI( "Conflict problem between pins" ),
72 wxT( "pin_to_pin" ) );
73
75 _HKI( "Warning" ),
76 wxT( "generic-warning" ) );
77
79 _HKI( "Error" ),
80 wxT( "generic-error" ) );
81
83 _HKI( "Mismatch between hierarchical labels and sheet pins" ),
84 wxT( "hier_label_mismatch" ) );
85
87 _HKI( "Four connection points are joined together" ),
88 wxT( "four_way_junction" ) );
89
91 _HKI( "Label connects more than one wire" ),
92 wxT( "label_multiple_wires" ) );
93
95 _HKI( "A pin with a \"no connection\" flag is connected" ),
96 wxT( "no_connect_connected" ) );
97
99 _HKI( "Unconnected \"no connection\" flag" ),
100 wxT( "no_connect_dangling" ) );
101
103 _HKI( "Label not connected" ),
104 wxT( "label_dangling" ) );
105
107 _HKI( "Label connected to only one pin" ),
108 wxT( "isolated_pin_label" ) );
109
111 _HKI( "Labels are similar (lower/upper case difference only)"),
112 wxT( "similar_labels" ) );
113
115 _HKI( "Power pins are similar (lower/upper case difference only)"),
116 wxT( "similar_power" ) );
117
119 _HKI( "Power pin and label are similar (lower/upper case difference only)"),
120 wxT( "similar_label_and_power" ) );
121
123 _HKI( "Global label only appears once in the schematic"),
124 wxT( "single_global_label" ) );
125
127 _HKI( "Local and global labels have same name" ),
128 wxT( "same_local_global_label" ) );
129
131 _HKI( "Local and global power symbols have same name" ),
132 wxT( "same_local_global_power" ) );
133
135 _HKI( "Different footprint assigned in another unit of the symbol" ),
136 wxT( "different_unit_footprint" ) );
137
139 _HKI( "Different net assigned to a shared pin in another unit of the symbol" ),
140 wxT( "different_unit_net" ) );
141
143 _HKI( "Conflict between bus alias definitions across schematic sheets" ),
144 wxT( "bus_definition_conflict" ) );
145
147 _HKI( "More than one name given to this bus or net" ),
148 wxT( "multiple_net_names" ) );
149
151 _HKI( "Net is graphically connected to a bus but not a bus member" ),
152 wxT( "net_not_bus_member" ) );
153
155 _HKI( "Buses are graphically connected but share no bus members" ),
156 wxT( "bus_to_bus_conflict" ) );
157
159 _HKI( "Invalid connection between bus and net items" ),
160 wxT( "bus_to_net_conflict" ) );
161
163 _HKI( "Ground pin not connected to ground net" ),
164 wxT( "ground_pin_not_ground" ) );
165
167 _HKI( "Pin name resembles stacked pin" ),
168 wxT( "stacked_pin_name" ) );
169
171 _HKI( "Field name has leading or trailing whitespace" ),
172 wxT( "field_name_whitespace" ) );
173
174ERC_ITEM ERC_ITEM::emptyLabelName( ERCE_EMPTY_LABEL_NAME, _HKI( "Label has an empty name" ),
175 wxT( "empty_label_name" ) );
176
178 _HKI( "Pin map references a pad that does not exist on the footprint" ),
179 wxT( "pin_map_bad_pad" ) );
180
182 _HKI( "Connected pin is not mapped to any footprint pad" ),
183 wxT( "pin_map_unmapped_pin" ) );
184
186 _HKI( "Two symbol pins are mapped to the same footprint pad" ),
187 wxT( "pin_map_duplicate_pad" ) );
188
190 _HKI( "Pin map references a pin number that no longer exists on the symbol" ),
191 wxT( "pin_map_stale_pin" ) );
192
194 _HKI( "Unresolved text variable" ),
195 wxT( "unresolved_variable" ) );
196
198 _HKI( "Undefined netclass" ),
199 wxT( "undefined_netclass" ) );
200
202 _HKI( "SPICE model issue" ),
203 wxT( "simulation_model_issue" ) );
204
206 _HKI( "Wires not connected to anything" ),
207 wxT( "wire_dangling" ) );
208
210 _HKI( "Library symbol issue" ),
211 wxT( "lib_symbol_issues" ) );
212
214 _HKI( "Symbol doesn't match copy in library" ),
215 wxT( "lib_symbol_mismatch" ) );
216
218 _HKI( "Footprint link issue" ),
219 wxT( "footprint_link_issues" ) );
220
222 _HKI( "Assigned footprint doesn't match footprint filters" ),
223 wxT( "footprint_filter" ) );
224
226 _HKI( "Symbol is not annotated" ),
227 wxT( "unannotated" ) );
228
230 _HKI( "Symbol has more units than are defined" ),
231 wxT( "extra_units" ) );
232
234 _HKI( "Symbol has units that are not placed" ),
235 wxT( "missing_unit" ) );
236
238 _HKI( "Symbol has input pins that are not placed" ),
239 wxT( "missing_input_pin" ) );
240
242 _HKI( "Symbol has bidirectional pins that are not placed" ),
243 wxT( "missing_bidi_pin" ) );
244
246 _HKI( "Symbol has power input pins that are not placed" ),
247 wxT( "missing_power_pin" ) );
248
250 _HKI( "Units of same symbol have different values" ),
251 wxT( "unit_value_mismatch" ) );
252
254 _HKI( "Duplicate reference designators" ),
255 wxT( "duplicate_reference" ) );
256
258 _HKI( "Bus Entry needed" ),
259 wxT( "bus_entry_needed" ) );
260
262 _HKI( "Unconnected wire endpoint" ),
263 wxT( "unconnected_wire_endpoint" ) );
264
266 _HKI( "Variant symbol not found in libraries" ),
267 wxT( "variant_symbol_invalid" ) );
268
270 _HKI( "Variant symbol is not pin-compatible" ),
271 wxT( "variant_symbol_incompatible" ) );
272
273std::vector<std::reference_wrapper<RC_ITEM>> ERC_ITEM::allItemTypes(
280
286
291 // Commented out until the logic for this element is coded
292 // TODO: Add bus label syntax checking
293 // ERC_ITEM::busLabelSyntax,
298
299 // ERC_ITEM types with no user-editable severities
300 // NOTE: this MUST be the last grouping in the list!
303
304
305std::shared_ptr<ERC_ITEM> ERC_ITEM::Create( int aErrorCode )
306{
307 switch( aErrorCode )
308 {
309 case ERCE_DUPLICATE_SHEET_NAME: return std::make_shared<ERC_ITEM>( duplicateSheetName );
310 case ERCE_ENDPOINT_OFF_GRID: return std::make_shared<ERC_ITEM>( endpointOffGrid );
311 case ERCE_PIN_NOT_CONNECTED: return std::make_shared<ERC_ITEM>( pinNotConnected );
312 case ERCE_PIN_NOT_DRIVEN: return std::make_shared<ERC_ITEM>( pinNotDriven );
313 case ERCE_POWERPIN_NOT_DRIVEN: return std::make_shared<ERC_ITEM>( powerpinNotDriven );
314 case ERCE_DUPLICATE_PIN_ERROR: return std::make_shared<ERC_ITEM>( duplicatePinError );
315 case ERCE_PIN_TO_PIN_WARNING: return std::make_shared<ERC_ITEM>( pinTableWarning );
316 case ERCE_PIN_TO_PIN_ERROR: return std::make_shared<ERC_ITEM>( pinTableError );
317 case ERCE_GENERIC_WARNING: return std::make_shared<ERC_ITEM>( genericWarning );
318 case ERCE_GENERIC_ERROR: return std::make_shared<ERC_ITEM>( genericError );
319 case ERCE_HIERACHICAL_LABEL: return std::make_shared<ERC_ITEM>( hierLabelMismatch );
320 case ERCE_NOCONNECT_CONNECTED: return std::make_shared<ERC_ITEM>( noConnectConnected );
321 case ERCE_NOCONNECT_NOT_CONNECTED: return std::make_shared<ERC_ITEM>( noConnectDangling );
322 case ERCE_FOUR_WAY_JUNCTION: return std::make_shared<ERC_ITEM>( fourWayJunction );
323 case ERCE_LABEL_MULTIPLE_WIRES: return std::make_shared<ERC_ITEM>( labelMultipleWires );
324 case ERCE_LABEL_NOT_CONNECTED: return std::make_shared<ERC_ITEM>( labelDangling );
325 case ERCE_SIMILAR_LABELS: return std::make_shared<ERC_ITEM>( similarLabels );
326 case ERCE_SIMILAR_POWER: return std::make_shared<ERC_ITEM>( similarPower );
327 case ERCE_SIMILAR_LABEL_AND_POWER: return std::make_shared<ERC_ITEM>( similarLabelAndPower );
328 case ERCE_SINGLE_GLOBAL_LABEL: return std::make_shared<ERC_ITEM>( singleGlobalLabel );
329 case ERCE_SAME_LOCAL_GLOBAL_LABEL: return std::make_shared<ERC_ITEM>( sameLocalGlobalLabel );
330 case ERCE_SAME_LOCAL_GLOBAL_POWER: return std::make_shared<ERC_ITEM>( sameLocalGlobalPower );
331 case ERCE_DIFFERENT_UNIT_FP: return std::make_shared<ERC_ITEM>( differentUnitFootprint );
332 case ERCE_DIFFERENT_UNIT_NET: return std::make_shared<ERC_ITEM>( differentUnitNet );
333 case ERCE_BUS_ALIAS_CONFLICT: return std::make_shared<ERC_ITEM>( busDefinitionConflict );
334 case ERCE_DRIVER_CONFLICT: return std::make_shared<ERC_ITEM>( multipleNetNames );
335 case ERCE_BUS_ENTRY_CONFLICT: return std::make_shared<ERC_ITEM>( netNotBusMember );
336 case ERCE_BUS_TO_BUS_CONFLICT: return std::make_shared<ERC_ITEM>( busToBusConflict );
337 case ERCE_BUS_TO_NET_CONFLICT: return std::make_shared<ERC_ITEM>( busToNetConflict );
338 case ERCE_GROUND_PIN_NOT_GROUND: return std::make_shared<ERC_ITEM>( groundPinNotGround );
339 case ERCE_LABEL_SINGLE_PIN: return std::make_shared<ERC_ITEM>( isolatedPinLabel );
340 case ERCE_UNRESOLVED_VARIABLE: return std::make_shared<ERC_ITEM>( unresolvedVariable );
341 case ERCE_UNDEFINED_NETCLASS: return std::make_shared<ERC_ITEM>( undefinedNetclass );
342 case ERCE_SIMULATION_MODEL: return std::make_shared<ERC_ITEM>( simulationModelIssues );
343 case ERCE_WIRE_DANGLING: return std::make_shared<ERC_ITEM>( wireDangling );
344 case ERCE_LIB_SYMBOL_ISSUES: return std::make_shared<ERC_ITEM>( libSymbolIssues );
345 case ERCE_LIB_SYMBOL_MISMATCH: return std::make_shared<ERC_ITEM>( libSymbolMismatch );
346 case ERCE_FOOTPRINT_LINK_ISSUES: return std::make_shared<ERC_ITEM>( footprintLinkIssues );
347 case ERCE_FOOTPRINT_FILTERS: return std::make_shared<ERC_ITEM>( footprintFilters );
348 case ERCE_UNANNOTATED: return std::make_shared<ERC_ITEM>( unannotated );
349 case ERCE_EXTRA_UNITS: return std::make_shared<ERC_ITEM>( extraUnits );
350 case ERCE_DIFFERENT_UNIT_VALUE: return std::make_shared<ERC_ITEM>( differentUnitValue );
351 case ERCE_DUPLICATE_REFERENCE: return std::make_shared<ERC_ITEM>( duplicateReference );
352 case ERCE_BUS_ENTRY_NEEDED: return std::make_shared<ERC_ITEM>( busEntryNeeded );
353 case ERCE_MISSING_UNIT: return std::make_shared<ERC_ITEM>( missingUnits );
354 case ERCE_MISSING_INPUT_PIN: return std::make_shared<ERC_ITEM>( missingInputPin );
355 case ERCE_MISSING_POWER_INPUT_PIN: return std::make_shared<ERC_ITEM>( missingPowerInputPin );
356 case ERCE_MISSING_BIDI_PIN: return std::make_shared<ERC_ITEM>( missingBidiPin );
357 case ERCE_UNCONNECTED_WIRE_ENDPOINT: return std::make_shared<ERC_ITEM>( unconnectedWireEndpoint );
358 case ERCE_STACKED_PIN_SYNTAX: return std::make_shared<ERC_ITEM>( stackedPinName );
359 case ERCE_FIELD_NAME_WHITESPACE: return std::make_shared<ERC_ITEM>( fieldNameWhitespace );
360 case ERCE_EMPTY_LABEL_NAME: return std::make_shared<ERC_ITEM>( emptyLabelName );
361 case ERCE_PIN_MAP_BAD_PAD: return std::make_shared<ERC_ITEM>( pinMapBadPad );
362 case ERCE_PIN_MAP_UNMAPPED_PIN: return std::make_shared<ERC_ITEM>( pinMapUnmappedPin );
363 case ERCE_PIN_MAP_DUPLICATE_PAD: return std::make_shared<ERC_ITEM>( pinMapDuplicatePad );
364 case ERCE_PIN_MAP_STALE_PIN: return std::make_shared<ERC_ITEM>( pinMapStalePin );
365 case ERCE_VARIANT_SYMBOL_INVALID: return std::make_shared<ERC_ITEM>( variantSymbolInvalid );
366 case ERCE_VARIANT_SYMBOL_INCOMPATIBLE: return std::make_shared<ERC_ITEM>( variantSymbolIncompatible );
367 case ERCE_UNSPECIFIED:
368 default:
369 wxFAIL_MSG( wxS( "Unknown ERC error code" ) );
370 break;
371 }
372
373 return nullptr;
374}
375
381void ERC_TREE_MODEL::GetValue( wxVariant& aVariant, wxDataViewItem const& aItem,
382 unsigned int aCol ) const
383{
384 SCH_EDIT_FRAME* schEditFrame = static_cast<SCH_EDIT_FRAME*>( m_editFrame );
385 const RC_TREE_NODE* node = ToNode( aItem );
386 std::shared_ptr<ERC_ITEM> ercItem = std::static_pointer_cast<ERC_ITEM>( node->m_RcItem );
387 MARKER_BASE* marker = ercItem->GetParent();
388 wxString msg;
389
390 auto getItemDesc =
391 [&]( EDA_ITEM* aCurrItem, SCH_SHEET_PATH& aSheet )
392 {
393 SCH_SHEET_PATH curSheet = schEditFrame->GetCurrentSheet();
394 wxString desc;
395
396 if( aSheet != curSheet )
397 {
398 // Use the schematic-level setter to avoid the view side effects of
399 // SCH_EDIT_FRAME::SetCurrentSheet, which recreates the drawing sheet
400 // proxy with potentially stale page number state.
401 schEditFrame->Schematic().SetCurrentSheet( aSheet );
402 aSheet.UpdateAllScreenReferences();
403 {
404 desc = aCurrItem->GetItemDescription( m_editFrame, true );
405 }
406 schEditFrame->Schematic().SetCurrentSheet( curSheet );
407 curSheet.UpdateAllScreenReferences();
408 }
409 else
410 {
411 desc = aCurrItem->GetItemDescription( m_editFrame, true );
412 }
413
414 return desc;
415 };
416
417 switch( node->m_Type )
418 {
420 if( marker )
421 {
422 SEVERITY severity = ercItem->GetParent()->GetSeverity();
423
424 if( severity == RPT_SEVERITY_EXCLUSION )
425 {
426 if( schEditFrame->GetSeverity( ercItem->GetErrorCode() ) == RPT_SEVERITY_WARNING )
427 msg = _( "Excluded warning: " );
428 else
429 msg = _( "Excluded error: " );
430 }
431 else if( severity == RPT_SEVERITY_WARNING )
432 {
433 msg = _( "Warning: " );
434 }
435 else
436 {
437 msg = _( "Error: " );
438 }
439 }
440
441 msg += ercItem->GetErrorMessage( true );
442 break;
443
445 if( marker && marker->GetMarkerType() == MARKER_BASE::MARKER_DRAWING_SHEET )
446 {
447 msg = _( "Drawing Sheet" );
448 }
449 else
450 {
451 msg = getItemDesc( schEditFrame->ResolveItem( ercItem->GetMainItemID() ),
452 ercItem->MainItemHasSheetPath() ? ercItem->GetMainItemSheetPath()
453 : schEditFrame->GetCurrentSheet() );
454 }
455
456 break;
457
459 msg = getItemDesc( schEditFrame->ResolveItem( ercItem->GetAuxItemID() ),
460 ercItem->AuxItemHasSheetPath() ? ercItem->GetAuxItemSheetPath()
461 : schEditFrame->GetCurrentSheet() );
462 break;
463
465 msg = getItemDesc( schEditFrame->ResolveItem( ercItem->GetAuxItem2ID() ),
466 schEditFrame->GetCurrentSheet() );
467 break;
468
470 msg = getItemDesc( schEditFrame->ResolveItem( ercItem->GetAuxItem3ID() ),
471 schEditFrame->GetCurrentSheet() );
472 break;
473
475 if( marker )
476 msg = marker->GetComment();
477
478 break;
479 }
480
481 msg.Replace( wxS( "\n" ), wxS( " " ) );
482 aVariant = msg;
483}
484
485
486wxString ERC_ITEM::getItemDescription( EDA_ITEM* aItem, int aIndex,
487 UNITS_PROVIDER* aUnitsProvider ) const
488{
489 SCH_ITEM* schItem = dynamic_cast<SCH_ITEM*>( aItem );
490 SCHEMATIC* sch = schItem ? schItem->Schematic() : nullptr;
491
492 const std::optional<SCH_SHEET_PATH>& itemSheet = ( aIndex == 0 ) ? m_mainItemSheet
494
495 if( !sch || !itemSheet.has_value() || sch->CurrentSheet() == *itemSheet )
496 return RC_ITEM::getItemDescription( aItem, aIndex, aUnitsProvider );
497
498 // Temporarily point the schematic at the affected item's sheet so per-instance
499 // fields (notably the symbol reference) resolve to the same text the GUI ERC
500 // dialog shows. Mirrors the lambda in ERC_TREE_MODEL::GetValue.
501 SCH_SHEET_PATH savedSheet = sch->CurrentSheet();
502 SCH_SHEET_PATH targetSheet = *itemSheet;
503
504 sch->SetCurrentSheet( targetSheet );
505 targetSheet.UpdateAllScreenReferences();
506
507 wxString desc = RC_ITEM::getItemDescription( aItem, aIndex, aUnitsProvider );
508
509 sch->SetCurrentSheet( savedSheet );
510 savedSheet.UpdateAllScreenReferences();
511
512 return desc;
513}
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:96
virtual wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const
Return a user-visible description string of this item.
Definition eda_item.cpp:169
static ERC_ITEM differentUnitValue
Definition erc_item.h:257
std::optional< SCH_SHEET_PATH > m_mainItemSheet
Definition erc_item.h:194
static ERC_ITEM busToBusConflict
Definition erc_item.h:233
static ERC_ITEM labelMultipleWires
Definition erc_item.h:218
static ERC_ITEM pinTableWarning
Definition erc_item.h:211
static ERC_ITEM footprintLinkIssues
Definition erc_item.h:249
static ERC_ITEM emptyLabelName
Definition erc_item.h:238
static ERC_ITEM unresolvedVariable
Definition erc_item.h:243
static ERC_ITEM duplicateSheetName
Definition erc_item.h:205
static ERC_ITEM noConnectDangling
Definition erc_item.h:219
static ERC_ITEM busDefinitionConflict
Definition erc_item.h:230
static ERC_ITEM fourWayJunction
Definition erc_item.h:217
static ERC_ITEM genericError
Definition erc_item.h:214
static ERC_ITEM libSymbolIssues
Definition erc_item.h:247
static ERC_ITEM variantSymbolIncompatible
Definition erc_item.h:262
static ERC_ITEM pinNotDriven
Definition erc_item.h:208
wxString getItemDescription(EDA_ITEM *aItem, int aIndex, UNITS_PROVIDER *aUnitsProvider) const override
Resolve the affected-item description in the per-instance SCH_SHEET_PATH context stored on this marke...
Definition erc_item.cpp:486
static ERC_ITEM undefinedNetclass
Definition erc_item.h:244
static ERC_ITEM extraUnits
Definition erc_item.h:252
static ERC_ITEM pinMapUnmappedPin
Definition erc_item.h:240
static ERC_ITEM variantSymbolInvalid
Definition erc_item.h:261
static ERC_ITEM heading_conflicts
Definition erc_item.h:201
static std::shared_ptr< ERC_ITEM > Create(int aErrorCode)
Constructs an ERC_ITEM for the given error code.
Definition erc_item.cpp:305
static ERC_ITEM noConnectConnected
Definition erc_item.h:216
static ERC_ITEM heading_misc
Definition erc_item.h:202
static ERC_ITEM endpointOffGrid
Definition erc_item.h:206
static ERC_ITEM isolatedPinLabel
Definition erc_item.h:221
static ERC_ITEM busToNetConflict
Definition erc_item.h:234
static ERC_ITEM differentUnitFootprint
Definition erc_item.h:228
static ERC_ITEM sameLocalGlobalLabel
Definition erc_item.h:223
static ERC_ITEM hierLabelMismatch
Definition erc_item.h:215
static ERC_ITEM heading_connections
Definition erc_item.h:200
static ERC_ITEM missingUnits
Definition erc_item.h:253
static ERC_ITEM similarLabels
Definition erc_item.h:225
static ERC_ITEM unconnectedWireEndpoint
Definition erc_item.h:260
static ERC_ITEM heading_internal
Definition erc_item.h:203
static std::vector< std::reference_wrapper< RC_ITEM > > allItemTypes
A list of all ERC_ITEM types which are valid error codes.
Definition erc_item.h:198
static ERC_ITEM labelDangling
Definition erc_item.h:220
static ERC_ITEM pinMapStalePin
Definition erc_item.h:242
static ERC_ITEM differentUnitNet
Definition erc_item.h:229
static ERC_ITEM pinMapDuplicatePad
Definition erc_item.h:241
static ERC_ITEM pinTableError
Definition erc_item.h:212
static ERC_ITEM similarLabelAndPower
Definition erc_item.h:227
static ERC_ITEM groundPinNotGround
Definition erc_item.h:235
static ERC_ITEM genericWarning
Definition erc_item.h:213
static ERC_ITEM footprintFilters
Definition erc_item.h:250
static ERC_ITEM fieldNameWhitespace
Definition erc_item.h:237
static ERC_ITEM netNotBusMember
Definition erc_item.h:232
static ERC_ITEM wireDangling
Definition erc_item.h:246
static ERC_ITEM powerpinNotDriven
Definition erc_item.h:209
static ERC_ITEM missingPowerInputPin
Definition erc_item.h:256
static ERC_ITEM missingBidiPin
Definition erc_item.h:255
static ERC_ITEM unannotated
Definition erc_item.h:251
static ERC_ITEM missingInputPin
Definition erc_item.h:254
static ERC_ITEM singleGlobalLabel
Definition erc_item.h:222
static ERC_ITEM sameLocalGlobalPower
Definition erc_item.h:224
static ERC_ITEM busEntryNeeded
Definition erc_item.h:259
static ERC_ITEM simulationModelIssues
Definition erc_item.h:245
std::optional< SCH_SHEET_PATH > m_auxItemSheet
Definition erc_item.h:195
static ERC_ITEM pinMapBadPad
Definition erc_item.h:239
static ERC_ITEM multipleNetNames
Definition erc_item.h:231
static ERC_ITEM similarPower
Definition erc_item.h:226
static ERC_ITEM pinNotConnected
Definition erc_item.h:207
static ERC_ITEM stackedPinName
Definition erc_item.h:236
static ERC_ITEM libSymbolMismatch
Definition erc_item.h:248
static ERC_ITEM duplicateReference
Definition erc_item.h:258
static ERC_ITEM duplicatePinError
Definition erc_item.h:210
void GetValue(wxVariant &aVariant, wxDataViewItem const &aItem, unsigned int aCol) const override
Override of RC_TREE_MODEL::GetValue which returns item descriptions in a specific SCH_SHEET_PATH cont...
Definition erc_item.cpp:381
Marker are mainly used to show a DRC or ERC error or warning.
Definition marker_base.h:45
@ MARKER_DRAWING_SHEET
Definition marker_base.h:52
enum MARKER_T GetMarkerType() const
Definition marker_base.h:87
wxString GetComment() const
Definition marker_base.h:96
virtual wxString getItemDescription(EDA_ITEM *aItem, int aIndex, UNITS_PROVIDER *aUnitsProvider) const
Resolve the description string used for an affected item in ShowReport and GetJsonViolation.
Definition rc_item.cpp:79
EDA_DRAW_FRAME * m_editFrame
Definition rc_item.h:359
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition rc_item.h:267
std::shared_ptr< RC_ITEM > m_RcItem
Definition rc_item.h:246
NODE_TYPE m_Type
Definition rc_item.h:245
Holds all the data relating to one schematic.
Definition schematic.h:90
void SetCurrentSheet(const SCH_SHEET_PATH &aPath)
Definition schematic.h:194
SCH_SHEET_PATH & CurrentSheet() const
Definition schematic.h:189
Schematic editor (Eeschema) main window.
SCH_SHEET_PATH & GetCurrentSheet() const
SCHEMATIC & Schematic() const
EDA_ITEM * ResolveItem(const KIID &aId, bool aAllowNullptrReturn=false) const override
Fetch an item by KIID.
SEVERITY GetSeverity(int aErrorCode) const override
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:162
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
Definition sch_item.cpp:268
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void UpdateAllScreenReferences() const
Update all the symbol references for this sheet path.
#define _(s)
@ ERCE_UNSPECIFIED
@ ERCE_UNANNOTATED
Symbol has not been annotated.
@ ERCE_POWERPIN_NOT_DRIVEN
Power input pin connected to some others pins but no power out pin to drive it.
@ ERCE_DRIVER_CONFLICT
Conflicting drivers (labels, etc) on a subgraph.
@ ERCE_SIMILAR_POWER
2 power pins are equal for case insensitive comparisons.
@ ERCE_MISSING_POWER_INPUT_PIN
Symbol has power input pins that are not placed on the schematic.
@ ERCE_UNCONNECTED_WIRE_ENDPOINT
A label is connected to more than one wire.
@ ERCE_GROUND_PIN_NOT_GROUND
A ground-labeled pin is not on a ground net while another pin is.
@ ERCE_SIMILAR_LABELS
2 labels are equal for case insensitive comparisons.
@ ERCE_VARIANT_SYMBOL_INCOMPATIBLE
Variant symbol override fails pin compatibility.
@ ERCE_STACKED_PIN_SYNTAX
Pin name resembles stacked pin notation.
@ ERCE_LABEL_NOT_CONNECTED
Label not connected to any pins.
@ ERCE_ENDPOINT_OFF_GRID
Pin or wire-end off grid.
@ ERCE_DUPLICATE_REFERENCE
More than one symbol with the same reference.
@ ERCE_EMPTY_LABEL_NAME
Label has an empty or whitespace-only name.
@ ERCE_EXTRA_UNITS
Symbol has more units than are defined.
@ ERCE_SAME_LOCAL_GLOBAL_LABEL
2 labels are equal for case insensitive comparisons.
@ ERCE_BUS_TO_BUS_CONFLICT
A connection between bus objects doesn't share at least one net.
@ ERCE_SIMILAR_LABEL_AND_POWER
label and pin are equal for case insensitive comparisons.
@ ERCE_SAME_LOCAL_GLOBAL_POWER
Local power port and global power port have the same name.
@ ERCE_PIN_MAP_BAD_PAD
Pin map references a pad absent from the footprint.
@ ERCE_LABEL_SINGLE_PIN
A label is connected only to a single pin.
@ ERCE_BUS_ENTRY_CONFLICT
A wire connected to a bus doesn't match the bus.
@ ERCE_FOOTPRINT_LINK_ISSUES
The footprint link is invalid, or points to a missing (or inactive) footprint or library.
@ ERCE_PIN_MAP_DUPLICATE_PAD
Two symbol pins map to one pad (not stacked/jumper).
@ ERCE_BUS_TO_NET_CONFLICT
A bus wire is graphically connected to a net port/pin (or vice versa).
@ ERCE_DUPLICATE_PIN_ERROR
@ ERCE_NOCONNECT_NOT_CONNECTED
A no connect symbol is not connected to anything.
@ ERCE_DIFFERENT_UNIT_NET
Shared pin in a multi-unit symbol is connected to more than one net.
@ ERCE_FOUR_WAY_JUNCTION
A four-way junction was found.
@ ERCE_PIN_NOT_CONNECTED
Pin not connected and not no connect symbol.
@ ERCE_UNDEFINED_NETCLASS
A netclass was referenced but not defined.
@ ERCE_BUS_ENTRY_NEEDED
Importer failed to auto-place a bus entry.
@ ERCE_UNRESOLVED_VARIABLE
A text variable could not be resolved.
@ ERCE_SIMULATION_MODEL
An error was found in the simulation model.
@ ERCE_LIB_SYMBOL_MISMATCH
Symbol doesn't match copy in library.
@ ERCE_GENERIC_ERROR
@ ERCE_DIFFERENT_UNIT_FP
Different units of the same symbol have different footprints assigned.
@ ERCE_NOCONNECT_CONNECTED
A no connect symbol is connected to more than 1 pin.
@ ERCE_PIN_TO_PIN_WARNING
@ ERCE_PIN_NOT_DRIVEN
Pin connected to some others pins but no pin to drive it.
@ ERCE_MISSING_INPUT_PIN
Symbol has input pins that are not placed.
@ ERCE_MISSING_UNIT
Symbol has units that are not placed on the schematic.
@ ERCE_FIELD_NAME_WHITESPACE
Field name has leading or trailing whitespace.
@ ERCE_DUPLICATE_SHEET_NAME
Duplicate sheet names within a given sheet.
@ ERCE_PIN_MAP_STALE_PIN
Pin map references a pin number not on the symbol.
@ ERCE_MISSING_BIDI_PIN
Symbol has bi-directional pins that are not placed.
@ ERCE_LIB_SYMBOL_ISSUES
Symbol not found in active libraries.
@ ERCE_FOOTPRINT_FILTERS
The assigned footprint doesn't match the footprint filters.
@ ERCE_HIERACHICAL_LABEL
Mismatch between hierarchical labels and pins sheets.
@ ERCE_WIRE_DANGLING
Some wires are not connected to anything else.
@ ERCE_BUS_ALIAS_CONFLICT
Conflicting bus alias definitions across sheets.
@ ERCE_GENERIC_WARNING
@ ERCE_VARIANT_SYMBOL_INVALID
Variant symbol override LIB_ID cannot be resolved.
@ ERCE_SINGLE_GLOBAL_LABEL
A label only exists once in the schematic.
@ ERCE_PIN_MAP_UNMAPPED_PIN
A connected pin resolves to no footprint pad.
@ ERCE_LABEL_MULTIPLE_WIRES
A label is connected to more than one wire.
@ ERCE_DIFFERENT_UNIT_VALUE
Units of same symbol have different values.
@ ERCE_PIN_TO_PIN_ERROR
Some functions to handle hotkeys in KiCad.
#define _HKI(x)
Definition page_info.cpp:40
SEVERITY
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_EXCLUSION