38#ifndef AlientekPowerSupply_h
39#define AlientekPowerSupply_h
61 virtual double GetPowerVoltageActual(
int chan)
override;
62 virtual double GetPowerVoltageNominal(
int chan)
override;
63 virtual double GetPowerCurrentActual(
int chan)
override;
64 virtual double GetPowerCurrentNominal(
int chan)
override;
65 virtual bool GetPowerChannelActive(
int chan)
override;
68 virtual void SetPowerVoltage(
int chan,
double volts)
override;
69 virtual void SetPowerCurrent(
int chan,
double amps)
override;
70 virtual void SetPowerChannelActive(
int chan,
bool on)
override;
71 virtual bool IsPowerConstantCurrent(
int chan)
override;
74 enum Function : uint8_t
92 enum Operation : uint8_t
99 void SendReceiveReport(Function function,
int sequence = -1, std::vector<uint8_t>* data =
nullptr);
100 void SendGetBasicSetReport();
101 void SendSetBasicSetReport();
103 uint8_t m_deviceAdress = 0xFB;
106 std::chrono::system_clock::time_point m_nextBasicInfoUpdate;
107 std::chrono::milliseconds m_basicInfoCacheDuration = std::chrono::milliseconds(10);
108 std::chrono::system_clock::time_point m_nextBasicSetUpdate;
109 std::chrono::milliseconds m_basicSetCacheDuration = std::chrono::milliseconds(1000);
An Alientek DP-100 power supply or other equivalent model.
Definition: AlientekPowerSupply.h:48
double m_iOutSet
Set output current in A.
Definition: AlientekPowerSupply.h:124
double m_iOut
Actual output current in A.
Definition: AlientekPowerSupply.h:121
uint8_t m_outMode
Output mode => 0 = CC, 1 = CV, 2 = OVP/OCP (according to workState)
Definition: AlientekPowerSupply.h:139
virtual bool SupportsIndividualOutputSwitching() override
Determines if the power supply supports switching individual output channels.
Definition: AlientekPowerSupply.cpp:111
bool m_powerState
Power state.
Definition: AlientekPowerSupply.h:151
double m_temp2
Temperature 2 in °C.
Definition: AlientekPowerSupply.h:133
uint8_t m_workState
Work state => 1 = OVP, 2 = OCP.
Definition: AlientekPowerSupply.h:142
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: AlientekPowerSupply.cpp:103
double m_ovpSet
Over-voltage protection setting in V.
Definition: AlientekPowerSupply.h:145
virtual bool SupportsVoltageCurrentControl(int chan) override
Determines if the power supply supports voltage/current control for the given channel.
Definition: AlientekPowerSupply.cpp:116
double m_temp1
Temperature 1 in °C.
Definition: AlientekPowerSupply.h:130
double m_vOutSet
Set output voltage in V.
Definition: AlientekPowerSupply.h:118
static std::string GetDriverNameInternal()
Return the constant driver name "alientek_dp".
Definition: AlientekPowerSupply.cpp:98
double m_dc5V
5V rail in V.
Definition: AlientekPowerSupply.h:136
double m_ocpSet
Over-current protection setting in A.
Definition: AlientekPowerSupply.h:148
double m_vOutMax
Max output voltage in V.
Definition: AlientekPowerSupply.h:127
double m_vIn
Input voltage in V.
Definition: AlientekPowerSupply.h:112
double m_vOut
Actual output voltage in V.
Definition: AlientekPowerSupply.h:115
Base class for instruments using USB HID communication protocol.
Definition: HIDInstrument.h:46
An SCPI-based power supply.
Definition: SCPIPowerSupply.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47