46 : m_channelVoltage(std::make_unique<std::atomic<float>[] >(
n))
47 , m_channelCurrent(std::make_unique<std::atomic<float>[] >(
n))
48 , m_channelConstantCurrent(std::make_unique<std::atomic<bool>[] >(
n))
49 , m_channelFuseTripped(std::make_unique<std::atomic<bool>[] >(
n))
50 , m_channelOn(std::make_unique<std::atomic<bool>[] >(
n))
51 , m_needsUpdate(std::make_unique<std::atomic<bool>[] >(
n))
52 , m_overcurrentShutdownEnabled(std::make_unique<std::atomic<bool>[] >(
n))
53 , m_softStartEnabled(std::make_unique<std::atomic<bool>[] >(
n))
54 , m_committedSetVoltage(std::make_unique<
float[]>(
n))
55 , m_setVoltage(std::make_unique<std::string[]>(
n))
56 , m_committedSetCurrent(std::make_unique<
float[]>(
n))
57 , m_setCurrent(std::make_unique<std::string[]>(
n))
58 , m_committedSSRamp(std::make_unique<
float[]>(
n))
59 , m_setSSRamp(std::make_unique<std::string[]>(
n))
60 , m_firstUpdateDone(
false)
61 , m_masterEnable(
false)
64 for(
size_t i=0;
i<
n;
i++)
66 m_channelVoltage[
i] = 0;
67 m_channelCurrent[
i] = 0;
68 m_channelConstantCurrent[
i] =
false;
69 m_channelFuseTripped[
i] =
false;
70 m_channelOn[
i] =
false;
72 m_needsUpdate[
i] =
true;
73 m_overcurrentShutdownEnabled[
i] =
false;
74 m_softStartEnabled[
i]=
false;
81 void FlushConfigCache()
83 for(
size_t i = 0 ;
i < m_channelNumber.load() ;
i++)
84 m_needsUpdate[
i] =
true;
87 std::unique_ptr<std::atomic<float>[]> m_channelVoltage;
88 std::unique_ptr<std::atomic<float>[]> m_channelCurrent;
89 std::unique_ptr<std::atomic<bool>[]> m_channelConstantCurrent;
90 std::unique_ptr<std::atomic<bool>[]> m_channelFuseTripped;
91 std::unique_ptr<std::atomic<bool>[]> m_channelOn;
93 std::unique_ptr<std::atomic<bool>[]> m_needsUpdate;
95 std::unique_ptr<std::atomic<bool>[]> m_overcurrentShutdownEnabled;
96 std::unique_ptr<std::atomic<bool>[]> m_softStartEnabled;
98 std::unique_ptr<float[]> m_committedSetVoltage;
99 std::unique_ptr<std::string[]> m_setVoltage;
100 std::unique_ptr<float[]> m_committedSetCurrent;
101 std::unique_ptr<std::string[]> m_setCurrent;
102 std::unique_ptr<float[]> m_committedSSRamp;
103 std::unique_ptr<std::string[]> m_setSSRamp;
106 std::atomic<bool> m_firstUpdateDone;
108 std::atomic<bool> m_masterEnable;
110 std::atomic<size_t> m_channelNumber;