|
DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
#include <NetworkLaser.h>
Inheritance diagram for DynExpInstr::NetworkLaser:Public Types | |
| using | ParamsType = NetworkLaserParams |
| using | ConfigType = NetworkLaserConfigurator |
| using | InstrumentDataType = NetworkLaserData |
Public Types inherited from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > | |
| using | ParamsType = gRPCInstrumentParams< Laser, 0, gRPCStubs... > |
Type of the parameter class belonging to this Object type. Declare this alias in every derived class with the respective parameter class accompanying the derived Object. " | |
| using | ConfigType = gRPCInstrumentConfigurator< Laser, 0, gRPCStubs... > |
Type of the configurator class belonging to this Object type. Declare this alias in every derived class with the respective configurator class accompanying the derived Object. | |
| using | InstrumentDataType = gRPCInstrumentData< Laser, 0, gRPCStubs... > |
Type of the data class belonging to this InstrumentBase type. Declare this alias in every derived class with the respective data class accompanying the derived InstrumentBase. | |
Public Types inherited from DynExpInstr::Laser | |
| using | ParamsType = LaserParams |
Type of the parameter class belonging to this Object type. Declare this alias in every derived class with the respective parameter class accompanying the derived Object. " | |
| using | ConfigType = LaserConfigurator |
Type of the configurator class belonging to this Object type. Declare this alias in every derived class with the respective configurator class accompanying the derived Object. | |
| using | InstrumentDataType = LaserData |
Type of the data class belonging to this InstrumentBase type. Declare this alias in every derived class with the respective data class accompanying the derived InstrumentBase. | |
| using | InitTaskType = LaserTasks::InitTask |
Defines a task for initializing an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by an initialization task class derived from InitTaskBase. Even if the task does not do anything, at least it has to call InitTaskBase::InitFuncImpl() of the derived instrument's initialization task class. | |
| using | ExitTaskType = LaserTasks::ExitTask |
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by a deinitialization task class derived from ExitTaskBase. Even if the task does not do anything, at least it has to call ExitTaskBase::ExitFuncImpl() of the derived instrument's deinitialization task class. | |
| using | UpdateTaskType = LaserTasks::UpdateTask |
Defines a task for updating an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by an update task class derived from UpdateTaskBase. Even if the task does not do anything, at least it has to call UpdateTaskBase::UpdateFuncImpl() of the derived instrument's update task class. | |
Public Types inherited from DynExp::InstrumentBase | |
| enum class | TaskHandlingContinuationType { Continue , Terminate , Defer } |
| Indicates how an instrument should proceed after handling a task. More... | |
| using | ParamsType = InstrumentParamsBase |
Type of the parameter class belonging to this Object type. Declare this alias in every derived class with the respective parameter class accompanying the derived Object. " | |
| using | ConfigType = InstrumentConfiguratorBase |
Type of the configurator class belonging to this Object type. Declare this alias in every derived class with the respective configurator class accompanying the derived Object. | |
| using | InstrumentDataType = InstrumentDataBase |
Type of the data class belonging to this InstrumentBase type. Declare this alias in every derived class with the respective data class accompanying the derived InstrumentBase. | |
| using | InstrumentDataTypeSyncPtrType = Util::SynchronizedPointer< InstrumentDataType > |
| Alias for the return type of InstrumentBase::GetInstrumentData(). Data class instances wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way. | |
| using | InstrumentDataTypeSyncPtrConstType = Util::SynchronizedPointer< const InstrumentDataType > |
| Alias for the return type of InstrumentBase::GetInstrumentData() const. Data class instances wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way. | |
| using | InitTaskType = InitTaskBase |
Defines a task for initializing an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by an initialization task class derived from InitTaskBase. Even if the task does not do anything, at least it has to call InitTaskBase::InitFuncImpl() of the derived instrument's initialization task class. | |
| using | ExitTaskType = ExitTaskBase |
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by a deinitialization task class derived from ExitTaskBase. Even if the task does not do anything, at least it has to call ExitTaskBase::ExitFuncImpl() of the derived instrument's deinitialization task class. | |
| using | UpdateTaskType = UpdateTaskBase |
Defines a task for updating an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by an update task class derived from UpdateTaskBase. Even if the task does not do anything, at least it has to call UpdateTaskBase::UpdateFuncImpl() of the derived instrument's update task class. | |
| using | InstrumentDataGetterType = Util::CallableMemberWrapper< InstrumentBase, InstrumentDataTypeSyncPtrType(InstrumentBase::*)(const std::chrono::milliseconds)> |
| Invoking an instance of this alias is supposed to call InstrumentBase::GetInstrumentData() of the instance the Util::CallableMemberWrapper has been constructed with. | |
Public Types inherited from DynExp::RunnableObject | |
| using | ParamsType = RunnableObjectParams |
Type of the parameter class belonging to this Object type. Declare this alias in every derived class with the respective parameter class accompanying the derived Object. " | |
| using | ConfigType = RunnableObjectConfigurator |
Type of the configurator class belonging to this Object type. Declare this alias in every derived class with the respective configurator class accompanying the derived Object. | |
Public Types inherited from DynExp::Object | |
| using | ParamsType = ParamsBase |
Type of the parameter class belonging to this Object type. Declare this alias in every derived class with the respective parameter class accompanying the derived Object. | |
| using | ParamsTypeSyncPtrType = Util::SynchronizedPointer< ParamsType > |
| Alias for the return type of Object::GetParams(). Parameters wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way. | |
| using | ParamsConstTypeSyncPtrType = Util::SynchronizedPointer< const ParamsType > |
| Alias for the return type of Object::GetParams() const. Parameters wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way. | |
| using | ConfigType = ConfiguratorBase |
Type of the configurator class belonging to this Object type. Declare this alias in every derived class with the respective configurator class accompanying the derived Object. | |
| using | ParamsGetterType = Util::CallableMemberWrapper< Object, decltype(&Object::GetParams)> |
| Invoking an instance of this alias is supposed to call Object::GetParams() of the instance the Util::CallableMemberWrapper has been constructed with. | |
Public Member Functions | |
| NetworkLaser (const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params) | |
| virtual | ~NetworkLaser () |
| virtual std::string | GetName () const override |
Returns the name of this Object type. | |
| virtual LaserData::FrequencyUnitType | GetFrequencyUnit () const override |
| Determines the frequency unit. | |
| virtual LaserData::IntensityUnitType | GetIntensityUnit () const override |
| Determines the intensity unit. | |
| virtual double | GetMinFrequency () const override |
Determines the minimal emission frequency. The default implementation returns GetMaxFrequency() which indicates that the laser does not support frequency tuning. | |
| virtual double | GetMaxFrequency () const override |
| Determines the maximal emission frequency. | |
| virtual double | GetMinIntensity () const override |
Determines the minimal emission intensity. The default implementation returns GetMaxIntensity() which indicates that the laser does not support intensity adjustment. | |
| virtual double | GetMaxIntensity () const override |
| Determines the maximal emission intensity. | |
| virtual double | GetMinScanRange () const override |
| Determines the minimal frequency scan range. The default implementation returns 0.0, indicating that the laser does not support scanning. | |
| virtual double | GetMaxScanRange () const override |
| Determines the maximal frequency scan range. The default implementation returns 0.0, indicating that the laser does not support scanning. | |
| virtual double | GetMinScanRate () const override |
| Determines the minimal frequency scan rate. The default implementation returns 0.0, indicating that the laser does not support scanning. | |
| virtual double | GetMaxScanRate () const override |
| Determines the maximal frequency scan rate. The default implementation returns 0.0, indicating that the laser does not support scanning. | |
| virtual double | GetModeHopFreeTuningRange () const override |
| Determines the mode hop free tuning range. The default implementation returns 0.0, indicating that the laser does not support frequency tuning. | |
| virtual void | SetFrequency (double Frequency, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Sets the laser's emission frequency. | |
| virtual void | SetIntensity (double Intensity, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Sets the laser's output intensity. | |
| virtual void | SetScanRange (double ScanRange, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Sets the laser's frequency scan range. | |
| virtual void | SetScanRate (double ScanRate, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Sets the laser's frequency scan rate. | |
| virtual void | Enable (DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Enables emission in constant mode. | |
| virtual void | Disable (DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Disables emission. | |
| virtual void | ScanContinuously (DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Enables emission in scan mode. | |
| virtual void | DisableScan (DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override |
| Disables scan and changes to constant emission mode. | |
Public Member Functions inherited from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > | |
| virtual | ~gRPCInstrument () |
| virtual std::string | GetCategory () const override |
Returns the category of this Object type. | |
Public Member Functions inherited from DynExpInstr::Laser | |
| Laser (const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params) | |
| Constructs an instrument instance. | |
| virtual | ~Laser ()=0 |
| virtual std::chrono::milliseconds | GetTaskQueueDelay () const override |
| Specifies in which time intervals the instrument's task queue runs to handle pending tasks. | |
Public Member Functions inherited from DynExp::InstrumentBase | |
| InstrumentBase (const std::thread::id OwnerThreadID, ParamsBasePtrType &&Params) | |
| Constructs an instrument instance. | |
| virtual | ~InstrumentBase ()=0 |
| template<typename DerivedInstrT , typename... TaskFuncArgTs, typename... ArgTs> | |
| ExceptionContainer | AsSyncTask (void(DerivedInstrT::*TaskFunc)(TaskFuncArgTs...) const, ArgTs &&...Args) const |
Calls a (derived) instrument's function which inserts a task into the instrument's task queue synchronously. This means that AsSyncTask() blocks until the task has been executed or aborted. This is achieved by passing a callback function to the task which in turn sets a flag after the task execution. The thread calling AsSyncTask() blocks (via std::this_thread::yield()) until this flag is set. | |
| InstrumentDataTypeSyncPtrType | GetInstrumentData (const std::chrono::milliseconds Timeout=GetInstrumentDataTimeoutDefault) |
Locks the mutex of the instrument data class instance InstrumentData assigned to this InstrumentBase instance and returns a pointer to the locked InstrumentData. Instrument data should not be locked by having called this function while subsequently calling a derived instrument's method which also makes use of the instrument's data by locking it. If this happens (e.g. in a module thread), the instrument data's mutex is locked recursively. In principle, this does no harm since Util::ISynchronizedPointerLockable supports that. But, it is not considered good practice. | |
| InstrumentDataTypeSyncPtrConstType | GetInstrumentData (const std::chrono::milliseconds Timeout=GetInstrumentDataTimeoutDefault) const |
Locks the mutex of the instrument data class instance InstrumentData assigned to this InstrumentBase instance and returns a pointer to the locked InstrumentData. Instrument data should not be locked by having called this function while subsequently calling a derived instrument's method which also makes use of the instrument's data by locking it. If this happens (e.g. in a module thread), the instrument data's mutex is locked recursively. In principle, this does no harm since Util::ISynchronizedPointerLockable supports that. But, it is not considered good practice. | |
| void | UpdateData () const |
Enqueues an update task (instance of class UpdateTaskBase). | |
| void | EnqueueArriveAtLatchTask (std::latch &Latch) const |
Enqueues a task which arrives at a latch when executed (instance of class ArriveAtLatchTask). | |
| bool | IsInitialized () const |
| Getter for Initialized. | |
Public Member Functions inherited from DynExp::RunnableObject | |
| RunnableObject (const std::thread::id OwnerThreadID, ParamsBasePtrType &&Params) | |
Constructs an Object instance. | |
| virtual | ~RunnableObject ()=0 |
| void | SetPaused (bool Pause, std::string Description="") |
Pauses or resumes a RunnableObject instance. Its thread stays running, but the instance does not perform any action while it is paused. | |
| bool | IsRunning () const noexcept |
| Returns Running. | |
| bool | IsPaused () const noexcept |
| Returns Paused. | |
| bool | IsExiting () const noexcept |
| Returns ShouldExit. | |
| auto | GetStartupType () const noexcept |
| Returns Startup. | |
| auto | GetReasonWhyPaused () const |
| Returns ReasonWhyPaused. | |
| bool | Run (QWidget *ParentWidget=nullptr) |
Starts the RunnableObject instance's thread and ensures that all Object instances linked to this instance via ObjectLink parameters are in a ready state. Calls RunChild() which is to be overridden by derived classes to start a thread and to pass this thread back by calling StoreThread(). | |
| bool | RunIfRunAutomatic () |
Calls Run() if RunnableObjectParams::Startup is set to RunnableObjectParams::Automatic. | |
| bool | RunIfRunOnCreation () |
Calls Run() if RunnableObjectParams::Startup is set to RunnableObjectParams::OnCreation. | |
| void | Terminate (bool Force=false, const std::chrono::milliseconds Timeout=TerminateTimeoutDefault) |
Notifies the RunnableObject instance's thread to terminate and waits until it has ended. Calls TerminateImpl(). | |
Public Member Functions inherited from Util::INonCopyable | |
| INonCopyable (const INonCopyable &)=delete | |
| INonCopyable & | operator= (const INonCopyable &)=delete |
Public Member Functions inherited from DynExp::Object | |
| ItemIDType | GetID () const noexcept |
Returns the ID of this Object instance. Thread-safe since ID is const. | |
| std::string | GetCategoryAndName () const |
Builds a string from an Object's category and name to allow the user to identify an Object's type. | |
| void | EnsureReadyState (bool IsAutomaticStartup) |
Ensures that this Object instance is ready by possibly starting its worker thread or by opening connections to hardware devices. | |
| void | CheckLinkedObjectStates () const |
Checks whether Object instances this instance uses are in a ready state. Override CheckLinkedObjectStatesChild() to implement this behavior. | |
| void | Reset () |
Resets this Object instance (including all its derived classes) by calling ResetImpl(). A reset implies that the derived classes reload all their parameters from Params and that all LinkedObjectWrapper instances owned by this Object instance become invalidated. | |
| void | BlockIfUnused (const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) |
Blocks this Object instance setting Object::IsBlocked to true. Refer to Object::IsBlocked for the consequences. | |
| ParamsConstTypeSyncPtrType | GetParams (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Locks the mutex of the parameter class instance Params assigned to this Object instance and returns a pointer to the locked Params. | |
| ParamsTypeSyncPtrType | GetParams (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) |
Locks the mutex of the parameter class instance Params assigned to this Object instance and returns a pointer to the locked Params. | |
| auto | GetObjectName (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Returns the name of this Object instance. | |
| bool | IsSharedUsageEnabled (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Returns whether shared usage has been enabled for this Object instance. Refer to ParamsBase::UsageType. | |
| void | SetWarning (std::string Description, int ErrorCode) const |
| Setter for Object::Warning. Sets the warning by a description and an error code. | |
| void | SetWarning (const Util::Exception &e) const |
Setter for Object::Warning. Sets the warning by retrieving the warning data from an exception e. | |
| void | ClearWarning () const |
| Resets Object::Warning. | |
| auto | GetWarning () const |
| Returns Object::Warning in a thread-safe way by copying its internal data. | |
| std::exception_ptr | GetException (const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) const |
Returns a pointer to the exception which has caused this Object instance to fail. | |
| bool | IsReady () const |
Returns wheter this Object instance is ready (e.g. it is running or connected to a hardware device) and not blocked (refer to Object::IsBlocked). | |
| auto | GetUseCount (const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) const |
| Counts the registered useres in a thread-safe way. | |
| bool | IsUnused (const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) const |
Returns whether this Object instance is used by other instances. | |
| auto | GetUserIDs (const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) const |
| Returns a list of the IDs of the registered users in a thread-safe way. | |
| auto | GetUserNamesString (const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) const |
| Builds a string describing which users are registered containing their object names, categories and type names in a thread-safe way. | |
Static Public Member Functions | |
| static constexpr auto | Name () noexcept |
Static Public Member Functions inherited from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > | |
| static constexpr auto | Name () noexcept |
| Every derived class has to redefine this function. | |
| static constexpr auto | Category () noexcept |
| Every derived class has to redefine this function. | |
Static Public Member Functions inherited from DynExpInstr::Laser | |
| static constexpr auto | Name () noexcept |
| Every derived class has to redefine this function. | |
| static constexpr auto | Category () noexcept |
| Every derived class has to redefine this function. | |
Static Public Member Functions inherited from DynExp::InstrumentBase | |
| static constexpr auto | Category () noexcept |
| Every derived class has to redefine this function. | |
Static Public Member Functions inherited from DynExp::Object | |
| static std::string | CategoryAndNameToStr (const std::string &Category, const std::string &Name) |
Builds a string from an Object's category and name to allow the user to identify an Object's type. | |
Private Member Functions | |
| void | ResetImpl (dispatch_tag< gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > >) override final |
| virtual void | ResetImpl (dispatch_tag< NetworkLaser >) |
| virtual std::unique_ptr< DynExp::InitTaskBase > | MakeInitTask () const override |
Factory function for an init task (InitTaskBase). Override to define the desired initialization task in derived classes only if the respective task really does something and if it has no pure virtual function. | |
| virtual std::unique_ptr< DynExp::ExitTaskBase > | MakeExitTask () const override |
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization task in derived classes only if the respective task really does something and if it has no pure virtual function. | |
| virtual std::unique_ptr< DynExp::UpdateTaskBase > | MakeUpdateTask () const override |
Factory function for an update task (UpdateTaskBase). Override to define the desired update task in derived classes only if the respective task really does something and if it has no pure virtual function. | |
Additional Inherited Members | |
Public Attributes inherited from DynExp::InstrumentBase | |
| InstrumenThreadOnlyType | InstrumentThreadOnly |
Allow exclusive access to some of InstrumentBase's private methods to the instrument thread InstrumentThreadMain(). | |
Public Attributes inherited from DynExp::RunnableObject | |
| RunnableInstanceOnlyType | RunnableInstanceOnly |
Allow exclusive access to some of RunnableObject's private methods to class RunnableInstance. | |
Public Attributes inherited from DynExp::Object | |
| LinkedObjectWrapperOnlyType | LinkedObjectWrapperOnly |
Allow exclusive access to some of Object's private methods to any LinkedObjectWrapper<T>. | |
Static Public Attributes inherited from DynExp::InstrumentBase | |
| static constexpr auto | GetInstrumentDataTimeoutDefault = std::chrono::milliseconds(1000) |
Determines the default timeout for GetInstrumentData() to lock the mutex synchronizing the instrument's data InstrumentData. | |
Static Public Attributes inherited from DynExp::RunnableObject | |
| static constexpr auto | ShortTimeoutDefault = std::chrono::milliseconds(50) |
| Default timeout e.g. used as a default for calls to InstrumentBase::GetInstrumentData or ModuleBase::GetModuleData. | |
| static constexpr auto | TerminateTimeoutDefault = std::chrono::milliseconds(3000) |
| Default timeout used as a default for calls to RunnableObject::Terminate. | |
Static Public Attributes inherited from DynExp::Object | |
| static constexpr std::chrono::milliseconds | GetParamsTimeoutDefault = std::chrono::milliseconds(100) |
Default timeout used by Object::GetParams() to lock the mutex of the parameter instance assigned to this Object instance. | |
Protected Types inherited from DynExp::RunnableObject | |
| using | ThreadFuncType = std::function< int(std::unique_ptr< RunnableInstance > &&, RunnableObject *)> |
Type of the thread function executed by RunnableObject instances. | |
Protected Member Functions inherited from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser > | |
| gRPCInstrument (const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params) | |
| Constructs an instrument instance. | |
Protected Member Functions inherited from DynExp::InstrumentBase | |
| template<typename TaskT , typename... ArgTs> | |
| void | MakeAndEnqueueTask (ArgTs &&...Args) const |
Calls MakeTask() to construct a new task and subsequently enqueues the task into the instrument's task queue. Logical const-ness: this is a const member function to allow pointers to const InstrumentBase inserting tasks into the instrument's task queue. These kind of pointers are e.g. returned by RunnableInstance::GetOwner() which can be called by tasks' TaskBase::RunChild() functions. For const InstrumentBase*, it is possible to insert tasks into the task queue, but not to change the InstrumentBase object itself (e.g. calling Object::Reset()). | |
Protected Member Functions inherited from DynExp::RunnableObject | |
| void | Init () |
| Initializes member variables in case of a reset. | |
| std::promise< void > | MakeThreadExitedPromise () |
Helper function to be used by overridden RunChild() functions in derived classes to (re)initialize the ThreadExitedSignal future and to provide the derived class a promise to signal the RunnableObject instance that its thread has terminated. | |
| void | MakeThread (ThreadFuncType ThreadFunc, std::unique_ptr< RunnableInstance > &&InstancePtr) |
Creates and runs the thread of the RunnableObject instance. Call this function in the derived class overriding RunChild() and nowhere else! | |
| bool | IsCallFromRunnableThread () const |
Checks whether Thread's id matches the id of the calling thread. This is thread-safe if the function is called by the RunnableObject instance's thread since Terminate() joins the threads before changing the Thread member. It is also thread-safe if the function is called by the thread owning the the RunnableObject instance since Run() and Terminate() can only be called by this thread. Only Run() and Terminate() (indirectly) modify Thread. | |
| void | EnsureCallFromRunnableThread () const |
Asserts that the call to this function is performed from the RunnableObject instance's thread by calling IsCallFromRunnableThread(). | |
| void | SetReasonWhyPaused (std::string Description) |
Sets the reason why this RunnableObject instance has been paused. | |
| void | SetReasonWhyPaused (const Util::Exception &e) |
Sets the reason why this RunnableObject instance has been paused. | |
| void | ClearReasonWhyPaused () |
Removes the reason why this RunnableObject instance has been paused (since it is resumed). | |
Protected Member Functions inherited from Util::INonCopyable | |
| constexpr | INonCopyable ()=default |
| ~INonCopyable ()=default | |
Protected Member Functions inherited from DynExp::Object | |
| Object (const std::thread::id OwnerThreadID, ParamsBasePtrType &&Params) | |
Constructs an Object instance. | |
| virtual | ~Object ()=0 |
| void | EnsureCallFromOwningThread () const |
Asserts that the call to this function is performed from the thread which constructed this Object instance (the thread with the id stored in Object::OwnerThreadID). | |
| ParamsTypeSyncPtrType | GetNonConstParams (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Allows derived Objects to edit their own parameters - even in const task functions (for instruments) or event functions (for modules). | |
| auto | LockUserList (const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) |
| Locks the user list for thread-safe manipulation. | |
| void | DeregisterAllUnsafe () |
| Deregisters all users and notifies them that they need to check the states of their used linked objects. | |
| auto | GetUseCountUnsafe () |
| auto | GetUserNamesStringUnsafe () const |
| bool | IsUnusedUnsafe () |
Returns whether this Object instance is used by other instances (not thread-safe). | |
Static Protected Member Functions inherited from DynExp::InstrumentBase | |
| static auto | GetExceptionUnsafe (const InstrumentDataTypeSyncPtrConstType &InstrumentDataPtr) |
| Getter for InstrumentDataBase::InstrumentException. If InstrumentDataBase::InstrumentException is nullptr and InstrumentDataBase::HasException is still true, returns a pointer to a Util::Exception instance. | |
Definition at line 247 of file NetworkLaser.h.
Definition at line 251 of file NetworkLaser.h.
Definition at line 252 of file NetworkLaser.h.
Definition at line 250 of file NetworkLaser.h.
| DynExpInstr::NetworkLaser::NetworkLaser | ( | const std::thread::id | OwnerThreadID, |
| DynExp::ParamsBasePtrType && | Params | ||
| ) |
Definition at line 268 of file NetworkLaser.cpp.
|
inlinevirtual |
Definition at line 257 of file NetworkLaser.h.
|
inlineoverridevirtual |
Disables emission.
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
Implements DynExpInstr::Laser.
Definition at line 280 of file NetworkLaser.h.
|
inlineoverridevirtual |
Disables scan and changes to constant emission mode.
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
| Util::NotImplementedException | is thrown by the default implementation, which does not do anything more. |
Reimplemented from DynExpInstr::Laser.
Definition at line 282 of file NetworkLaser.h.
|
inlineoverridevirtual |
Enables emission in constant mode.
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
Implements DynExpInstr::Laser.
Definition at line 279 of file NetworkLaser.h.
|
overridevirtual |
Determines the frequency unit.
Implements DynExpInstr::Laser.
Definition at line 273 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the intensity unit.
Implements DynExpInstr::Laser.
Definition at line 280 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the maximal emission frequency.
GetFrequencyUnit(). Implements DynExpInstr::Laser.
Definition at line 294 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the maximal emission intensity.
GetIntensityUnit(). Implements DynExpInstr::Laser.
Definition at line 308 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the maximal frequency scan range. The default implementation returns 0.0, indicating that the laser does not support scanning.
GetFrequencyUnit(). Reimplemented from DynExpInstr::Laser.
Definition at line 322 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the maximal frequency scan rate. The default implementation returns 0.0, indicating that the laser does not support scanning.
GetFrequencyUnit() per second. Reimplemented from DynExpInstr::Laser.
Definition at line 336 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the minimal emission frequency. The default implementation returns GetMaxFrequency() which indicates that the laser does not support frequency tuning.
GetFrequencyUnit(). Reimplemented from DynExpInstr::Laser.
Definition at line 287 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the minimal emission intensity. The default implementation returns GetMaxIntensity() which indicates that the laser does not support intensity adjustment.
GetIntensityUnit(). Reimplemented from DynExpInstr::Laser.
Definition at line 301 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the minimal frequency scan range. The default implementation returns 0.0, indicating that the laser does not support scanning.
GetFrequencyUnit(). Reimplemented from DynExpInstr::Laser.
Definition at line 315 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the minimal frequency scan rate. The default implementation returns 0.0, indicating that the laser does not support scanning.
GetFrequencyUnit() per second. Reimplemented from DynExpInstr::Laser.
Definition at line 329 of file NetworkLaser.cpp.
|
overridevirtual |
Determines the mode hop free tuning range. The default implementation returns 0.0, indicating that the laser does not support frequency tuning.
GetFrequencyUnit(). Reimplemented from DynExpInstr::Laser.
Definition at line 343 of file NetworkLaser.cpp.
|
inlineoverridevirtual |
Returns the name of this Object type.
Reimplemented from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser >.
Definition at line 259 of file NetworkLaser.h.
|
inlineoverrideprivatevirtual |
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization task in derived classes only if the respective task really does something and if it has no pure virtual function.
MakeTask(). Reimplemented from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser >.
Definition at line 289 of file NetworkLaser.h.
|
inlineoverrideprivatevirtual |
Factory function for an init task (InitTaskBase). Override to define the desired initialization task in derived classes only if the respective task really does something and if it has no pure virtual function.
MakeTask(). Reimplemented from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser >.
Definition at line 288 of file NetworkLaser.h.
|
inlineoverrideprivatevirtual |
Factory function for an update task (UpdateTaskBase). Override to define the desired update task in derived classes only if the respective task really does something and if it has no pure virtual function.
MakeTask(). Reimplemented from DynExpInstr::gRPCInstrument< Laser, 0, DynExpProto::NetworkLaser::NetworkLaser >.
Definition at line 290 of file NetworkLaser.h.
|
inlinestaticconstexprnoexcept |
Definition at line 254 of file NetworkLaser.h.
|
finaloverrideprivate |
Definition at line 350 of file NetworkLaser.cpp.
|
inlineprivatevirtual |
Definition at line 286 of file NetworkLaser.h.
|
inlineoverridevirtual |
Enables emission in scan mode.
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
| Util::NotImplementedException | is thrown by the default implementation, which does not do anything more. |
Reimplemented from DynExpInstr::Laser.
Definition at line 281 of file NetworkLaser.h.
|
inlineoverridevirtual |
Sets the laser's emission frequency.
| Frequency | Emission frequency in units of GetFrequencyUnit() |
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
Implements DynExpInstr::Laser.
Definition at line 274 of file NetworkLaser.h.
|
inlineoverridevirtual |
Sets the laser's output intensity.
| Intensity | Output intensity in units of GetIntensityUnit() |
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
Implements DynExpInstr::Laser.
Definition at line 275 of file NetworkLaser.h.
|
inlineoverridevirtual |
Sets the laser's frequency scan range.
| ScanRange | Scan range in units of GetFrequencyUnit() |
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
Implements DynExpInstr::Laser.
Definition at line 276 of file NetworkLaser.h.
|
inlineoverridevirtual |
Sets the laser's frequency scan rate.
| ScanRate | Scan rate in units of GetFrequencyUnit() |
| CallbackFunc | This callback function is called after the task has finished (either successfully or not) with a pointer to the current task and with a reference to the exception which occurred during the task execution (if an exception has occurred). |
Implements DynExpInstr::Laser.
Definition at line 277 of file NetworkLaser.h.