53 int m_voltageRangeIndex;
54 std::vector<std::string> m_voltageRangeNames;
56 int m_currentRangeIndex;
57 std::vector<std::string> m_currentRangeNames;
61 float m_committedSetPoint;
62 std::string m_setPoint;
65 : m_loadEnabled(
false)
66 , m_voltageRangeIndex(0)
67 , m_currentRangeIndex(0)
69 , m_committedSetPoint(0)
75 : m_loadEnabled(
load->GetLoadActive(
chan))
84 m_voltageRangeNames.push_back(
volts.PrettyPrint(
v));
85 m_voltageRangeIndex =
load->GetLoadVoltageRange(
chan);
91 m_currentRangeNames.push_back(
amps.PrettyPrint(
i));
92 m_currentRangeIndex =
load->GetLoadCurrentRange(
chan);
103 if(m_load ==
nullptr)
106 m_committedSetPoint = m_load->GetLoadSetPoint(m_chan);
116 m_setPoint =
amps.PrettyPrint(m_committedSetPoint);
120 m_setPoint =
volts.PrettyPrint(m_committedSetPoint);
124 m_setPoint =
watts.PrettyPrint(m_committedSetPoint);
128 m_setPoint =
ohms.PrettyPrint(m_committedSetPoint);
138 std::shared_ptr<Load> m_load;
148 virtual bool DoRender();
150 std::shared_ptr<SCPILoad> GetLoad()
153 void RefreshFromHardware();
171 std::vector<std::future<LoadChannelUIState> > m_futureUIState;
Definition AcceleratorBuffer.h:204
Generic dialog box or other popup window.
Definition Dialog.h:46
UI state for a single load channel.
Definition LoadDialog.h:49
void RefreshSetPoint()
Pulls the set point from hardware.
Definition LoadDialog.h:100
Definition LoadDialog.h:143
std::shared_ptr< SCPILoad > m_load
The load we're controlling.
Definition LoadDialog.h:162
void ChannelSettings(size_t channel)
Run settings for a single channel of the load.
Definition LoadDialog.cpp:161
double m_tstart
Timestamp of when we opened the dialog.
Definition LoadDialog.h:159
std::shared_ptr< LoadState > m_state
Current channel stats, live updated.
Definition LoadDialog.h:165
std::vector< std::string > m_channelNames
Set of channel names.
Definition LoadDialog.h:168
std::vector< LoadChannelUIState > m_channelUIState
Channel state for the UI.
Definition LoadDialog.h:174
LoadMode
Operating modes for the load.
Definition Load.h:62
@ MODE_CONSTANT_VOLTAGE
Draw as much current as needed for the input voltage to drop to the specified level.
Definition Load.h:67
@ MODE_CONSTANT_CURRENT
Draw a constant current regardless of supplied voltage.
Definition Load.h:64
@ MODE_CONSTANT_POWER
Draw a constant power regardless of supplied voltage.
Definition Load.h:73
@ MODE_CONSTANT_RESISTANCE
Emulate a fixed resistance.
Definition Load.h:70
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