diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-12 18:49:00 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-12 18:49:00 -0300 |
commit | 1088617b8f1c31af3ad6a87f9934f7a55240b3a2 (patch) | |
tree | 922d0e070c7ef3351dc166340b77485dd5b814f3 /Project/Bus.h | |
parent | d5c3a7c9c375f683f5b66a19caf28299af89ef65 (diff) | |
download | PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.gz PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.xz PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.zip |
Bus form under implementation [2]
Diffstat (limited to 'Project/Bus.h')
-rw-r--r-- | Project/Bus.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Project/Bus.h b/Project/Bus.h index ec18e93..50bfa1a 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -4,11 +4,34 @@ #include "BusForm.h" #include "Element.h" +struct BusElectricalData +{ + wxString name = ""; + double nominalVoltage = 138.0; + ElectricalUnit nominalVoltageUnit = UNIT_kV; + bool isVoltageControlled = false; + double controlledVoltage = 1.0; + int controlledVoltageUnitChoice = 0; // 0 = p.u., 1 = same as nominalVoltageUnit (UNIT_V or UNIT_kV). + bool slackBus = false; + bool hasFault = false; + FaultData faultType = FAULT_THREEPHASE; + FaultData faultLocation = FAULT_LINE_A; + double faultResistance = 0.0; + double faultReactance = 0.0; + bool plotBus = false; + bool stabHasFault = false; + double stabFaultTime = 0.0; + double stabFaultLength = 0.0; + double stabFaultResistance = 0.0; + double stabFaultReactance = 0.0; +}; + class Bus : public Element { public: Bus(); Bus(wxPoint2DDouble position); + Bus(wxPoint2DDouble position, wxString name); ~Bus(); virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return true; } virtual bool Contains(wxPoint2DDouble position) const; @@ -19,7 +42,12 @@ class Bus : public Element virtual void MovePickbox(wxPoint2DDouble position); virtual bool PickboxContains(wxPoint2DDouble position); virtual bool GetContextMenu(wxMenu& menu); - virtual bool ShowForm(wxWindow* parent); + virtual BusElectricalData GetEletricalData() const { return m_electricalData; } + virtual void SetElectricalData(BusElectricalData electricalData) { m_electricalData = electricalData; } + virtual bool ShowForm(wxWindow* parent, Element* element); + + private: + BusElectricalData m_electricalData; }; #endif // BUS_H |