KiCad PCB EDA Suite
PNS::DP_GATEWAY Class Reference

Class DP_GATEWAY. More...

#include <pns_diff_pair.h>

Public Member Functions

 DP_GATEWAY (const VECTOR2I &aAnchorP, const VECTOR2I &aAnchorN, bool aIsDiagonal, int aAllowedEntryAngles=DIRECTION_45::ANG_OBTUSE, int aPriority=0)
 
 ~DP_GATEWAY ()
 
bool IsDiagonal () const
 Function IsDiagonal() More...
 
const VECTOR2IAnchorP () const
 
const VECTOR2IAnchorN () const
 
int AllowedAngles () const
 Function AllowedAngles() More...
 
int Priority () const
 Function Priority() More...
 
void SetPriority (int aPriority)
 
void SetEntryLines (const SHAPE_LINE_CHAIN &aEntryP, const SHAPE_LINE_CHAIN &aEntryN)
 
const SHAPE_LINE_CHAINEntryP () const
 
const SHAPE_LINE_CHAINEntryN () const
 
const DIFF_PAIR Entry () const
 
void Reverse ()
 
bool HasEntryLines () const
 

Private Attributes

SHAPE_LINE_CHAIN m_entryP
 
SHAPE_LINE_CHAIN m_entryN
 
bool m_hasEntryLines
 
VECTOR2I m_anchorP
 
VECTOR2I m_anchorN
 
bool m_isDiagonal
 
int m_allowedEntryAngles
 
int m_priority
 

Detailed Description

Class DP_GATEWAY.

Defines a "gateway" for routing a differential pair - e.g. a pair of points (anchors) with certain orientation, spacing and (optionally) predefined entry paths. The routing algorithm connects such gateways with parallel lines, thus creating a difrerential pair.

Definition at line 47 of file pns_diff_pair.h.

Constructor & Destructor Documentation

◆ DP_GATEWAY()

PNS::DP_GATEWAY::DP_GATEWAY ( const VECTOR2I aAnchorP,
const VECTOR2I aAnchorN,
bool  aIsDiagonal,
int  aAllowedEntryAngles = DIRECTION_45::ANG_OBTUSE,
int  aPriority = 0 
)
inline

Definition at line 49 of file pns_diff_pair.h.

54  : m_anchorP( aAnchorP ),
55  m_anchorN( aAnchorN ),
56  m_isDiagonal( aIsDiagonal ),
57  m_allowedEntryAngles( aAllowedEntryAngles ),
58  m_priority( aPriority )
59  {
60  m_hasEntryLines = false;
61  }
VECTOR2I m_anchorN
VECTOR2I m_anchorP

References m_hasEntryLines.

◆ ~DP_GATEWAY()

PNS::DP_GATEWAY::~DP_GATEWAY ( )
inline

Definition at line 63 of file pns_diff_pair.h.

64  {
65  }

Member Function Documentation

◆ AllowedAngles()

int PNS::DP_GATEWAY::AllowedAngles ( ) const
inline

Function AllowedAngles()

Returns
a mask of 45-degree entry directoins allowed for the gateway.

Definition at line 87 of file pns_diff_pair.h.

87 { return m_allowedEntryAngles; }

References m_allowedEntryAngles.

Referenced by PNS::DIFF_PAIR::BuildInitial().

◆ AnchorN()

const VECTOR2I& PNS::DP_GATEWAY::AnchorN ( ) const
inline

Definition at line 79 of file pns_diff_pair.h.

79 { return m_anchorN; }
VECTOR2I m_anchorN

References m_anchorN.

Referenced by PNS::DIFF_PAIR::BuildInitial().

◆ AnchorP()

const VECTOR2I& PNS::DP_GATEWAY::AnchorP ( ) const
inline

Definition at line 77 of file pns_diff_pair.h.

77 { return m_anchorP; }
VECTOR2I m_anchorP

References m_anchorP.

Referenced by PNS::DIFF_PAIR::BuildInitial().

◆ Entry()

const DIFF_PAIR PNS::DP_GATEWAY::Entry ( ) const

Definition at line 303 of file pns_diff_pair.cpp.

304 {
305  return DIFF_PAIR( m_entryP, m_entryN, 0 );
306 }
SHAPE_LINE_CHAIN m_entryN
SHAPE_LINE_CHAIN m_entryP

References m_entryN, and m_entryP.

Referenced by PNS::DIFF_PAIR::BuildInitial().

◆ EntryN()

const SHAPE_LINE_CHAIN& PNS::DP_GATEWAY::EntryN ( ) const
inline

Definition at line 112 of file pns_diff_pair.h.

112 { return m_entryN; }
SHAPE_LINE_CHAIN m_entryN

References m_entryN.

◆ EntryP()

const SHAPE_LINE_CHAIN& PNS::DP_GATEWAY::EntryP ( ) const
inline

Definition at line 111 of file pns_diff_pair.h.

111 { return m_entryP; }
SHAPE_LINE_CHAIN m_entryP

References m_entryP.

◆ HasEntryLines()

bool PNS::DP_GATEWAY::HasEntryLines ( ) const
inline

Definition at line 117 of file pns_diff_pair.h.

118  {
119  return m_hasEntryLines;
120  }

References m_hasEntryLines.

Referenced by PNS::DIFF_PAIR::BuildInitial().

◆ IsDiagonal()

bool PNS::DP_GATEWAY::IsDiagonal ( ) const
inline

Function IsDiagonal()

Returns
true, if the gateway anchors lie on a diagonal line

Definition at line 72 of file pns_diff_pair.h.

73  {
74  return m_isDiagonal;
75  }

References m_isDiagonal.

◆ Priority()

int PNS::DP_GATEWAY::Priority ( ) const
inline

Function Priority()

Returns
priority/score value for gateway matching

Definition at line 94 of file pns_diff_pair.h.

95  {
96  return m_priority;
97  }

References m_priority.

◆ Reverse()

void PNS::DP_GATEWAY::Reverse ( )

Definition at line 208 of file pns_diff_pair.cpp.

209 {
212 }
SHAPE_LINE_CHAIN m_entryN
const SHAPE_LINE_CHAIN Reverse() const
Function Reverse()
SHAPE_LINE_CHAIN m_entryP

References m_entryN, m_entryP, and SHAPE_LINE_CHAIN::Reverse().

Referenced by PNS::DIFF_PAIR::BuildInitial().

◆ SetEntryLines()

void PNS::DP_GATEWAY::SetEntryLines ( const SHAPE_LINE_CHAIN aEntryP,
const SHAPE_LINE_CHAIN aEntryN 
)
inline

Definition at line 104 of file pns_diff_pair.h.

105  {
106  m_entryP = aEntryP;
107  m_entryN = aEntryN;
108  m_hasEntryLines = true;
109  }
SHAPE_LINE_CHAIN m_entryN
SHAPE_LINE_CHAIN m_entryP

References m_entryN, m_entryP, and m_hasEntryLines.

Referenced by PNS::DP_GATEWAYS::BuildFromPrimitivePair().

◆ SetPriority()

void PNS::DP_GATEWAY::SetPriority ( int  aPriority)
inline

Definition at line 99 of file pns_diff_pair.h.

100  {
101  m_priority = aPriority;
102  }

References m_priority.

Referenced by PNS::DP_GATEWAYS::buildDpContinuation(), and PNS::DP_GATEWAYS::BuildFromPrimitivePair().

Member Data Documentation

◆ m_allowedEntryAngles

int PNS::DP_GATEWAY::m_allowedEntryAngles
private

Definition at line 127 of file pns_diff_pair.h.

Referenced by AllowedAngles().

◆ m_anchorN

VECTOR2I PNS::DP_GATEWAY::m_anchorN
private

Definition at line 125 of file pns_diff_pair.h.

Referenced by AnchorN().

◆ m_anchorP

VECTOR2I PNS::DP_GATEWAY::m_anchorP
private

Definition at line 125 of file pns_diff_pair.h.

Referenced by AnchorP().

◆ m_entryN

SHAPE_LINE_CHAIN PNS::DP_GATEWAY::m_entryN
private

Definition at line 123 of file pns_diff_pair.h.

Referenced by Entry(), EntryN(), Reverse(), and SetEntryLines().

◆ m_entryP

SHAPE_LINE_CHAIN PNS::DP_GATEWAY::m_entryP
private

Definition at line 123 of file pns_diff_pair.h.

Referenced by Entry(), EntryP(), Reverse(), and SetEntryLines().

◆ m_hasEntryLines

bool PNS::DP_GATEWAY::m_hasEntryLines
private

Definition at line 124 of file pns_diff_pair.h.

Referenced by DP_GATEWAY(), HasEntryLines(), and SetEntryLines().

◆ m_isDiagonal

bool PNS::DP_GATEWAY::m_isDiagonal
private

Definition at line 126 of file pns_diff_pair.h.

Referenced by IsDiagonal().

◆ m_priority

int PNS::DP_GATEWAY::m_priority
private

Definition at line 128 of file pns_diff_pair.h.

Referenced by Priority(), and SetPriority().


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