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, int aDirectionMask=0, const wxString aName=wxT(""))
 
 DP_GATEWAY ()
 
 ~DP_GATEWAY ()
 
void SetDimensions (const DP_DIMENSIONS &aDims)
 
void SetPrimaryDirection (DIRECTION_45 aPrimDir)
 
void AddPrimaryDirection (DIRECTION_45 aPrimDir)
 
bool HasPrimaryDirection () const
 
int PrimaryDirectionMask () const
 
const DP_DIMENSIONSDimensions () const
 
void SetDirections (DIRECTION_45 dP, DIRECTION_45 dN)
 
bool IsDiagonal () const
 
void SetName (const wxString &aName)
 
const wxString GetName () 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)
 
void SetAnchors (const VECTOR2I &aP, const VECTOR2I &aN)
 
const SHAPE_LINE_CHAINEntryP () const
 
const SHAPE_LINE_CHAINEntryN () const
 
const DIFF_PAIR Entry () const
 
void Reverse ()
 
bool HasEntryLines () const
 
std::optional< DP_GATEWAYExtend (int aLength)
 
std::optional< DP_GATEWAYAddTurns (bool aSide, bool a90Deg, bool aLeft, bool aWiggle)
 
DIRECTION_45 DirP () const
 
DIRECTION_45 DirN () const
 

Private Attributes

DP_DIMENSIONS m_dims
 
DIRECTION_45 m_dirP
 
DIRECTION_45 m_dirN
 
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
 
int m_directionMask
 
wxString m_name
 

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

Constructor & Destructor Documentation

◆ DP_GATEWAY() [1/2]

PNS::DP_GATEWAY::DP_GATEWAY ( const VECTOR2I & aAnchorP,
const VECTOR2I & aAnchorN,
bool aIsDiagonal,
int aAllowedEntryAngles = DIRECTION_45::ANG_OBTUSE,
int aPriority = 0,
int aDirectionMask = 0,
const wxString aName = wxT( "" ) )
inline

◆ DP_GATEWAY() [2/2]

PNS::DP_GATEWAY::DP_GATEWAY ( )
inline

Definition at line 102 of file pns_diff_pair.h.

◆ ~DP_GATEWAY()

PNS::DP_GATEWAY::~DP_GATEWAY ( )
inline

Definition at line 107 of file pns_diff_pair.h.

Member Function Documentation

◆ AddPrimaryDirection()

void PNS::DP_GATEWAY::AddPrimaryDirection ( DIRECTION_45 aPrimDir)
inline

Definition at line 118 of file pns_diff_pair.h.

References m_directionMask, and DIRECTION_45::Mask().

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

◆ AddTurns()

◆ AllowedAngles()

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

Definition at line 151 of file pns_diff_pair.h.

References m_allowedEntryAngles.

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

◆ AnchorN()

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

◆ AnchorP()

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

◆ Dimensions()

const DP_DIMENSIONS & PNS::DP_GATEWAY::Dimensions ( ) const
inline

Definition at line 130 of file pns_diff_pair.h.

References m_dims.

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

◆ DirN()

DIRECTION_45 PNS::DP_GATEWAY::DirN ( ) const
inline

Definition at line 194 of file pns_diff_pair.h.

References m_dirN.

◆ DirP()

DIRECTION_45 PNS::DP_GATEWAY::DirP ( ) const
inline

Definition at line 193 of file pns_diff_pair.h.

References m_dirP.

◆ Entry()

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

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

References m_entryN.

Referenced by AddTurns(), and PNS::drawSingleGateway().

◆ EntryP()

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

Definition at line 179 of file pns_diff_pair.h.

References m_entryP.

Referenced by AddTurns(), and PNS::drawSingleGateway().

◆ Extend()

◆ GetName()

const wxString PNS::DP_GATEWAY::GetName ( ) const

Definition at line 388 of file pns_diff_pair.cpp.

References m_dirN, m_dirP, m_name, and m_priority.

Referenced by PNS::DIFF_PAIR::BuildInitial(), and PNS::DIFF_PAIR_PLACER::routeHead().

◆ HasEntryLines()

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

Definition at line 185 of file pns_diff_pair.h.

References m_hasEntryLines.

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

◆ HasPrimaryDirection()

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

◆ IsDiagonal()

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

Definition at line 136 of file pns_diff_pair.h.

References m_isDiagonal.

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

◆ PrimaryDirectionMask()

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

◆ Priority()

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

Definition at line 156 of file pns_diff_pair.h.

References m_priority.

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

◆ Reverse()

void PNS::DP_GATEWAY::Reverse ( )

Definition at line 194 of file pns_diff_pair.cpp.

References m_entryN, and m_entryP.

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

◆ SetAnchors()

void PNS::DP_GATEWAY::SetAnchors ( const VECTOR2I & aP,
const VECTOR2I & aN )
inline

Definition at line 173 of file pns_diff_pair.h.

References m_anchorN, and m_anchorP.

Referenced by AddTurns().

◆ SetDimensions()

void PNS::DP_GATEWAY::SetDimensions ( const DP_DIMENSIONS & aDims)
inline

◆ SetDirections()

void PNS::DP_GATEWAY::SetDirections ( DIRECTION_45 dP,
DIRECTION_45 dN )
inline

Definition at line 131 of file pns_diff_pair.h.

References m_dirN, and m_dirP.

Referenced by AddTurns(), PNS::DP_GATEWAYS::buildDpContinuation(), and PNS::DP_GATEWAYS::BuildGeneric().

◆ SetEntryLines()

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

◆ SetName()

void PNS::DP_GATEWAY::SetName ( const wxString & aName)
inline

◆ SetPrimaryDirection()

void PNS::DP_GATEWAY::SetPrimaryDirection ( DIRECTION_45 aPrimDir)
inline

◆ SetPriority()

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

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

Referenced by AllowedAngles(), and DP_GATEWAY().

◆ m_anchorN

VECTOR2I PNS::DP_GATEWAY::m_anchorN
private

Definition at line 201 of file pns_diff_pair.h.

Referenced by AnchorN(), DP_GATEWAY(), Extend(), and SetAnchors().

◆ m_anchorP

VECTOR2I PNS::DP_GATEWAY::m_anchorP
private

Definition at line 201 of file pns_diff_pair.h.

Referenced by AnchorP(), DP_GATEWAY(), Extend(), and SetAnchors().

◆ m_dims

DP_DIMENSIONS PNS::DP_GATEWAY::m_dims
private

Definition at line 197 of file pns_diff_pair.h.

Referenced by AddTurns(), Dimensions(), and SetDimensions().

◆ m_directionMask

int PNS::DP_GATEWAY::m_directionMask
private

◆ m_dirN

DIRECTION_45 PNS::DP_GATEWAY::m_dirN
private

Definition at line 198 of file pns_diff_pair.h.

Referenced by AddTurns(), DirN(), Extend(), GetName(), and SetDirections().

◆ m_dirP

DIRECTION_45 PNS::DP_GATEWAY::m_dirP
private

Definition at line 198 of file pns_diff_pair.h.

Referenced by AddTurns(), DirP(), Extend(), GetName(), and SetDirections().

◆ m_entryN

SHAPE_LINE_CHAIN PNS::DP_GATEWAY::m_entryN
private

Definition at line 199 of file pns_diff_pair.h.

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

◆ m_entryP

SHAPE_LINE_CHAIN PNS::DP_GATEWAY::m_entryP
private

Definition at line 199 of file pns_diff_pair.h.

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

◆ m_hasEntryLines

bool PNS::DP_GATEWAY::m_hasEntryLines
private

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

Referenced by AddTurns(), DP_GATEWAY(), and IsDiagonal().

◆ m_name

wxString PNS::DP_GATEWAY::m_name
private

Definition at line 206 of file pns_diff_pair.h.

Referenced by AddTurns(), DP_GATEWAY(), GetName(), and SetName().

◆ m_priority

int PNS::DP_GATEWAY::m_priority
private

Definition at line 204 of file pns_diff_pair.h.

Referenced by DP_GATEWAY(), GetName(), Priority(), and SetPriority().


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