Fledge
An open source edge computing platform for industrial users
FilterPlugin Class Reference
Inheritance diagram for FilterPlugin:
Collaboration diagram for FilterPlugin:

Public Member Functions

 FilterPlugin (const std::string &name, PLUGIN_HANDLE handle)
 FilterPlugin class constructor. More...
 
 ~FilterPlugin ()
 FilterPlugin destructor.
 
const std::string getName () const
 
PLUGIN_HANDLE init (const ConfigCategory &config, OUTPUT_HANDLE *outHandle, OUTPUT_STREAM outputFunc)
 Call the loaded plugin "plugin_init" method. More...
 
void shutdown ()
 Call the loaded plugin "plugin_shutdown" method.
 
void ingest (READINGSET *)
 Call the loaded plugin "plugin_ingest" method. More...
 
bool persistData ()
 
void startData (const std::string &pluginData)
 Call plugin_start passing plugin data. More...
 
std::string shutdownSaveData ()
 Call the loaded plugin "plugin_shutdown" method returning plugind data (as string) More...
 
void start ()
 Call plugin_start.
 
void reconfigure (const std::string &)
 Call plugin_reconfigure method. More...
 
- Public Member Functions inherited from Plugin
 Plugin (PLUGIN_HANDLE handle)
 
const PLUGIN_INFORMATIONgetInfo ()
 
PLUGIN_HANDLE getHandle ()
 

Public Attributes

PluginDatam_plugin_data
 

Additional Inherited Members

- Protected Attributes inherited from Plugin
PLUGIN_HANDLE handle
 
PluginManagermanager
 
PLUGIN_INFORMATIONinfo
 

Constructor & Destructor Documentation

◆ FilterPlugin()

FilterPlugin::FilterPlugin ( const std::string &  name,
PLUGIN_HANDLE  handle 
)

FilterPlugin class constructor.

This class wraps the filter plugin C interface and creates set of function pointers that resolve to the loaded plugin and enclose in the class.

Parameters
nameThe filter name
handleThe loaded plugin handle

Set the function pointers to Filter Plugin C API

Member Function Documentation

◆ ingest()

void FilterPlugin::ingest ( READINGSET readings)

Call the loaded plugin "plugin_ingest" method.

This call ingest the readings through the filters chain

Parameters
readingsThe reading set to ingest

◆ init()

PLUGIN_HANDLE FilterPlugin::init ( const ConfigCategory config,
OUTPUT_HANDLE *  outHandle,
OUTPUT_STREAM  outputFunc 
)

Call the loaded plugin "plugin_init" method.

Parameters
configThe filter configuration
outHandleThe output_handled passed with filtered data to OUTPUT_STREAM function
outputFuncThe output_stream function pointer the filter uses to pass data out
Returns
The PLUGIN_HANDLE object

◆ reconfigure()

void FilterPlugin::reconfigure ( const std::string &  )

Call plugin_reconfigure method.

Parameters
configurationThe new filter configuration

◆ shutdownSaveData()

string FilterPlugin::shutdownSaveData ( )

Call the loaded plugin "plugin_shutdown" method returning plugind data (as string)

Returns
Plugin data as JSON string (to be saved into strage layer)

◆ startData()

void FilterPlugin::startData ( const std::string &  pluginData)

Call plugin_start passing plugin data.

Parameters
storedDataPlugin data to pass (from storage layer)

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