Tellurium Plugins
Python ctypes wrapper documentation
 All Functions Variables Groups Pages
Functions
Plugin Manager

Plugin Manager Library Functions The Plugin manager loads and manages one or more plugins. More...

Functions

def createPluginManager
 Create a new instance of a plugin manager. More...
 
def freePluginManager
 Free the plugin manager. More...
 
def loadPlugins
 Load plugins. More...
 
def hasLoadPluginErrors
 Check if there was any Errors catched during loading of plugins. More...
 
def getPluginLoadErrors
 Get any Errors catched during loading of plugins. More...
 
def unLoadPlugins
 Unload all plugins. More...
 
def loadPlugin
 Load a particular plugin. More...
 
def unLoadPlugin
 Unload a particular plugin. More...
 
def getNumberOfPlugins
 Get number of loaded plugins. More...
 
def getPluginNames
 Function to retrieve the names of all currently loaded plugins. More...
 
def getPluginLibraryNames
 Function to retrieve the library names of all currently loaded plugins. More...
 
def getFirstPlugin
 getFirstPlugin retrieves the "first" plugin in the plugin managers internal list of plugins. More...
 
def getNextPlugin
 getNextPlugin retrieves the "next" plugin in the plugin managers internal list of plugins. More...
 
def getPreviousPlugin
 getPreviousPlugin retrieves the "previous" plugin in the plugin managers internal list of plugins. More...
 
def getCurrentPlugin
 getCurrentPlugin retrieves the "current" plugin in the plugin managers internal list of plugins. More...
 
def getPlugin
 Get the plugin handle for the named plugin. More...
 

Detailed Description

Plugin Manager Library Functions The Plugin manager loads and manages one or more plugins.

Handles to individual plugins are obtained by the getFirstPlugin, getNextPlugin etc functions, or the getPlugin(pluginName) function.

The basic approach to using the plugin system is:

  1. Create a plugin manager first
  2. Load the plugins using loadPlugins (all) or loadPlugin (specific one)
  3. Obtain the plugin handle using getPlugin or directly from loadPlugin (singular)
  4. Using the plugin handle, set values to the plugin properties
  5. Run the plugin method execute(pluginHandle)
  6. Retrieve results from plugin properties

Function Documentation

def python.telplugins_c_api.createPluginManager (   pluginDir = None)

Create a new instance of a plugin manager.

A PluginManager manages a collection of plugins, loaded and unloaded by the load and unload API functions respectively.

Parameters
pluginDirFull path to folder containing plugins. If None, uses default folder.
Returns
On success, a handle to a Plugin manager, on failure, None.
1 pm = telPlugins.createPluginManager()

def python.telplugins_c_api.freePluginManager (   pm)

Free the plugin manager.

A call to this function will also unload any loaded plugins.

Parameters
pmHandle to a plugin manager.
Returns
true if success, false otherwise.
def python.telplugins_c_api.getCurrentPlugin (   pm)

getCurrentPlugin retrieves the "current" plugin in the plugin managers internal list of plugins.

This function is typically used together with the getFirst, Next and getPreviousPlugin functions.

Parameters
pmHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns None if the plugin is not found
def python.telplugins_c_api.getFirstPlugin (   pm)

getFirstPlugin retrieves the "first" plugin in the plugin managers internal list of plugins.

This function is typically used together with the getNextPlugin and the getPreviousPlugin functions.

Parameters
pmHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns None if the plugin is not found
def python.telplugins_c_api.getNextPlugin (   pm)

getNextPlugin retrieves the "next" plugin in the plugin managers internal list of plugins.

This function is typically used together with the getFirstPlugin and getPreviousPlugin functions.

Parameters
pmHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns None if the plugin is not found
def python.telplugins_c_api.getNumberOfPlugins (   pm)

Get number of loaded plugins.

Parameters
pmHandle to a PluginManager instance
Returns
Returns the number of loaded plugins, -1 if a problem is encountered. Call telPlugins.getLastError() to obtain error message.
def python.telplugins_c_api.getPlugin (   pm,
  pluginName 
)

Get the plugin handle for the named plugin.

Parameters
pmHandle to a PluginManager instance
pluginNameA string that holds the name of the plugin
Returns
Returns a handle to a plugin, with name as supplied in the property pluginName. Returns None if the plugin is not found
def python.telplugins_c_api.getPluginLibraryNames (   pm)

Function to retrieve the library names of all currently loaded plugins.

Parameters
pmHandle to a PluginManager instance
Returns
Returns library names for all loaded plugins as a string, None otherwise
1 names = telPlugins.getPluginLibraryNames(pm)
2 print names
3 ['tel_add_noise', 'tel_lm']

def python.telplugins_c_api.getPluginLoadErrors (   pm)

Get any Errors catched during loading of plugins.

Parameters
pmHandle to a PluginManager instance
Returns
Returns a string if there was errors, None otherwise
def python.telplugins_c_api.getPluginNames (   pm)

Function to retrieve the names of all currently loaded plugins.

Parameters
pmHandle to a PluginManager instance
Returns
Returns names for all loaded plugins as a string, None otherwise
1 names = telPlugins.getPluginNames(pm)
2 print names
3 ['AddNoise', 'Levenberg-Marquardt']

def python.telplugins_c_api.getPreviousPlugin (   pm)

getPreviousPlugin retrieves the "previous" plugin in the plugin managers internal list of plugins.

This function is typically used together with the getFirstPlugin and getNextPlugin functions.

Parameters
pmHandle to a PluginManager instance
Returns
Returns a handle to a plugin. Returns None if the plugin is not found
def python.telplugins_c_api.hasLoadPluginErrors (   pm)

Check if there was any Errors catched during loading of plugins.

Parameters
pmHandle to a PluginManager instance
Returns
Returns true or false indicating if there was errors
def python.telplugins_c_api.loadPlugin (   pm,
  pluginName 
)

Load a particular plugin.

Parameters
pmHandle to a PluginManager instance
pluginNameName of the plugin to load. The plugin name is the plugin's shared library name, without path and extension. The library names for the plugins can be obtained by calling getPluginNames()
Returns
Returns a handle to a plugin, None if unsuccesful
1 lmPlugin = telPlugins.loadPlugin(pm, "tel_lm")

def python.telplugins_c_api.loadPlugins (   pm)

Load plugins.

The function will look in the default plugin folder for plugins, and load them.

Parameters
pmHandle to a PluginManager instance
Returns
Returns true if Plugins are loaded, false otherwise
1 sucess = telPlugins.loadPlugins (pm)

def python.telplugins_c_api.unLoadPlugin (   pm,
  pHandle 
)

Unload a particular plugin.

Parameters
pmHandle to a PluginManager instance
pHandleHandle to a Plugin instance
Returns
Returns true if the Plugin are unloaded succesfully, false otherwise
def python.telplugins_c_api.unLoadPlugins (   pm)

Unload all plugins.

Parameters
pmHandle to a PluginManager instance
Returns
Returns true if Plugins are unloaded succesfully, false otherwise