KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_calculator_settings.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 (C) 2020-2023 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 _PCB_CALCULATOR_SETTINGS_H
25#define _PCB_CALCULATOR_SETTINGS_H
26
27#include <array>
28#include <unordered_map>
30
32{
33public:
35 {
37 double zin;
38 double zout;
39 };
40
42 {
43 int type;
44 std::unordered_map<std::string, ATTENUATOR> attenuators;
45 };
46
48 {
51
62 };
63
65 {
66 wxString r1;
67 wxString r2;
68 wxString vref;
69 wxString vout;
70 wxString data_file;
72 int type;
74 };
75
77 {
86 };
87
89 {
92 double frequency;
98 };
99
101 {
102 wxString current;
103 wxString delta_tc;
104 wxString track_len;
106 wxString resistivity;
115 };
116
118 typedef std::map<std::string, double> TL_PARAM_MAP;
119
121 typedef std::map<std::string, int> TL_PARAM_UNITS_MAP;
122
124 {
125 int type;
126
128 std::map<std::string, TL_PARAM_MAP> param_values;
129
131 std::map<std::string, TL_PARAM_UNITS_MAP> param_units;
132 };
133
134 struct VIA_SIZE
135 {
138 wxString thickness;
140 wxString length;
142 wxString pad_diameter;
150 wxString permittivity;
151 wxString temp_rise;
153 };
154
156 {
159 };
160
162
164
165 virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
166
167protected:
168 virtual std::string getLegacyFrameName() const override { return "pcb_calculator"; }
169
170public:
172
174
176
178
180
182
184
186
188
190
192
194};
195
196#endif
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:92
std::map< std::string, double > TL_PARAM_MAP
Map of TRANSLINE_PRM id to value.
virtual std::string getLegacyFrameName() const override
virtual bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
std::map< std::string, int > TL_PARAM_UNITS_MAP
Map of TRANSLINE_PRM id to units selection.
std::unordered_map< std::string, ATTENUATOR > attenuators
std::map< std::string, TL_PARAM_MAP > param_values
Transline parameters, per transline type.
std::map< std::string, TL_PARAM_UNITS_MAP > param_units
Transline parameter units selections, per transline type.