DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Module.h File Reference

Implementation of DynExp module objects. More...

Go to the source code of this file.

Classes

class  DynExp::EventBase
 Common base class for all events to store them in a FIFO queue to be invoked later. More...
 
class  DynExp::DefaultEvent< ReceiverType, ArgTupleType >
 Describes an event which consists of a receiver's member function and a set of arguments to call this function with. The first argument is expected to be of type ModuleInstance*. This argument is not included in ArgTupleType). More...
 
struct  DynExp::DefaultEvent< ReceiverType, ArgTupleType >::EventFuncTraits< Indices >
 Helper struct to allow accessing elements within ArgTupleType. More...
 
class  DynExp::ModuleDataBase
 Data structure to contain data which is synchronized in between different threads. This is needed since the module thread as well as the main thread might access the module at the same time. Every class (indirectly) derived from class ModuleBase must be accompanied by a module data class derived from ModuleDataBase. ModuleDataBase and derived classes contain data shared by the respective module thread and the user interface (main) thread to e.g. visualize data. Data only used by the module thread should be private members of the module class. Data only used by the user interface should be private members of the module's widget class (derived from QModuleWidget), respectively. More...
 
struct  DynExp::ModuleDataBase::dispatch_tag< typename >
 Refer to ParamsBase::dispatch_tag. More...
 
class  DynExp::ModuleDataBase::ModuleBaseOnlyType
 Allow exclusive access to some of ModuleDataBase's private methods to ModuleBase. More...
 
class  DynExp::ModuleDataBase::ModuleThreadOnlyType
 Allow exclusive access to some of ModuleDataBase's private methods to the module thread ModuleThreadMain(). More...
 
class  DynExp::ModuleParamsBase
 Parameter class for ModuleBase. More...
 
class  DynExp::ModuleConfiguratorBase
 Configurator class for ModuleBase. More...
 
class  DynExp::ModuleBase
 Base class for modules. Modules implement programs on their own (e.g. measurement protocols or servers for ethernet communication). They might have a user interface. Modules make use of meta instruments (InstrumentBase) to implement e.g. measurement routines on a higher level, which renders the modules independent from physical devices from specific manufacturers. Derive from this class to implement modules without a user interface. More...
 
class  DynExp::ModuleBase::ModuleThreadOnlyType
 Allow exclusive access to some of ModuleBase's private methods to the module thread ModuleThreadMain(). More...
 
class  DynExp::ModuleBase::EventListenersOnlyType
 Allow exclusive access to some of ModuleBase's private methods to any TypedEventListeners class. More...
 
class  DynExp::ModuleInstance
 Defines data for a thread belonging to a ModuleBase instance. Refer to RunnableInstance. More...
 
class  DynExp::EventListenersBase
 Common base class for all managers of event listeners of type TypedEventListeners. ModuleBase instances are considered event listeners. More...
 
class  DynExp::TypedEventListeners< EventFuncArgs >
 Typed managers of event listeners class whose instances are owned by classes derived from InterModuleEvent. The class maps modules registering/subscribing to inter-module events to the respective event functions which are invoked when the related event occurs. More...
 
class  DynExp::InterModuleEventBase
 Common base class for all inter-module events. More...
 
class  DynExp::InterModuleEvent< DerivedEvent, EventFuncArgs >
 Typed base class for inter-module events to realize CRTP. More...
 
class  DynExp::QModuleWidget
 Window class for Qt-based user interfaces belonging to DynExp modules. User interface Qt window classes belonging to a module derived from ModuleBase have to derive from this class. More...
 
class  DynExp::QModuleDockWidget
 Provides a frame for QModuleWidget windows, which are undocked from the DynExpManager's QMdiArea. More...
 
class  DynExp::QModuleDataBase
 Data class for QModuleBase. More...
 
class  DynExp::WindowStyleParamsExtension
 Bundles several parameters to describe a UI window's style. Use in parameter classes. More...
 
class  DynExp::QModuleParamsBase
 Parameter class for QModuleBase. More...
 
class  DynExp::QModuleConfiguratorBase
 Configurator class for QModuleBase. More...
 
class  DynExp::QModuleBase
 Base class for modules with a Qt-based user interface. Derive from this class to implement modules with a user interface. More...
 

Namespaces

 DynExp
 DynExp's main namespace contains the implementation of DynExp including classes to manage resources (DynExp objects like hardware adapters, instruments, and modules) as well as their dependencies and parameters.
 
 DynExpModule
 DynExp's module namespace contains the implementation of DynExp modules which extend DynExp's core functionality in a modular way.
 

Typedefs

using DynExp::ModulePtrType = std::unique_ptr< ModuleBase >
 Pointer type to store a module (DynExp::ModuleBase) with. More...
 

Functions

template<typename ModuleT >
ConfiguratorBasePtrType DynExp::MakeModuleConfig ()
 Factory function to generate a configurator for a specific module type. More...
 
template<typename ModuleT >
ModulePtrType DynExp::MakeModule (const std::thread::id OwnerThreadID, ParamsBasePtrType &&Params)
 Factory function to generate a module of a specific type. More...
 
int DynExp::ModuleThreadMain (ModuleInstance Instance, ModuleBase *const Module)
 Modules run in their own thread. This is the module thread's main function. More...
 
template<typename ReceiverType , typename... ArgsTs>
auto DynExp::MakeEvent (ReceiverType *Receiver, typename DefaultEvent< ReceiverType, std::tuple< std::remove_reference_t< ArgsTs >... >>::EventFuncPtrType EventFuncPtr, ArgsTs &&...Args)
 Creates an event of type DefaultEvent. More...
 
template<typename To , typename From , std::enable_if_t< std::is_same_v< ModuleDataBase, std::remove_cv_t< From >>, int > = 0>
auto DynExp::dynamic_ModuleData_cast (Util::SynchronizedPointer< From > &&ModuleDataPtr)
 Casts the data base class From into a derived ModuleBase's (To) data class keeping the data locked by Util::SynchronizedPointer for thread-safe casting. More...
 

Detailed Description

Implementation of DynExp module objects.

Definition in file Module.h.


Class Documentation

◆ DynExp::ModuleDataBase::dispatch_tag

struct DynExp::ModuleDataBase::dispatch_tag

template<typename>
struct DynExp::ModuleDataBase::dispatch_tag< typename >

Refer to ParamsBase::dispatch_tag.

Template Parameters
Type(derived from class ModuleDataBase) to instantiate the dispatch tag template with.

Definition at line 189 of file Module.h.