  | 
  
    Fledge
    
   An open source edge computing platform for industrial users 
   | 
 
 
 
 
    2 #ifndef _PYTHON_PLUGIN_HANDLE_H 
    3 #define _PYTHON_PLUGIN_HANDLE_H 
   17 #include <plugin_handle.h> 
   20 typedef void* (*pluginResolveSymbolFn)(
const char *, 
const std::string&);
 
   21 typedef void (*pluginCleanupFn)(
const std::string&);
 
   44             pluginCleanupFn cleanupFn =
 
   45                 (pluginCleanupFn) dlsym(m_hndl, 
"PluginInterfaceCleanup");
 
   46             if (cleanupFn == NULL)
 
   50                                m_interfaceObjName.c_str(),
 
   51                                "PluginInterfaceCleanup",
 
   74             pluginResolveSymbolFn resolvSymFn =
 
   75                 (pluginResolveSymbolFn) dlsym(m_hndl, 
"PluginInterfaceResolveSymbol");
 
   76             if (resolvSymFn == NULL)
 
   81                                m_interfaceObjName.c_str(),
 
   82                                "PluginInterfaceResolveSymbol",
 
   86             void *rv = resolvSymFn(sym, m_name);
 
   91                 if (m_type.compare(PLUGIN_TYPE_FILTER) == 0)
 
   94                                    "returning NULL for sym=%s, plugin %s, type %s",
 
  102                                    "returning NULL for sym=%s, plugin %s, type %s",
 
  122         void *getHandle() { 
return this; }
 
  127         std::string m_interfaceObjName;
 
  
 
void debug(const std::string &msg,...)
Log a message at the level debug.
Definition: logger.cpp:346
 
void error(const std::string &msg,...)
Log a message at the level error.
Definition: logger.cpp:447
 
void * GetInfo()
Returns function pointer that can be invoked to call 'plugin_info' function in python plugin.
Definition: python_plugin_handle.h:116
 
static Logger * getLogger()
Return the singleton instance of the logger class.
Definition: logger.cpp:184
 
~PythonPluginHandle()
Base destructor.
Definition: python_plugin_handle.h:38
 
The PluginHandle class is used to represent an opaque handle to a plugin instance.
Definition: plugin_handle.h:24
 
The PythonPluginHandle class is the base class used to represent an interface to a plugin that is ava...
Definition: python_plugin_handle.h:27
 
void * ResolveSymbol(const char *sym)
Gets function pointer from loaded python interface library that can be invoked to call 'sym' function...
Definition: python_plugin_handle.h:68