RTXI  3.0.0
The Real-Time eXperiment Interface Reference Manual
Public Member Functions
Workspace::Manager Class Reference

#include <workspace.hpp>

Inheritance diagram for Workspace::Manager:
Inheritance graph
Collaboration diagram for Workspace::Manager:
Collaboration graph

Public Member Functions

 Manager (const Manager &)=delete
 
 Manager (Manager &&)=delete
 
Manageroperator= (const Manager &)=delete
 
Manageroperator= (Manager &&)=delete
 
 Manager (Event::Manager *ev_manager)
 
 ~Manager () override
 
Widgets::PluginloadPlugin (const std::string &library)
 
void unloadPlugin (Widgets::Plugin *plugin)
 
void receiveEvent (Event::Object *event) override
 
bool isRegistered (const Widgets::Plugin *plugin)
 
std::vector< DAQ::Device * > getDevices (const std::string &driver)
 
std::vector< DAQ::Device * > getAllDevices ()
 
void saveSettings (const QString &profile_name)
 
void loadSettings (const QString &profile_name)
 
- Public Member Functions inherited from Event::Handler
 Handler ()=default
 
 Handler (const Handler &)=default
 
 Handler (Handler &&)=delete
 
Handleroperator= (const Handler &)=default
 
Handleroperator= (Handler &&)=delete
 
virtual ~Handler ()=default
 

Detailed Description

This class is responsible for managing Plugin device loading and unloading

Definition at line 43 of file workspace.hpp.

Constructor & Destructor Documentation

◆ Manager() [1/3]

Workspace::Manager::Manager(const Manager)
delete

◆ Manager() [2/3]

Workspace::Manager::Manager(Manager && )
delete

◆ Manager() [3/3]

Workspace::Manager::Manager(Event::Managerev_manager)
explicit

Definition at line 53 of file workspace.cpp.

Here is the call graph for this function:

◆ ~Manager()

Workspace::Manager::~Manager()
override

Definition at line 67 of file workspace.cpp.

Member Function Documentation

◆ getAllDevices()

std::vector< DAQ::Device * > Workspace::Manager::getAllDevices()

Get all devices in registry

Returns
A vector of DAQ::Device pointers

Definition at line 125 of file workspace.cpp.

◆ getDevices()

std::vector< DAQ::Device * > Workspace::Manager::getDevices(const std::string & driver)

Get the list of all loaded devices in RTXI

The workspace manager, upon instantiation, will search predefined places for loadable DAQ device drivers. Once those drivers are successfully loaded, the manager will store them in a registry. This returns the list of all DAQ devices in the registry.

Parameters
driverThe name of the driver associated with the devices
Returns
A vector of DAQ::Device pointers associated with the driver
See also
DAQ::Device
DAQ::Driver

Definition at line 112 of file workspace.cpp.

◆ isRegistered()

bool Workspace::Manager::isRegistered(const Widgets::Pluginplugin)

Checks whether plugin is registered.

Parameters
pluginPlugin pointer to check registration.
Returns
True if registered, false otherwise.

Definition at line 92 of file workspace.cpp.

◆ loadPlugin()

Widgets::Plugin * Workspace::Manager::loadPlugin(const std::string & library)

loads plugin

Parameters
libraryThe name of the core library to load. For dynamically loaded widgets it is the location of the library in the filesystem.
Returns
Raw pointer to widgets plugin. The plugin is already registered with the manager upon return of this function.

Definition at line 201 of file workspace.cpp.

Here is the call graph for this function:

◆ loadSettings()

void Workspace::Manager::loadSettings(const QString & profile_name)

Restore workspace values and state settings

Parameters
profile_nameThe name of the stored settings

Definition at line 180 of file workspace.cpp.

◆ operator=() [1/2]

Manager& Workspace::Manager::operator=(const Manager)
delete

◆ operator=() [2/2]

Manager& Workspace::Manager::operator=(Manager && )
delete

◆ receiveEvent()

void Workspace::Manager::receiveEvent(Event::Objectevent)
overridevirtual

Handles plugin loading/unloadin gevents from gui thread

Parameters
eventThe event to handle. The workspace manager only handles the following event types: Event::Type::PLUGIN_INSERT_EVENT Event::Type::PLUGIN_REMOVE_EVENT Event::Type::DAQ_DEVICE_QUERY_EVENT

Implements Event::Handler.

Definition at line 383 of file workspace.cpp.

Here is the call graph for this function:

◆ saveSettings()

void Workspace::Manager::saveSettings(const QString & profile_name)

Save current workspace values and state settings

Parameters
profile_nameThe name to save the settings

Definition at line 144 of file workspace.cpp.

◆ unloadPlugin()

void Workspace::Manager::unloadPlugin(Widgets::Pluginplugin)

unloads plugin

Parameters
pluginPlugin pointer to remove from workspace manager registry

Definition at line 268 of file workspace.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: