Scope
SwitchResonance.h
1 #pragma once
2 
3 #include "daqmx/DAQmxTask.h"
4 
5 namespace scope {
6 
10 
11 protected:
14 
16  mutable std::atomic<bool> state;
17 
19  const uint8_t ondata;
20 
22  const uint8_t offdata;
23 
24 public:
26 
29 
31  void Initialize(const std::wstring& _outputline);
32 
34  void TurnOn(void);
35 
37  void TurnOff(void);
38 
40  void Set(const bool& _on);
41 
43  bool GetState() const { return state; }
44 };
45 
46 }
void TurnOn(void)
Turns the relay on.
~SwitchResonance()
Relay gets closed on destruction.
Controls the relay for turning on and off the resonance scanner via DAQmx one line digital output...
void Set(const bool &_on)
Turns the relay on and off.
const uint8_t ondata
a one
Wraps a DAQmx Digital Output task.
Definition: DAQmxTask.h:224
void Initialize(const std::wstring &_outputline)
Relay gets closed on initialization.
void TurnOff(void)
Turns the relay off.
std::atomic< bool > state
current relay state
const uint8_t offdata
a zero
DAQmx::CDAQmxDigitalOutTask task
the DAQmx task