Scope
|
#include <ScopeController.h>
Inherits scope::BaseController< 1, true >.
Inherited by scope::ScopeControllerModeBasic.
Classes | |
struct | FPUButtons |
class | Impl |
class | ModeLiveImpl |
struct | ScanModeButtons |
Public Member Functions | |
ScopeController (void) | |
void | Version () |
std::wstring | CurrentConfigFile () const |
void | PrepareQuit () |
bool | LoadParameters (const std::wstring &filepath) |
bool | SaveParameters (const std::wstring &filepath) |
void | ZeroGalvoOutputs () |
void | OpenCloseShutter (const uint32_t &_area, const bool &_open) |
bool | GetShutterState (const uint32_t &_area) const |
void | TurnOnOffSwitchResonance (const uint32_t &_area, const bool &_on) |
bool | GetSwitchResonanceState (const uint32_t &_area) const |
void | SaveCurrentWindowPositions () |
void | SetHistogramLimits (const uint32_t &_area, const uint32_t &_channel, const uint16_t &_lower, const uint16_t &_upper) |
void | SavePreset (const uint32_t &_area, const CString &_name) |
void | SelectPreset (const uint32_t &_area, const size_t &_n) |
void | RegisterScanmodeCallback (std::function< void(const uint32_t &, const ScannerVectorType &)> _callback) |
Attaching/Detaching channels and histograms | |
void | AttachFrame (gui::CChannelFrame *const cframe) |
void | DetachFrame (gui::CChannelFrame *const cframe) |
void | AttachFrame (gui::CHistogramFrame *const hframe) |
bool | HistogramAlreadyAttached (const uint32_t &_area) |
void | DetachFrame (gui::CHistogramFrame *const hframe) |
Public Member Functions inherited from scope::BaseController< 1, true > | |
virtual | ~BaseController () |
Impl * | Pimpl () const |
void | Start (const parameters::Scope &_parameters) |
void | StopAll () |
ControllerReturnStatus | WaitForAll (const int32_t &_wait_time=-1) |
Static Public Attributes | |
static parameters::Scope | GuiParameters |
static ScopeNumber< bool > | ReadOnlyWhileScanning |
ScopeButtons | |
GUI classes can connect CScopeButtonCtrl to these ScopeButtons via their scope_controller member and thus pass commands to the ScopeController. At the same time, the status of the WTL buttons can be controlled by the ScopeController (e.g. disable while scanning). I.e. ScopeButtons are mediators between the controls (CScopeButtonCtrl) and ScopeController functions to start certain stuff; if it weren't for the button state, CScopeButtonCtrl could directly connect to these functions... | |
static ScopeButton | StartSingleButton |
static ScopeButton | StartLiveButton |
static ScopeButton | StartStackButton |
static ScopeButton | StartTimeseriesButton |
static ScopeButton | StartBehaviorButton |
static ScopeButton | StopButton |
static ScopeButton | QuitButton |
static ScopeButton | StackStartHereButton |
static ScopeButton | StackStopHereButton |
static std::array< ScopeNumber< double >, SCOPE_NAREAS > | SingleFrameProgress |
static ScopeNumber< double > | PlaneCounter |
static std::array< ScopeNumber< double >, SCOPE_NAREAS > | FrameCounter |
static ScopeNumber< double > | RepeatCounter |
static ScopeNumber< double > | TrialCounter |
static ScopeNumber< double > | TotalTime |
static ScopeButton | StageZeroButton |
static std::array< FPUButtons, SCOPE_NAREAS > | FPU |
static std::array< ScanModeButtons, SCOPE_NAREAS > | ScanMode |
Protected Member Functions | |
Impl & | GetImpl () |
Impl *const | Pimpl () const |
Protected Member Functions inherited from scope::BaseController< 1, true > | |
BaseController (Impl *const _pimpl) | |
Additional Inherited Members | |
Protected Attributes inherited from scope::BaseController< 1, true > | |
Impl *const | pimpl |
Main controller of microscope hardware and acquisition, also interface to the GUI.
Implements: Singleton, ActiveObject, Pimpl
Definition at line 45 of file ScopeController.h.
scope::ScopeController::ScopeController | ( | void | ) |
Injects pimpl of ScopeController into BaseControllers pimpl (saves memory, since pointer is reused for the current pimpl)
Definition at line 37 of file ScopeController.cpp.
|
protected |
static local variable for singleton is in there.
Definition at line 28 of file ScopeController.cpp.
|
protected |
Definition at line 33 of file ScopeController.cpp.
void scope::ScopeController::Version | ( | ) |
Print the current ScopeController version to debug console.
This should be called before creation of the GUI, when only the main thread exists. Then the static member in GetImpl() is initialized and we do not have to worry about thread-safe singleton creation...
Definition at line 78 of file ScopeController.cpp.
std::wstring scope::ScopeController::CurrentConfigFile | ( | ) | const |
Definition at line 82 of file ScopeController.cpp.
void scope::ScopeController::PrepareQuit | ( | ) |
Called by CMainDialogFrame::QuitApplication.
Stops running threads etc, avoids destruction of these when the static pimpl gets destructed (probably very late or undefined). Calls ScopeController::ScopeControllerImpl::PrepareQuit
Definition at line 46 of file ScopeController.cpp.
bool scope::ScopeController::LoadParameters | ( | const std::wstring & | filepath | ) |
Load a complete ScopeParameters set from disk.
Calls ScopeControllerImpl::LoadParameters.
Definition at line 50 of file ScopeController.cpp.
bool scope::ScopeController::SaveParameters | ( | const std::wstring & | filepath | ) |
Store the current complete ScopeParameters set to disk.
Calls ScopeControllerImpl::SaveParameters (non-const since we update parameters from GUI first).
Definition at line 54 of file ScopeController.cpp.
void scope::ScopeController::ZeroGalvoOutputs | ( | ) |
Zeros galvo outputs.
Calls ScopeControllerImpl::ZeroGalvoOutputs.
Definition at line 58 of file ScopeController.cpp.
void scope::ScopeController::OpenCloseShutter | ( | const uint32_t & | _area, |
const bool & | _open | ||
) |
Opens/closes the shutter.
Calls ScopeControllerImpl::OpenCloseShutter
Definition at line 62 of file ScopeController.cpp.
bool scope::ScopeController::GetShutterState | ( | const uint32_t & | _area | ) | const |
Current state of the shutter.
Calls ScopeControllerImpl::GetShutterState
Definition at line 66 of file ScopeController.cpp.
void scope::ScopeController::TurnOnOffSwitchResonance | ( | const uint32_t & | _area, |
const bool & | _on | ||
) |
Turns the resonance scanner relay on and off.
Calls ScopeControllerImpl::TurnOnOffSwitchResonance
Definition at line 70 of file ScopeController.cpp.
bool scope::ScopeController::GetSwitchResonanceState | ( | const uint32_t & | _area | ) | const |
Current state of the resonance scanner relay.
Calls ScopeControllerImpl::GetShutterState
Definition at line 74 of file ScopeController.cpp.
void scope::ScopeController::SaveCurrentWindowPositions | ( | ) |
Saves current positions of windows by adding frames to WindowCollection of ScopeController::GuiParameters.
Calls ScopeControllerImpl::SaveCurrentWindowPositions.
Definition at line 106 of file ScopeController.cpp.
void scope::ScopeController::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.
Calls ScopeControllerImpl::SetHistogramLimits.
Definition at line 110 of file ScopeController.cpp.
void scope::ScopeController::SavePreset | ( | const uint32_t & | _area, |
const CString & | _name | ||
) |
Saves the current values as a preset with name _name.
Calls ScopeControllerImpl::SavePreset.
void scope::ScopeController::SelectPreset | ( | const uint32_t & | _area, |
const size_t & | _n | ||
) |
Writes the parameters of the selected preset into daq and svframe.
Calls ScopeControllerImpl::SelectPreset.
void scope::ScopeController::RegisterScanmodeCallback | ( | std::function< void(const uint32_t &, const ScannerVectorType &)> | _callback | ) |
Registers a function to call when scanmode is changed.
Usually CScanSettingsSheet registers for switching between FrameScan property pages. Calls ScopeControllerImpl::RegisterScanModeCallback
Definition at line 114 of file ScopeController.cpp.
|
static |
The complete pseudo-global parameter set of the microscope.
GUI classes can connect e.g. CScopeEditCtrl to specific parameters and thus pass values to the ScopeController. At the same time, the status of the controls can be controlled by the ScopeController (e.g. disable while scanning).
Definition at line 99 of file ScopeController.h.
|
static |
Set to true while scanning, GUI elements can connect to this to disable buttons and controls (that are not matched by static ScopeButtons etc here) while scanning.
Definition at line 103 of file ScopeController.h.
|
static |
Updated from PipelineControllerImpl::Run.
Definition at line 122 of file ScopeController.h.
|
static |
Updated from ScopeControllerImpl::RunStack, connected to progress indicator in CStackSettingsPage.
Definition at line 125 of file ScopeController.h.
|
static |
Updated from PipelineControllerImpl::Run, connected to progress indicator in CTimeSeriesSettingsPage or edit control in CBehaviorSettingsPage.
Definition at line 128 of file ScopeController.h.
|
static |
Updated from ScopeControllerImpl::RunTimeseries, connected to progress indicator in CTimeSeriesSettingsPage.
Definition at line 131 of file ScopeController.h.
|
static |
Updated from ScopeControllerImpl::RunBehavior, connected to edit control in CBehaviorSettingsPage.
Definition at line 134 of file ScopeController.h.
|
static |
Updated from e.g.
ScopeControllerImpl::RunBehavior, connected to time indicator in CBehaviorSettingsPage
Definition at line 137 of file ScopeController.h.
|
static |
Button to zero main stage coordinates.
Definition at line 140 of file ScopeController.h.
|
static |
Buttons for FPU nudge.
Definition at line 143 of file ScopeController.h.
|
static |
Buttons for switching the scan mode.
Definition at line 146 of file ScopeController.h.