133 void ResetImpl(dispatch_tag<InstrumentDataBase>)
override final;
204 constexpr static auto Name() noexcept {
return "Laser"; }
205 constexpr static auto Category() noexcept {
return "I/O"; }
211 : InstrumentBase(OwnerThreadID, std::move(Params)) {}
215 virtual std::string
GetName()
const override {
return Name(); }
216 virtual std::string
GetCategory()
const override {
return Category(); }
218 virtual std::chrono::milliseconds
GetTaskQueueDelay()
const override {
return std::chrono::milliseconds(50); }
Implementation of DynExp instrument objects.
Configurator class for Laser.
LaserConfigurator()=default
static const char * IntensityUnitTypeToStr(const IntensityUnitType &Unit)
Returns a descriptive string of a respective intensity unit to be e.g. used in the UI.
double ScanRate
Current scan rate.
FrequencyUnitType
Supported laser frequency units.
auto GetScanRateValue() const noexcept
Getter for ScanRate.
virtual ~LaserData()=default
virtual LaserStateType GetLaserStateChild() const noexcept=0
Returns the laser's current state.
void SetScanRangeValue(double ScanRange) noexcept
Setter for ScanRange.
double Frequency
Current frequency.
LaserStateType
Possible laser states.
@ Startup
The laser is warming up.
@ Error
The laser is in an error state.
@ EmissionEnabledConstant
The laser is emitting in constant mode.
@ EmissionEnabledScanning
The laser is emitting in scan mode.
@ Ready
The laser is ready for emission.
void SetFrequencyValue(double Frequency) noexcept
Setter for Frequency.
void ResetImpl(dispatch_tag< InstrumentDataBase >) override final
auto GetFrequencyValue() const noexcept
Getter for Frequency.
double Intensity
Current intensity.
virtual void ResetImpl(dispatch_tag< LaserData >)
IntensityUnitType
Supported laser intensity units.
@ Power_W
Power in Watt (W)
static const char * FrequencyUnitTypeToStr(const FrequencyUnitType &Unit)
Returns a descriptive string of a respective frequency unit to be e.g. used in the UI.
void SetScanRateValue(double ScanRate) noexcept
Setter for ScanRate.
auto GetScanRangeValue() const noexcept
Getter for ScanRange.
auto GetLaserState() const noexcept
Returns the laser's current state.
void SetIntensityValue(double Intensity) noexcept
Setter for Intensity.
double ScanRange
Current scan range.
auto GetIntensityValue() const noexcept
Getter for Intensity.
Parameter class for Laser.
LaserParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
Constructs the parameters for a Laser instance.
void ConfigureParamsImpl(dispatch_tag< InstrumentParamsBase >) override final
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...
virtual void ConfigureParamsImpl(dispatch_tag< LaserParams >)
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
void ExitFuncImpl(dispatch_tag< ExitTaskBase >, DynExp::InstrumentInstance &Instance) override final
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
Deinitializes the respective instrument within the instrument inheritance hierarchy....
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
void InitFuncImpl(dispatch_tag< InitTaskBase >, DynExp::InstrumentInstance &Instance) override final
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
Initializes the respective instrument within the instrument inheritance hierarchy....
Defines a task for updating an instrument within an instrument inheritance hierarchy....
void UpdateFuncImpl(dispatch_tag< UpdateTaskBase >, DynExp::InstrumentInstance &Instance) override final
virtual void UpdateFuncImpl(dispatch_tag< UpdateTask >, DynExp::InstrumentInstance &Instance)
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
Meta instrument for a laser.
static constexpr auto Name() noexcept
Every derived class has to redefine this function.
virtual double GetMinIntensity() const
Determines the minimal emission intensity. The default implementation returns GetMaxIntensity() which...
virtual void Enable(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Enables emission in constant mode.
virtual double GetMaxIntensity() const =0
Determines the maximal emission intensity.
virtual std::string GetCategory() const override
Returns the category of this Object type.
virtual void ResetImpl(dispatch_tag< Laser >)=0
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual double GetMinScanRange() const
Determines the minimal frequency scan range. The default implementation returns 0....
Laser(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs an instrument instance.
virtual double GetModeHopFreeTuningRange() const
Determines the mode hop free tuning range. The default implementation returns 0.0,...
virtual double GetMinFrequency() const
Determines the minimal emission frequency. The default implementation returns GetMaxFrequency() which...
virtual double GetMaxScanRange() const
Determines the maximal frequency scan range. The default implementation returns 0....
virtual double GetMaxScanRate() const
Determines the maximal frequency scan rate. The default implementation returns 0.0,...
virtual std::chrono::milliseconds GetTaskQueueDelay() const override
Specifies in which time intervals the instrument's task queue runs to handle pending tasks.
virtual std::string GetName() const override
Returns the name of this Object type.
virtual void SetIntensity(double Intensity, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Sets the laser's output intensity.
virtual LaserData::IntensityUnitType GetIntensityUnit() const =0
Determines the intensity unit.
virtual double GetMaxFrequency() const =0
Determines the maximal emission frequency.
virtual void SetScanRate(double ScanRate, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Sets the laser's frequency scan rate.
virtual void Disable(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Disables emission.
virtual LaserData::FrequencyUnitType GetFrequencyUnit() const =0
Determines the frequency unit.
virtual void SetFrequency(double Frequency, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Sets the laser's emission frequency.
virtual void SetScanRange(double ScanRange, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Sets the laser's frequency scan range.
static constexpr auto Category() noexcept
Every derived class has to redefine this function.
virtual double GetMinScanRate() const
Determines the minimal frequency scan rate. The default implementation returns 0.0,...
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
Base class for instruments. Instruments comprise virtual devices (meta instruments) and physial devic...
Configurator class for InstrumentBase.
Data structure to contain data which is synchronized in between different threads....
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
Refer to ParamsBase::dispatch_tag.
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
Tag for function dispatching mechanism within this class used when derived classes are not intended t...
Type owning a callback function which is invoked when a task has finished, failed,...
Defines a task for updating an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
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.
Accumulates include statements to provide a precompiled header.