Power System Platform  2026w34a-beta
Loading...
Searching...
No Matches
BusFormArcFlashProtection Class Reference
Inheritance diagram for BusFormArcFlashProtection:
Collaboration diagram for BusFormArcFlashProtection:

Public Member Functions

 BusFormArcFlashProtection (wxWindow *parent, Bus *bus, double basePower)

Protected Member Functions

void OnChoiceFuseClass (wxCommandEvent &event) override
void OnNominalCurrentUpdated (wxCommandEvent &event) override
void OnRadioI1Selected (wxCommandEvent &event) override
void OnChoiceCBCurrent (wxCommandEvent &event) override
void OnChoiceCBTrip (wxCommandEvent &event) override
void OnChoiceCBType (wxCommandEvent &event) override
void OnAddButtonClick (wxCommandEvent &event) override
void OnDeviceChanged (wxDataViewEvent &event) override
void OnImportButtonClick (wxCommandEvent &event) override
void OnMethodSelected (wxCommandEvent &event) override
void OnOKButtonClick (wxCommandEvent &event) override
void OnRemoveButtonClick (wxCommandEvent &event) override
void OnTypeSelected (wxCommandEvent &event) override
void OnnCancelButtonClick (wxCommandEvent &event) override
void OnGridKeyDown (wxKeyEvent &event)
void OnGridCornerPaint (wxPaintEvent &event)
bool ParseDouble (const wxString &text, double &value)
void InitializeCBChoices ()
void UpdateCBCurrentChoices ()
void UpdateCBTripChoices ()
void UpdateCBChoices ()
void UpdateRadioI1Selection ()
void UpdateFuseCurrentChoices ()
void LoadProtectionData (const ArcFlashProtectionData &data)
bool ValidateAndGetProtectionData (ArcFlashProtectionData &data)

Protected Attributes

Bus * m_bus = nullptr
double m_basePower = 100e6
TCCPopup * m_tccPopup = nullptr
bool m_gridCornerHover = false
wxDataViewItem m_previousDeviceSelection
bool m_restoringDeviceSelection = false

Private Member Functions

void EnableFields ()

Detailed Description

Definition at line 10 of file BusFormArcFlashProtection.h.

Constructor & Destructor Documentation

◆ BusFormArcFlashProtection()

BusFormArcFlashProtection::BusFormArcFlashProtection ( wxWindow * parent,
Bus * bus,
double basePower )

Definition at line 27 of file BusFormArcFlashProtection.cpp.

28 : BusFormArcFlashProtectionBase(parent), m_bus(bus), m_basePower(basePower)
29{
30 const auto& busData = m_bus->GetElectricalDataRef();
31 double baseVoltage = m_bus->GetValueFromUnit(
32 m_bus->GetElectricalDataRef().nominalVoltage,
33 m_bus->GetElectricalDataRef().nominalVoltageUnit);
34 double baseCurrent = m_basePower / (std::sqrt(3.0) * baseVoltage);
35 double ibf = std::abs(busData.faultCurrent[0]) * baseCurrent;
36
37 if (busData.hasFault) {
38 m_staticTextIbf->SetLabel(_("Total Ibf (fault): ") + Bus::StringFromDouble(ibf / 1e3, 0, 4) + wxT(" kA"));
39 }
40
41 auto addDevice = [&](auto* device) {
42 const auto& parentList = device->GetParentList();
43 if (parentList.size() != 2)
44 return;
45
46 const auto& data = device->GetElectricalDataRef();
47 int busIndex = parentList[0] == m_bus ? 0 : 1;
48
49 double faultCurrent = std::abs(data.faultCurrent[busIndex][0]) * baseCurrent;
50
51 if (!device->IsOnline())
52 faultCurrent = 0.0;
53
54 const bool check = data.arcFlashProtection.configured
55 ? data.arcFlashProtection.consider
56 : faultCurrent > 1e-3 && data.faultCurrent[busIndex][0].real() > 1e-6;
57
58 wxString deviceName = data.name;
59 wxString faultCurrentString = Bus::StringFromDouble(faultCurrent / 1e3, 0, 2);
60
61 m_dvListCtrlDevices->AppendItem({
62 wxVariant(check),
63 wxVariant(deviceName),
64 wxVariant(faultCurrentString)
65 },
66 reinterpret_cast<wxUIntPtr>(device));
67 };
68 for (auto* element : m_bus->GetChildList()) {
69 if (auto* line = dynamic_cast<Line*>(element))
70 addDevice(line);
71 else if (auto* transformer = dynamic_cast<Transformer*>(element))
72 addDevice(transformer);
73 }
74
75 m_gridTCC->AppendCols(2);
76
77
78 m_gridTCC->SetColLabelValue(0, _("Current (A)"));
79 m_gridTCC->SetColLabelValue(1, _("Time (s)"));
80
81 m_gridTCC->SetColFormatFloat(0, -1, 3);
82 m_gridTCC->SetColFormatFloat(1, -1, 3);
83
84 int gridWidth = m_gridTCC->GetRowLabelSize();
85
86 for (int col = 0; col < m_gridTCC->GetNumberCols(); ++col)
87 gridWidth += m_gridTCC->GetColSize(col);
88
89 m_gridTCC->SetMinSize(wxSize(gridWidth + 100, -1));
90 m_splitterPageRight->SetMinSize(wxSize(gridWidth + 100, -1));
91
92 int devicesWidth = 30;
93
94 for (unsigned int i = 0; i < m_dvListCtrlDevices->GetColumnCount(); ++i) {
95#ifdef __WXMSW__
96 devicesWidth += static_cast<int>(m_dvListCtrlDevices->GetBestColumnWidth(static_cast<int>(i)));
97#else
98 devicesWidth += m_dvListCtrlDevices->GetColumn(i)->GetWidth();
99#endif
100 }
101
102 m_dvListCtrlDevices->SetMinSize(wxSize(devicesWidth, 100));
103
104 m_splitterPageLeft->Layout();
105 m_splitterPageRight->Layout();
106
107 GetSizer()->Fit(this);
108
109 m_splitter->SetSashGravity(1.0);
110
111 //const int rightWidth = m_splitterPageRight->GetSizer()->CalcMin().x;
112 const int rightWidth = m_splitterPageRight->GetMinWidth();
113 const int sashPosition = m_splitter->GetClientSize().x - rightWidth - m_splitter->GetSashSize();
114
115 m_splitter->SetSashPosition(sashPosition);
116
117 m_gridTCC->Bind(wxEVT_KEY_DOWN, &BusFormArcFlashProtection::OnGridKeyDown, this);
118
119 // Chart popup
120 wxWindow* corner = m_gridTCC->GetGridCornerLabelWindow();
121 corner->Bind(wxEVT_PAINT, &BusFormArcFlashProtection::OnGridCornerPaint, this);
122 corner->Bind(wxEVT_ENTER_WINDOW, [this](wxMouseEvent& event) {
123 if (!m_tccPopup)
124 m_tccPopup = new TCCPopup(this, m_gridTCC);
125
126 wxPoint mousePos = wxGetMousePosition();
127 m_tccPopup->Move(mousePos + wxPoint(15, 15));
128 m_tccPopup->Popup();
129
130 event.Skip();
131 });
132
133 corner->Bind(wxEVT_MOTION, [this](wxMouseEvent& event) {
134 if (m_tccPopup && m_tccPopup->IsShown()) {
135 const wxPoint mouse = wxGetMousePosition();
136 const wxSize popupSize = m_tccPopup->GetSize();
137 const int offset = FromDIP(10);
138
139 wxPoint pos = mouse + wxPoint(offset, offset);
140
141 const wxRect screen = wxGetClientDisplayRect();
142
143 if (pos.x + popupSize.x > screen.GetRight())
144 pos.x -= pos.x + popupSize.x - screen.GetRight();
145
146 if (pos.y + popupSize.y > screen.GetBottom())
147 pos.y -= pos.y + popupSize.y - screen.GetBottom();
148
149 if (pos.y < screen.GetTop())
150 pos.y = screen.GetTop();
151
152 m_tccPopup->SetPosition(pos);
153 }
154
155 event.Skip();
156 });
157
158 corner->Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent& event) {
159 if (m_tccPopup)
160 m_tccPopup->Dismiss();
161
162 event.Skip();
163 });
164
165 InitializeCBChoices();
166 UpdateRadioI1Selection();
167 EnableFields();
168 SetSize(GetBestSize());
169}
static wxString StringFromDouble(double value, int minDecimal=1, int maxDecimals=13)
Convert a double value to string.
Definition Element.cpp:548

◆ ~BusFormArcFlashProtection()

BusFormArcFlashProtection::~BusFormArcFlashProtection ( )
override

Definition at line 171 of file BusFormArcFlashProtection.cpp.

172{
173 wxWindow* corner = m_gridTCC->GetGridCornerLabelWindow();
174 corner->Unbind(wxEVT_PAINT, &BusFormArcFlashProtection::OnGridCornerPaint, this);
175}

Member Function Documentation

◆ EnableFields()

void BusFormArcFlashProtection::EnableFields ( )
private

Definition at line 177 of file BusFormArcFlashProtection.cpp.

178{
179 switch (m_choiceType->GetSelection())
180 {
181 case 0:
182 m_choiceMethod->Enable();
183 m_choiceMethod->SetString(1, _("Appendix I"));
184 m_checkBoxIsMeltTime->Enable(false);
185 m_textCtrlDelay->Enable();
186 break;
187 case 1:
188 m_choiceMethod->Enable();
189 m_choiceMethod->SetString(1, _("Appendix H"));
190 m_checkBoxIsMeltTime->Enable();
191 m_textCtrlDelay->Enable(false);
192 break;
193 default: break;
194 }
195 switch (m_choiceMethod->GetSelection())
196 {
197 case 0:
198 m_panelTCC->Enable();
199 m_panelAI->Enable(false);
200 m_panelAH->Enable(false);
201 m_notebook->SetSelection(0);
202 break;
203 case 1:
204 //m_gridTCC->Enable(false);
205 //m_bmpButtonAdd->Enable(false);
206 //m_bmpButtonRemove->Enable(false);
207 //m_buttonImport->Enable(false);
208 m_panelTCC->Enable(false);
209 if (m_choiceType->GetSelection() == 0)
210 {
211 m_panelAI->Enable();
212 m_panelAH->Enable(false);
213 m_notebook->SetSelection(1);
214 }
215 else
216 {
217 m_panelAI->Enable(false);
218 m_panelAH->Enable();
219 m_notebook->SetSelection(2);
220 }
221 break;
222 default: break;
223 }
224}

◆ InitializeCBChoices()

void BusFormArcFlashProtection::InitializeCBChoices ( )
protected

Definition at line 682 of file BusFormArcFlashProtection.cpp.

683{
684 m_choiceCBType->Clear();
685 m_choiceCBType->Append(_("MCCB"));
686 m_choiceCBType->Append(_("ICCB"));
687 m_choiceCBType->Append(_("LVPCB"));
688 m_choiceCBType->SetSelection(0);
689
690 m_choiceCBVoltage->Clear();
691 m_choiceCBVoltage->Append(_("\u2264 480 V"));
692 m_choiceCBVoltage->Append(_("575\u2013690 V"));
693 m_choiceCBVoltage->SetSelection(0);
694
695 UpdateCBChoices();
696}

◆ LoadProtectionData()

void BusFormArcFlashProtection::LoadProtectionData ( const ArcFlashProtectionData & data)
protected

Definition at line 810 of file BusFormArcFlashProtection.cpp.

811{
812 const bool isBreaker = data.type == ArcFlashProtectionType::CIRCUIT_BREAKER;
813 const bool isFuse = !isBreaker;
814
815 // Protection type and method.
816 m_choiceType->SetSelection(isBreaker ? 0 : 1);
817 m_choiceMethod->SetString(1, isBreaker ? _("Appendix I") : _("Appendix H"));
818
819 const bool isAppendixI = isBreaker && data.method == ArcFlashProtectionMethod::ANNEX_I;
820 const bool isAppendixH = isFuse && data.method == ArcFlashProtectionMethod::ANNEX_H;
821 const bool validAnnex = isAppendixI || isAppendixH;
822
823 wxASSERT_MSG(data.method == ArcFlashProtectionMethod::TCC_CURVE || validAnnex,
824 "Invalid protection type and method combination");
825
826 const int methodSelection = data.method == ArcFlashProtectionMethod::TCC_CURVE || !validAnnex ? 0 : 1;
827 m_choiceMethod->SetSelection(methodSelection);
828
829 EnableFields();
830
831 // Show the corresponding notebook page.
832 const int page = methodSelection == 0 ? 0 : (isBreaker ? 1 : 2);
833 m_notebook->ChangeSelection(page);
834
835 // TCC curve.
836 m_gridTCC->BeginBatch();
837
838 if (m_gridTCC->GetNumberRows() > 0)
839 m_gridTCC->DeleteRows(0, m_gridTCC->GetNumberRows());
840
841 if (!data.tccPoints.empty())
842 {
843 m_gridTCC->AppendRows(static_cast<int>(data.tccPoints.size()));
844
845 for (size_t i = 0; i < data.tccPoints.size(); ++i)
846 {
847 m_gridTCC->SetCellValue(static_cast<int>(i), 0, FormatProtectionNumber(data.tccPoints[i].current));
848 m_gridTCC->SetCellValue(static_cast<int>(i), 1, FormatProtectionNumber(data.tccPoints[i].time));
849 }
850 }
851
852 m_gridTCC->EndBatch();
853 m_gridTCC->ForceRefresh();
854
855 m_checkBoxIsMeltTime->SetValue(data.curveIsMeltTimeOnly);
856 m_textCtrlDelay->ChangeValue(FormatOptionalNumber(data.additionalDelay));
857
858 // Appendix I: map BreakerFamily to the three cascading choices.
859 int breakerType = 0;
860 int currentRange = 0;
861 int tripUnit = 0;
862
863 switch (data.breakerFamily)
864 {
865 case ArcFlashBreakerFamily::MCCB_100_400A:
866 breakerType = 0; currentRange = 0; tripUnit = 0;
867 break;
868
869 case ArcFlashBreakerFamily::MCCB_600_1200A_TM_OR_M:
870 breakerType = 0; currentRange = 1; tripUnit = 0;
871 break;
872
873 case ArcFlashBreakerFamily::MCCB_600_1200A_E_LI:
874 breakerType = 0; currentRange = 1; tripUnit = 1;
875 break;
876
877 case ArcFlashBreakerFamily::MCCB_OR_ICCB_1600_6000A:
878 breakerType = 1; currentRange = 0; tripUnit = 0;
879 break;
880
881 case ArcFlashBreakerFamily::LVPCB_800_6300A_E_LI:
882 breakerType = 2; currentRange = 0; tripUnit = 0;
883 break;
884
885 case ArcFlashBreakerFamily::LVPCB_800_6300A_E_LS:
886 breakerType = 2; currentRange = 0; tripUnit = 1;
887 break;
888 }
889
890 m_choiceCBType->SetSelection(breakerType);
891 UpdateCBCurrentChoices();
892
893 m_choiceCBCurrent->SetSelection(currentRange);
894 UpdateCBTripChoices();
895
896 m_choiceCBTrip->SetSelection(tripUnit);
897 m_choiceCBVoltage->SetSelection(static_cast<int>(data.breakerVoltageBand));
898
899 m_textCtrlI2->ChangeValue(FormatOptionalNumber(data.i2_kA));
900
901 // Load I1 source and update the I1/It label and field state.
902 const int i1Selection = data.i1Source == ArcFlashI1Source::DIRECT ? 0 : 1;
903 m_radioBoxI1->SetSelection(i1Selection);
904 UpdateRadioI1Selection();
905
906 // The nominal current is optional and is not the same as It.
907 m_textCtrlIn->ChangeValue(FormatOptionalNumber(data.breakerNominalCurrent_A));
908
909 // The input field is I1 in amperes, or It in amperes, depending on the radio selection.
910 if (data.i1Source == ArcFlashI1Source::DIRECT)
911 m_textCtrl1->ChangeValue(FormatOptionalNumber(data.i1_kA * 1000.0));
912 else
913 m_textCtrl1->ChangeValue(FormatOptionalNumber(data.it_A));
914
915 // Appendix H: map FuseFamily to class and current range.
916 const int fuseFamily = static_cast<int>(data.fuseFamily);
917
918 m_choiceFuseClass->SetSelection(fuseFamily < 4 ? 0 : 1);
919 UpdateFuseCurrentChoices();
920 m_choiceFuseCurrent->SetSelection(fuseFamily < 4 ? fuseFamily : fuseFamily - 4);
921
922 // Update the "Use" checkbox for the currently selected device.
923 //const int selectedRow = m_dvListCtrlDevices->GetSelectedRow();
924 //
925 //if (selectedRow != wxNOT_FOUND)
926 // m_dvListCtrlDevices->SetToggleValue(data.consider, selectedRow, 0);
927
928 m_notebook->Layout();
929 m_splitterPageRight->Layout();
930 Layout();
931
932 if (m_tccPopup && m_tccPopup->IsShown())
933 m_tccPopup->UpdateGraph();
934}

◆ OnAddButtonClick()

void BusFormArcFlashProtection::OnAddButtonClick ( wxCommandEvent & event)
overrideprotected

Definition at line 226 of file BusFormArcFlashProtection.cpp.

227{
228 const int row = m_gridTCC->GetNumberRows();
229 m_gridTCC->AppendRows(1);
230 m_gridTCC->SetCellValue(row, 0, "0.0");
231 m_gridTCC->SetCellValue(row, 1, "0.0");
232}

◆ OnChoiceCBCurrent()

void BusFormArcFlashProtection::OnChoiceCBCurrent ( wxCommandEvent & event)
overrideprotected

Definition at line 1450 of file BusFormArcFlashProtection.cpp.

1451{
1452 UpdateCBTripChoices();
1453}

◆ OnChoiceCBTrip()

void BusFormArcFlashProtection::OnChoiceCBTrip ( wxCommandEvent & event)
overrideprotected

Definition at line 1454 of file BusFormArcFlashProtection.cpp.

1455{
1456 //UpdateCBChoices();
1457}

◆ OnChoiceCBType()

void BusFormArcFlashProtection::OnChoiceCBType ( wxCommandEvent & event)
overrideprotected

Definition at line 1458 of file BusFormArcFlashProtection.cpp.

1459{
1460 UpdateCBChoices();
1461}

◆ OnChoiceFuseClass()

void BusFormArcFlashProtection::OnChoiceFuseClass ( wxCommandEvent & event)
overrideprotected

Definition at line 1479 of file BusFormArcFlashProtection.cpp.

1480{
1481 UpdateFuseCurrentChoices();
1482}

◆ OnDeviceChanged()

void BusFormArcFlashProtection::OnDeviceChanged ( wxDataViewEvent & event)
overrideprotected

Definition at line 234 of file BusFormArcFlashProtection.cpp.

235{
236 //auto devicePtr = m_dvListCtrlDevices->GetItemData(event.GetItem());
237 //auto* element = reinterpret_cast<Element*>(devicePtr);
238 //ArcFlashProtectionData afpData;
239 //if (auto* line = dynamic_cast<Line*>(element))
240 // afpData = line->GetElectricalDataRef().arcFlashProtection;
241 //else if (auto* transformer = dynamic_cast<Transformer*>(element))
242 // afpData = transformer->GetElectricalDataRef().arcFlashProtection;
243 //LoadProtectionData(afpData);
244 if (m_restoringDeviceSelection)
245 return;
246
247 const wxDataViewItem newItem = event.GetItem();
248
249 if (!newItem.IsOk())
250 return;
251
252 if (newItem == m_previousDeviceSelection)
253 return;
254
255 auto getElement = [this](const wxDataViewItem& item) -> Element* {
256 auto devicePtr = m_dvListCtrlDevices->GetItemData(item);
257 return reinterpret_cast<Element*>(devicePtr);
258 };
259
260 auto getProtectionData = [](Element* element) -> ArcFlashProtectionData* {
261 if (auto* line = dynamic_cast<Line*>(element))
262 return &line->GetElectricalDataRef().arcFlashProtection;
263
264 if (auto* transformer = dynamic_cast<Transformer*>(element))
265 return &transformer->GetElectricalDataRef().arcFlashProtection;
266
267 return nullptr;
268 };
269
270 // Validate and save the previously selected device.
271 if (m_previousDeviceSelection.IsOk()) {
272 auto* previousElement = getElement(m_previousDeviceSelection);
273 auto* previousData = getProtectionData(previousElement);
274
275 if (previousData) {
276 ArcFlashProtectionData validatedData = *previousData;
277
278 const int previousRow =
279 m_dvListCtrlDevices->ItemToRow(m_previousDeviceSelection);
280
281 if (previousRow != wxNOT_FOUND)
282 validatedData.consider =
283 m_dvListCtrlDevices->GetToggleValue(previousRow, 0);
284
285 if (!ValidateAndGetProtectionData(validatedData)) {
286 m_restoringDeviceSelection = true;
287 m_dvListCtrlDevices->Unselect(newItem);
288 m_dvListCtrlDevices->Select(m_previousDeviceSelection);
289 m_restoringDeviceSelection = false;
290 return;
291 }
292
293 *previousData = validatedData;
294 }
295 }
296
297 // Load the newly selected device.
298 m_previousDeviceSelection = newItem;
299
300 if (auto* element = getElement(newItem)) {
301 if (auto* protectionData = getProtectionData(element))
302 LoadProtectionData(*protectionData);
303 }
304}

◆ OnGridCornerPaint()

void BusFormArcFlashProtection::OnGridCornerPaint ( wxPaintEvent & event)
protected

Definition at line 600 of file BusFormArcFlashProtection.cpp.

601{
602 wxWindow* corner = m_gridTCC->GetGridCornerLabelWindow();
603
604 wxAutoBufferedPaintDC dc(corner);
605 dc.SetBackground(wxBrush(corner->GetBackgroundColour()));
606 dc.Clear();
607
608 std::unique_ptr<wxGraphicsContext> gc(wxGraphicsContext::Create(dc));
609 if (!gc)
610 return;
611
612 gc->SetAntialiasMode(wxANTIALIAS_DEFAULT);
613
614 const wxSize size = corner->GetClientSize();
615
616 const double left = 2.0;
617 const double right = size.x - 2.0;
618 const double top = 2.0;
619 const double bottom = size.y - 2.0;
620
621 if (size.x <= 4 || size.y <= 4)
622 return;
623
624 const wxColour axisColour(90, 90, 90);
625 const wxColour curveColour(40, 100, 200);
626
627 // Draw axes.
628 gc->SetPen(wxPen(axisColour, 1.0));
629 gc->StrokeLine(left, top, left, bottom);
630 gc->StrokeLine(left, bottom, right, bottom);
631
632 // Define a TCC-like curve.
633 const double x0 = left + size.x * 0.23;
634 const double y0 = top + size.y * 0.12;
635
636 const double x1 = left + size.x * 0.42;
637 const double y1 = top + size.y * 0.50;
638
639 const double x2 = left + size.x * 0.63;
640 const double y2 = top + size.y * 0.72;
641
642 const double x3 = right - size.x * 0.08;
643 const double y3 = top + size.y * 0.80;
644
645 wxGraphicsPath path = gc->CreatePath();
646
647 path.MoveToPoint(x0, y0);
648
649 path.AddCurveToPoint(
650 x0 + size.x * 0.01, y0 + size.y * 0.12,
651 x1 - size.x * 0.10, y1 - size.y * 0.12,
652 x1, y1
653 );
654
655 path.AddCurveToPoint(
656 x1 + size.x * 0.08, y1 + size.y * 0.12,
657 x2 - size.x * 0.05, y2 - size.y * 0.03,
658 x2, y2
659 );
660
661 path.AddCurveToPoint(
662 x2 + size.x * 0.10, y2 + size.y * 0.06,
663 x3 - size.x * 0.08, y3,
664 x3, y3
665 );
666
667 // Draw the TCC curve.
668 gc->SetPen(wxPen(curveColour, m_gridCornerHover ? 2.0 : 1.5));
669 gc->StrokePath(path);
670}

◆ OnGridKeyDown()

void BusFormArcFlashProtection::OnGridKeyDown ( wxKeyEvent & event)
protected

Definition at line 535 of file BusFormArcFlashProtection.cpp.

536{
537 if (!event.ControlDown() || event.GetKeyCode() != 'V') {
538 event.Skip();
539 return;
540 }
541
542 if (!wxTheClipboard->Open()) {
543 event.Skip();
544 return;
545 }
546
547 wxTextDataObject data;
548
549 if (!wxTheClipboard->GetData(data)) {
550 wxTheClipboard->Close();
551 event.Skip();
552 return;
553 }
554
555 wxTheClipboard->Close();
556
557 wxString text = data.GetText();
558 text.Replace("\r\n", "\n");
559 text.Replace("\r", "\n");
560
561 wxArrayString rows;
562 wxStringTokenizer rowTokenizer(text, "\n");
563
564 while (rowTokenizer.HasMoreTokens())
565 rows.Add(rowTokenizer.GetNextToken());
566
567 int startRow = m_gridTCC->GetGridCursorRow();
568 int startCol = m_gridTCC->GetGridCursorCol();
569
570 if (startRow < 0)
571 startRow = 0;
572
573 if (startCol < 0)
574 startCol = 0;
575
576 int row = startRow;
577
578 for (const auto& rowText : rows) {
579 if (rowText.IsEmpty())
580 continue;
581
582 wxArrayString columns;
583 wxStringTokenizer columnTokenizer(rowText, "\t");
584
585 while (columnTokenizer.HasMoreTokens())
586 columns.Add(columnTokenizer.GetNextToken());
587
588 while (row >= m_gridTCC->GetNumberRows())
589 m_gridTCC->AppendRows(1);
590
591 for (size_t i = 0; i < columns.size() && startCol + static_cast<int>(i) < m_gridTCC->GetNumberCols(); ++i)
592 m_gridTCC->SetCellValue(row, startCol + static_cast<int>(i), columns[i]);
593
594 ++row;
595 }
596
597 m_gridTCC->ForceRefresh();
598}

◆ OnImportButtonClick()

void BusFormArcFlashProtection::OnImportButtonClick ( wxCommandEvent & event)
overrideprotected

Definition at line 306 of file BusFormArcFlashProtection.cpp.

307{
308 wxFileDialog dialog(
309 this,
310 _("Import TCC curve"),
311 "",
312 "",
313 _("CSV files (*.csv)|*.csv|All files (*.*)|*.*"),
314 wxFD_OPEN | wxFD_FILE_MUST_EXIST);
315
316 if (dialog.ShowModal() != wxID_OK)
317 return;
318
319 wxTextFile file;
320
321 if (!file.Open(dialog.GetPath()))
322 {
323 wxMessageBox(_("Unable to open the selected file."), _("Import error"), wxOK | wxICON_ERROR, this);
324 return;
325 }
326
327
328 m_gridTCC->ClearGrid();
329
330 if (m_gridTCC->GetNumberRows() > 0)
331 m_gridTCC->DeleteRows(0, m_gridTCC->GetNumberRows());
332
333 int row = 0;
334
335 for (size_t i = 0; i < file.GetLineCount(); ++i)
336 {
337 wxString line = file.GetLine(i).Trim(true).Trim(false);
338
339 if (line.IsEmpty())
340 continue;
341
342 wxArrayString columns;
343
344 if (line.Find(';') != wxNOT_FOUND)
345 {
346 wxStringTokenizer tokenizer(line, ";");
347
348 while (tokenizer.HasMoreTokens())
349 columns.Add(tokenizer.GetNextToken());
350 }
351 else if (line.Find('\t') != wxNOT_FOUND)
352 {
353 wxStringTokenizer tokenizer(line, "\t");
354
355 while (tokenizer.HasMoreTokens())
356 columns.Add(tokenizer.GetNextToken());
357 }
358 else
359 {
360 wxStringTokenizer tokenizer(line, ",");
361
362 while (tokenizer.HasMoreTokens())
363 columns.Add(tokenizer.GetNextToken());
364 }
365
366 if (columns.size() < 2)
367 continue;
368
369 wxString currentString = columns[0].Trim(true).Trim(false);
370 wxString timeString = columns[1].Trim(true).Trim(false);
371
372 double current = 0.0;
373 double time = 0.0;
374
375 if (!ParseDouble(currentString, current) || !ParseDouble(timeString, time))
376 {
377 if (row == 0)
378 continue;
379
380 wxMessageBox(
381 wxString::Format(_("Invalid data at line %zu."), i + 1),
382 _("Import error"),
383 wxOK | wxICON_ERROR,
384 this);
385
386 file.Close();
387 return;
388 }
389
390 if (current <= 0.0 || time <= 0.0)
391 {
392 wxMessageBox(
393 wxString::Format(_("Invalid data at line %zu. Current and time must be greater than zero."), i + 1),
394 _("Import error"),
395 wxOK | wxICON_ERROR,
396 this);
397
398 file.Close();
399 return;
400 }
401
402 m_gridTCC->AppendRows(1);
403 m_gridTCC->SetCellValue(row, 0, wxString::FromDouble(current));
404 m_gridTCC->SetCellValue(row, 1, wxString::FromDouble(time));
405
406 ++row;
407 }
408
409 file.Close();
410
411 m_gridTCC->ForceRefresh();
412
413 if (m_tccPopup && m_tccPopup->IsShown())
414 m_tccPopup->UpdateGraph();
415}

◆ OnMethodSelected()

void BusFormArcFlashProtection::OnMethodSelected ( wxCommandEvent & event)
overrideprotected

Definition at line 417 of file BusFormArcFlashProtection.cpp.

418{
419 EnableFields();
420}

◆ OnnCancelButtonClick()

void BusFormArcFlashProtection::OnnCancelButtonClick ( wxCommandEvent & event)
overrideprotected

Definition at line 530 of file BusFormArcFlashProtection.cpp.

531{
532 EndModal(wxID_CANCEL);
533}

◆ OnNominalCurrentUpdated()

void BusFormArcFlashProtection::OnNominalCurrentUpdated ( wxCommandEvent & event)
overrideprotected

Definition at line 1466 of file BusFormArcFlashProtection.cpp.

1467{
1468 double value = 0.0;
1469 if (m_textCtrlIn->GetValue().ToDouble(&value))
1470 {
1471 if (value <= 100.0) {
1472 m_textCtrl1->SetValue(wxString::FromDouble(1300));
1473 }
1474 else {
1475 m_textCtrl1->SetValue(wxString::FromDouble(value * 10.0));
1476 }
1477 }
1478}

◆ OnOKButtonClick()

void BusFormArcFlashProtection::OnOKButtonClick ( wxCommandEvent & event)
overrideprotected

Definition at line 422 of file BusFormArcFlashProtection.cpp.

423{
424 const unsigned int itemCount = m_dvListCtrlDevices->GetItemCount();
425
426 if (itemCount == 0) {
427 EndModal(wxID_OK);
428 return;
429 }
430
431 auto getElement = [this](const wxDataViewItem& item) -> Element* {
432 return reinterpret_cast<Element*>(
433 m_dvListCtrlDevices->GetItemData(item));
434 };
435
436 auto getProtectionData = [](Element* element) -> ArcFlashProtectionData* {
437 if (auto* line = dynamic_cast<Line*>(element))
438 return &line->GetElectricalDataRef().arcFlashProtection;
439
440 if (auto* transformer = dynamic_cast<Transformer*>(element))
441 return &transformer->GetElectricalDataRef().arcFlashProtection;
442
443 return nullptr;
444 };
445
446 std::vector<std::pair<ArcFlashProtectionData*,
447 ArcFlashProtectionData>> updates;
448
449 updates.reserve(itemCount);
450
451 const wxDataViewItem originalSelection = m_previousDeviceSelection;
452
453 // Validate the currently displayed device first.
454 if (originalSelection.IsOk()) {
455 auto* element = getElement(originalSelection);
456 auto* protectionData = getProtectionData(element);
457
458 if (protectionData) {
459 ArcFlashProtectionData data = *protectionData;
460
461 const int row = m_dvListCtrlDevices->ItemToRow(originalSelection);
462 if (row != wxNOT_FOUND)
463 data.consider = m_dvListCtrlDevices->GetToggleValue(row, 0);
464
465 if (!ValidateAndGetProtectionData(data))
466 return;
467
468 updates.emplace_back(protectionData, data);
469 }
470 }
471
472 // Validate all remaining devices.
473 m_restoringDeviceSelection = true;
474
475 for (unsigned int row = 0; row < itemCount; ++row) {
476 const wxDataViewItem item = m_dvListCtrlDevices->RowToItem(row);
477
478 if (item == originalSelection)
479 continue;
480
481 auto* element = getElement(item);
482 auto* protectionData = getProtectionData(element);
483
484 if (!protectionData)
485 continue;
486
487 LoadProtectionData(*protectionData);
488
489 ArcFlashProtectionData data = *protectionData;
490 data.consider = m_dvListCtrlDevices->GetToggleValue(row, 0);
491
492 if (!ValidateAndGetProtectionData(data)) {
493 m_restoringDeviceSelection = false;
494
495 m_dvListCtrlDevices->UnselectAll();
496 m_dvListCtrlDevices->Select(item);
497 m_previousDeviceSelection = item;
498
499 LoadProtectionData(*protectionData);
500 return;
501 }
502
503 updates.emplace_back(protectionData, data);
504 }
505
506 m_restoringDeviceSelection = false;
507
508 // Commit only after every device has been validated.
509 for (auto& [protectionData, data] : updates)
510 *protectionData = data;
511
512 EndModal(wxID_OK);
513}

◆ OnRadioI1Selected()

void BusFormArcFlashProtection::OnRadioI1Selected ( wxCommandEvent & event)
overrideprotected

Definition at line 1462 of file BusFormArcFlashProtection.cpp.

1463{
1464 UpdateRadioI1Selection();
1465}

◆ OnRemoveButtonClick()

void BusFormArcFlashProtection::OnRemoveButtonClick ( wxCommandEvent & event)
overrideprotected

Definition at line 515 of file BusFormArcFlashProtection.cpp.

516{
517 wxArrayInt rows = m_gridTCC->GetSelectedRows();
518
519 for (int i = rows.size() - 1; i >= 0; --i)
520 {
521 m_gridTCC->DeleteRows(rows[i], 1);
522 }
523}

◆ OnTypeSelected()

void BusFormArcFlashProtection::OnTypeSelected ( wxCommandEvent & event)
overrideprotected

Definition at line 525 of file BusFormArcFlashProtection.cpp.

526{
527 EnableFields();
528}

◆ ParseDouble()

bool BusFormArcFlashProtection::ParseDouble ( const wxString & text,
double & value )
protected

Definition at line 672 of file BusFormArcFlashProtection.cpp.

673{
674 wxString str = text;
675 str.Trim(true).Trim(false);
676 if (str.Find(',') != wxNOT_FOUND)
677 str.Replace(",", ".");
678
679 return str.ToCDouble(&value);
680}

◆ UpdateCBChoices()

void BusFormArcFlashProtection::UpdateCBChoices ( )
protected

Definition at line 764 of file BusFormArcFlashProtection.cpp.

765{
766 UpdateCBCurrentChoices();
767 UpdateCBTripChoices();
768}

◆ UpdateCBCurrentChoices()

void BusFormArcFlashProtection::UpdateCBCurrentChoices ( )
protected

Definition at line 698 of file BusFormArcFlashProtection.cpp.

699{
700 const int type = m_choiceCBType->GetSelection();
701
702 m_choiceCBCurrent->Clear();
703 m_choiceCBCurrent->Enable(true);
704
705 switch (type)
706 {
707 case 0: // MCCB
708 m_choiceCBCurrent->Append(_("100\u2013400A"));
709 m_choiceCBCurrent->Append(_("600\u20131200A"));
710 m_choiceCBCurrent->SetSelection(0);
711 break;
712
713 case 1: // ICCB
714 m_choiceCBCurrent->Append(_("1600\u20136000A"));
715 m_choiceCBCurrent->SetSelection(0);
716 m_choiceCBCurrent->Enable(false);
717 break;
718
719 case 2: // LVPCB
720 m_choiceCBCurrent->Append(_("800\u20136300A"));
721 m_choiceCBCurrent->SetSelection(0);
722 m_choiceCBCurrent->Enable(false);
723 break;
724 }
725}

◆ UpdateCBTripChoices()

void BusFormArcFlashProtection::UpdateCBTripChoices ( )
protected

Definition at line 727 of file BusFormArcFlashProtection.cpp.

728{
729 const int type = m_choiceCBType->GetSelection();
730 const int current = m_choiceCBCurrent->GetSelection();
731
732 m_choiceCBTrip->Clear();
733 m_choiceCBTrip->Enable(true);
734
735 if (type == 0) // MCCB
736 {
737 if (current == 0) // 100–400 A
738 {
739 m_choiceCBTrip->Append(_("TM or M"));
740 m_choiceCBTrip->SetSelection(0);
741 m_choiceCBTrip->Enable(false);
742 }
743 else // 600–1200 A
744 {
745 m_choiceCBTrip->Append(_("TM or M"));
746 m_choiceCBTrip->Append(_("Electronic (E, LI)"));
747 m_choiceCBTrip->SetSelection(0);
748 }
749 }
750 else if (type == 1) // ICCB
751 {
752 m_choiceCBTrip->Append(_("TM or M"));
753 m_choiceCBTrip->SetSelection(0);
754 m_choiceCBTrip->Enable(false);
755 }
756 else if (type == 2) // LVPCB
757 {
758 m_choiceCBTrip->Append(_("Electronic (E, LI)"));
759 m_choiceCBTrip->Append(_("Electronic, short-time delay (E, LS)"));
760 m_choiceCBTrip->SetSelection(0);
761 }
762}

◆ UpdateFuseCurrentChoices()

void BusFormArcFlashProtection::UpdateFuseCurrentChoices ( )
protected

Definition at line 782 of file BusFormArcFlashProtection.cpp.

783{
784 m_choiceFuseCurrent->Clear();
785
786 switch (m_choiceFuseClass->GetSelection())
787 {
788 case 0: // Class L
789 m_choiceFuseCurrent->Append(_("601–800A"));
790 m_choiceFuseCurrent->Append(_("801–1200A"));
791 m_choiceFuseCurrent->Append(_("1201–1600A"));
792 m_choiceFuseCurrent->Append(_("1601–2000A"));
793 break;
794
795 case 1: // Class RK1
796 m_choiceFuseCurrent->Append(_("≤ 100A"));
797 m_choiceFuseCurrent->Append(_("101–200A"));
798 m_choiceFuseCurrent->Append(_("201–400A"));
799 m_choiceFuseCurrent->Append(_("401–600A"));
800 break;
801
802 default:
803 break;
804 }
805
806 if (m_choiceFuseCurrent->GetCount() > 0)
807 m_choiceFuseCurrent->SetSelection(0);
808}

◆ UpdateRadioI1Selection()

void BusFormArcFlashProtection::UpdateRadioI1Selection ( )
protected

Definition at line 770 of file BusFormArcFlashProtection.cpp.

771{
772 if (m_radioBoxI1->GetSelection() == 0) {
773 m_textCtrlIn->Enable(false);
774 m_staticTextI1->SetLabel(_("Minimum current (I₁) [A]"));
775 }
776 else {
777 m_staticTextI1->SetLabel(_("Instant/Short-Time (Iₜ) [A]"));
778 m_textCtrlIn->Enable();
779 }
780}

◆ ValidateAndGetProtectionData()

bool BusFormArcFlashProtection::ValidateAndGetProtectionData ( ArcFlashProtectionData & data)
protected

Definition at line 936 of file BusFormArcFlashProtection.cpp.

937{
938 ArcFlashProtectionData result = data;
939
940 auto showError = [&](const wxString& message) {
941 wxMessageBox(message, _("Invalid data"), wxOK | wxICON_WARNING, m_parent);
942 return false;
943 };
944
945 auto parseDouble = [&](const wxString& text, double& value, const wxString& field) {
946 return m_bus->DoubleFromString(
947 m_parent,
948 text,
949 value,
950 wxString::Format(_("Value entered incorrectly in the field \"%s\"."), field));
951 };
952
953 auto requirePositive = [&](double value, const wxString& field) {
954 if (!std::isfinite(value) || value <= 0.0)
955 return showError(wxString::Format(
956 _("The field \"%s\" must be greater than zero."), field));
957
958 return true;
959 };
960
961 // Protection type.
962 const int typeSelection = m_choiceType->GetSelection();
963
964 if (typeSelection < 0 || typeSelection > 1)
965 return showError(_("Select a valid protection type."));
966
967 result.type = typeSelection == 0
968 ? ArcFlashProtectionType::CIRCUIT_BREAKER
969 : ArcFlashProtectionType::FUSE;
970
971 // Protection method.
972 const int methodSelection = m_choiceMethod->GetSelection();
973
974 if (methodSelection < 0 || methodSelection > 1)
975 return showError(_("Select a valid protection method."));
976
977 if (methodSelection == 0)
978 result.method = ArcFlashProtectionMethod::TCC_CURVE;
979 else if (result.type == ArcFlashProtectionType::CIRCUIT_BREAKER)
980 result.method = ArcFlashProtectionMethod::ANNEX_I;
981 else
982 result.method = ArcFlashProtectionMethod::ANNEX_H;
983
984 // Additional delay is optional; an empty field means zero.
985 wxString delayText = m_textCtrlDelay->GetValue();
986 delayText.Trim(false).Trim(true);
987
988 if (delayText.IsEmpty())
989 result.additionalDelay = 0.0;
990 else if (!parseDouble(delayText, result.additionalDelay, _("Additional delay (s)")))
991 return false;
992
993 if (!std::isfinite(result.additionalDelay) || result.additionalDelay < 0.0)
994 return showError(_("The additional delay must be greater than or equal to zero."));
995
996 // TCC curve.
997 if (result.method == ArcFlashProtectionMethod::TCC_CURVE) {
998 const int rows = m_gridTCC->GetNumberRows();
999
1000 if (m_gridTCC->GetNumberCols() < 2 || rows < 2)
1001 return showError(_("The TCC curve must contain at least two points."));
1002
1003 std::vector<ArcFlashTCCPoint> points;
1004 points.reserve(rows);
1005
1006 for (int row = 0; row < rows; ++row) {
1007 ArcFlashTCCPoint point;
1008
1009 const wxString currentField =
1010 wxString::Format(_("Current (A), row %d of the TCC curve"), row + 1);
1011
1012 const wxString timeField =
1013 wxString::Format(_("Time (s), row %d of the TCC curve"), row + 1);
1014
1015 if (!parseDouble(m_gridTCC->GetCellValue(row, 0), point.current, currentField))
1016 return false;
1017
1018 if (!requirePositive(point.current, currentField))
1019 return false;
1020
1021 if (!parseDouble(m_gridTCC->GetCellValue(row, 1), point.time, timeField))
1022 return false;
1023
1024 if (!requirePositive(point.time, timeField))
1025 return false;
1026
1027 points.push_back(point);
1028 }
1029
1030 result.tccPoints = points;
1031 result.curveIsMeltTimeOnly = m_checkBoxIsMeltTime->GetValue();
1032 }
1033
1034 // Appendix I: circuit breaker.
1035 if (result.method == ArcFlashProtectionMethod::ANNEX_I) {
1036 const int cbType = m_choiceCBType->GetSelection();
1037 const int currentRange = m_choiceCBCurrent->GetSelection();
1038 const int tripUnit = m_choiceCBTrip->GetSelection();
1039
1040 if (cbType < 0 || cbType > 2 || currentRange < 0 || tripUnit < 0)
1041 return showError(_("Select valid circuit breaker parameters."));
1042
1043 // Map the type, current range and trip unit to the breaker family.
1044 switch (cbType) {
1045 case 0: // MCCB
1046 if (currentRange == 0 && tripUnit == 0) {
1047 result.breakerFamily = ArcFlashBreakerFamily::MCCB_100_400A;
1048 }
1049 else if (currentRange == 1 && tripUnit == 0) {
1050 result.breakerFamily = ArcFlashBreakerFamily::MCCB_600_1200A_TM_OR_M;
1051 }
1052 else if (currentRange == 1 && tripUnit == 1) {
1053 result.breakerFamily = ArcFlashBreakerFamily::MCCB_600_1200A_E_LI;
1054 }
1055 else {
1056 return showError(
1057 _("The selected MCCB current range and trip unit are not compatible."));
1058 }
1059 break;
1060
1061 case 1: // ICCB
1062 if (currentRange != 0 || tripUnit != 0)
1063 return showError(
1064 _("The selected ICCB current range and trip unit are not compatible."));
1065
1066 result.breakerFamily = ArcFlashBreakerFamily::MCCB_OR_ICCB_1600_6000A;
1067 break;
1068
1069 case 2: // LVPCB
1070 if (currentRange != 0 || (tripUnit != 0 && tripUnit != 1))
1071 return showError(
1072 _("The selected LVPCB current range and trip unit are not compatible."));
1073
1074 result.breakerFamily = tripUnit == 0
1075 ? ArcFlashBreakerFamily::LVPCB_800_6300A_E_LI
1076 : ArcFlashBreakerFamily::LVPCB_800_6300A_E_LS;
1077 break;
1078 }
1079
1080 // Voltage range.
1081 const int voltageSelection = m_choiceCBVoltage->GetSelection();
1082
1083 if (voltageSelection < 0 || voltageSelection > 1)
1084 return showError(_("Select a valid circuit breaker voltage range."));
1085
1086 result.breakerVoltageBand = voltageSelection == 0
1087 ? ArcFlashBreakerVoltageBand::V480_AND_LOWER
1088 : ArcFlashBreakerVoltageBand::V575_TO_690;
1089
1090 // Interrupting capacity I2, in kA.
1091 if (!parseDouble(m_textCtrlI2->GetValue(), result.i2_kA,
1092 _("Interrupting capacity (I₂) [kA]")))
1093 return false;
1094
1095 if (!requirePositive(result.i2_kA, _("Interrupting capacity (I₂) [kA]")))
1096 return false;
1097
1098 // I1 entered directly, or calculated from It.
1099 const int i1Selection = m_radioBoxI1->GetSelection();
1100
1101 if (i1Selection < 0 || i1Selection > 1)
1102 return showError(_("Select a valid minimum current calculation method."));
1103
1104 if (i1Selection == 0) {
1105 double i1_A = 0.0;
1106
1107 if (!parseDouble(m_textCtrl1->GetValue(), i1_A,
1108 _("Minimum current (I₁) [A]")))
1109 return false;
1110
1111 if (!requirePositive(i1_A, _("Minimum current (I₁) [A]")))
1112 return false;
1113
1114 result.i1Source = ArcFlashI1Source::DIRECT;
1115 result.i1_kA = i1_A / 1000.0;
1116 result.it_A = 0.0;
1117 result.breakerNominalCurrent_A = 0.0;
1118 }
1119 else {
1120 double nominalCurrent_A = 0.0;
1121 double it_A = 0.0;
1122
1123 if (!parseDouble(m_textCtrlIn->GetValue(), nominalCurrent_A,
1124 _("Nominal current [A]")))
1125 return false;
1126
1127 if (!requirePositive(nominalCurrent_A, _("Nominal current [A]")))
1128 return false;
1129
1130 if (!parseDouble(m_textCtrl1->GetValue(), it_A,
1131 _("Instant/Short-Time current (Iₜ) [A]")))
1132 return false;
1133
1134 if (!requirePositive(it_A, _("Instant/Short-Time current (Iₜ) [A]")))
1135 return false;
1136
1137 result.i1Source = ArcFlashI1Source::FROM_IT;
1138 result.breakerNominalCurrent_A = nominalCurrent_A;
1139 result.it_A = it_A;
1140 result.i1_kA = 0.0;
1141 }
1142 }
1143
1144 // Appendix H: fuse.
1145 if (result.method == ArcFlashProtectionMethod::ANNEX_H) {
1146 const int fuseClass = m_choiceFuseClass->GetSelection();
1147 const int currentSelection = m_choiceFuseCurrent->GetSelection();
1148 const int currentCount = static_cast<int>(m_choiceFuseCurrent->GetCount());
1149
1150 if (fuseClass < 0 || fuseClass > 1 || currentSelection < 0)
1151 return showError(_("Select a valid fuse class and current range."));
1152
1153 int familyIndex = -1;
1154
1155 if (currentCount == 4) {
1156 // The current-range choices contain only the ranges for the selected class.
1157 familyIndex = fuseClass * 4 + currentSelection;
1158 }
1159 else if (currentCount == 8) {
1160 // Support the original list containing both fuse classes.
1161 const int firstIndex = fuseClass * 4;
1162
1163 if (currentSelection < firstIndex || currentSelection >= firstIndex + 4)
1164 return showError(
1165 _("The selected fuse current range does not match the fuse class."));
1166
1167 familyIndex = currentSelection;
1168 }
1169 else {
1170 return showError(_("The fuse current range choices are invalid."));
1171 }
1172
1173 if (familyIndex < 0 || familyIndex > 7)
1174 return showError(_("Select a valid fuse current range."));
1175
1176 result.fuseFamily = static_cast<ArcFlashFuseFamily>(familyIndex);
1177 }
1178
1179 // Use flag associated with the currently selected device.
1180 const int selectedRow = m_dvListCtrlDevices->GetSelectedRow();
1181
1182 //if (selectedRow >= 0)
1183 // result.consider = m_dvListCtrlDevices->GetToggleValue(selectedRow, 0);
1184
1185 // The remaining fields that have no corresponding controls are preserved from the original data structure.
1186 result.configured = true;
1187
1188 data = result;
1189 return true;
1190}

Member Data Documentation

◆ m_basePower

double BusFormArcFlashProtection::m_basePower = 100e6
protected

Definition at line 46 of file BusFormArcFlashProtection.h.

◆ m_bus

Bus* BusFormArcFlashProtection::m_bus = nullptr
protected

Definition at line 45 of file BusFormArcFlashProtection.h.

◆ m_gridCornerHover

bool BusFormArcFlashProtection::m_gridCornerHover = false
protected

Definition at line 48 of file BusFormArcFlashProtection.h.

◆ m_previousDeviceSelection

wxDataViewItem BusFormArcFlashProtection::m_previousDeviceSelection
protected

Definition at line 49 of file BusFormArcFlashProtection.h.

◆ m_restoringDeviceSelection

bool BusFormArcFlashProtection::m_restoringDeviceSelection = false
protected

Definition at line 50 of file BusFormArcFlashProtection.h.

◆ m_tccPopup

TCCPopup* BusFormArcFlashProtection::m_tccPopup = nullptr
protected

Definition at line 47 of file BusFormArcFlashProtection.h.


The documentation for this class was generated from the following files: