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

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.

References m_hasEntryLines.

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
PNS::DP_GATEWAY::~DP_GATEWAY ( )
inline

Definition at line 63 of file pns_diff_pair.h.

64  {
65  }

Member Function Documentation

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.

References m_allowedEntryAngles.

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

87 { return m_allowedEntryAngles; }
const VECTOR2I& PNS::DP_GATEWAY::AnchorN ( ) const
inline

Definition at line 79 of file pns_diff_pair.h.

References m_anchorN.

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

79 { return m_anchorN; }
VECTOR2I m_anchorN
const VECTOR2I& PNS::DP_GATEWAY::AnchorP ( ) const
inline

Definition at line 77 of file pns_diff_pair.h.

References m_anchorP.

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

77 { return m_anchorP; }
VECTOR2I m_anchorP
const DIFF_PAIR PNS::DP_GATEWAY::Entry ( ) const

Definition at line 303 of file pns_diff_pair.cpp.

References m_entryN, and m_entryP.

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

304 {
305  return DIFF_PAIR( m_entryP, m_entryN, 0 );
306 }
SHAPE_LINE_CHAIN m_entryN
SHAPE_LINE_CHAIN m_entryP
const SHAPE_LINE_CHAIN& PNS::DP_GATEWAY::EntryN ( ) const
inline

Definition at line 112 of file pns_diff_pair.h.

References m_entryN.

112 { return m_entryN; }
SHAPE_LINE_CHAIN m_entryN
const SHAPE_LINE_CHAIN& PNS::DP_GATEWAY::EntryP ( ) const
inline

Definition at line 111 of file pns_diff_pair.h.

References m_entryP.

111 { return m_entryP; }
SHAPE_LINE_CHAIN m_entryP
bool PNS::DP_GATEWAY::HasEntryLines ( ) const
inline

Definition at line 117 of file pns_diff_pair.h.

References m_hasEntryLines.

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

118  {
119  return m_hasEntryLines;
120  }
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.

References m_isDiagonal.

73  {
74  return m_isDiagonal;
75  }
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.

References m_priority.

95  {
96  return m_priority;
97  }
void PNS::DP_GATEWAY::Reverse ( )

Definition at line 208 of file pns_diff_pair.cpp.

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

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

209 {
212 }
const SHAPE_LINE_CHAIN Reverse() const
Function Reverse()
SHAPE_LINE_CHAIN m_entryN
SHAPE_LINE_CHAIN m_entryP
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.

References m_entryN, m_entryP, and m_hasEntryLines.

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

105  {
106  m_entryP = aEntryP;
107  m_entryN = aEntryN;
108  m_hasEntryLines = true;
109  }
SHAPE_LINE_CHAIN m_entryN
SHAPE_LINE_CHAIN m_entryP
void PNS::DP_GATEWAY::SetPriority ( int  aPriority)
inline

Definition at line 99 of file pns_diff_pair.h.

References m_priority.

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

100  {
101  m_priority = aPriority;
102  }

Member Data Documentation

int PNS::DP_GATEWAY::m_allowedEntryAngles
private

Definition at line 127 of file pns_diff_pair.h.

Referenced by AllowedAngles().

VECTOR2I PNS::DP_GATEWAY::m_anchorN
private

Definition at line 125 of file pns_diff_pair.h.

Referenced by AnchorN().

VECTOR2I PNS::DP_GATEWAY::m_anchorP
private

Definition at line 125 of file pns_diff_pair.h.

Referenced by AnchorP().

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().

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().

bool PNS::DP_GATEWAY::m_hasEntryLines
private

Definition at line 124 of file pns_diff_pair.h.

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

bool PNS::DP_GATEWAY::m_isDiagonal
private

Definition at line 126 of file pns_diff_pair.h.

Referenced by IsDiagonal().

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: