KiCad PCB EDA Suite
Loading...
Searching...
No Matches
attenuator_classes.h
Go to the documentation of this file.
1
5/*
6 * Attenuator Synthesis
7 *
8 * From Qucs
9 * Modified for KiCad
10 */
11
12#ifndef ATTENUATORFUNC_H
13#define ATTENUATORFUNC_H
14
15// Forward declare the bitmaps enum from bitmaps/bitmap_list.h
16enum class BITMAPS : unsigned int;
17
18class wxString;
19
25};
26
28{
29public:
30 virtual ~ATTENUATOR();
31
37 virtual bool Calculate();
38
42 void ReadConfig();
43
48
49protected:
50 // The constructor is protected, because this class is not intended to be instantiated.
52
53public:
54 wxString m_Name; // Identifier for configuration.
55 int m_ResultCount; // Number of value to calculate, and therefore display
56 bool m_Error; // Set to true if values cannot be calculated
57 double m_Zin; // Impedance of source
58 bool m_Zin_Enable; // Set to true when impedance of source has meaning
59 double m_Zout; // Impedance of load
60 double m_Attenuation; // Attenuation in dB
61 bool m_Attenuation_Enable; // Set to true when Attenuation has meaning
62 double m_MinimumATT; // Minimum attenuation in dB from parameters
63 double m_R1; // value of R1
64 double m_R2; // value of R2
65 double m_R3; // value of R3 (if any)
66 BITMAPS m_SchBitmapName; // The schema of this attenuator
67 wxString* m_FormulaName; // The HTML/markdown text name of the formula
68
69protected:
71 double Lmin, L, A; // internal variable for temporary use
72};
73
75{
76public:
79 virtual bool Calculate() override;
80};
81
83{
84public:
87 virtual bool Calculate() override;
88};
89
91{
92public:
95 virtual bool Calculate() override;
96};
97
99{
100public:
103 virtual bool Calculate() override;
104};
105
106#endif // ATTENUATORFUNC_H
ATTENUATORS_TYPE
@ TEE_TYPE
@ SPLITTER_TYPE
@ BRIDGE_TYPE
@ PI_TYPE
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
virtual bool Calculate() override
Calculates the values of components in attenuator.
virtual bool Calculate() override
Calculates the values of components in attenuator.
virtual bool Calculate() override
Calculates the values of components in attenuator.
virtual bool Calculate() override
Calculates the values of components in attenuator.
ATTENUATORS_TYPE m_Topology
void ReadConfig()
Read values stored in config for this attenuator.
void WriteConfig()
Read values stored in config for this attenuator.
virtual bool Calculate()
Calculates the values of components in attenuator.
BITMAPS m_SchBitmapName
wxString * m_FormulaName
bool m_Attenuation_Enable
virtual ~ATTENUATOR()
ATTENUATOR(ATTENUATORS_TYPE Topology)
double m_Attenuation