DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
DynExp's core class acts as the interface between the user interface and DynExp's internal data like all DynExp::Object instances and their threads. There should only be one instance of this class. It owns all DynExp resources through the respective ResourceManagerBase
instances. Logical const-ness: Non-const functions (like functions to run/stop/reset/save/... the project) cannot be called from DynExp::Object instances possessing a const handle to the DynExpCore
instance. Instead, these functions should be called through the user interface (from the DynExpManager
instance).
More...
Public Types | |
using | ParamsTypeSyncPtrType = Util::SynchronizedPointer< ProjectParams > |
Alias for the return type of DynExpCore::GetParams(). Parameters wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way. More... | |
using | ParamsConstTypeSyncPtrType = Util::SynchronizedPointer< const ProjectParams > |
Alias for the return type of DynExpCore::GetParams() const. Parameters wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way. More... | |
Public Member Functions | |
DynExpCore (HardwareAdapterLibraryVectorType HardwareAdapterLib, InstrumentLibraryVectorType InstrumentLib, ModuleLibraryVectorType ModuleLib, std::string ProjectFileToOpen="") | |
Constructs a DynExpCore instance. More... | |
~DynExpCore () | |
void | Shutdown () |
Terminates DynExpCore::WorkerThread and waits until the thread has ended. More... | |
void | Reset (bool Force=false) |
Resets the currently loaded project removing all resources from the resource managers. After a call to this function, a new empty project is available. More... | |
void | SaveProject (std::string_view Filename, const QMainWindow &MainWindow, const QDialog &CircuitDiagramDlg, QSplitter &HSplitter, QSplitter &VSplitter) |
Saves the current DynExp project to an XML project file. More... | |
void | OpenProject (std::string_view Filename) |
Loads a DynExp project from an XML project file. More... | |
void | EditProjectSettings (QWidget *const DialogParent) |
Opens a settings dialog (ParamsConfigDialog ) to let the user configure the parameter values of the current project settings stored in Params. More... | |
auto | ConnectHardwareAdapters (CommonResourceManagerBase::FunctionToCallWhenObjectStartedType FunctionToCallWhenHardwareAdapterConnecting=nullptr) |
Connects all hardware adapters contained in HardwareAdapterMgr asynchronously calling ResourceManagerBase::Startup() More... | |
bool | AllHardwareAdaptersConnected () const |
Checks whether all hardware adapters contained in HardwareAdapterMgr have been connected successfully. More... | |
bool | AllInstrumentsInitialized () const |
Checks whether all instruments contained in InstrumentMgr have been initialized successfully. More... | |
void | RunInstruments (CommonResourceManagerBase::FunctionToCallWhenObjectStartedType FunctionToCallWhenInstrumentStarted=nullptr) |
Runs all instruments contained in InstrumentMgr with RunnableObjectParams::StartupType::OnCreation startup setting. More... | |
void | RunModules (CommonResourceManagerBase::FunctionToCallWhenObjectStartedType FunctionToCallWhenModuleStarted=nullptr) |
Runs all modules contained in ModuleMgr with RunnableObjectParams::StartupType::OnCreation startup setting. More... | |
void | ShutdownProject () |
Terminates all running instruments and modules. More... | |
void | ResetFailedItems (QWidget &ParentWindow) |
Calls Object::Reset() and Object::ClearWarning() on all owned DynExp::Object instances which are in an error state. Considers dependencies in between these objects and stops and restarts related objects if required for resetting failed objects and if the user confirms. More... | |
void | RestoreWindowStatesFromParams (QMainWindow &MainWindow, QDialog &CircuitDiagramDlg, QSplitter &HSplitter, QSplitter &VSplitter, bool OnlyMainWindow=false) |
Sets module and main windows' positions, sizes and styles according to parameters stored in the current project's configuration Params. More... | |
auto & | GetHardwareAdapterLib () const noexcept |
Getter for the hardware adapter library. More... | |
auto & | GetInstrumentLib () const noexcept |
Getter for the instrument library. More... | |
auto & | GetModuleLib () const noexcept |
Getter for the module library. More... | |
auto & | GetHardwareAdapterManager () noexcept |
Getter for the hardware adapter manager. More... | |
auto & | GetInstrumentManager () noexcept |
Getter for the instrument manager. More... | |
auto & | GetModuleManager () noexcept |
Getter for the module manager. More... | |
auto & | GetHardwareAdapterManager () const noexcept |
Getter for the hardware adapter manager. More... | |
auto & | GetInstrumentManager () const noexcept |
Getter for the instrument manager. More... | |
auto & | GetModuleManager () const noexcept |
Getter for the module manager. More... | |
ItemIDType | MakeItem (const LibraryEntry< HardwareAdapterPtrType > &LibEntry, ParamsBasePtrType &&Params) |
Creates a DynExp::HardwareAdapterBase instance from a LibraryEntry . More... | |
ItemIDType | MakeItem (const LibraryEntry< InstrumentPtrType > &LibEntry, ParamsBasePtrType &&Params) |
Creates a DynExp::InstrumentBase instance from a LibraryEntry . More... | |
ItemIDType | MakeItem (const LibraryEntry< ModulePtrType > &LibEntry, ParamsBasePtrType &&Params) |
Creates a DynExp::ModuleBase instance from a LibraryEntry . More... | |
bool | HasLoadedProjectFromCommandlineParams () noexcept |
Indicates whether a DynExp project has been loaded from a path specified as a command line argument when starting DynExp. After the first call to this method, LoadedProjectFromCommandlineParams will always be false. More... | |
void | MoveQWorkerToWorkerThread (Util::QWorker &Worker, ItemIDType ID) const |
Moves a Util::QWorker instance to WorkerThread to run its Qt event queue there. This method is thread-safe since it is only called by the main thread after it constructed a DynExp::Object instance. More... | |
std::string | GetDataSaveDirectory (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Recalls a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to recall the directory the user has chosen last for saving a file. This directory is the same across all modules. More... | |
void | SetDataSaveDirectory (const std::filesystem::path &Directory, const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) |
Sets a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to store the directory the user has chosen last for saving a file. This directory is the same across all modules. More... | |
Thread-safe public functions | |
Methods can be called from any thread. | |
auto | GetProjectFilename (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Locks Params and returns the current DynExp project's filename. More... | |
auto | GetLastDataSaveDirectory (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Locks Params and returns the path to a directory where modules can save data. More... | |
bool | IsProjectOpened (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const noexcept |
Locks Params and determines whether a project has been openend from a project file. More... | |
std::filesystem::path | ToAbsolutePath (const std::filesystem::path &Path) const |
Transforms the path Path into an absolute path relative to ProjectParams::ProjectFilename. More... | |
ParamsConstTypeSyncPtrType | GetParams (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) const |
Locks the mutex of the parameter class instance Params assigned to the current project and returns a pointer to the locked Params. More... | |
const auto | GetOwnerThreadID () const noexcept |
Getter for the thread id of the thread which constructed (and owns) this DynExpCore instance. More... | |
Public Member Functions inherited from Util::INonCopyable | |
INonCopyable (const INonCopyable &)=delete | |
INonCopyable & | operator= (const INonCopyable &)=delete |
Static Public Attributes | |
static constexpr std::chrono::milliseconds | GetParamsTimeoutDefault = std::chrono::milliseconds(100) |
Default timeout used by DynExpCore::GetParams() to lock the mutex of the project parameter instance. More... | |
Private Member Functions | |
bool | OpenProjectSafe (const std::string &Filename) noexcept |
Calls OpenProject() and performs error handling for that function. More... | |
template<typename LibEntryT , typename ParamsT , typename ManagerT > | |
ItemIDType | MakeItem (const LibraryEntry< LibEntryT > &LibEntry, ParamsT &&Params, ManagerT &ResourceManager, const std::string ItemTypeName) |
Creates a DynExp::Object instance from a LibraryEntry . More... | |
ParamsTypeSyncPtrType | GetParams (const std::chrono::milliseconds Timeout=GetParamsTimeoutDefault) |
Locks the mutex of the parameter class instance Params assigned to the current project and returns a pointer to the locked Params. More... | |
void | UpdateParamsFromWindowStates (const QMainWindow &MainWindow, const QDialog &CircuitDiagramDlg, QSplitter &HSplitter, QSplitter &VSplitter) |
Retrieves the module and main windows' positions, sizes and styles from the windows and updates the parameters stored in the current project's configuration Params accordingly. More... | |
Private Attributes | |
const HardwareAdapterLibraryVectorType | HardwareAdapterLib |
Hardware adapter library vector containing information about all hardware adapters DynExp knows. More... | |
const InstrumentLibraryVectorType | InstrumentLib |
Instrument library vector containing information about all instruments DynExp knows. More... | |
const ModuleLibraryVectorType | ModuleLib |
Module library vector containing information about all modules DynExp knows. More... | |
bool | LoadedProjectFromCommandlineParams |
This flag will be set to true if DynExpCore has been initialized with a path to a project file to load passed as a command line option. More... | |
std::unique_ptr< ProjectParams > | Params |
Project parameters (configuration) of the current DynExp project. Must never be nullptr . More... | |
const std::thread::id | OwnerThreadID |
The ID is set by DynExpCore::DynExpCore() to the id of the thread which constructed the DynExpCore instance. This thread owns the instance. Ownership cannot be transferred to another thread. The owning thread must also be the user interface thread. More... | |
QThread | WorkerThread |
One worker thread runs the Qt event queues for all objects derived from Util::QWorker (e.g. hardware adapters derived from QSerialCommunicationHardwareAdapter ). The derived Util::QWorker instances just insert tasks into the WorkerThread's event queue. Those tasks get executed asynchronously by Qt. This is required since QObject instances (like QSerialPort ) cannot be shared between different (instrument) threads. Instead, QObject instances have to belong to one thread only (unfortunately). More... | |
Preserve declaration order | |
The DynExp::Object managers must be declared in this order to ensure that all | |
HardwareAdapterManager | HardwareAdapterMgr |
Hardware adapter manager owning all instantiated hardware adapters. More... | |
InstrumentManager | InstrumentMgr |
Instrument manager owning all instantiated instruments. More... | |
ModuleManager | ModuleMgr |
Module manager owning all instantiated modules. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Util::INonCopyable | |
constexpr | INonCopyable ()=default |
~INonCopyable ()=default | |
DynExp's core class acts as the interface between the user interface and DynExp's internal data like all DynExp::Object instances and their threads. There should only be one instance of this class. It owns all DynExp resources through the respective ResourceManagerBase
instances. Logical const-ness: Non-const functions (like functions to run/stop/reset/save/... the project) cannot be called from DynExp::Object instances possessing a const handle to the DynExpCore
instance. Instead, these functions should be called through the user interface (from the DynExpManager
instance).
DynExpCore
instance must not be transferred to another thread than the one creating it. Definition at line 126 of file DynExpCore.h.
using DynExp::DynExpCore::ParamsConstTypeSyncPtrType = Util::SynchronizedPointer<const ProjectParams> |
Alias for the return type of DynExpCore::GetParams() const. Parameters wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way.
Definition at line 139 of file DynExpCore.h.
Alias for the return type of DynExpCore::GetParams(). Parameters wrapped into Util::SynchronizedPointer can be accessed in a thread-safe way.
Definition at line 133 of file DynExpCore.h.
DynExp::DynExpCore::DynExpCore | ( | HardwareAdapterLibraryVectorType | HardwareAdapterLib, |
InstrumentLibraryVectorType | InstrumentLib, | ||
ModuleLibraryVectorType | ModuleLib, | ||
std::string | ProjectFileToOpen = "" |
||
) |
Constructs a DynExpCore
instance.
HardwareAdapterLib | Hardware adapters available to DynExp (result of LibraryBase::ToVector()). |
InstrumentLib | Instruments available to DynExp (result of LibraryBase::ToVector()). |
ModuleLib | Modules available to DynExp (result of LibraryBase::ToVector()). |
ProjectFileToOpen | Path to a DynExp project XML file to load and to start |
Definition at line 23 of file DynExpCore.cpp.
DynExp::DynExpCore::~DynExpCore | ( | ) |
Definition at line 45 of file DynExpCore.cpp.
bool DynExp::DynExpCore::AllHardwareAdaptersConnected | ( | ) | const |
Checks whether all hardware adapters contained in HardwareAdapterMgr have been connected successfully.
Definition at line 164 of file DynExpCore.cpp.
bool DynExp::DynExpCore::AllInstrumentsInitialized | ( | ) | const |
Checks whether all instruments contained in InstrumentMgr have been initialized successfully.
Definition at line 169 of file DynExpCore.cpp.
|
inline |
Connects all hardware adapters contained in HardwareAdapterMgr asynchronously calling ResourceManagerBase::Startup()
FunctionToCallWhenHardwareAdapterConnecting | Callback function. Refer to FunctionToCallWhenObjectStartedType . |
std::future
instance. Refer to the documentation of std::async()
. Definition at line 204 of file DynExpCore.h.
void DynExp::DynExpCore::EditProjectSettings | ( | QWidget *const | DialogParent | ) |
Opens a settings dialog (ParamsConfigDialog
) to let the user configure the parameter values of the current project settings stored in Params.
DialogParent | QWidget acting as a parent of the modal settings dialog |
Definition at line 156 of file DynExpCore.cpp.
std::string DynExp::DynExpCore::GetDataSaveDirectory | ( | const std::chrono::milliseconds | Timeout = GetParamsTimeoutDefault | ) | const |
Recalls a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to recall the directory the user has chosen last for saving a file. This directory is the same across all modules.
Timeout | Time to wait for locking the project parameters Params. |
Definition at line 298 of file DynExpCore.cpp.
|
inlinenoexcept |
Getter for the hardware adapter library.
Definition at line 263 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the hardware adapter manager.
Definition at line 295 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the hardware adapter manager.
Definition at line 281 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the instrument library.
Definition at line 269 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the instrument manager.
Definition at line 296 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the instrument manager.
Definition at line 287 of file DynExpCore.h.
|
inline |
Locks Params and returns the path to a directory where modules can save data.
Timeout | Time to wait for locking the mutex of Params. |
Definition at line 347 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the module library.
Definition at line 275 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the module manager.
Definition at line 297 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the module manager.
Definition at line 293 of file DynExpCore.h.
|
inlinenoexcept |
Getter for the thread id of the thread which constructed (and owns) this DynExpCore
instance.
Definition at line 376 of file DynExpCore.h.
|
private |
Locks the mutex of the parameter class instance Params assigned to the current project and returns a pointer to the locked Params.
Timeout | Time to wait for locking the mutex of Params. |
ProjectParams
(non-const) to allow access to all of its members. Definition at line 356 of file DynExpCore.cpp.
DynExpCore::ParamsConstTypeSyncPtrType DynExp::DynExpCore::GetParams | ( | const std::chrono::milliseconds | Timeout = GetParamsTimeoutDefault | ) | const |
Locks the mutex of the parameter class instance Params assigned to the current project and returns a pointer to the locked Params.
Timeout | Time to wait for locking the mutex of Params. |
ProjectParams
, since only this class itself is allowed to modify Params. Definition at line 285 of file DynExpCore.cpp.
|
inline |
Locks Params and returns the current DynExp project's filename.
Timeout | Time to wait for locking the mutex of Params. |
Definition at line 340 of file DynExpCore.h.
|
noexcept |
Indicates whether a DynExp project has been loaded from a path specified as a command line argument when starting DynExp. After the first call to this method, LoadedProjectFromCommandlineParams will always be false.
Definition at line 271 of file DynExpCore.cpp.
|
inlinenoexcept |
Locks Params and determines whether a project has been openend from a project file.
Timeout | Time to wait for locking the mutex of Params. |
Definition at line 354 of file DynExpCore.h.
ItemIDType DynExp::DynExpCore::MakeItem | ( | const LibraryEntry< HardwareAdapterPtrType > & | LibEntry, |
ParamsBasePtrType && | Params | ||
) |
Creates a DynExp::HardwareAdapterBase instance from a LibraryEntry
.
LibEntry | Entry of HardwareAdapterLib to instantiate |
Params | Reference to the Object's parameters to take ownership of |
Definition at line 256 of file DynExpCore.cpp.
ItemIDType DynExp::DynExpCore::MakeItem | ( | const LibraryEntry< InstrumentPtrType > & | LibEntry, |
ParamsBasePtrType && | Params | ||
) |
Creates a DynExp::InstrumentBase instance from a LibraryEntry
.
LibEntry | Entry of InstrumentLib to instantiate |
Params | Reference to the Object's parameters to take ownership of |
Definition at line 261 of file DynExpCore.cpp.
|
private |
Creates a DynExp::Object instance from a LibraryEntry
.
LibEntryT | Pointer to the base type of a certain DynExp resource (e.g. DynExp::ModulePtrType) |
ParamsT | Type of the parameter base class related to DynExp::Object instances of type LibEntryT |
ManagerT | Type of the resource manager managing instances of type LibEntryT . |
LibEntry | Library entry to instantiate |
Params | Reference to the Object's parameters to take ownership of |
ResourceManager | Resource manager to insert the newly generated Object instance into |
ItemTypeName | Human-readable type name of the types managed by ResourceManager to be displayed in log messages. |
Definition at line 488 of file DynExpCore.h.
ItemIDType DynExp::DynExpCore::MakeItem | ( | const LibraryEntry< ModulePtrType > & | LibEntry, |
ParamsBasePtrType && | Params | ||
) |
Creates a DynExp::ModuleBase instance from a LibraryEntry
.
LibEntry | Entry of ModuleLib to instantiate |
Params | Reference to the Object's parameters to take ownership of |
Definition at line 266 of file DynExpCore.cpp.
void DynExp::DynExpCore::MoveQWorkerToWorkerThread | ( | Util::QWorker & | Worker, |
ItemIDType | ID | ||
) | const |
Moves a Util::QWorker instance to WorkerThread to run its Qt event queue there. This method is thread-safe since it is only called by the main thread after it constructed a DynExp::Object instance.
Worker | Util::QWorker instance to move to DynExp's worker thread WorkerThread. Refer to Util::QWorker and to WorkerThread. |
ID | Object ID of the DynExp::Object owning Worker . |
Definition at line 290 of file DynExpCore.cpp.
void DynExp::DynExpCore::OpenProject | ( | std::string_view | Filename | ) |
Loads a DynExp project from an XML project file.
Filename | Path to a DynExp project XML file to load |
Util::InvalidDataException | is thrown if the data contained in the file Filename refers to could not be parsed as XML. |
Definition at line 114 of file DynExpCore.cpp.
|
privatenoexcept |
Calls OpenProject()
and performs error handling for that function.
Filename | Path of the project file to open. |
Definition at line 313 of file DynExpCore.cpp.
void DynExp::DynExpCore::Reset | ( | bool | Force = false | ) |
Resets the currently loaded project removing all resources from the resource managers. After a call to this function, a new empty project is available.
Force | If false, ResourceManagerBase::PrepareReset() is called on each owned resource manager, before calls to ResourceManagerBase::Reset() follow. If true, only the latter method is called. |
Definition at line 58 of file DynExpCore.cpp.
void DynExp::DynExpCore::ResetFailedItems | ( | QWidget & | ParentWindow | ) |
Calls Object::Reset() and Object::ClearWarning() on all owned DynExp::Object instances which are in an error state. Considers dependencies in between these objects and stops and restarts related objects if required for resetting failed objects and if the user confirms.
ParentWindow | QWidget acting as a parent of modal dialog boxes, which are potentially displayed. |
Definition at line 190 of file DynExpCore.cpp.
void DynExp::DynExpCore::RestoreWindowStatesFromParams | ( | QMainWindow & | MainWindow, |
QDialog & | CircuitDiagramDlg, | ||
QSplitter & | HSplitter, | ||
QSplitter & | VSplitter, | ||
bool | OnlyMainWindow = false |
||
) |
Sets module and main windows' positions, sizes and styles according to parameters stored in the current project's configuration Params.
MainWindow | DynExp's main window (DynExpManager instance) whose window state to save |
CircuitDiagramDlg | DynExp's circuit diagram window (CircuitDiagram instance) whose window state to save |
HSplitter | Horizontal main splitter widget in the main window |
VSplitter | Vertical main splitter widget in the main window |
OnlyMainWindow | If true, only applies window states from the project settings to the main window. If false, also applies saved window states to module windows. |
Definition at line 231 of file DynExpCore.cpp.
void DynExp::DynExpCore::RunInstruments | ( | CommonResourceManagerBase::FunctionToCallWhenObjectStartedType | FunctionToCallWhenInstrumentStarted = nullptr | ) |
Runs all instruments contained in InstrumentMgr with RunnableObjectParams::StartupType::OnCreation startup setting.
FunctionToCallWhenInstrumentStarted | Callback function. Refer to FunctionToCallWhenObjectStartedType . |
Definition at line 174 of file DynExpCore.cpp.
void DynExp::DynExpCore::RunModules | ( | CommonResourceManagerBase::FunctionToCallWhenObjectStartedType | FunctionToCallWhenModuleStarted = nullptr | ) |
Runs all modules contained in ModuleMgr with RunnableObjectParams::StartupType::OnCreation startup setting.
FunctionToCallWhenModuleStarted | Callback function. Refer to FunctionToCallWhenObjectStartedType . |
Definition at line 179 of file DynExpCore.cpp.
void DynExp::DynExpCore::SaveProject | ( | std::string_view | Filename, |
const QMainWindow & | MainWindow, | ||
const QDialog & | CircuitDiagramDlg, | ||
QSplitter & | HSplitter, | ||
QSplitter & | VSplitter | ||
) |
Saves the current DynExp project to an XML project file.
Filename | Path where to save the DynExp project XML file |
MainWindow | DynExp's main window (DynExpManager instance) whose window state to save |
CircuitDiagramDlg | DynExp's circuit diagram window (CircuitDiagram instance) whose window state to save |
HSplitter | Horizontal main splitter widget in the main window |
VSplitter | Vertical main splitter widget in the main window |
Definition at line 81 of file DynExpCore.cpp.
void DynExp::DynExpCore::SetDataSaveDirectory | ( | const std::filesystem::path & | Directory, |
const std::chrono::milliseconds | Timeout = GetParamsTimeoutDefault |
||
) |
Sets a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to store the directory the user has chosen last for saving a file. This directory is the same across all modules.
Directory | Path to show by default in the modules' file open/save dialogs. |
Timeout | Time to wait for locking the project parameters Params. |
Definition at line 308 of file DynExpCore.cpp.
void DynExp::DynExpCore::Shutdown | ( | ) |
Terminates DynExpCore::WorkerThread and waits until the thread has ended.
Util::ThreadDidNotRespondException | is thrown if WorkerThread does not terminate in due time. |
Definition at line 50 of file DynExpCore.cpp.
void DynExp::DynExpCore::ShutdownProject | ( | ) |
Terminates all running instruments and modules.
Definition at line 184 of file DynExpCore.cpp.
std::filesystem::path DynExp::DynExpCore::ToAbsolutePath | ( | const std::filesystem::path & | Path | ) | const |
Transforms the path Path
into an absolute path relative to ProjectParams::ProjectFilename.
Path | Relative path to be transformed |
Path
itself if it is either empty or already absolute. Definition at line 279 of file DynExpCore.cpp.
|
private |
Retrieves the module and main windows' positions, sizes and styles from the windows and updates the parameters stored in the current project's configuration Params accordingly.
MainWindow | DynExp's main window (DynExpManager instance) whose window state to save |
CircuitDiagramDlg | DynExp's circuit diagram window (CircuitDiagram instance) whose window state to save |
HSplitter | Horizontal main splitter widget in the main window |
VSplitter | Vertical main splitter widget in the main window |
Definition at line 361 of file DynExpCore.cpp.
|
staticconstexpr |
Default timeout used by DynExpCore::GetParams() to lock the mutex of the project parameter instance.
Definition at line 145 of file DynExpCore.h.
|
private |
Hardware adapter library vector containing information about all hardware adapters DynExp knows.
Definition at line 441 of file DynExpCore.h.
|
private |
Hardware adapter manager owning all instantiated hardware adapters.
Definition at line 451 of file DynExpCore.h.
|
private |
Instrument library vector containing information about all instruments DynExp knows.
Definition at line 442 of file DynExpCore.h.
|
private |
Instrument manager owning all instantiated instruments.
Definition at line 452 of file DynExpCore.h.
|
private |
This flag will be set to true if DynExpCore
has been initialized with a path to a project file to load passed as a command line option.
Definition at line 460 of file DynExpCore.h.
|
private |
Module library vector containing information about all modules DynExp knows.
Definition at line 443 of file DynExpCore.h.
|
private |
Module manager owning all instantiated modules.
Definition at line 453 of file DynExpCore.h.
|
private |
The ID is set by DynExpCore::DynExpCore() to the id of the thread which constructed the DynExpCore
instance. This thread owns the instance. Ownership cannot be transferred to another thread. The owning thread must also be the user interface thread.
Definition at line 472 of file DynExpCore.h.
|
private |
Project parameters (configuration) of the current DynExp project. Must never be nullptr
.
Definition at line 465 of file DynExpCore.h.
|
mutableprivate |
One worker thread runs the Qt event queues for all objects derived from Util::QWorker (e.g. hardware adapters derived from QSerialCommunicationHardwareAdapter
). The derived Util::QWorker instances just insert tasks into the WorkerThread's event queue. Those tasks get executed asynchronously by Qt. This is required since QObject
instances (like QSerialPort
) cannot be shared between different (instrument) threads. Instead, QObject
instances have to belong to one thread only (unfortunately).
Definition at line 484 of file DynExpCore.h.