openDAQ
Open data acquisition platform
Module manager
+ Collaboration diagram for Module manager:

Detailed Description

Modules

 Factories
 

Functions

daq::ListPtr< daq::IModule > getModules () const
 Retrieves all modules known to the manager. Whether they were found or side-loaded. More...
 
void addModule (const daq::ModulePtr &module) const
 Side-load a custom module in run-time from memory that was not found by default. More...
 
void loadModules (const daq::ContextPtr &context) const
 Loads all modules from the directory path specified during manager construction. The Context is passed to all loaded modules for internal use. More...
 
daq::ModulePtr loadModule (const daq::StringPtr &path) const
 Loads and adds a single module from the given absolute file system path. More...
 
void setAuthenticatedOnly (daq::Bool authenticatedOnly) const
 Toggle whether this module manager will only load modules that can be authenticated. More...
 
void setModuleAuthenticator (const daq::ModuleAuthenticatorPtr &authenticator) const
 Imports the module authenticator. More...
 
daq::DictPtr< daq::IString, daq::IString > getVendorKeys () const
 Returns a dictionary of module IDs and the respective public keys of their vendors. More...
 

Function Documentation

◆ addModule()

void addModule ( const daq::ModulePtr &  module) const
inline

Side-load a custom module in run-time from memory that was not found by default.

Parameters
moduleThe module to add.
Exceptions
DuplicateItemExceptionWhen an identical module was already added.

◆ getModules()

daq::ListPtr<daq::IModule> getModules ( ) const
inline

Retrieves all modules known to the manager. Whether they were found or side-loaded.

Returns
A list of known modules.

◆ getVendorKeys()

daq::DictPtr<daq::IString, daq::IString> getVendorKeys ( ) const
inline

Returns a dictionary of module IDs and the respective public keys of their vendors.

Returns
key (IString) - module ID, value (IString) - public vendor key

Used to identify which authenticator/certificate was used to authenticate the module.

◆ loadModule()

daq::ModulePtr loadModule ( const daq::StringPtr &  path) const
inline

Loads and adds a single module from the given absolute file system path.

Parameters
pathThe absolute path to the module file.
Returns
The resulting loaded and added module object.

This function should be used only after the default modules have been loaded using loadModules. The specified path must exist and reference a file with the proper extension.

◆ loadModules()

void loadModules ( const daq::ContextPtr &  context) const
inline

Loads all modules from the directory path specified during manager construction. The Context is passed to all loaded modules for internal use.

Parameters
contextThe Context containing the Logger, Scheduler, Property Object Class Manager and Module Manager

◆ setAuthenticatedOnly()

void setAuthenticatedOnly ( daq::Bool  authenticatedOnly) const
inline

Toggle whether this module manager will only load modules that can be authenticated.

Parameters
authenticatedOnlytrue - only authenticated modules are loaded, false - all modules are loaded

◆ setModuleAuthenticator()

void setModuleAuthenticator ( const daq::ModuleAuthenticatorPtr &  authenticator) const
inline

Imports the module authenticator.

Parameters
authenticatorA custom authenticator used to verify the signature/checksum of the modules.