openDAQ
Open data acquisition platform
IModuleManager Struct Referenceabstract

Loads all available modules in a implementation-defined manner. User can also side-load custom modules via addModule call. More...

+ Inheritance diagram for IModuleManager:
+ Collaboration diagram for IModuleManager:

Detailed Description

Loads all available modules in a implementation-defined manner. User can also side-load custom modules via addModule call.

Public Member Functions

virtual ErrCode INTERFACE_FUNC getModules (IList **modules)=0
 Retrieves all modules known to the manager. Whether they were found or side-loaded. More...
 
virtual ErrCode INTERFACE_FUNC addModule (IModule *module)=0
 Side-load a custom module in run-time from memory that was not found by default. More...
 
virtual ErrCode INTERFACE_FUNC loadModules (IContext *context)=0
 Loads all modules from the directory path specified during manager construction. The Context is passed to all loaded modules for internal use. More...
 
virtual ErrCode INTERFACE_FUNC loadModule (IString *path, IModule **module)=0
 Loads and adds a single module from the given absolute file system path. More...
 
virtual ErrCode INTERFACE_FUNC setAuthenticatedOnly (Bool authenticatedOnly)=0
 Toggle whether this module manager will only load modules that can be authenticated. More...
 
virtual ErrCode INTERFACE_FUNC setModuleAuthenticator (IModuleAuthenticator *authenticator)=0
 Imports the module authenticator. More...
 
virtual ErrCode INTERFACE_FUNC getVendorKeys (IDict **vendorKeys)=0
 Returns a dictionary of module IDs and the respective public keys of their vendors. More...
 
- Public Member Functions inherited from IBaseObject
virtual ErrCode INTERFACE_FUNC borrowInterface (const IntfID &intfID, void **obj) const =0
 Returns another interface which is supported by the object without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC dispose ()=0
 Disposes all references held by the object. More...
 
virtual ErrCode INTERFACE_FUNC getHashCode (SizeT *hashCode)=0
 Returns hash code of the object. More...
 
virtual ErrCode INTERFACE_FUNC equals (IBaseObject *other, Bool *equal) const =0
 Compares object to another object for equality. More...
 
virtual ErrCode INTERFACE_FUNC toString (CharPtr *str)=0
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from IUnknown
virtual ErrCode INTERFACE_FUNC queryInterface (const IntfID &intfID, void **obj)=0
 Returns another interface which is supported by the object and increments the reference count. More...
 
virtual int INTERFACE_FUNC addRef ()=0
 Increments the reference count for an interface on an object. More...
 
virtual int INTERFACE_FUNC releaseRef ()=0
 Decrements the reference count for an interface on an object. More...
 

Member Function Documentation

◆ addModule()

virtual ErrCode INTERFACE_FUNC addModule ( IModule module)
pure virtual

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

Parameters
moduleThe module to add.
Return values
OPENDAQ_ERR_DUPLICATEITEMWhen an identical module was already added.

◆ getModules()

virtual ErrCode INTERFACE_FUNC getModules ( IList **  modules)
pure virtual

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

Parameters
[out]modulesA list of known modules.

◆ getVendorKeys()

virtual ErrCode INTERFACE_FUNC getVendorKeys ( IDict **  vendorKeys)
pure virtual

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

Parameters
[out]vendorKeyskey (IString) - module ID, value (IString) - public vendor key

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

◆ loadModule()

virtual ErrCode INTERFACE_FUNC loadModule ( IString path,
IModule **  module 
)
pure virtual

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

Parameters
pathThe absolute path to the module file.
[out]moduleThe 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()

virtual ErrCode INTERFACE_FUNC loadModules ( IContext context)
pure virtual

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()

virtual ErrCode INTERFACE_FUNC setAuthenticatedOnly ( Bool  authenticatedOnly)
pure virtual

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()

virtual ErrCode INTERFACE_FUNC setModuleAuthenticator ( IModuleAuthenticator authenticator)
pure virtual

Imports the module authenticator.

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