KiCad PCB EDA Suite
Loading...
Searching...
No Matches
erc_settings.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 (C) 2024 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Jon Evans <[email protected]>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#include <algorithm>
23#include <tuple>
24#include <erc/erc_item.h>
25#include <erc/erc_settings.h>
26#include <schematic.h>
27#include <sch_marker.h>
28#include <sch_screen.h>
30#include <settings/parameters.h>
31
33
34
35
36#define OK PIN_ERROR::OK
37#define ERR PIN_ERROR::PP_ERROR
38#define WAR PIN_ERROR::WARNING
39
44{
45/* I, O, Bi, 3S, Pas, NIC, UnS, PwrI, PwrO, OC, OE, NC */
46/* I */ { OK, OK, OK, OK, OK, OK, WAR, OK, OK, OK, OK, ERR },
47/* O */ { OK, ERR, OK, WAR, OK, OK, WAR, OK, ERR, ERR, ERR, ERR },
48/* Bi */ { OK, OK, OK, OK, OK, OK, WAR, OK, WAR, OK, WAR, ERR },
49/* 3S */ { OK, WAR, OK, OK, OK, OK, WAR, WAR, ERR, WAR, WAR, ERR },
50/*Pas */ { OK, OK, OK, OK, OK, OK, WAR, OK, OK, OK, OK, ERR },
51/*NIC */ { OK, OK, OK, OK, OK, OK, OK, OK, OK, OK, OK, ERR },
52/*UnS */ { WAR, WAR, WAR, WAR, WAR, OK, WAR, WAR, WAR, WAR, WAR, ERR },
53/*PwrI*/ { OK, OK, OK, WAR, OK, OK, WAR, OK, OK, OK, OK, ERR },
54/*PwrO*/ { OK, ERR, WAR, ERR, OK, OK, WAR, OK, ERR, ERR, ERR, ERR },
55/* OC */ { OK, ERR, OK, WAR, OK, OK, WAR, OK, ERR, OK, OK, ERR },
56/* OE */ { OK, ERR, WAR, WAR, OK, OK, WAR, OK, ERR, OK, OK, ERR },
57/* NC */ { ERR, ERR, ERR, ERR, ERR, ERR, ERR, ERR, ERR, ERR, ERR, ERR }
58};
59
60
72{
73/* I, O, Bi, 3S, Pas, NIC, UnS, PwrI, PwrO, OC, OE, NC */
74/* I */ { NOD, DRV, DRV, DRV, DRV, NOD, DRV, NOD, DRV, DRV, DRV, NPI },
75/* O */ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, DRV, DRV, DRV, DRV, NPI },
76/* Bi */ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, NOD, DRV, DRV, DRV, NPI },
77/* 3S */ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, NOD, DRV, DRV, DRV, NPI },
78/*Pas */ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, NOD, DRV, DRV, DRV, NPI },
79/*NIC */ { NOD, NOD, NOD, NOD, NOD, NOD, NOD, NOD, NOD, NOD, NOD, NPI },
80/*UnS */ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, NOD, DRV, DRV, DRV, NPI },
81/*PwrI*/ { NOD, DRV, NOD, NOD, NOD, NOD, NOD, NOD, DRV, NOD, NOD, NPI },
82/*PwrO*/ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, DRV, DRV, DRV, DRV, NPI },
83/* OC */ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, NOD, DRV, DRV, DRV, NPI },
84/* OE */ { DRV, DRV, DRV, DRV, DRV, NOD, DRV, NOD, DRV, DRV, DRV, NPI },
85/* NC */ { NPI, NPI, NPI, NPI, NPI, NPI, NPI, NPI, NPI, NPI, NPI, NPI }
86};
87
88
89ERC_SETTINGS::ERC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) :
90 NESTED_SETTINGS( "erc", ercSettingsSchemaVersion, aParent, aPath, false )
91{
93
94 for( int i = ERCE_FIRST; i <= ERCE_LAST; ++i )
96
97 // Error is the default setting so set non-error priorities here.
133
134 m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "rule_severities",
135 [&]() -> nlohmann::json
136 {
137 nlohmann::json ret = {};
138
139 for( const RC_ITEM& item : ERC_ITEM::GetItemsWithSeverities() )
140 {
141 wxString name = item.GetSettingsKey();
142 int code = item.GetErrorCode();
143
144 if( name.IsEmpty() || m_ERCSeverities.count( code ) == 0 )
145 continue;
146
147 ret[std::string( name.ToUTF8() )] = SeverityToString( m_ERCSeverities[code] );
148 }
149
150 return ret;
151 },
152 [&]( const nlohmann::json& aJson )
153 {
154 if( !aJson.is_object() )
155 return;
156
157 for( const RC_ITEM& item : ERC_ITEM::GetItemsWithSeverities() )
158 {
159 int code = item.GetErrorCode();
160 wxString name = item.GetSettingsKey();
161
162 std::string key( name.ToUTF8() );
163
164 if( aJson.contains( key ) )
165 m_ERCSeverities[code] = SeverityFromString( aJson[key] );
166 }
167 },
168 {} ) );
169
170 m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "erc_exclusions",
171 [&]() -> nlohmann::json
172 {
173 nlohmann::json js = nlohmann::json::array();
174
175 for( const ERC_EXCLUSION& exclusion : m_ErcExclusions )
176 js.push_back( exclusion );
177
178 return js;
179 },
180 [&]( const nlohmann::json& aObj )
181 {
182 m_ErcExclusions.clear();
183
184 if( !aObj.is_array() )
185 return;
186
187 for( const nlohmann::json& entry : aObj )
188 {
189 if( !entry.is_object() )
190 continue;
191
192 ERC_EXCLUSION exclusion = entry.get<ERC_EXCLUSION>();
193
194 if( !exclusion.GetSortKey().empty() )
195 m_ErcExclusions.insert( exclusion );
196 }
197 },
198 {} ) );
199
200 m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "pin_map",
201 [&]() -> nlohmann::json
202 {
203 nlohmann::json ret = nlohmann::json::array();
204
205 for( int i = 0; i < ELECTRICAL_PINTYPES_TOTAL; i++ )
206 {
207 nlohmann::json inner = nlohmann::json::array();
208
209 for( int j = 0; j < ELECTRICAL_PINTYPES_TOTAL; j++ )
210 inner.push_back( static_cast<int>( GetPinMapValue( i, j ) ) );
211
212 ret.push_back( inner );
213 }
214
215 return ret;
216 },
217 [&]( const nlohmann::json& aJson )
218 {
219 if( !aJson.is_array() || aJson.size() != ELECTRICAL_PINTYPES_TOTAL )
220 return;
221
222 for( size_t i = 0; i < ELECTRICAL_PINTYPES_TOTAL; i++ )
223 {
224 if( i > aJson.size() - 1 )
225 break;
226
227 nlohmann::json inner = aJson[i];
228
229 if( !inner.is_array() || inner.size() != ELECTRICAL_PINTYPES_TOTAL )
230 return;
231
232 for( size_t j = 0; j < ELECTRICAL_PINTYPES_TOTAL; j++ )
233 {
234 if( inner[j].is_number_integer() )
235 {
236 int val = inner[j].get<int>();
237
238 if( val >= 0 && val <= static_cast<int>( PIN_ERROR::UNCONNECTED ) )
239 SetPinMapValue( i, j, static_cast<PIN_ERROR>( val ) );
240 }
241 }
242 }
243 },
244 {} ) );
245
246 registerMigration( 0, 1, std::bind( &ERC_SETTINGS::migrateSchema0to1, this ) );
247
248 // Pin weights used for sorting. Take care, sorting is descending!
261
263}
264
265
267{
268 // Schema 0 to 1: convert ERC exclusions from legacy pipe-delimited strings to ProtoJSON
269 std::optional<nlohmann::json> opt = Get<nlohmann::json>( "erc_exclusions" );
270
271 if( !opt )
272 return true;
273
274 m_ErcExclusionsLegacy.clear();
275
276 for( const nlohmann::json& entry : *opt )
277 {
278 if( entry.is_array() && entry.size() > 0 )
279 {
280 wxString markerData = entry[0].get<wxString>();
281 wxString comment = entry.size() > 1 ? entry[1].get<wxString>() : wxString();
282
283 if( !markerData.IsEmpty() )
284 m_ErcExclusionsLegacy.emplace( markerData, comment );
285 }
286 else if( entry.is_string() )
287 {
288 wxString markerData = entry.get<wxString>();
289
290 if( !markerData.IsEmpty() )
291 m_ErcExclusionsLegacy.emplace( markerData, wxString() );
292 }
293 }
294
295 Set( "erc_exclusions", nlohmann::json::array() );
296
297 return true;
298}
299
300
302{
303 if( m_parent )
304 {
305 m_parent->ReleaseNestedSettings( this );
306 m_parent = nullptr;
307 }
308}
309
310
311SEVERITY ERC_SETTINGS::GetSeverity( int aErrorCode ) const
312{
313 // Special-case duplicate pin error. Multiple pins with the same number are allowed
314 // if they share the same net, but having them on different nets is always an error.
315 if( aErrorCode == ERCE_DUPLICATE_PIN_ERROR )
316 {
317 return RPT_SEVERITY_ERROR;
318 }
319 // Pin-to-pin codes carry independent ignore state but a fixed reported severity.
320 // Warning-or-error is controlled by which errorCode it is, so each slot's stored
321 // value is consulted only to determine ignore-vs-active.
322 else if( aErrorCode == ERCE_PIN_TO_PIN_ERROR )
323 {
324 auto it = m_ERCSeverities.find( ERCE_PIN_TO_PIN_ERROR );
325
326 if( it != m_ERCSeverities.end() && it->second == RPT_SEVERITY_IGNORE )
327 return RPT_SEVERITY_IGNORE;
328
329 return RPT_SEVERITY_ERROR;
330 }
331 else if( aErrorCode == ERCE_PIN_TO_PIN_WARNING )
332 {
334
335 if( it != m_ERCSeverities.end() && it->second == RPT_SEVERITY_IGNORE )
336 return RPT_SEVERITY_IGNORE;
337
339 }
340 else if( aErrorCode == ERCE_GENERIC_WARNING )
341 {
343 }
344 else if( aErrorCode == ERCE_GENERIC_ERROR )
345 {
346 return RPT_SEVERITY_ERROR;
347 }
348
349 wxCHECK_MSG( m_ERCSeverities.count( aErrorCode ), RPT_SEVERITY_IGNORE,
350 wxS( "Missing severity from map in ERC_SETTINGS!" ) );
351
352 return m_ERCSeverities.at( aErrorCode );
353}
354
355
356void ERC_SETTINGS::SetSeverity( int aErrorCode, SEVERITY aSeverity )
357{
358 m_ERCSeverities[ aErrorCode ] = aSeverity;
359}
360
361
363{
364 memcpy( m_PinMap, m_defaultPinMap, sizeof( m_PinMap ) );
365}
366
367
368void SHEETLIST_ERC_ITEMS_PROVIDER::visitMarkers( std::function<void( SCH_MARKER* )> aVisitor ) const
369{
370 std::set<SCH_SCREEN*> seenScreens;
371
372 for( const SCH_SHEET_PATH& sheet : m_schematic->BuildUnorderedSheetList() )
373 {
374 bool firstTime = seenScreens.count( sheet.LastScreen() ) == 0;
375
376 if( firstTime )
377 seenScreens.insert( sheet.LastScreen() );
378
379 std::map<std::tuple<int, int, std::string, wxString>, SCH_MARKER*> orderedMarkers;
380
381 for( SCH_ITEM* item : sheet.LastScreen()->Items().OfType( SCH_MARKER_T ) )
382 {
383 SCH_MARKER* marker = static_cast<SCH_MARKER*>( item );
384
385 if( marker->GetMarkerType() != MARKER_BASE::MARKER_ERC )
386 continue;
387
388 const VECTOR2I& position = marker->GetPosition();
389 orderedMarkers.emplace( std::make_tuple( position.x,
390 position.y,
391 ERC_EXCLUSION::FromMarker( *marker ).GetSortKey(),
392 marker->GetRCItem()->GetErrorMessage( false ) ),
393 marker );
394 }
395
396 for( const auto& [key, marker] : orderedMarkers )
397 {
398 std::shared_ptr<const ERC_ITEM> ercItem =
399 std::static_pointer_cast<const ERC_ITEM>( marker->GetRCItem() );
400
401 // Only show sheet-specific markers on the owning sheet
402 if( ercItem->IsSheetSpecific() )
403 {
404 if( ercItem->GetSpecificSheetPath() != sheet )
405 continue;
406 }
407
408 // Don't show non-specific markers more than once
409 if( !firstTime && !ercItem->IsSheetSpecific() )
410 continue;
411
412 aVisitor( marker );
413 }
414 }
415}
416
417
419{
420 if( aMarker->IsExcluded() )
422
423 return m_schematic->ErcSettings().GetSeverity( aMarker->GetRCItem()->GetErrorCode() );
424}
425
426
428{
429 switch( aSeverity )
430 {
431 case RPT_SEVERITY_ERROR: m_errorCount += aDelta; break;
432 case RPT_SEVERITY_WARNING: m_warningCount += aDelta; break;
433 case RPT_SEVERITY_EXCLUSION: m_exclusionCount += aDelta; break;
434 default: break;
435 }
436}
437
438
440{
441 m_severities = aSeverities;
442
443 m_filteredMarkers.clear();
444 m_errorCount = 0;
445 m_warningCount = 0;
447
449 [&]( SCH_MARKER* aMarker )
450 {
451 SEVERITY severity = markerSeverity( aMarker );
452
453 adjustCount( severity, 1 );
454
455 if( severity & m_severities )
456 m_filteredMarkers.push_back( aMarker );
457 } );
458
459 // Sort markers so that errors appear before warnings
460 std::stable_sort( m_filteredMarkers.begin(), m_filteredMarkers.end(),
461 []( const SCH_MARKER* a, const SCH_MARKER* b )
462 {
463 return a->GetSeverity() > b->GetSeverity();
464 } );
465}
466
467
472
473
475{
476 if( aSeverity < 0 )
477 return m_filteredMarkers.size();
478
479 int count = 0;
480
481 if( aSeverity & RPT_SEVERITY_ERROR )
482 count += m_errorCount;
483
484 if( aSeverity & RPT_SEVERITY_WARNING )
485 count += m_warningCount;
486
487 if( aSeverity & RPT_SEVERITY_EXCLUSION )
488 count += m_exclusionCount;
489
490 return count;
491}
492
493
494std::shared_ptr<ERC_ITEM> SHEETLIST_ERC_ITEMS_PROVIDER::GetERCItem( int aIndex ) const
495{
496 SCH_MARKER* marker = m_filteredMarkers[ aIndex ];
497
498 return marker ? std::static_pointer_cast<ERC_ITEM>( marker->GetRCItem() ) : nullptr;
499}
500
501
502std::shared_ptr<RC_ITEM> SHEETLIST_ERC_ITEMS_PROVIDER::GetItem( int aIndex ) const
503{
504 return GetERCItem( aIndex );
505}
506
507
509 const wxString& aComment )
510{
511 // Toggling the exclusion moves the marker between the exclusion bucket and its error/warning
512 // bucket, so the cached counts must follow the transition. Route the mutation through here so
513 // the old severity is captured before the marker flips.
514 if( aMarker->IsExcluded() == aExcluded )
515 {
516 aMarker->SetExcluded( aExcluded, aComment );
517 return;
518 }
519
520 adjustCount( markerSeverity( aMarker ), -1 );
521 aMarker->SetExcluded( aExcluded, aComment );
522 adjustCount( markerSeverity( aMarker ), 1 );
523}
524
525
526void SHEETLIST_ERC_ITEMS_PROVIDER::DeleteItem( int aIndex, bool aDeep )
527{
528 SCH_MARKER* marker = m_filteredMarkers[ aIndex ];
529 m_filteredMarkers.erase( m_filteredMarkers.begin() + aIndex );
530
531 adjustCount( markerSeverity( marker ), -1 );
532
533 if( aDeep )
534 {
535 SCH_SCREENS screens( m_schematic->Root() );
536 screens.DeleteMarker( marker );
537 }
538}
539
const char * name
Container for an ERC exclusion, which is a SCH_MARKER plus an optional comment.
static ERC_EXCLUSION FromMarker(const SCH_MARKER &aMarker)
std::string GetSortKey() const
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
Definition erc_item.h:72
ERC_PIN_SORTING_METRIC m_ERCSortingMetric
The type of sorting used by the ERC checker to resolve multi-pin errors.
std::map< ELECTRICAL_PINTYPE, int > m_PinTypeWeights
Weights for electrical pins used in ERC to decide which pin gets the marker in case of a multi-pin er...
static PIN_ERROR m_defaultPinMap[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
Default Look up table which gives the ERC error level for a pair of connected pins.
SEVERITY GetSeverity(int aErrorCode) const
ERC_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
std::set< std::pair< wxString, wxString > > m_ErcExclusionsLegacy
void SetSeverity(int aErrorCode, SEVERITY aSeverity)
virtual ~ERC_SETTINGS()
std::set< ERC_EXCLUSION, ERC_EXCLUSION_COMPARE > m_ErcExclusions
PIN_ERROR GetPinMapValue(int aFirstType, int aSecondType) const
std::map< int, SEVERITY > m_ERCSeverities
bool migrateSchema0to1()
static int m_PinMinDrive[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
Look up table which gives the minimal drive for a pair of connected pins on a net.
void SetPinMapValue(int aFirstType, int aSecondType, PIN_ERROR aValue)
PIN_ERROR m_PinMap[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
void Set(const std::string &aPath, ValueType aVal)
Stores a value into the JSON document Will throw an exception if ValueType isn't something that the l...
std::vector< PARAM_BASE * > m_params
The list of parameters (owned by this object)
void registerMigration(int aOldSchemaVersion, int aNewSchemaVersion, std::function< bool(void)> aMigrator)
Registers a migration from one schema version to another.
JSON_SETTINGS(const wxString &aFilename, SETTINGS_LOC aLocation, int aSchemaVersion)
bool IsExcluded() const
Definition marker_base.h:90
std::shared_ptr< RC_ITEM > GetRCItem() const
void SetExcluded(bool aExcluded, const wxString &aComment=wxEmptyString)
Definition marker_base.h:91
enum MARKER_T GetMarkerType() const
Definition marker_base.h:88
JSON_SETTINGS * m_parent
A pointer to the parent object to load and store from.
NESTED_SETTINGS(const std::string &aName, int aSchemaVersion, JSON_SETTINGS *aParent, const std::string &aPath, bool aLoadFromFile=true)
Like a normal param, but with custom getter and setter functions.
Definition parameters.h:299
A holder for a rule check item, DRC in Pcbnew or ERC in Eeschema.
Definition rc_item.h:81
int GetErrorCode() const
Definition rc_item.h:158
virtual wxString GetErrorMessage(bool aTranslate) const
Definition rc_item.cpp:37
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:170
VECTOR2I GetPosition() const override
Definition sch_marker.h:104
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition sch_screen.h:818
void DeleteMarker(SCH_MARKER *aMarker)
Delete a specific marker.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void adjustCount(SEVERITY aSeverity, int aDelta)
int GetCount(int aSeverity=-1) const override
SEVERITY markerSeverity(SCH_MARKER *aMarker) const
void SetSeverities(int aSeverities) override
void visitMarkers(std::function< void(SCH_MARKER *)> aVisitor) const
void SetMarkerExcluded(SCH_MARKER *aMarker, bool aExcluded, const wxString &aComment=wxEmptyString)
Set the exclusion state of a marker while keeping the cached severity counts in sync.
void DeleteItem(int aIndex, bool aDeep) override
Remove (and optionally deletes) the indexed item from the list.
std::shared_ptr< ERC_ITEM > GetERCItem(int aIndex) const
std::vector< SCH_MARKER * > m_filteredMarkers
std::shared_ptr< RC_ITEM > GetItem(int aIndex) const override
Retrieve a RC_ITEM by index.
int GetSeverities() const override
const int ercSettingsSchemaVersion
#define ERR
#define WAR
#define OK
#define DRV
@ ERCE_UNSPECIFIED
@ ERCE_DRIVER_CONFLICT
Conflicting drivers (labels, etc) on a subgraph.
@ ERCE_SIMILAR_POWER
2 power pins are equal for case insensitive comparisons.
@ 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_FIRST
@ ERCE_ENDPOINT_OFF_GRID
Pin or wire-end off grid.
@ ERCE_EMPTY_LABEL_NAME
Label has an empty or whitespace-only name.
@ ERCE_SAME_LOCAL_GLOBAL_LABEL
2 labels are equal for case insensitive comparisons.
@ ERCE_LAST
@ 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_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_DUPLICATE_PIN_ERROR
@ ERCE_NOCONNECT_NOT_CONNECTED
A no connect symbol is not connected to anything.
@ ERCE_FOUR_WAY_JUNCTION
A four-way junction was found.
@ 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_NOCONNECT_CONNECTED
A no connect symbol is connected to more than 1 pin.
@ ERCE_PIN_TO_PIN_WARNING
@ 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_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_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_WIRED_IMPLICIT_POWER
Wired hidden power input also joins its global net by name.
@ ERCE_PIN_TO_PIN_ERROR
PIN_ERROR
The values a pin-to-pin entry in the pin matrix can take on.
#define NOD
#define NPI
Types of drive on a net (used for legacy ERC)
template KICOMMON_API std::optional< nlohmann::json > JSON_SETTINGS::Get< nlohmann::json >(const std::string &aPath) const
@ PT_INPUT
usual pin input: must be connected
Definition pin_type.h:33
@ PT_NC
not connected (must be left open)
Definition pin_type.h:46
@ PT_OUTPUT
usual output
Definition pin_type.h:34
@ PT_TRISTATE
tri state bus pin
Definition pin_type.h:36
@ PT_NIC
not internally connected (may be connected to anything)
Definition pin_type.h:40
@ PT_BIDI
input or output (like port for a microprocessor)
Definition pin_type.h:35
@ PT_OPENEMITTER
pin type open emitter
Definition pin_type.h:45
@ PT_POWER_OUT
output of a regulator: intended to be connected to power input pins
Definition pin_type.h:43
@ PT_OPENCOLLECTOR
pin type open collector
Definition pin_type.h:44
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
Definition pin_type.h:42
@ PT_UNSPECIFIED
unknown electrical properties: creates always a warning when connected
Definition pin_type.h:41
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin.
Definition pin_type.h:39
#define ELECTRICAL_PINTYPES_TOTAL
Definition pin_type.h:52
SEVERITY
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_ERROR
@ RPT_SEVERITY_UNDEFINED
@ RPT_SEVERITY_EXCLUSION
@ RPT_SEVERITY_IGNORE
@ SCH_MARKER_T
Definition typeinfo.h:154
SEVERITY SeverityFromString(const wxString &aSeverity)
Definition ui_common.cpp:56
wxString SeverityToString(const SEVERITY &aSeverity)
Definition ui_common.cpp:67
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708