KiCad PCB EDA Suite
NETCLASS Class Reference

A collection of nets and the parameters used to route or test these nets. More...

#include <netclass.h>

Public Member Functions

 NETCLASS (const wxString &aName)
 Create a NETCLASS instance with aName. More...
 
 ~NETCLASS ()
 
wxString GetClass () const
 
const wxString GetName () const
 
void SetName (const wxString &aName)
 
const wxString & GetDescription () const
 
void SetDescription (const wxString &aDesc)
 
bool HasClearance () const
 
int GetClearance () const
 
void SetClearance (int aClearance)
 
bool HasTrackWidth () const
 
int GetTrackWidth () const
 
void SetTrackWidth (int aWidth)
 
bool HasViaDiameter () const
 
int GetViaDiameter () const
 
void SetViaDiameter (int aDia)
 
int HasViaDrill () const
 
int GetViaDrill () const
 
void SetViaDrill (int aSize)
 
bool HasuViaDiameter () const
 
int GetuViaDiameter () const
 
void SetuViaDiameter (int aSize)
 
bool HasuViaDrill () const
 
int GetuViaDrill () const
 
void SetuViaDrill (int aSize)
 
bool HasDiffPairWidth () const
 
int GetDiffPairWidth () const
 
void SetDiffPairWidth (int aSize)
 
bool HasDiffPairGap () const
 
int GetDiffPairGap () const
 
void SetDiffPairGap (int aSize)
 
bool HasDiffPairViaGap () const
 
int GetDiffPairViaGap () const
 
void SetDiffPairViaGap (int aSize)
 
COLOR4D GetPcbColor () const
 
void SetPcbColor (const COLOR4D &aColor)
 
int GetWireWidth () const
 
void SetWireWidth (int aWidth)
 
int GetBusWidth () const
 
void SetBusWidth (int aWidth)
 
COLOR4D GetSchematicColor () const
 
void SetSchematicColor (COLOR4D aColor)
 
int GetLineStyle () const
 
void SetLineStyle (int aStyle)
 

Static Public Attributes

static const char Default [] = "Default"
 the name of the default NETCLASS More...
 

Protected Attributes

wxString m_Name
 Name of the net class. More...
 
wxString m_Description
 what this NETCLASS is for. More...
 
std::optional< int > m_Clearance
 The units on these parameters is Internal Units (1 nm) More...
 
std::optional< int > m_TrackWidth
 track width used to route NETs in this NETCLASS More...
 
std::optional< int > m_ViaDia
 via diameter More...
 
std::optional< int > m_ViaDrill
 via drill hole diameter More...
 
std::optional< int > m_uViaDia
 microvia diameter More...
 
std::optional< int > m_uViaDrill
 microvia drill hole diameter More...
 
std::optional< int > m_diffPairWidth
 
std::optional< int > m_diffPairGap
 
std::optional< int > m_diffPairViaGap
 
int m_wireWidth
 
int m_busWidth
 
COLOR4D m_schematicColor
 
int m_lineStyle
 
COLOR4D m_PcbColor
 Optional color override for this netclass (PCB context) More...
 

Detailed Description

A collection of nets and the parameters used to route or test these nets.

Definition at line 46 of file netclass.h.

Constructor & Destructor Documentation

◆ NETCLASS()

NETCLASS::NETCLASS ( const wxString &  aName)

Create a NETCLASS instance with aName.

Parameters
aNameis the name of this new netclass.

Definition at line 50 of file netclass.cpp.

50 :
51 m_Name( aName ),
53{
54 // Default settings
58 // These defaults will be overwritten by SetParams,
59 // from the board design parameters, later
66
69 SetSchematicColor( COLOR4D::UNSPECIFIED );
71}
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition: color4d.h:390
void SetViaDiameter(int aDia)
Definition: netclass.h:81
void SetViaDrill(int aSize)
Definition: netclass.h:85
void SetuViaDiameter(int aSize)
Definition: netclass.h:89
void SetDiffPairWidth(int aSize)
Definition: netclass.h:97
void SetLineStyle(int aStyle)
Definition: netclass.h:120
COLOR4D m_PcbColor
Optional color override for this netclass (PCB context)
Definition: netclass.h:146
void SetSchematicColor(COLOR4D aColor)
Definition: netclass.h:117
void SetDiffPairViaGap(int aSize)
Definition: netclass.h:105
void SetuViaDrill(int aSize)
Definition: netclass.h:93
void SetDiffPairGap(int aSize)
Definition: netclass.h:101
void SetClearance(int aClearance)
Definition: netclass.h:73
void SetBusWidth(int aWidth)
Definition: netclass.h:114
void SetWireWidth(int aWidth)
Definition: netclass.h:111
void SetTrackWidth(int aWidth)
Definition: netclass.h:77
wxString m_Name
Name of the net class.
Definition: netclass.h:123
const int DEFAULT_UVIA_DIAMETER
Definition: netclass.cpp:37
const int DEFAULT_DIFF_PAIR_WIDTH
Definition: netclass.cpp:40
const int DEFAULT_DIFF_PAIR_GAP
Definition: netclass.cpp:41
const int DEFAULT_DIFF_PAIR_VIAGAP
Definition: netclass.cpp:42
const int DEFAULT_LINE_STYLE
Definition: netclass.cpp:47
const int DEFAULT_CLEARANCE
Definition: netclass.cpp:34
const int DEFAULT_UVIA_DRILL
Definition: netclass.cpp:38
const int DEFAULT_TRACK_WIDTH
Definition: netclass.cpp:39
const int DEFAULT_WIRE_WIDTH
Definition: netclass.cpp:44
const int DEFAULT_VIA_DRILL
Definition: netclass.cpp:36
const int DEFAULT_VIA_DIAMETER
Definition: netclass.cpp:35
const int DEFAULT_BUS_WIDTH
Definition: netclass.cpp:45

References DEFAULT_BUS_WIDTH, DEFAULT_CLEARANCE, DEFAULT_DIFF_PAIR_GAP, DEFAULT_DIFF_PAIR_VIAGAP, DEFAULT_DIFF_PAIR_WIDTH, DEFAULT_LINE_STYLE, DEFAULT_TRACK_WIDTH, DEFAULT_UVIA_DIAMETER, DEFAULT_UVIA_DRILL, DEFAULT_VIA_DIAMETER, DEFAULT_VIA_DRILL, DEFAULT_WIRE_WIDTH, SetBusWidth(), SetClearance(), SetDiffPairGap(), SetDiffPairViaGap(), SetDiffPairWidth(), SetLineStyle(), SetSchematicColor(), SetTrackWidth(), SetuViaDiameter(), SetuViaDrill(), SetViaDiameter(), SetViaDrill(), SetWireWidth(), and UNSPECIFIED.

◆ ~NETCLASS()

NETCLASS::~NETCLASS ( )

Definition at line 74 of file netclass.cpp.

75{
76}

Member Function Documentation

◆ GetBusWidth()

int NETCLASS::GetBusWidth ( ) const
inline

Definition at line 113 of file netclass.h.

113{ return m_busWidth; }
int m_busWidth
Definition: netclass.h:142

◆ GetClass()

wxString NETCLASS::GetClass ( ) const
inline

Definition at line 60 of file netclass.h.

61 {
62 return wxT( "NETCLASS" );
63 }

◆ GetClearance()

int NETCLASS::GetClearance ( ) const
inline

Definition at line 72 of file netclass.h.

72{ return m_Clearance.value_or(-1); }
std::optional< int > m_Clearance
The units on these parameters is Internal Units (1 nm)
Definition: netclass.h:128

◆ GetDescription()

const wxString & NETCLASS::GetDescription ( ) const
inline

Definition at line 68 of file netclass.h.

68{ return m_Description; }
wxString m_Description
what this NETCLASS is for.
Definition: netclass.h:124

◆ GetDiffPairGap()

int NETCLASS::GetDiffPairGap ( ) const
inline

Definition at line 100 of file netclass.h.

100{ return m_diffPairGap.value_or( -1 ); }
std::optional< int > m_diffPairGap
Definition: netclass.h:138

◆ GetDiffPairViaGap()

int NETCLASS::GetDiffPairViaGap ( ) const
inline

Definition at line 104 of file netclass.h.

104{ return m_diffPairViaGap.value_or( -1 ); }
std::optional< int > m_diffPairViaGap
Definition: netclass.h:139

◆ GetDiffPairWidth()

int NETCLASS::GetDiffPairWidth ( ) const
inline

Definition at line 96 of file netclass.h.

96{ return m_diffPairWidth.value_or( -1 ); }
std::optional< int > m_diffPairWidth
Definition: netclass.h:137

◆ GetLineStyle()

int NETCLASS::GetLineStyle ( ) const
inline

Definition at line 119 of file netclass.h.

119{ return m_lineStyle; }
int m_lineStyle
Definition: netclass.h:144

◆ GetName()

◆ GetPcbColor()

COLOR4D NETCLASS::GetPcbColor ( ) const
inline

Definition at line 107 of file netclass.h.

107{ return m_PcbColor; }

◆ GetSchematicColor()

COLOR4D NETCLASS::GetSchematicColor ( ) const
inline

Definition at line 116 of file netclass.h.

116{ return m_schematicColor; }
COLOR4D m_schematicColor
Definition: netclass.h:143

◆ GetTrackWidth()

int NETCLASS::GetTrackWidth ( ) const
inline

Definition at line 76 of file netclass.h.

76{ return m_TrackWidth.value_or( -1 ); }
std::optional< int > m_TrackWidth
track width used to route NETs in this NETCLASS
Definition: netclass.h:130

Referenced by EAGLE_PLUGIN::Load(), PCB_EDIT_FRAME::SetTrackSegmentWidth(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().

◆ GetuViaDiameter()

int NETCLASS::GetuViaDiameter ( ) const
inline

Definition at line 88 of file netclass.h.

88{ return m_uViaDia.value_or( -1 ); }
std::optional< int > m_uViaDia
microvia diameter
Definition: netclass.h:134

Referenced by EDIT_TOOL::ChangeTrackWidth(), DRAWING_TOOL::DrawVia(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().

◆ GetuViaDrill()

int NETCLASS::GetuViaDrill ( ) const
inline

Definition at line 92 of file netclass.h.

92{ return m_uViaDrill.value_or( -1 ); }
std::optional< int > m_uViaDrill
microvia drill hole diameter
Definition: netclass.h:135

Referenced by EDIT_TOOL::ChangeTrackWidth(), DRAWING_TOOL::DrawVia(), PCB_VIA::GetDrillValue(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().

◆ GetViaDiameter()

int NETCLASS::GetViaDiameter ( ) const
inline

Definition at line 80 of file netclass.h.

80{ return m_ViaDia.value_or( -1 ); }
std::optional< int > m_ViaDia
via diameter
Definition: netclass.h:131

Referenced by EAGLE_PLUGIN::Load(), PCB_EDIT_FRAME::SetTrackSegmentWidth(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().

◆ GetViaDrill()

int NETCLASS::GetViaDrill ( ) const
inline

Definition at line 84 of file netclass.h.

84{ return m_ViaDrill.value_or( -1 ); }
std::optional< int > m_ViaDrill
via drill hole diameter
Definition: netclass.h:132

Referenced by PCB_VIA::GetDrillValue(), EAGLE_PLUGIN::Load(), PCB_EDIT_FRAME::SetTrackSegmentWidth(), and DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow().

◆ GetWireWidth()

int NETCLASS::GetWireWidth ( ) const
inline

Definition at line 110 of file netclass.h.

110{ return m_wireWidth; }
int m_wireWidth
Definition: netclass.h:141

◆ HasClearance()

bool NETCLASS::HasClearance ( ) const
inline

Definition at line 71 of file netclass.h.

71{ return (bool) m_Clearance; }

◆ HasDiffPairGap()

bool NETCLASS::HasDiffPairGap ( ) const
inline

Definition at line 99 of file netclass.h.

99{ return (bool) m_diffPairGap; }

◆ HasDiffPairViaGap()

bool NETCLASS::HasDiffPairViaGap ( ) const
inline

Definition at line 103 of file netclass.h.

103{ return (bool) m_diffPairViaGap; }

◆ HasDiffPairWidth()

bool NETCLASS::HasDiffPairWidth ( ) const
inline

Definition at line 95 of file netclass.h.

95{ return (bool) m_diffPairWidth; }

◆ HasTrackWidth()

bool NETCLASS::HasTrackWidth ( ) const
inline

Definition at line 75 of file netclass.h.

75{ return (bool) m_TrackWidth; }

◆ HasuViaDiameter()

bool NETCLASS::HasuViaDiameter ( ) const
inline

Definition at line 87 of file netclass.h.

87{ return (bool) m_uViaDia; }

◆ HasuViaDrill()

bool NETCLASS::HasuViaDrill ( ) const
inline

Definition at line 91 of file netclass.h.

91{ return (bool) m_uViaDrill; }

◆ HasViaDiameter()

bool NETCLASS::HasViaDiameter ( ) const
inline

Definition at line 79 of file netclass.h.

79{ return (bool) m_ViaDia; }

◆ HasViaDrill()

int NETCLASS::HasViaDrill ( ) const
inline

Definition at line 83 of file netclass.h.

83{ return (bool) m_ViaDrill; }

◆ SetBusWidth()

void NETCLASS::SetBusWidth ( int  aWidth)
inline

Definition at line 114 of file netclass.h.

114{ m_busWidth = aWidth; }

Referenced by NETCLASS().

◆ SetClearance()

void NETCLASS::SetClearance ( int  aClearance)
inline

Definition at line 73 of file netclass.h.

73{ m_Clearance = aClearance; }

Referenced by NETCLASS().

◆ SetDescription()

void NETCLASS::SetDescription ( const wxString &  aDesc)
inline

Definition at line 69 of file netclass.h.

69{ m_Description = aDesc; }

◆ SetDiffPairGap()

void NETCLASS::SetDiffPairGap ( int  aSize)
inline

Definition at line 101 of file netclass.h.

101{ m_diffPairGap = aSize; }

Referenced by NETCLASS().

◆ SetDiffPairViaGap()

void NETCLASS::SetDiffPairViaGap ( int  aSize)
inline

Definition at line 105 of file netclass.h.

105{ m_diffPairViaGap = aSize; }

Referenced by NETCLASS().

◆ SetDiffPairWidth()

void NETCLASS::SetDiffPairWidth ( int  aSize)
inline

Definition at line 97 of file netclass.h.

97{ m_diffPairWidth = aSize; }

Referenced by NETCLASS().

◆ SetLineStyle()

void NETCLASS::SetLineStyle ( int  aStyle)
inline

Definition at line 120 of file netclass.h.

120{ m_lineStyle = aStyle; }

Referenced by NETCLASS().

◆ SetName()

void NETCLASS::SetName ( const wxString &  aName)
inline

Definition at line 66 of file netclass.h.

66{ m_Name = aName; }

◆ SetPcbColor()

void NETCLASS::SetPcbColor ( const COLOR4D aColor)
inline

Definition at line 108 of file netclass.h.

108{ m_PcbColor = aColor; }

◆ SetSchematicColor()

void NETCLASS::SetSchematicColor ( COLOR4D  aColor)
inline

Definition at line 117 of file netclass.h.

117{ m_schematicColor = aColor; }

Referenced by NETCLASS().

◆ SetTrackWidth()

void NETCLASS::SetTrackWidth ( int  aWidth)
inline

Definition at line 77 of file netclass.h.

77{ m_TrackWidth = aWidth; }

Referenced by NETCLASS().

◆ SetuViaDiameter()

void NETCLASS::SetuViaDiameter ( int  aSize)
inline

Definition at line 89 of file netclass.h.

89{ m_uViaDia = aSize; }

Referenced by NETCLASS().

◆ SetuViaDrill()

void NETCLASS::SetuViaDrill ( int  aSize)
inline

Definition at line 93 of file netclass.h.

93{ m_uViaDrill = aSize; }

Referenced by NETCLASS().

◆ SetViaDiameter()

void NETCLASS::SetViaDiameter ( int  aDia)
inline

Definition at line 81 of file netclass.h.

81{ m_ViaDia = aDia; }

Referenced by NETCLASS().

◆ SetViaDrill()

void NETCLASS::SetViaDrill ( int  aSize)
inline

Definition at line 85 of file netclass.h.

85{ m_ViaDrill = aSize; }

Referenced by NETCLASS().

◆ SetWireWidth()

void NETCLASS::SetWireWidth ( int  aWidth)
inline

Definition at line 111 of file netclass.h.

111{ m_wireWidth = aWidth; }

Referenced by NETCLASS().

Member Data Documentation

◆ Default

◆ m_busWidth

int NETCLASS::m_busWidth
protected

Definition at line 142 of file netclass.h.

◆ m_Clearance

std::optional<int> NETCLASS::m_Clearance
protected

The units on these parameters is Internal Units (1 nm)

clearance when routing

Definition at line 128 of file netclass.h.

◆ m_Description

wxString NETCLASS::m_Description
protected

what this NETCLASS is for.

Definition at line 124 of file netclass.h.

◆ m_diffPairGap

std::optional<int> NETCLASS::m_diffPairGap
protected

Definition at line 138 of file netclass.h.

◆ m_diffPairViaGap

std::optional<int> NETCLASS::m_diffPairViaGap
protected

Definition at line 139 of file netclass.h.

◆ m_diffPairWidth

std::optional<int> NETCLASS::m_diffPairWidth
protected

Definition at line 137 of file netclass.h.

◆ m_lineStyle

int NETCLASS::m_lineStyle
protected

Definition at line 144 of file netclass.h.

◆ m_Name

wxString NETCLASS::m_Name
protected

Name of the net class.

Definition at line 123 of file netclass.h.

◆ m_PcbColor

COLOR4D NETCLASS::m_PcbColor
protected

Optional color override for this netclass (PCB context)

Definition at line 146 of file netclass.h.

◆ m_schematicColor

COLOR4D NETCLASS::m_schematicColor
protected

Definition at line 143 of file netclass.h.

◆ m_TrackWidth

std::optional<int> NETCLASS::m_TrackWidth
protected

track width used to route NETs in this NETCLASS

Definition at line 130 of file netclass.h.

◆ m_uViaDia

std::optional<int> NETCLASS::m_uViaDia
protected

microvia diameter

Definition at line 134 of file netclass.h.

◆ m_uViaDrill

std::optional<int> NETCLASS::m_uViaDrill
protected

microvia drill hole diameter

Definition at line 135 of file netclass.h.

◆ m_ViaDia

std::optional<int> NETCLASS::m_ViaDia
protected

via diameter

Definition at line 131 of file netclass.h.

◆ m_ViaDrill

std::optional<int> NETCLASS::m_ViaDrill
protected

via drill hole diameter

Definition at line 132 of file netclass.h.

◆ m_wireWidth

int NETCLASS::m_wireWidth
protected

Definition at line 141 of file netclass.h.


The documentation for this class was generated from the following files: