Scope
DaqController.h
1 #pragma once
2 
3 #include "ScopeDefines.h"
4 #include "BaseController.h"
5 
6 // Foward declarations
7 template<class T> class SynchronizedQueue;
8 template<class T> class ScopeMessage;
9 namespace scope {
10  class DaqChunk;
11  typedef std::shared_ptr<DaqChunk> DaqChunkPtr;
12  class DaqChunkResonance;
13  typedef std::shared_ptr<DaqChunkResonance> DaqChunkResonancePtr;
14  namespace parameters {
15  class Scope;
16  class Area;
17  }
18  class ScannerVectorFrameBasic;
19  typedef std::shared_ptr<ScannerVectorFrameBasic> ScannerVectorFrameBasicPtr;
20  enum ControllerReturnStatus;
21 }
22 
23 namespace scope {
24 
33  : public BaseController<SCOPE_NAREAS> {
34 
35 protected:
37  class Impl;
38 
39 protected:
42 
45 
47  explicit DaqController(Impl*);
48 
50  Impl* const Pimpl() const;
51 
52 public:
54  DaqController(std::array<SynchronizedQueue<ScopeMessage<SCOPE_DAQCHUNKPTR_T>>, SCOPE_NAREAS>* const _oqueues, const parameters::Scope& _parameters);
55 
58 
60  void OnlineParameterUpdate(const parameters::Area& _areaparameters);
61 
63  void AbortOnlineParameterUpdate(const uint32_t& _area);
64 
66  void ZeroGalvoOutputs();
67 
69  void SetScannerVector(const uint32_t& _area, ScannerVectorFrameBasicPtr _sv);
70 
72  void OpenCloseShutter(const uint32_t& _area, const bool& _open);
73 
75  bool GetShutterState(const uint32_t& _area) const;
76 
78  void TurnOnOffSwitchResonance(const uint32_t& _area, const bool& _on);
79 
81  bool GetSwitchResonanceState(const uint32_t& _area) const;
82 };
83 
84 }
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 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.
The DaqController controls the data acquisition hardware, both outputs for scanners as well as input ...
Definition: DaqController.h:32
Message with tag and cargo for SyncQueues between controllers.
Definition: DaqController.h:8
void ZeroGalvoOutputs()
Sets all galvos to zero position, needed for microscope alignment.
DaqController & operator=(DaqController &other)
disable assignment
bool GetShutterState(const uint32_t &_area) const
DaqController(DaqController &other)
disable copy
void OnlineParameterUpdate(const parameters::Area &_areaparameters)
Changes daq parameters during live scan.
~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
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