Scope
|
#include <ScopeController_p.h>
Inherits scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Public Member Functions | |
Impl () | |
~Impl () | |
void | PrepareQuit () |
void | Version () const |
std::wstring | CurrentConfigFile () const |
void | InitializeHardware () |
void | StartLive () |
void | StartStack () |
void | StartSingle () |
void | StartTimeseries () |
void | StartBehavior () |
void | Stop () |
void | UpdateAreaParametersFromGui (const uint32_t &_area) |
bool | LoadParameters (const std::wstring &_filepath) |
bool | SaveParameters (const std::wstring &_filepath) |
void | SaveCurrentWindowPositions () |
void | SetStageZero () |
void | StackStartHere () |
void | StackStopHere () |
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 | SetFPUButtonsState (const bool &state) |
void | SetGuiCtrlState () |
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) |
void | ResolutionChange (const uint32_t &_area) |
void | SetHistogramLimits (const uint32_t &_area, const uint32_t &_channel, const uint16_t &_lower, const uint16_t &_upper) |
void | SetScanMode (const uint32_t &_area, const ScannerVectorType &_mode) |
void | RegisterScanmodeCallback (std::function< void(const uint32_t &, const ScannerVectorType &)> _callback) |
Public Member Functions inherited from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl | |
Impl (const parameters::Scope &_parameters) | |
virtual void | Start (const parameters::Scope &_params) |
virtual void | StopOne (const uint32_t &_a) |
virtual void | StopAll () |
virtual ControllerReturnStatus | WaitForOne (const uint32_t &_a, const int32_t &_wait_time) |
virtual ControllerReturnStatus | WaitForAll (const int32_t &_wait_time) |
Public Attributes | |
Hardware controllers | |
FPUController | theFPUs |
SCOPE_XYZCONTROL_T | theStage |
Protected Member Functions | |
Impl (const Impl &i) | |
Impl | operator= (const Impl &i) |
void | LogRun () |
void | StartAllControllers () |
void | StopAllControllers () |
void | WaitForAllControllers () |
void | ClearAllQueues () |
void | SetScannerVectorParameters () |
ControllerReturnStatus | RunLive (StopCondition *const sc) |
ControllerReturnStatus | RunSingle (StopCondition *const sc) |
ControllerReturnStatus | RunStack (StopCondition *const sc) |
ControllerReturnStatus | RunTimeseries (StopCondition *const sc) |
ControllerReturnStatus | RunBehavior (StopCondition *const sc) |
void | ClearAfterStop () |
Protected Member Functions inherited from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl | |
virtual ControllerReturnStatus | Run (StopCondition *const ac, const uint32_t &_n) |
Protected Attributes | |
std::array< SynchronizedQueue< ScopeMessage< SCOPE_DAQCHUNKPTR_T > >, SCOPE_NAREAS > | daq_to_pipeline |
SynchronizedQueue< ScopeMessage< SCOPE_MULTIIMAGEPTR_T > > | pipeline_to_storage |
SynchronizedQueue< ScopeMessage< SCOPE_MULTIIMAGEPTR_T > > | pipeline_to_display |
StopCondition | repeat_abort |
std::condition_variable | waitbetweenrepeats_cond |
std::mutex | waitbetweenrepeats_mutex |
std::future< void > | onlineupdate_future |
std::atomic< bool > | onlineupdate_running |
DWORD | time |
ScopeNumber< bool > | initialparametersloaded |
std::wstring | currentconfigfile |
std::vector< std::function< void(const uint32_t &, const ScannerVectorType &)> > | scanmodecallbacks |
ScopeLogger | scope_logger |
std::array< ScannerVectorFrameBasicPtr, SCOPE_NAREAS > | framescannervecs |
Dataflow controllers | |
DaqController | theDaq |
PipelineController | thePipeline |
StorageController | theStorage |
DisplayController | theDisplay |
Protected Attributes inherited from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl | |
std::array< std::shared_future< ControllerReturnStatus >, N_ACTIVES > | futures |
std::array< StopCondition, N_ACTIVES > | stops |
parameters::Scope | parameters |
The implementation class of the ScopeController.
Definition at line 32 of file ScopeController_p.h.
|
protected |
disable copy
|
inlineexplicit |
Initializes and connects stuff.
Definition at line 377 of file ScopeController_p.h.
|
inlinevirtual |
Stop whatever is running.
Reimplemented from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Definition at line 438 of file ScopeController_p.h.
|
inlineprotected |
Logs the current scan (not live scans)
Definition at line 97 of file ScopeController_p.h.
|
inlineprotected |
Starts all controllers with the current parameters.
Definition at line 123 of file ScopeController_p.h.
|
inlineprotected |
Stops all controllers in the correct order and waits for them to finish.
Definition at line 132 of file ScopeController_p.h.
|
inlineprotected |
Waits for all controllers to intrinsically finish.
Only good for nframes runmode
Definition at line 154 of file ScopeController_p.h.
|
inlineprotected |
Clear all queues between controllers.
Definition at line 162 of file ScopeController_p.h.
|
inlineprotected |
Set parameters for scanner vectors, since these are shared_ptr in DaqControllerDAQmx and PipelineController they get updated there too.
Definition at line 170 of file ScopeController_p.h.
|
inlineprotected |
Worker function to control live scanning (basically only starting everything up)
Definition at line 177 of file ScopeController_p.h.
|
inlineprotected |
Worker function to control a single scan.
Definition at line 186 of file ScopeController_p.h.
|
inlineprotected |
Worker function to control a stack scan.
Definition at line 197 of file ScopeController_p.h.
|
inlineprotected |
Worker function to control a timeseries scan.
Definition at line 271 of file ScopeController_p.h.
|
inlineprotected |
Worker function to control a behavior triggered scan.
Definition at line 317 of file ScopeController_p.h.
|
inlineprotected |
Clears queues, resets run state, and reenables controls.
Definition at line 359 of file ScopeController_p.h.
|
inline |
Called via CMainDialogFrame::QuitApplication.
Stops running threads etc, avoids destruction of these when the static pimpl gets destructed (probably very late or undefined).
Definition at line 444 of file ScopeController_p.h.
|
inline |
Prints out the last Git commit date of the currently running version (see description at ScopeController::Version)
Definition at line 455 of file ScopeController_p.h.
|
inline |
Definition at line 463 of file ScopeController_p.h.
|
inline |
(Re-)Initializes ScopeControllers own hardware components (XYControl/Stage, ZControl, and FPU stuff)
Definition at line 468 of file ScopeController_p.h.
|
inline |
Starts live scanning by running RunLive asynchronously.
Definition at line 475 of file ScopeController_p.h.
|
inline |
Start a stack scan by running RunStack asynchronously.
Definition at line 490 of file ScopeController_p.h.
|
inline |
Starts a single frame scan by running RunSingle asynchronously.
Definition at line 504 of file ScopeController_p.h.
|
inline |
Starts a timeseries by running RunTimeseries asynchronously.
Definition at line 518 of file ScopeController_p.h.
|
inline |
Starts a behavior triggered acquisition by running RunBehavior asynchronously.
Definition at line 537 of file ScopeController_p.h.
|
inline |
Stops whatever scanning is going on and clears the queues.
Definition at line 551 of file ScopeController_p.h.
|
inline |
Updates area parameters and scanner vectors in the controllers from the GuiParameters set without stopping scanning.
Definition at line 578 of file ScopeController_p.h.
|
inline |
Loads current parameter set from disk.
[in] | _filepath | path and name of parameters on disk |
Definition at line 623 of file ScopeController_p.h.
|
inline |
Saves the current parameter set to disk.
[in] | _filepath | path and name to save to |
Definition at line 636 of file ScopeController_p.h.
|
inline |
Saves current positions of windows by adding frames to WindowCollection of ScopeController::GuiParameters.
Definition at line 643 of file ScopeController_p.h.
|
inline |
Sets the current xyz stage position as zero.
Definition at line 651 of file ScopeController_p.h.
|
inline |
Sets the start stack position to the current z position.
Definition at line 656 of file ScopeController_p.h.
|
inline |
Sets the stop stack position to the current z position.
Definition at line 670 of file ScopeController_p.h.
|
inline |
Calls the DaqController to set Galvo outputs to zero.
Definition at line 684 of file ScopeController_p.h.
|
inline |
Opens/closes the shutter.
Definition at line 692 of file ScopeController_p.h.
|
inline |
Definition at line 697 of file ScopeController_p.h.
|
inline |
Turns the resonance scanner relay on and off.
Definition at line 702 of file ScopeController_p.h.
|
inline |
Definition at line 707 of file ScopeController_p.h.
|
inline |
Sets the state of the GUI buttons for FPU control (via the corresponding ScopeButtons).
True = enabled, false = disabled.
Definition at line 712 of file ScopeController_p.h.
|
inline |
Sets the state of GUI controls (via the corresponding ScopeNumbers).
True = read&write/enabled, false = readonly/disabled. Other GUI elements can connect to ReadOnlyWhileScanning.
Definition at line 723 of file ScopeController_p.h.
|
inline |
Attach a CChannelFrame as observer.
Definition at line 757 of file ScopeController_p.h.
|
inline |
Detach an observing CChannelFrame.
Definition at line 762 of file ScopeController_p.h.
|
inline |
Attach a CHistogramFrame as observer.
Definition at line 767 of file ScopeController_p.h.
|
inline |
Definition at line 772 of file ScopeController_p.h.
|
inline |
Detach an observing CHistogramFrame.
Definition at line 777 of file ScopeController_p.h.
|
inline |
Called via change of GuiParameters.areas[x].framesaw.scanvec.xres etc.
Definition at line 782 of file ScopeController_p.h.
|
inline |
Sets the color limits for displaying imgages, calls DisplayController::SetHistogramLimits.
Definition at line 787 of file ScopeController_p.h.
|
inline |
Sets the type of scanning.
Called via ScopeController ScanModeButtons. Calls the scanmode callbacks. Updates/recreates the scanvectors from a different type and sets them in theDaq and thePipeline
Definition at line 794 of file ScopeController_p.h.
|
inline |
Registers a function to call when scanmode is changed.
Usually CScanSettingsSheet registers for switching between FrameScan property pages.
Definition at line 813 of file ScopeController_p.h.
|
protected |
queues from the daqs to the pipelines
Definition at line 37 of file ScopeController_p.h.
|
protected |
queue from the pipelines to the storage
Definition at line 40 of file ScopeController_p.h.
|
protected |
queue from the pipelines to the display
Definition at line 43 of file ScopeController_p.h.
|
protected |
Scanner vectors.
The scanner vector for frame scanning
Definition at line 48 of file ScopeController_p.h.
|
protected |
thread-safe bool to signal a requested abort of a stack scan
Definition at line 60 of file ScopeController_p.h.
|
protected |
for abortable waiting between timeseries repeats
Definition at line 63 of file ScopeController_p.h.
|
protected |
for abortable waiting between timeseries repeats
Definition at line 66 of file ScopeController_p.h.
|
protected |
future for the online update thread
Definition at line 69 of file ScopeController_p.h.
|
protected |
set if an online update is currently running, to prevent to simultaneous online update threads
Definition at line 72 of file ScopeController_p.h.
|
protected |
stores the time to run a scan
Definition at line 75 of file ScopeController_p.h.
|
protected |
true after parameter set on program start is loaded
Definition at line 78 of file ScopeController_p.h.
|
protected |
currently loaded config
Definition at line 81 of file ScopeController_p.h.
|
protected |
list of callbacks for scan mode switching
Definition at line 84 of file ScopeController_p.h.
|
protected |
a logger kept handy
Definition at line 87 of file ScopeController_p.h.