2 #include "helpers/ScopeButton.h"
3 #include "helpers/ScopeScanModeButton.h"
4 #include "helpers/ScopeNumber.h"
5 #include "parameters/Scope.h"
7 #include "BaseController.h"
8 #include "BaseController_p.h"
11 #include "devices\fpga\FPGAPhotonCounter.h"
12 #include "devices\fpga\FPGADigitalDemultiplexer.h"
13 #include "devices\fpga\FPGAAnalogIntegrator.h"
14 #include "devices\fpga\FPGAAnalogDemultiplexer.h"
15 #include "devices\fpga\FPGANoiseOutput.h"
16 #include "devices\fpga\FPGAResonanceScanner.h"
17 #include "devices\fpga\FPGAResonanceScanner_NI5771.h"
26 class CHistogramFrame;
84 std::map<ScannerVectorTypeHelper::Mode, ScopeScanModeButton>
map;
88 map.emplace(ScannerVectorTypeHelper::Mode::Bidirectional,
ScopeScanModeButton(ScannerVectorTypeHelper::Mode::Bidirectional));
89 map.emplace(ScannerVectorTypeHelper::Mode::LineStraight,
ScopeScanModeButton(ScannerVectorTypeHelper::Mode::LineStraight));
90 map.emplace(ScannerVectorTypeHelper::Mode::Planehopper,
ScopeScanModeButton(ScannerVectorTypeHelper::Mode::Planehopper));
91 map.emplace(ScannerVectorTypeHelper::Mode::ResonanceBiDi,
ScopeScanModeButton(ScannerVectorTypeHelper::Mode::ResonanceBiDi));
92 map.emplace(ScannerVectorTypeHelper::Mode::ResonanceHopper,
ScopeScanModeButton(ScannerVectorTypeHelper::Mode::ResonanceHopper));
93 map.emplace(ScannerVectorTypeHelper::Mode::Sawtooth,
ScopeScanModeButton(ScannerVectorTypeHelper::Mode::Sawtooth));
143 static std::array<FPUButtons, SCOPE_NAREAS>
FPU;
146 static std::array<ScanModeButtons, SCOPE_NAREAS>
ScanMode;
193 bool HistogramAlreadyAttached(
const uint32_t& _area);
202 void SetHistogramLimits(
const uint32_t& _area,
const uint32_t& _channel,
const uint16_t& _lower,
const uint16_t& _upper);
205 void SavePreset(
const uint32_t& _area,
const CString& _name);
208 void SelectPreset(
const uint32_t& _area,
const size_t& _n);
Main controller of microscope hardware and acquisition, also interface to the GUI.
std::wstring CurrentConfigFile() const
static ScopeButton StageZeroButton
Button to zero main stage coordinates.
static ScopeNumber< double > TrialCounter
Updated from ScopeControllerImpl::RunBehavior, connected to edit control in CBehaviorSettingsPage.
static std::array< ScopeNumber< double >, SCOPE_NAREAS > FrameCounter
Updated from PipelineControllerImpl::Run, connected to progress indicator in CTimeSeriesSettingsPage ...
The master parameters class.
bool GetShutterState(const uint32_t &_area) const
Current state of the shutter.
void SetHistogramLimits(const uint32_t &_area, const uint32_t &_channel, const uint16_t &_lower, const uint16_t &_upper)
Sets display limits for a certain area and channel.
Base class for all Scope datatypes here, provides a uniform interface (and saves typing...).
Manages the display of images.
bool GetSwitchResonanceState(const uint32_t &_area) const
Current state of the resonance scanner relay.
void RegisterScanmodeCallback(std::function< void(const uint32_t &, const ScannerVectorType &)> _callback)
Registers a function to call when scanmode is changed.
Impl *const Pimpl() const
In here all declarations for all kinds of datatypes Scope needs.
static ScopeNumber< double > PlaneCounter
Updated from ScopeControllerImpl::RunStack, connected to progress indicator in CStackSettingsPage.
bool LoadParameters(const std::wstring &filepath)
Load a complete ScopeParameters set from disk.
Manages the display of histograms.
static ScopeNumber< double > TotalTime
Updated from e.g.
static std::array< ScanModeButtons, SCOPE_NAREAS > ScanMode
Buttons for switching the scan mode.
Impl & GetImpl()
static local variable for singleton is in there.
The implementation class of the ScopeController.
void SelectPreset(const uint32_t &_area, const size_t &_n)
Writes the parameters of the selected preset into daq and svframe.
void ZeroGalvoOutputs()
Zeros galvo outputs.
Describes the scanner vector type.
bool SaveParameters(const std::wstring &filepath)
Store the current complete ScopeParameters set to disk.
void SavePreset(const uint32_t &_area, const CString &_name)
Saves the current values as a preset with name _name.
void OpenCloseShutter(const uint32_t &_area, const bool &_open)
Opens/closes the shutter.
static std::array< FPUButtons, SCOPE_NAREAS > FPU
Buttons for FPU nudge.
void SaveCurrentWindowPositions()
Saves current positions of windows by adding frames to WindowCollection of ScopeController::GuiParame...
static std::array< ScopeNumber< double >, SCOPE_NAREAS > SingleFrameProgress
Updated from PipelineControllerImpl::Run.
ScopeController(void)
Injects pimpl of ScopeController into BaseControllers pimpl (saves memory, since pointer is reused fo...
static parameters::Scope GuiParameters
The complete pseudo-global parameter set of the microscope.
Base class for all controllers.
void TurnOnOffSwitchResonance(const uint32_t &_area, const bool &_on)
Turns the resonance scanner relay on and off.
void Version()
Print the current ScopeController version to debug console.
static ScopeNumber< bool > ReadOnlyWhileScanning
Set to true while scanning, GUI elements can connect to this to disable buttons and controls (that ar...
static ScopeNumber< double > RepeatCounter
Updated from ScopeControllerImpl::RunTimeseries, connected to progress indicator in CTimeSeriesSettin...
void PrepareQuit()
Called by CMainDialogFrame::QuitApplication.
The implementation class of the ScopeController.