36#ifndef KuaiquPowerSupply_h
37#define KuaiquPowerSupply_h
59 virtual double GetPowerVoltageActual(
int chan)
override;
60 virtual double GetPowerVoltageNominal(
int chan)
override;
61 virtual double GetPowerCurrentActual(
int chan)
override;
62 virtual double GetPowerCurrentNominal(
int chan)
override;
63 virtual bool GetPowerChannelActive(
int chan)
override;
66 virtual void SetPowerVoltage(
int chan,
double volts)
override;
67 virtual void SetPowerCurrent(
int chan,
double amps)
override;
68 virtual void SetPowerChannelActive(
int chan,
bool on)
override;
69 virtual bool IsPowerConstantCurrent(
int chan)
override;
73 COMMAND_WRITE_VOLTAGE=
'1',
74 COMMAND_READ_VOLTAGE =
'2',
75 COMMAND_WRITE_CURRENT=
'3',
76 COMMAND_READ_CURRENT =
'4',
77 COMMAND_KEYPAD_ECHO =
'5',
78 COMMAND_FIRMWARE =
'6',
86 std::recursive_mutex m_transportMutex;
88 std::chrono::milliseconds m_rateLimitingInterval = std::chrono::milliseconds(4);
89 std::chrono::system_clock::time_point m_nextCommandReady = std::chrono::system_clock::now();
92 bool SendWriteValueCommand(Command command,
double value);
93 double SendReadValueCommand(Command command);
94 std::string SendSimpleCommand(Command command);
95 std::string SendCommand(Command command, std::string commandString);
100 double m_voltage = 0;
101 bool m_constantCurrent =
false;
A KUAIQU power supply.
Definition: KuaiquPowerSupply.h:46
virtual bool SupportsVoltageCurrentControl(int chan) override
Determines if the power supply supports voltage/current control for the given channel.
Definition: KuaiquPowerSupply.cpp:212
KuaiquPowerSupply(SCPITransport *transport)
Initialize the driver.
Definition: KuaiquPowerSupply.cpp:49
static std::string GetDriverNameInternal()
Return the constant driver name strnig "kuaiqu_psu".
Definition: KuaiquPowerSupply.cpp:194
virtual bool SupportsIndividualOutputSwitching() override
Determines if the power supply supports switching individual output channels.
Definition: KuaiquPowerSupply.cpp:207
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: KuaiquPowerSupply.cpp:199
An SCPI-based oscilloscope.
Definition: SCPIInstrument.h:38
An SCPI-based power supply.
Definition: SCPIPowerSupply.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47