KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PNS::DP_GATEWAY Class Reference

Define a "gateway" for routing a differential pair - e.g. 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
 
const VECTOR2IAnchorP () const
 
const VECTOR2IAnchorN () const
 
int AllowedAngles () const
 
int Priority () const
 
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

Define 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 differential pair.

Definition at line 43 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 46 of file pns_diff_pair.h.

References m_hasEntryLines.

◆ ~DP_GATEWAY()

PNS::DP_GATEWAY::~DP_GATEWAY ( )
inline

Definition at line 55 of file pns_diff_pair.h.

Member Function Documentation

◆ AllowedAngles()

int PNS::DP_GATEWAY::AllowedAngles ( ) const
inline
Returns
a mask of 45-degree entry directions allowed for the gateway.

Definition at line 74 of file pns_diff_pair.h.

References m_allowedEntryAngles.

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

◆ AnchorN()

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

Definition at line 69 of file pns_diff_pair.h.

References m_anchorN.

Referenced by PNS::DIFF_PAIR::BuildInitial(), and PNS::DP_GATEWAYS::FilterByOrientation().

◆ AnchorP()

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

Definition at line 67 of file pns_diff_pair.h.

References m_anchorP.

Referenced by PNS::DIFF_PAIR::BuildInitial(), and PNS::DP_GATEWAYS::FilterByOrientation().

◆ Entry()

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

Definition at line 301 of file pns_diff_pair.cpp.

References DIFF_PAIR, 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 97 of file pns_diff_pair.h.

References m_entryN.

◆ EntryP()

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

Definition at line 96 of file pns_diff_pair.h.

References m_entryP.

◆ HasEntryLines()

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

Definition at line 102 of file pns_diff_pair.h.

References m_hasEntryLines.

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

◆ IsDiagonal()

bool PNS::DP_GATEWAY::IsDiagonal ( ) const
inline
Returns
true if the gateway anchors lie on a diagonal line.

Definition at line 62 of file pns_diff_pair.h.

References m_isDiagonal.

◆ Priority()

int PNS::DP_GATEWAY::Priority ( ) const
inline
Returns
priority/score value for gateway matching.

Definition at line 79 of file pns_diff_pair.h.

References m_priority.

◆ Reverse()

void PNS::DP_GATEWAY::Reverse ( )

Definition at line 199 of file pns_diff_pair.cpp.

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 89 of file pns_diff_pair.h.

References m_entryN, m_entryP, and m_hasEntryLines.

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

◆ SetPriority()

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

Definition at line 84 of file pns_diff_pair.h.

References m_priority.

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

Member Data Documentation

◆ m_allowedEntryAngles

int PNS::DP_GATEWAY::m_allowedEntryAngles
private

Definition at line 112 of file pns_diff_pair.h.

Referenced by AllowedAngles().

◆ m_anchorN

VECTOR2I PNS::DP_GATEWAY::m_anchorN
private

Definition at line 110 of file pns_diff_pair.h.

Referenced by AnchorN().

◆ m_anchorP

VECTOR2I PNS::DP_GATEWAY::m_anchorP
private

Definition at line 110 of file pns_diff_pair.h.

Referenced by AnchorP().

◆ m_entryN

SHAPE_LINE_CHAIN PNS::DP_GATEWAY::m_entryN
private

Definition at line 108 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 108 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 109 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 111 of file pns_diff_pair.h.

Referenced by IsDiagonal().

◆ m_priority

int PNS::DP_GATEWAY::m_priority
private

Definition at line 113 of file pns_diff_pair.h.

Referenced by Priority(), and SetPriority().


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