libRoadRunner Plugin C API  1.0.0
Plugin Framework for libRoadRunner
 All Data Structures Files Functions Variables Typedefs Groups Pages
Functions
rrp_api.h File Reference

Plugins Core C-API Header. More...

#include "rrp_exporter.h"
#include "rrp_types.h"
#include "rrp_parameter_api.h"

Go to the source code of this file.

Functions

RRPluginManagerHandle createPluginManager (const char *pluginDir)
 Create a new instance of a plugin manager. More...
 
bool freePluginManager (RRPluginManagerHandle handle)
 Free the plugin manager. A call to this function will also unload any loaded plugins. More...
 
bool loadPlugins (RRPluginManagerHandle handle)
 Load plugins. The function will look in the default plugin folder for plugins, and load them. More...
 
bool unLoadPlugins (RRPluginManagerHandle handle)
 Unload plugins. More...
 
RRPluginHandle loadPlugin (RRPluginManagerHandle handle, const char *pluginName)
 Load a particular plugin. More...
 
bool unLoadPlugin (RRPluginManagerHandle handle, RRPluginHandle plugin)
 unload a particular plugin More...
 
int getNumberOfPlugins (RRPluginManagerHandle handle)
 Get Number of loaded plugins. More...
 
char * getPluginNames (RRPluginManagerHandle handle)
 Function to retrieve the names of currently loaded plugins. More...
 
char * getPluginLibraryNames (RRPluginManagerHandle handle)
 Function to retrieve the library name of currently loaded plugins. More...
 
RRPluginHandle getFirstPlugin (RRPluginManagerHandle handle)
 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. More...
 
RRPluginHandle getNextPlugin (RRPluginManagerHandle handle)
 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. More...
 
RRPluginHandle getPreviousPlugin (RRPluginManagerHandle handle)
 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. More...
 
RRPluginHandle getCurrentPlugin (RRPluginManagerHandle handle)
 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. More...
 
RRPluginHandle getPlugin (RRPluginManagerHandle handle, const char *pluginName)
 GetPluginHandle. More...
 
long getPluginSharedLibHandle (RRPluginManagerHandle handle, RRPluginHandle pluginHandle)
 Get a handle to a plugins shared library. More...
 
char * getPluginName (RRPluginHandle handle)
 Get the name of a Plugin. More...
 
char * getPluginInfo (RRPluginHandle handle)
 Return some information about a Plugin. More...
 
unsigned char * getPluginManualAsPDF (RRPluginHandle handle)
 Get Plugin manual as PDF. A plugin may embedd a help manual as a PDF. This function return such as a pointer to a string. Use the function getPluginManualNrOfBytes to get the exact length of this string. More...
 
unsigned int getPluginManualNrOfBytes (RRPluginHandle handle)
 Get the byte size for the PDF manual. More...
 
bool assignRoadRunnerInstance (RRPluginHandle pHandle, RRHandle rrHandle)
 Assign a roadrunner instance handle for the plugin to use. A plugin may use an externally created roadrunner instance for its internal work. More...
 
bool executePlugin (RRPluginHandle handle)
 The executePlugin function is the function designated to fire of a Plugins "worker". What is done when this function is entered is plugin dependent. More...
 
bool executePluginEx (RRPluginHandle handle, bool inAThread)
 The executePluginEx is similar to the executePlugin function, except it takes two extra arguments. More...
 
char * getPluginStatus (RRPluginHandle handle)
 Get some status of a plugin. See the plugins documentation on what to expect. More...
 
char * getPluginResult (RRPluginHandle handle)
 Returns a plugins result, as a string. See the plugins documentation on what to expect. More...
 
bool resetPlugin (RRPluginHandle handle)
 Reset a Plugin. Plugin dependent. A reset function should bring the internal state of a plugin to a known state. More...
 
bool isPluginWorking (RRPluginHandle handle)
 check if plugin is actively working More...
 
void terminateWork (RRPluginHandle handle)
 Terminate any work that is in progress in a plugin. If the plugins worker is executed in a thread, this function will signal the internals of the plugin to terminate. More...
 
bool isBeingTerminated (RRPluginHandle handle)
 Check if the work of a plugin is currently being terminated. More...
 
bool wasTerminated (RRPluginHandle handle)
 wasTerminated. query a plugin if work was terminated before completion More...
 
bool assignOnStartedEvent (RRPluginHandle handle, PluginEvent cb, void *userData1, void *userData2)
 Assign event function fired when a plugin starts its work. More...
 
bool assignOnProgressEvent (RRPluginHandle handle, PluginEvent cb, void *userData1, void *userData2)
 Assign event function fired as a plugin progresses. More...
 
bool assignOnFinishedEvent (RRPluginHandle handle, PluginEvent cb, void *userData1, void *userData2)
 Assign event function fired when a plugin finishes its work. More...
 
bool assignPluginInput (RRPluginHandle handle, void *userData)
 Hand external data to a plugin. More...
 
RRHandle getRRHandleFromPlugin (RRPluginHandle handle)
 Get roadrunner instance handle from plugin. More...
 
char * getPluginPropertiesAsXML (RRPluginHandle handle)
 Get a Plugins Parameterse as an xml document. The string returned from this function is formated as xml. More...
 
RRParametersHandle getPluginParameters (RRPluginHandle handle)
 Get a handle to a plugins parameters. More...
 
char * getListOfPluginParameterNames (RRPluginHandle handle)
 Get a list of a plugin parameter names, as a string. Space being the delimiter. More...
 
RRParameterHandle getPluginParameter (RRPluginHandle handle, const char *parameterName)
 Get a parameter handle to a parameter. More...
 
bool setPluginParameter (RRPluginHandle handle, const char *parameterName, const char *value)
 Set the value of a PluginParameter by a string. More...
 
RRDataHandle getRoadRunnerDataHandle (RRHandle handle)
 Retrieve a handle to RoadRunners internal data. More...
 
RRCDataPtr createRRCData (RRDataHandle rrDataHandle)
 Create a RoadRunner C data structure (RRCDataPtr) from RoadRunner data. More...
 
int getRRCDataNumRows (RRCDataPtr rrData)
 Retrieve the number of rows in the given RoadRunner C numberical data (returned from simulate(RRHandle handle)) More...
 
int getRRCDataNumCols (RRCDataPtr rrData)
 Retrieve the number of columns in the given rrCData data (returned form simulat(RRHandle handle)) More...
 
bool getRRCDataElementF (RRCDataPtr rrcData, int r, int c, double *value)
 Retrieves an element at a given row and column from a RRCData struct type variable. More...
 
bool getRoadRunnerDataElement (RRDataHandle rrData, int r, int c, double *value)
 Retrieves an element at a given row and column from a RoadRunner data type variable. More...
 
char * getRoadRunnerDataColumnHeader (RRDataHandle _data)
 
int getRoadRunnerDataNumRows (RRDataHandle rrData)
 
int getRoadRunnerDataNumCols (RRDataHandle rrData)
 
RRDataHandle createRoadRunnerData (int rows, int cols, char *colNames)
 
bool freeRoadRunnerData (RRDataHandle handle)
 
char * stringArrayToStringFWD (const RRStringArrayPtr list)
 Returns a string list in string form. More...
 
bool writeRoadRunnerDataToFile (RRDataHandle rrData, char *fName)
 
bool readRoadRunnerDataFromFile (RRDataHandle rrData, char *fName)
 
char * getLastPluginError ()
 Return last API error. More...
 
bool freeText (char *text)
 Free char* generated by library routines.
 

Detailed Description

Plugins Core C-API Header.

Author
Totte Karlsson & Herbert M Sauro

<-----------------------------------------------------------— This file is part of cRoadRunner. See http://code.google.com/p/roadrunnerlib for more details.

Copyright (C) 2012-2013 University of Washington, Seattle, WA, USA

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In plain english this means:

You CAN freely download and use this software, in whole or in part, for personal, company internal, or commercial purposes;

You CAN use the software in packages or distributions that you create.

You SHOULD include a copy of the license in any redistribution you may make;

You are NOT required include the source of software, or of any modifications you may have made to it, in any redistribution you may assemble that includes it.

YOU CANNOT:

redistribute any piece of this software without proper attribution;

Function Documentation

RRDataHandle getRoadRunnerDataHandle ( RRHandle  handle)

Retrieve a handle to RoadRunners internal data.

Parameters
handleHandle to a RoadRunner instance
Returns
Returns an handle to roadrunners internal data object