15#include "NetworkLaser.pb.h"
16#include "NetworkLaser.grpc.pb.h"
28 default:
throw Util::InvalidDataException(
"The given unit does not exist in the LaserData::FrequencyUnitType enumeration. Did you forget to adjust the FrequencyUnitType enumeration in class \"LaserData\"?");
38 default:
throw Util::InvalidDataException(
"The given unit does not exist in the DynExpProto::Common::FrequencyUnitType enumeration or is not supported by this instrument. Did you forget to adjust the FrequencyUnitType enumeration in file \"Common.proto\"?");
47 default:
throw Util::InvalidDataException(
"The given unit does not exist in the LaserData::IntensityUnitType enumeration. Did you forget to adjust the IntensityUnitType enumeration in class \"LaserData\"?");
56 default:
throw Util::InvalidDataException(
"The given unit does not exist in the DynExpProto::Common::IntensityUnitType enumeration or is not supported by this instrument. Did you forget to adjust the IntensityUnitType enumeration in file \"Common.proto\"?");
69 default:
throw Util::InvalidDataException(
"The given state does not exist in the DynExpProto::NetworkLaser::StateType enumeration.");
73 namespace NetworkLaserTasks
225 virtual const char*
GetParamClassTag() const noexcept
override {
return "NetworkLaserParams"; }
254 constexpr static auto Name() noexcept {
return "Network Laser"; }
288 virtual std::unique_ptr<DynExp::InitTaskBase>
MakeInitTask()
const override {
return DynExp::MakeTask<NetworkLaserTasks::InitTask>(); }
289 virtual std::unique_ptr<DynExp::ExitTaskBase>
MakeExitTask()
const override {
return DynExp::MakeTask<NetworkLaserTasks::ExitTask>(); }
290 virtual std::unique_ptr<DynExp::UpdateTaskBase>
MakeUpdateTask()
const override {
return DynExp::MakeTask<NetworkLaserTasks::UpdateTask>(); }
Defines DynExp's core module as an interface between the UI and DynExp objects.
Defines a meta instrument for a laser source.
FrequencyUnitType
Supported laser frequency units.
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.
IntensityUnitType
Supported laser intensity units.
@ Power_W
Power in Watt (W)
Meta instrument for a laser.
virtual ~NetworkLaserConfigurator()=default
NetworkLaserConfigurator()=default
virtual DynExp::ParamsBasePtrType MakeParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) const override
Override to make derived classes call DynExp::MakeParams with the correct configurator type derived f...
auto GetModeHopFreeTuningRange() const noexcept
auto GetMinIntensity() const noexcept
double HardwareMinFrequency
double HardwareMaxScanRate
double HardwareMaxFrequency
double HardwareMinScanRange
LaserStateType LaserState
auto GetIntensityUnit() const noexcept
double HardwareMaxIntensity
auto GetMaxFrequency() const noexcept
virtual ~NetworkLaserData()=default
auto GetMaxIntensity() const noexcept
double HardwareModeHopFreeTuningRange
void ResetImpl(dispatch_tag< gRPCInstrumentData< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > >) override final
NetworkLaserData()=default
double HardwareMinScanRate
auto GetMinScanRate() const noexcept
double HardwareMinIntensity
virtual LaserStateType GetLaserStateChild() const noexcept override
auto GetMinScanRange() const noexcept
auto GetMaxScanRange() const noexcept
IntensityUnitType IntensityUnit
FrequencyUnitType FrequencyUnit
auto GetMinFrequency() const noexcept
double HardwareMaxScanRange
auto GetMaxScanRate() const noexcept
auto GetFrequencyUnit() const noexcept
virtual void ConfigureParamsImpl(dispatch_tag< NetworkLaserParams >)
virtual ~NetworkLaserParams()=default
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...
NetworkLaserParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
void ConfigureParamsImpl(dispatch_tag< gRPCInstrumentParams< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > >) override final
DisableScanTask(CallbackType CallbackFunc) noexcept
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
DisableTask(CallbackType CallbackFunc) noexcept
EnableTask(CallbackType CallbackFunc) noexcept
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
void ExitFuncImpl(dispatch_tag< gRPCInstrumentTasks::ExitTask< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > >, DynExp::InstrumentInstance &Instance) override final
void InitFuncImpl(dispatch_tag< gRPCInstrumentTasks::InitTask< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > >, DynExp::InstrumentInstance &Instance) override final
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
ScanContinuouslyTask(CallbackType CallbackFunc) noexcept
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
SetFrequencyTask(double Frequency, CallbackType CallbackFunc) noexcept
SetIntensityTask(double Intensity, CallbackType CallbackFunc) noexcept
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
SetScanRangeTask(double ScanRange, CallbackType CallbackFunc) noexcept
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
SetScanRateTask(double ScanRate, CallbackType CallbackFunc) noexcept
virtual void UpdateFuncImpl(dispatch_tag< UpdateTask >, DynExp::InstrumentInstance &Instance)
void UpdateFuncImpl(dispatch_tag< gRPCInstrumentTasks::UpdateTask< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > >, DynExp::InstrumentInstance &Instance) override final
virtual void Disable(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Disables emission.
virtual std::unique_ptr< DynExp::UpdateTaskBase > MakeUpdateTask() const override
Factory function for an update task (UpdateTaskBase). Override to define the desired update task in d...
virtual double GetMinScanRate() const override
Determines the minimal frequency scan rate. The default implementation returns 0.0,...
virtual double GetMinFrequency() const override
Determines the minimal emission frequency. The default implementation returns GetMaxFrequency() which...
virtual LaserData::FrequencyUnitType GetFrequencyUnit() const override
Determines the frequency unit.
virtual void SetFrequency(double Frequency, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Sets the laser's emission frequency.
virtual double GetMaxScanRange() const override
Determines the maximal frequency scan range. The default implementation returns 0....
virtual void SetScanRate(double ScanRate, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Sets the laser's frequency scan rate.
virtual std::unique_ptr< DynExp::InitTaskBase > MakeInitTask() const override
Factory function for an init task (InitTaskBase). Override to define the desired initialization task ...
virtual void SetIntensity(double Intensity, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Sets the laser's output intensity.
virtual void DisableScan(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Disables scan and changes to constant emission mode.
virtual double GetMaxScanRate() const override
Determines the maximal frequency scan rate. The default implementation returns 0.0,...
virtual std::string GetName() const override
Returns the name of this Object type.
virtual void ScanContinuously(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enables emission in scan mode.
virtual double GetMinScanRange() const override
Determines the minimal frequency scan range. The default implementation returns 0....
static constexpr auto Name() noexcept
virtual void SetScanRange(double ScanRange, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Sets the laser's frequency scan range.
virtual LaserData::IntensityUnitType GetIntensityUnit() const override
Determines the intensity unit.
virtual std::unique_ptr< DynExp::ExitTaskBase > MakeExitTask() const override
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization tas...
virtual double GetModeHopFreeTuningRange() const override
Determines the mode hop free tuning range. The default implementation returns 0.0,...
virtual double GetMinIntensity() const override
Determines the minimal emission intensity. The default implementation returns GetMaxIntensity() which...
virtual double GetMaxIntensity() const override
Determines the maximal emission intensity.
virtual void Enable(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enables emission in constant mode.
virtual double GetMaxFrequency() const override
Determines the maximal emission frequency.
void ResetImpl(dispatch_tag< gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > >) override final
Configurator class for gRPCInstrument.
Data class for gRPCInstrument.
Parameter class for gRPCInstrument.
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
DynExp::ExitTaskBase::dispatch_tag< Type > dispatch_tag
Refer to DynExp::ParamsBase::dispatch_tag.
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
DynExp::InitTaskBase::dispatch_tag< Type > dispatch_tag
Refer to DynExp::ParamsBase::dispatch_tag.
Defines a task for updating an instrument within an instrument inheritance hierarchy....
DynExp::UpdateTaskBase::dispatch_tag< Type > dispatch_tag
Refer to DynExp::ParamsBase::dispatch_tag.
Meta instrument template for transforming meta instruments into network instruments,...
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
Defines data for a thread belonging to a InstrumentBase 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.
Refer to ParamsBase::dispatch_tag.
Type owning a callback function which is invoked when a task has finished, failed,...
Base class for all tasks being processed by instruments. The class must not contain public virtual fu...
CallbackType CallbackFunc
This callback function is called after the task has finished (either successfully or not) with a poin...
TaskBase(CallbackType CallbackFunc=nullptr, std::chrono::system_clock::time_point DeferUntil={}) noexcept
Constructs an instrument task.
Defines the return type of task functions.
Data to operate on is invalid for a specific purpose. This indicates a corrupted data structure or fu...
Defines a meta instrument template for transforming meta instruments into network instruments,...
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
constexpr DynExpProto::Common::IntensityUnitType ToPrototUnitType(DataStreamInstrumentData::UnitType Unit)
constexpr LaserData::FrequencyUnitType ToLaserUnitType(DynExpProto::Common::FrequencyUnitType Unit)
constexpr LaserData::LaserStateType ToLaserStateType(DynExpProto::NetworkLaser::StateType State)
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.