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

The NorthFilterPipeline class is derived from FilterPipeline class and is used to represent a pipeline of filter applicable to sending process. More...

#include <north_filter_pipeline.h>

Inheritance diagram for NorthFilterPipeline:
Collaboration diagram for NorthFilterPipeline:

Public Member Functions

 NorthFilterPipeline (ManagementClient *mgtClient, StorageClient &storage, std::string serviceName)
 NorthFilterPipeline class constructor. More...
 
bool setupFiltersPipeline (void *passToOnwardFilter, void *useFilteredData, void *sendingProcess)
 Set the filter pipeline for sending process. More...
 
- Public Member Functions inherited from FilterPipeline
 FilterPipeline (ManagementClient *mgtClient, StorageClient &storage, std::string serviceName)
 FilterPipeline class constructor. More...
 
 ~FilterPipeline ()
 FilterPipeline destructor.
 
PipelineElementgetFirstFilterPlugin ()
 
unsigned int getFilterCount ()
 
void configChange (const std::string &, const std::string &)
 Configuration change for one of the filters. More...
 
void cleanupFilters (const std::string &categoryName)
 Cleanup all the loaded filters. More...
 
bool loadFilters (const std::string &categoryName)
 Load all filter plugins in the pipeline. More...
 
bool setupFiltersPipeline (void *passToOnwardFilter, void *useFilteredData, void *ingest)
 Set the filter pipeline. More...
 
bool isReady ()
 
bool hasChanged (const std::string pipeline) const
 
bool isShuttingDown ()
 
void setShuttingDown ()
 
void execute ()
 Called when we pass the data into the pipeline. More...
 
void awaitCompletion ()
 Wait for all active branches of the pipeline to complete.
 
void startBranch ()
 A new branch has started in the pipeline.
 
void completeBranch ()
 A branch in the pipeline has completed.
 

Additional Inherited Members

- Protected Attributes inherited from FilterPipeline
ManagementClientmgtClient
 
StorageClientstorage
 
std::string serviceName
 
std::vector< PipelineElement * > m_filters
 
std::map< std::string, PipelineElement * > m_filterCategories
 
std::string m_pipeline
 
bool m_ready
 
bool m_shutdown
 
ServiceHandlerm_serviceHandler
 
int m_activeBranches
 
std::mutex m_actives
 
std::condition_variable m_branchActivations
 

Detailed Description

The NorthFilterPipeline class is derived from FilterPipeline class and is used to represent a pipeline of filter applicable to sending process.

Methods are provided to load filters, setup filtering pipeline and for pipeline/filters cleanup.

Constructor & Destructor Documentation

◆ NorthFilterPipeline()

NorthFilterPipeline::NorthFilterPipeline ( ManagementClient mgtClient,
StorageClient storage,
std::string  serviceName 
)

NorthFilterPipeline class constructor.

This class abstracts the filter pipeline interface for sending process

Parameters
mgtClientManagement client handle
storageStorage client handle
serviceNameName of the service to which this pipeline applies

Member Function Documentation

◆ setupFiltersPipeline()

bool NorthFilterPipeline::setupFiltersPipeline ( void *  passToOnwardFilter,
void *  useFilteredData,
void *  _sendingProcess 
)

Set the filter pipeline for sending process.

This method calls the the method "plugin_init" for all loadad filters. Up to date filter configurations and Ingest filtering methods are passed to "plugin_init"

Parameters
passToOnwardFilterPtr to function that passes data to next filter
useFilteredDataPtr to function that gets final filtered data
_sendingProcessThe SendingProcess class handle
Returns
True on success, False otherwise. Any caught exception

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