35#ifndef PowerSupplyDialog_h
36#define PowerSupplyDialog_h
52 bool m_overcurrentShutdownEnabled;
53 bool m_softStartEnabled;
55 std::string m_setVoltage;
56 std::string m_setCurrent;
57 std::string m_setSSRamp;
59 float m_committedSetVoltage;
60 float m_committedSetCurrent;
61 float m_committedSSRamp;
64 : m_outputEnabled(
false)
65 , m_overcurrentShutdownEnabled(
false)
66 , m_softStartEnabled(
false)
69 , m_committedSetVoltage(0)
70 , m_committedSetCurrent(0)
71 , m_committedSSRamp(0)
75 : m_outputEnabled(
psu->GetPowerChannelActive(
chan))
76 , m_overcurrentShutdownEnabled(
psu->GetPowerOvercurrentShutdownEnabled(
chan))
77 , m_softStartEnabled(
psu->IsSoftStartEnabled(
chan))
78 , m_committedSetVoltage(
psu->GetPowerVoltageNominal(
chan))
79 , m_committedSetCurrent(
psu->GetPowerCurrentNominal(
chan))
80 , m_committedSSRamp(
psu->GetSoftStartRampTime(
chan))
85 m_setVoltage =
volts.PrettyPrint(m_committedSetVoltage);
86 m_setCurrent =
amps.PrettyPrint(m_committedSetCurrent);
87 m_setSSRamp =
fs.PrettyPrint(m_committedSSRamp);
97 virtual bool DoRender();
99 void RefreshFromHardware();
101 std::shared_ptr<SCPIPowerSupply> GetPSU()
106 void AsyncLoadState();
115 std::shared_ptr<SCPIPowerSupply>
m_psu;
121 std::vector<std::future<PowerSupplyChannelUIState> > m_futureUIState;
Definition AcceleratorBuffer.h:204
Generic dialog box or other popup window.
Definition Dialog.h:46
UI state for a single power supply channel.
Definition PowerSupplyDialog.h:49
Definition PowerSupplyDialog.h:92
double m_tstart
Timestamp of when we opened the dialog.
Definition PowerSupplyDialog.h:112
std::vector< PowerSupplyChannelUIState > m_channelUIState
Channel state for the UI.
Definition PowerSupplyDialog.h:124
std::shared_ptr< SCPIPowerSupply > m_psu
The PSU we're controlling.
Definition PowerSupplyDialog.h:115
std::shared_ptr< PowerSupplyState > m_state
Current channel stats, live updated.
Definition PowerSupplyDialog.h:118
void ChannelSettings(int i, float v, float a, float etime)
A single channel's settings.
Definition PowerSupplyDialog.cpp:184
A Session stores all of the instrument configuration and other state the user has open.
Definition Session.h:126
A unit of measurement, plus conversion to pretty-printed output.
Definition Unit.h:59