Fledge
An open source edge computing platform for industrial users
PluginManager Class Reference

The manager for plugins. More...

#include <plugin_manager.h>

Collaboration diagram for PluginManager:

Public Member Functions

PLUGIN_HANDLE loadPlugin (const std::string &name, const std::string &type)
 Load a given plugin.
 
void unloadPlugin (PLUGIN_HANDLE handle)
 
void * resolveSymbol (PLUGIN_HANDLE handle, const std::string &symbol)
 Resolve a symbol within the plugin.
 
PLUGIN_HANDLE findPluginByName (const std::string &name)
 Find a loaded plugin by name.
 
PLUGIN_HANDLE findPluginByType (const std::string &type)
 Find a loaded plugin by type.
 
PLUGIN_INFORMATIONgetInfo (const PLUGIN_HANDLE)
 Return the information for a named plugin.
 
void getInstalledPlugins (const std::string &type, std::list< std::string > &plugins)
 Get the installed plugins in the given plugin type subdirectory of "plugins" under FLEDGE_ROOT Plugin type is one of: south, north, filter, notificationRule, notificationDelivery. More...
 
void setPluginType (tPluginType type)
 Set Plugin Type.
 
PLUGIN_TYPE getPluginImplType (const PLUGIN_HANDLE hndl)
 
std::vector< std::string > getPluginsByFlags (const std::string &type, unsigned int flags)
 Return a list of plugins matching the criteria of plugin type and plugin flags. More...
 

Static Public Member Functions

static PluginManagergetInstance ()
 PluginManager Singleton implementation.
 

Static Public Attributes

static PluginManagerinstance = 0
 

Detailed Description

The manager for plugins.

This manager is a singleton and is responsible for loading, tracking and unloading the plugins within the system.

Member Function Documentation

◆ getInstalledPlugins()

void PluginManager::getInstalledPlugins ( const std::string &  type,
std::list< std::string > &  plugins 
)

Get the installed plugins in the given plugin type subdirectory of "plugins" under FLEDGE_ROOT Plugin type is one of: south, north, filter, notificationRule, notificationDelivery.

Parameters
typeThe plugin type
pluginsThe output plugin list name to fill

Get all sub directory names in path: path = plugins/filter/ delta scale

Plugin filename is libdelta.so, libscale.so Plugin name is the subdirecory name in path Skip directory starting with '_' or with name 'common'

◆ getPluginsByFlags()

std::vector< string > PluginManager::getPluginsByFlags ( const std::string &  type,
unsigned int  flags 
)

Return a list of plugins matching the criteria of plugin type and plugin flags.

Parameters
typeThe plugin type to match
flagsA bitmask of flags to match
Returns
vector<string> A list of matching plugin names

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