12#include "../../MetaInstruments/Laser.h"
13#include "../../Instruments/InterModuleCommunicator.h"
21 class LaserScanningSpectroscopy;
26 class LaserScanningSpectroscopy;
27 class LaserScanningSpectroscopyData;
45 bool AllowResize() const noexcept override final {
return true; }
46 const auto GetUI() const noexcept {
return ui.get(); }
52 std::unique_ptr<Ui::LaserScanningSpectroscopy>
ui;
108 virtual const char*
GetParamClassTag() const noexcept
override {
return "LaserScanningSpectroscopyParams"; }
113 "PLEInterModuleCommunicator",
"PLE inter-module communicator",
"Inter-module communicator to control data acquisition",
DynExpUI::Icons::Instrument,
true };
115 "WFInterModuleCommunicator",
"WF inter-module communicator",
"Inter-module communicator to communicate with widefield microscope module",
DynExpUI::Icons::Instrument,
true };
117 "Capturing time difference (ms)",
"Time difference between capturing events in continuous scan mode",
144 constexpr static auto Name() noexcept {
return "Laser Scanning Spectroscopy"; }
145 constexpr static auto Category() noexcept {
return "Experiments"; }
153 std::chrono::milliseconds
GetMainLoopDelay() const override final {
return std::chrono::milliseconds(50); }
158 void ResetImpl(dispatch_tag<QModuleBase>)
override final;
160 std::unique_ptr<DynExp::QModuleWidget>
MakeUIWidget() override final;
171 void OnInit(
DynExp::ModuleInstance* Instance) const override final;
172 void OnExit(
DynExp::ModuleInstance* Instance) const override final;
186 void OnPathChanged(
DynExp::ModuleInstance* Instance, const std::
string& SaveFilename) const;
Provides common events for inter-module communication. Also refer to DynExp::InterModuleEventBase.
Defines DynExp's core module as an interface between the UI and DynExp objects.
LaserStateType
Possible laser states.
virtual ~LaserScanningSpectroscopyConfigurator()=default
LaserScanningSpectroscopyConfigurator()=default
virtual DynExp::ParamsBasePtrType MakeParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) const override final
Override to make derived classes call DynExp::MakeParams with the correct configurator type derived f...
DynExp::LinkedObjectWrapperContainer< DynExpInstr::Laser > Laser
double ScanStartFrequency
void ResetImpl(dispatch_tag< QModuleDataBase >) override final
int LaserScanningSpectroscopyProgress
virtual ~LaserScanningSpectroscopyData()=default
LaserScanningSpectroscopyData()
virtual void ResetImpl(dispatch_tag< LaserScanningSpectroscopyData >)
auto & GetPLECommunicator()
DynExp::LinkedObjectWrapperContainer< DynExpInstr::InterModuleCommunicator > PLECommunicator
double LowerFrequencyLimit
StateType LaserScanningSpectroscopyState
DynExp::LinkedObjectWrapperContainer< DynExpInstr::InterModuleCommunicator > WFCommunicator
std::filesystem::path FileSavePath
auto & GetWFCommunicator()
double ModeHopFreeTuningRange
DynExpInstr::LaserData::LaserStateType LaserState
double UpperFrequencyLimit
Param< DynExp::ObjectLink< DynExpInstr::InterModuleCommunicator > > PLECommunicator
Param< ParamsConfigDialog::NumberType > CapturingTimeDifference
Param< DynExp::ObjectLink< DynExpInstr::InterModuleCommunicator > > WFCommunicator
Param< DynExp::ObjectLink< DynExpInstr::Laser > > Laser
void ConfigureParamsImpl(dispatch_tag< QModuleParamsBase >) override final
virtual ~LaserScanningSpectroscopyParams()=default
LaserScanningSpectroscopyParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
virtual const char * GetParamClassTag() const noexcept override
This function is intended to be overridden once in each derived class returning the name of the respe...
void OnStop(DynExp::ModuleInstance *Instance) const
virtual std::string GetName() const override
Returns the name of this Object type.
std::chrono::system_clock::time_point WaitingEndTimePoint
std::unique_ptr< DynExp::QModuleWidget > MakeUIWidget() override final
Used by InitUI() as a factory function for the module's user interface widget. Create the widget here...
void OnFinishedCapturing(DynExp::ModuleInstance *Instance) const
std::chrono::milliseconds GetMainLoopDelay() const override final
Specifies in which time intervals the module's event queue runs to handle pending events.
StateType WaitForSettingFrequencyStateFunc(DynExp::ModuleInstance &Instance)
void OnStart(DynExp::ModuleInstance *Instance) const
void OnStartAtToggled(DynExp::ModuleInstance *Instance, bool) const
static constexpr auto WaitForCapturingState
void OnNumberOfRepetitionsChanged(DynExp::ModuleInstance *Instance, int NumberOfRepetitions) const
void OnInit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread starts. Override it to lock instruments this m...
Util::DynExpErrorCodes::DynExpErrorCodes ModuleMainLoop(DynExp::ModuleInstance &Instance) override final
Module main loop. The function is executed periodically by the module thread. Also refer to GetMainLo...
void FrequencyStep(DynExp::ModuleInstance *Instance) const
StateType WaitForCapturingStateFunc(DynExp::ModuleInstance &Instance)
virtual std::string GetCategory() const override
Returns the category of this Object type.
virtual ~LaserScanningSpectroscopy()=default
std::filesystem::path BuildFilename(Util::SynchronizedPointer< ModuleDataType > &ModuleData, std::string_view FilenameSuffix) const
void OnStepSizeChanged(DynExp::ModuleInstance *Instance, double StepSize) const
Util::StateMachine< StateMachineStateType > StateMachine
bool IsSettingFrequencyState() const noexcept
void OnExit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread terminates (not due to an exception,...
bool IsCapturingState() const noexcept
void ResetImpl(dispatch_tag< QModuleBase >) override final
LaserScanningSpectroscopyData ModuleDataType
size_t NumFailedUpdateAttempts
bool IsReadyState() const noexcept
StateType ReadyStateFunc(DynExp::ModuleInstance &Instance)
void OnLowerFrequencyLimitChanged(DynExp::ModuleInstance *Instance, double LowerFrequencyLimit) const
void OnPathChanged(DynExp::ModuleInstance *Instance, const std::string &SaveFilename) const
void OnNumberOfStepsChanged(DynExp::ModuleInstance *Instance, int NumberOfSteps) const
static constexpr auto Name() noexcept
void OnStartClicked(DynExp::ModuleInstance *Instance, bool) const
static constexpr auto Category() noexcept
void OnUpperFrequencyLimitChanged(DynExp::ModuleInstance *Instance, double UpperFrequencyLimit) const
static constexpr auto ReadyState
static constexpr auto WaitForSettingFrequencyState
void UpdateUIChild(const ModuleBase::ModuleDataGetterType &ModuleDataGetter) override final
void OnScanBackAndForthToggled(DynExp::ModuleInstance *Instance, bool Checked) const
void OnFrequencyRangeChanged(DynExp::ModuleInstance *Instance, double FrequencyRange) const
void OnCenterFrequencyChanged(DynExp::ModuleInstance *Instance, double CenterFrequency) const
void OnStopClicked(DynExp::ModuleInstance *Instance, bool) const
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
This class holds a pointer (LinkedObjectWrapperPointer) to a LinkedObjectWrapper. Intances of this cl...
Util::CallableMemberWrapper< ModuleBase, ModuleDataTypeSyncPtrType(ModuleBase::*)(const std::chrono::milliseconds)> ModuleDataGetterType
Invoking an instance of this alias is supposed to call ModuleBase::GetModuleData() of the instance th...
const std::unique_ptr< ModuleDataType > ModuleData
Module data belonging to this ModuleBase instance.
ModuleBase(const std::thread::id OwnerThreadID, ParamsBasePtrType &&Params)
Constructs a ModuleBase instance.
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a ModuleBase instance. Refer to RunnableInstance.
const std::thread::id OwnerThreadID
Thread id of the thread which has constructed (and owns) this Object instance.
const ParamsBasePtrType Params
Pointer to the parameter class instance belonging to this Object instance.
const auto & GetCore() const noexcept
Returns a reference to DynExp's core.
const ItemIDType ID
ID of the Object this parameter class instance belongs to.
const DynExpCore & Core
Reference to DynExp's core.
Tag for function dispatching mechanism within this class used when derived classes are not intended t...
Base class for modules with a Qt-based user interface. Derive from this class to implement modules wi...
Configurator class for QModuleBase.
Data class for QModuleBase.
Parameter class for QModuleBase.
QModuleParamsBase(ItemIDType ID, const DynExpCore &Core)
Constructs the parameters for a QModuleBase instance.
State machine state as used by class StateMachine. A state mainly wraps a state function of the membe...
Pointer to lock a class derived from ISynchronizedPointerLockable for synchronizing between threads....
@ WaitForSettingFrequency
constexpr auto Instrument
DynExp's main namespace contains the implementation of DynExp including classes to manage resources (...
std::unique_ptr< ParamsBase > ParamsBasePtrType
Alias for a pointer to the parameter system base class ParamsBase.
size_t ItemIDType
ID type of objects/items managed by DynExp.
DynExpErrorCodes
DynExp's error codes
DynExp's Util namespace contains commonly used functions and templates as well as extensions to Qt an...
Accumulates include statements to provide a precompiled header.