Scope
|
#include <DaqController_p.h>
Inherits scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Public Member Functions | |
Impl (std::array< SynchronizedQueue< ScopeMessage< SCOPE_DAQCHUNKPTR_T >>, SCOPE_NAREAS > *const _oqueues, const parameters::Scope &_parameters) | |
virtual | ~Impl () |
void | Start (const parameters::Scope &_params) override |
void | OnlineParameterUpdate (const parameters::Area &_areaparameters) |
void | WorkerOnlineParameterUpdate (const uint32_t _area) |
void | AbortOnlineParameterUpdate (const uint32_t &_area) |
void | ZeroGalvoOutputs () |
void | SetScannerVector (const uint32_t &_area, ScannerVectorFrameBasicPtr _sv) |
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 |
Public Member Functions inherited from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl | |
Impl (const parameters::Scope &_parameters) | |
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) |
Protected Member Functions | |
Impl (const Impl &i) | |
Impl | operator= (const Impl &i) |
ControllerReturnStatus | Run (StopCondition *const sc, const uint32_t &_area) override |
Protected Attributes | |
std::array< SynchronizedQueue< ScopeMessage< SCOPE_DAQCHUNKPTR_T > >, SCOPE_NAREAS > *const | output_queues |
std::array< std::unique_ptr< Outputs >, SCOPE_NAREAS > | outputs |
std::array< std::unique_ptr< Inputs >, SCOPE_NAREAS > | inputs |
std::unique_ptr< SCOPE_STIMULATIONS_T > | stimulation |
std::array< Shutter, SCOPE_NAREAS > | shutters |
std::array< SwitchResonance, SCOPE_NAREAS > | switches |
std::array< ScannerVectorFrameBasicPtr, SCOPE_NAREAS > | scannervecs |
StimulationVector | stimvec |
std::array< uint32_t, SCOPE_NAREAS > | chunksizes |
std::array< std::condition_variable, SCOPE_NAREAS > | online_update_done |
std::array< std::atomic< bool >, SCOPE_NAREAS > | online_update_done_flag |
std::array< std::mutex, SCOPE_NAREAS > | online_update_done_mutexe |
ScopeLogger | scope_logger |
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 DaqController.
Every area runs in one thread.
Definition at line 28 of file DaqController_p.h.
|
protected |
disable copy
|
inlineexplicit |
Sets the output queues, generates initial ScannerVectors and initializes the shutters and the resonance scanner switches.
[in] | _oqueues | output queues |
[in] | _parameters | initial ScopeParameters set |
Definition at line 155 of file DaqController_p.h.
|
inlinevirtual |
Stops and interrupts everything and zeros galvo outputs.
Reimplemented from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Definition at line 172 of file DaqController_p.h.
|
inlineoverrideprotectedvirtual |
Main function for running data acquisition.
It is executed asynchronously. For every area one Run function is executed (since DaqController is derived from BaseController<SCOPE_NAREAS>).
Reimplemented from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Definition at line 80 of file DaqController_p.h.
|
inlineoverridevirtual |
Starts the DaqController.
Calculates ScannerVector and StimulationVector. Calculates various acquisition related rates. Creates tasks sets timing and triggering. Writes ScannerVector and StimulationVector, opens the shutters, turns on the resonance scanner switches, starts all tasks, starts all Run methods asynchronously and gets their futures.
[in] | _params | ScopeParameter set to work with |
Reimplemented from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Definition at line 183 of file DaqController_p.h.
|
inline |
Handles update of parameters during scanning.
Definition at line 256 of file DaqController_p.h.
|
inline |
Does the actual writing to device for an online update.
Definition at line 276 of file DaqController_p.h.
|
inline |
Aborts a running online parameters update (aborts the block-wise Outputs::Write operation)
Definition at line 297 of file DaqController_p.h.
|
inline |
Zeros galvo outputs.
Definition at line 303 of file DaqController_p.h.
|
inline |
|
inline |
Opens/closes the shutter.
Calls DaqController::Impl::OpenCloseShutter
Definition at line 330 of file DaqController_p.h.
|
inline |
Definition at line 336 of file DaqController_p.h.
|
inline |
Turns the resonance scanner relay on and off.
Definition at line 341 of file DaqController_p.h.
|
inline |
Definition at line 347 of file DaqController_p.h.
|
protected |
array holding the output queues to the PipelineControllers
Definition at line 33 of file DaqController_p.h.
|
protected |
The outputs (pointers to base class)
Definition at line 36 of file DaqController_p.h.
|
protected |
The inputs (pointers to base class)
Definition at line 39 of file DaqController_p.h.
|
protected |
The stimulation output.
Definition at line 42 of file DaqController_p.h.
|
protected |
array holding shutter class for every area
Definition at line 45 of file DaqController_p.h.
|
protected |
array holding SwitchResonance class for every area
Definition at line 48 of file DaqController_p.h.
|
protected |
The scanner vector for frame scanning.
Definition at line 51 of file DaqController_p.h.
|
protected |
stimulation
Definition at line 54 of file DaqController_p.h.
|
protected |
size of a read chunk in samples per channel
Definition at line 57 of file DaqController_p.h.
|
protected |
condition variables to wait for until online updates is done (new frame is completely written to buffer or aborted)
Definition at line 60 of file DaqController_p.h.
|
protected |
bool flag to set after online update is done
Definition at line 63 of file DaqController_p.h.
|
protected |
mutexe for the condition variables
Definition at line 66 of file DaqController_p.h.
|
protected |
a ScopeLogger kept handy here
Definition at line 69 of file DaqController_p.h.