20#ifndef PANEL_SETUP_TUNING_PROFILE_INFO_H
21#define PANEL_SETUP_TUNING_PROFILE_INFO_H
160 std::pair<CALCULATION_BOARD_PARAMETERS, CALCULATION_RESULT>
166 std::pair<CALCULATION_BOARD_PARAMETERS, CALCULATION_RESULT>
208 const std::vector<int>& dielectricLayerStackupIds,
212 void getDielectricLayers(
const std::vector<BOARD_STACKUP_ITEM*>& aStackupLayerList,
int aSignalLayerId,
213 int aReferenceLayerId, std::vector<int>& aDielectricLayerStackupIds );
256 static constexpr double RHO = 1.72e-8;
PANEL_SETUP_TUNING_PROFILE_INFO_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(719, 506), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void OnAddViaOverride(wxCommandEvent &event) override
Add a via override row.
static constexpr double RHO
Electrical resistivity or specific electrical resistance of copper (ohm*meter)
MICROSTRIP m_microstripCalc
Calculator for single microstrip parameters.
COUPLED_STRIPLINE m_coupledStriplineCalc
Calculator for coupled (differential) stripline parameters.
void initPanel()
Initialise all controls on the panel.
void calculateTrackParametersForCell(int aRow, int aCol)
Calculate the required track parameters for the given track parameters grid row and col.
@ TRACK_GRID_BOTTOM_REFERENCE
@ TRACK_GRID_TOP_REFERENCE
@ TRACK_GRID_SIGNAL_LAYER
CALCULATION_RESULT calculateSingleStripline(const int aRow, CalculationType aCalculationType)
Calculate the track width or delay for the given propagation grid row.
double getTargetImpedance() const
Get the target impedance for the profile.
CALCULATION_RESULT calculateSingleMicrostrip(const int aRow, CalculationType aCalculationType)
Calculate the track width or delay for the given propagation grid row.
STRIPLINE m_striplineCalc
Calculator for single stripline parameters.
static double calculateSkinDepth(double aFreq, double aMurc, double aSigma)
Calculate the effective skin depth for the given parameters.
UNIT_BINDER m_netchainBridgePropagationUnits
Units for global net chain bridge propagation unit delay.
bool ValidateProfile(size_t aPageIndex)
Validate this panel's data.
void UpdateLayerNames()
Update the displayed layer names in all grids.
static int getStackupLayerId(const std::vector< BOARD_STACKUP_ITEM * > &aLayerList, PCB_LAYER_ID aPcbLayerId)
Get the index in to the layer list for the given layer.
UNIT_BINDER m_viaPropagationUnits
Units for global via propagation unit delay.
CALCULATION_RESULT calculateDifferentialMicrostrip(int aRow, CalculationType aCalculationType)
Calculate the track width, pair gap, or delay for the given propagation grid row.
std::pair< CALCULATION_BOARD_PARAMETERS, CALCULATION_RESULT > getMicrostripBoardParameters(int aRow, const EDA_IU_SCALE &aScale)
Get the board parameters for microstrip calculations.
PANEL_SETUP_TUNING_PROFILE_INFO(wxWindow *aParentWindow, PANEL_SETUP_TUNING_PROFILES *parentPanel)
DIELECTRIC_INFO calculateAverageDielectricConstants(const std::vector< BOARD_STACKUP_ITEM * > &aStackupLayerList, const std::vector< int > &dielectricLayerStackupIds, const EDA_IU_SCALE &aIuScale)
Calculate the geometric average of the dielectric material properties.
void LoadProfile(const TUNING_PROFILE &aProfile)
Load the given profile in to the panel.
TUNING_PROFILE GetProfile() const
Save the panel to the given profile.
static DIELECTRIC_INFO getSolderMaskParameters(const std::vector< BOARD_STACKUP_ITEM * > &aStackupLayerList, const EDA_IU_SCALE &aScale, PCB_LAYER_ID aSignalLayerId)
Get the dielectric information for the solder mask covering a given signallayer.
double getFrequency() const
Get the target frequency in Hz.
~PANEL_SETUP_TUNING_PROFILE_INFO() override
PANEL_SETUP_TUNING_PROFILES * m_parentPanel
The parent setup panel.
const wxString & GetLastSyncedName() const
Gets the profile name as of the last rename sync.
void OnChangeProfileType(wxCommandEvent &event) override
Change between Single and Differential profiles.
std::pair< CALCULATION_BOARD_PARAMETERS, CALCULATION_RESULT > getStriplineBoardParameters(int aRow, const EDA_IU_SCALE &aScale)
Get the board parameters for stripline calculations.
void getDielectricLayers(const std::vector< BOARD_STACKUP_ITEM * > &aStackupLayerList, int aSignalLayerId, int aReferenceLayerId, std::vector< int > &aDielectricLayerStackupIds)
Get the dielectric layers for dielectrics between the two given copper layer IDs.
void OnRemoveTrackRow(wxCommandEvent &event) override
Remove a row from the track propagation grid.
@ VIA_GRID_SIGNAL_LAYER_TO
@ VIA_GRID_SIGNAL_LAYER_FROM
@ VIA_GRID_VIA_LAYER_FROM
wxString GetProfileName() const
Get the name of this profile.
COUPLED_MICROSTRIP m_coupledMicrostripCalc
Calculator for coupled (differential) microstrip parameters.
CALCULATION_RESULT calculateDifferentialStripline(int aRow, CalculationType aCalculationType)
Calculate the track width, pair gap, or delay for the given propagation grid row.
void onChangeProfileType(TUNING_PROFILE::PROFILE_TYPE aType) const
Set the panel display for the given tuning type.
wxString m_lastSyncedName
The profile name as of the last rename sync.
void OnRemoveViaOverride(wxCommandEvent &event) override
Remove a via override row.
void SetLastSyncedName(const wxString &aName)
Marks the current profile name as synced.
void OnAddTrackRow(wxCommandEvent &event) override
Add a row to the track propagation grid.
void setColumnWidths()
Set up the widths of all grid columns.
void OnProfileNameChanged(wxCommandEvent &event) override
Update the parent notebook control.
PCB_LAYER_ID
A quick note on layer IDs:
double SignalLayerThickness
double SolderMaskLossTangent
double SolderMaskDielectricConstant
double DielectricConstant
double SolderMaskThickness
double BottomDielectricLayerThickness
double TopDielectricLayerThickness
CALCULATION_RESULT(const wxString &errorMsg)
CALCULATION_RESULT(const int aWidth, const int aDiffPairGap, const int aDelay)
CALCULATION_RESULT(const int aWidth, const int aDelay)
CALCULATION_RESULT()=default
Represents a single line in the tuning profile configuration grid.