DynamicModule¶
-
class
kanzi::connect::DynamicModule¶ Class responsible of loading modules dynamically from shared libraries.
Public Static Functions
-
static Module *
loadModule(const string modulename, uint32_t majorVersion, uint32_t minorVersion)¶ Loads and constructs a module from specific file.
- Parameters
modulename – the name of the module from which the library filename is build upon.
majorVersion – major version of kanzi loading the service.
minorVersion – minor version of kanzi loading the service.
- Returns
newly allocated module instance or nullptr in case loading failed. NOTE: It is not possible to unload modules so everything loaded remains in memory.
-
static vector<string>
lookupModules()¶ Searches for module from the current working directory.
- Returns
vector of filenames pointing to potential modules.
-
static string
serviceNameFromModuleFilename(string moduleFilename)¶ Tries to resolve service name from module filename.
This function expects the naming to be following “service_Cluster_GL_vs2015_Debug.dll” | “libservice_Cluster.so”
- Parameters
moduleFilename – the module filename to be analyzed.
- Returns
service name if able to resolve it. empty string if unable to do the task.
-
static Module *