KiCad PCB EDA Suite
Loading...
Searching...
No Matches
time_domain_parameters_iface.h
Go to the documentation of this file.
1/*
2* This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#ifndef PCBNEW_TIME_DOMAIN_PARAMETERS_INTERFACE_H
25#define PCBNEW_TIME_DOMAIN_PARAMETERS_INTERFACE_H
26
28#include <netclass.h>
29
31
36{
39
42
44 int64_t Width;
45
47 bool IsDiffPairCoupled{ false };
48
50 int64_t DiffPairCouplingGap{ 0 };
51};
52
53
60{
61public:
62 explicit TIME_DOMAIN_PARAMETERS_IFACE( BOARD* aBoard, LENGTH_DELAY_CALCULATION* aCalculation ) :
63 m_board{ aBoard }, m_lengthCalculation{ aCalculation }
64 {
65 }
66
67 virtual ~TIME_DOMAIN_PARAMETERS_IFACE() = default;
68
73 virtual void OnStackupChanged() {};
74
79 virtual void OnSettingsChanged() {};
80
87 virtual std::vector<int64_t> GetPropagationDelays( const std::vector<LENGTH_DELAY_CALCULATION_ITEM>& aItems,
88 const TIME_DOMAIN_GEOMETRY_CONTEXT& aContext ) = 0;
89
97 const TIME_DOMAIN_GEOMETRY_CONTEXT& aContext ) = 0;
98
106 virtual int64_t GetTrackLengthForPropagationDelay( int64_t aDelay,
107 const TIME_DOMAIN_GEOMETRY_CONTEXT& aContext ) = 0;
108
116 const TIME_DOMAIN_GEOMETRY_CONTEXT& aContext ) = 0;
117
118protected:
121
124};
125
126#endif //PCBNEW_TIME_DOMAIN_PARAMETERS_INTERFACE_H
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:317
Lightweight class which holds a pad, via, or a routed trace outline.
Class which calculates lengths (and associated routing statistics) in a BOARD context.
A collection of nets and the parameters used to route or test these nets.
Definition: netclass.h:45
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Interface for providers of time domain parameter information.
BOARD * m_board
The board all calculations are for.
TIME_DOMAIN_PARAMETERS_IFACE(BOARD *aBoard, LENGTH_DELAY_CALCULATION *aCalculation)
LENGTH_DELAY_CALCULATION * m_lengthCalculation
The parent length / delay calculation object.
virtual int64_t CalculatePropagationDelayForShapeLineChain(const SHAPE_LINE_CHAIN &aShape, const TIME_DOMAIN_GEOMETRY_CONTEXT &aContext)=0
Gets the propagation delay for the given shape line chain.
virtual int64_t GetTrackLengthForPropagationDelay(int64_t aDelay, const TIME_DOMAIN_GEOMETRY_CONTEXT &aContext)=0
Gets the track length (in internal distance units) required for the given propagation delay (in inter...
virtual ~TIME_DOMAIN_PARAMETERS_IFACE()=default
virtual std::vector< int64_t > GetPropagationDelays(const std::vector< LENGTH_DELAY_CALCULATION_ITEM > &aItems, const TIME_DOMAIN_GEOMETRY_CONTEXT &aContext)=0
Gets the propagation delays (in internal units) for the given items in the given geometry context.
virtual void OnStackupChanged()
Event called by the length and time calculation architecture if the board stackup has changed.
virtual int64_t GetPropagationDelay(const LENGTH_DELAY_CALCULATION_ITEM &aItem, const TIME_DOMAIN_GEOMETRY_CONTEXT &aContext)=0
Gets the propagation delay (in internal units) for the given item in the given geometry context.
virtual void OnSettingsChanged()
Event called by the length and time calculation architecture if netclass definitions have changed.
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
A data structure to contain basic geometry data which can affect signal propagation calculations.
PCB_LAYER_ID Layer
The layer this track is on.
bool IsDiffPairCoupled
Whether this track or via is a member of a coupled differential pair.
int64_t DiffPairCouplingGap
The gap between coupled tracks.
int64_t Width
The width (in internal units) of the track.
const NETCLASS * NetClass
The net class this track belongs to.