KiCad PCB EDA Suite
Loading...
Searching...
No Matches
erc.h
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) 2009 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2011 Wayne Stambaugh <[email protected]>
6 * Copyright (C) 2009-2023 KiCad Developers, see change_log.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU 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, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef ERC_H
27#define ERC_H
28
29#include <erc_settings.h>
30#include <vector>
31#include <map>
32
33
34class SCH_SHEET_LIST;
35class SCHEMATIC;
37class SCH_EDIT_FRAME;
39struct KIFACE;
40class PROJECT;
41class SCREEN;
42class SCH_RULE_AREA;
43
44
45extern const wxString CommentERC_H[];
46extern const wxString CommentERC_V[];
47
48
50{
51public:
52
53 ERC_TESTER( SCHEMATIC* aSchematic ) :
54 m_schematic( aSchematic )
55 {
56 }
57
66 int TestDuplicateSheetNames( bool aCreateMarker );
67
71 void TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet );
72
82
88
95
100 int TestPinToPin();
101
107
112 int TestSimilarLabels();
113
119
124 int TestFootprintLinkIssues( KIFACE* aCvPcb, PROJECT* aProject );
125
131
135 int TestSimModelIssues();
136
140 int TestMissingUnits();
141
147
151 int RunRuleAreaERC();
152
157 std::map<SCH_SCREEN*, std::vector<SCH_RULE_AREA*>>& allScreenRuleAreas );
158
159 void RunTests( DS_PROXY_VIEW_ITEM* aDrawingSheet, SCH_EDIT_FRAME* aEditFrame,
160 KIFACE* aCvPcb, PROJECT* aProject, PROGRESS_REPORTER* aProgressReporter );
161
162private:
163
165};
166
167
168#endif // ERC_H
Definition: erc.h:50
int TestLibSymbolIssues()
Test symbols for changed library symbols and broken symbol library links.
Definition: erc.cpp:933
void TestTextVars(DS_PROXY_VIEW_ITEM *aDrawingSheet)
Check for any unresolved text variable references.
Definition: erc.cpp:181
int TestPinToPin()
Checks the full netlist against the pin-to-pin connectivity requirements.
Definition: erc.cpp:679
int TestSimilarLabels()
Checks for labels that differ only in capitalization.
Definition: erc.cpp:872
int RunRuleAreaERC()
Tests for rule area ERC issues.
Definition: erc.cpp:1233
int TestFootprintLinkIssues(KIFACE *aCvPcb, PROJECT *aProject)
Test footprint links against the current footprint libraries.
Definition: erc.cpp:1037
int TestOffGridEndpoints()
Test pins and wire ends for being off grid.
Definition: erc.cpp:1117
int TestDuplicateSheetNames(bool aCreateMarker)
Inside a given sheet, one cannot have sheets with duplicate names (file names can be duplicated).
Definition: erc.cpp:134
int TestMultUnitPinConflicts()
Checks if shared pins on multi-unit symbols have been connected to different nets.
Definition: erc.cpp:813
int TestConflictingBusAliases()
Check that there are no conflicting bus alias definitions in the schematic.
Definition: erc.cpp:303
int TestNoConnectPins()
In KiCad 5 and earlier, you could connect stuff up to pins with NC electrical type.
Definition: erc.cpp:610
int TestRuleAreaOverlappingRuleAreasERC(std::map< SCH_SCREEN *, std::vector< SCH_RULE_AREA * > > &allScreenRuleAreas)
Runs ERC to check for overlapping rule areas.
Definition: erc.cpp:1260
int TestMissingNetclasses()
Tests for netclasses that are referenced but not defined.
Definition: erc.cpp:557
int TestSimModelIssues()
Test SPICE models for various issues.
Definition: erc.cpp:1182
ERC_TESTER(SCHEMATIC *aSchematic)
Definition: erc.h:53
SCHEMATIC * m_schematic
Definition: erc.h:164
void RunTests(DS_PROXY_VIEW_ITEM *aDrawingSheet, SCH_EDIT_FRAME *aEditFrame, KIFACE *aCvPcb, PROJECT *aProject, PROGRESS_REPORTER *aProgressReporter)
Definition: erc.cpp:1300
int TestMissingUnits()
Test for uninstantiated units of multi unit symbols.
Definition: erc.cpp:415
int TestMultiunitFootprints()
Test if all units of each multiunit symbol have the same footprint assigned.
Definition: erc.cpp:350
A progress reporter interface for use in multi-threaded environments.
Container for project specific data.
Definition: project.h:62
Holds all the data relating to one schematic.
Definition: schematic.h:75
Schematic editor (Eeschema) main window.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
const wxString CommentERC_V[]
Definition: erc.cpp:90
const wxString CommentERC_H[]
Definition: erc.cpp:73
Implement a participant in the KIWAY alchemy.
Definition: kiway.h:151