Scope
DaqController.cpp
1 #include "stdafx.h"
2 #include "DaqController.h"
3 #include "DaqController_p.h"
4 
5 namespace scope {
6 
7 DaqController::DaqController(std::array<SynchronizedQueue<ScopeMessage<SCOPE_DAQCHUNKPTR_T>>, SCOPE_NAREAS>* const _oqueues, const parameters::Scope& _parameters)
8  : BaseController( new Impl(_oqueues, _parameters)) {
9 }
10 
12  DBOUT(L"DaqController::~DaqController\n");
13  StopAll();
14 }
15 
17  : BaseController(newpimpl) {
18 }
19 
22 }
23 
25  Pimpl()->OnlineParameterUpdate(_areaparameters);
26 }
27 
28 void DaqController::AbortOnlineParameterUpdate(const uint32_t& _area) {
30 }
31 
34 }
35 
36 void DaqController::SetScannerVector(const uint32_t& _area, ScannerVectorFrameBasicPtr _sv) {
37  Pimpl()->SetScannerVector(_area, _sv);
38 }
39 
40 void DaqController::OpenCloseShutter(const uint32_t& _area, const bool& _open) {
41  Pimpl()->OpenCloseShutter(_area, _open);
42 }
43 
44 bool DaqController::GetShutterState(const uint32_t& _area) const {
45  return Pimpl()->GetShutterState(_area);
46 }
47 
48 void DaqController::TurnOnOffSwitchResonance(const uint32_t& _area, const bool& _on) {
49  Pimpl()->TurnOnOffSwitchResonance(_area, _on);
50 }
51 
52 bool DaqController::GetSwitchResonanceState(const uint32_t& _area) const {
53  return Pimpl()->GetSwitchResonanceState(_area);
54 }
55 
56 }
Parameters for a whole area (includes a daq and a fpu)
Definition: Scope.h:64
void OpenCloseShutter(const uint32_t &_area, const bool &_open)
Opens/closes the shutter.
void StopAll()
Stop the controller, calls BaseController::Impl::StopAll.
void SetScannerVector(const uint32_t &_area, ScannerVectorFrameBasicPtr _sv)
Sets a scanner vector.
The implementation class of the DaqController.
The master parameters class.
Definition: Scope.h:204
void AbortOnlineParameterUpdate(const uint32_t &_area)
Aborts a potentially currently running online update.
void ZeroGalvoOutputs()
Zeros galvo outputs.
Impl * Pimpl() const
void ZeroGalvoOutputs()
Sets all galvos to zero position, needed for microscope alignment.
void AbortOnlineParameterUpdate(const uint32_t &_area)
Aborts a running online parameters update (aborts the block-wise Outputs::Write operation) ...
bool GetShutterState(const uint32_t &_area) const
DaqController(DaqController &other)
disable copy
This is the include file for standard system include files, or project specific include files that ar...
void OnlineParameterUpdate(const parameters::Area &_areaparameters)
Handles update of parameters during scanning.
void OnlineParameterUpdate(const parameters::Area &_areaparameters)
Changes daq parameters during live scan.
void SetScannerVector(const uint32_t &_area, ScannerVectorFrameBasicPtr _sv)
Sets a scanner vector.
void OpenCloseShutter(const uint32_t &_area, const bool &_open)
Opens/closes the shutter.
#define DBOUT(s)
A debug output to the debug console.
Definition: helpers.h:153
~DaqController()
Stops all.
Impl *const Pimpl() const
A synchronized, thread-safe queue was modeled after ringbuffer example from boost?! and/or a Herb Sutter column?!
Definition: DaqController.h:7
void TurnOnOffSwitchResonance(const uint32_t &_area, const bool &_on)
Turns the resonance scanner relay on and off.
bool GetShutterState(const uint32_t _area) const
Base class for all controllers.
void TurnOnOffSwitchResonance(const uint32_t &_area, const bool &_on)
Turns the resonance scanner relay on and off.
bool GetSwitchResonanceState(const uint32_t _area) const
bool GetSwitchResonanceState(const uint32_t &_area) const