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

A pipeline element that represents a branch in the pipeline. More...

#include <pipeline_element.h>

Inheritance diagram for PipelineBranch:
Collaboration diagram for PipelineBranch:

Public Member Functions

 PipelineBranch (FilterPipeline *parent)
 Constructor for a branch in a filter pipeline.
 
 ~PipelineBranch ()
 Destructor for the pipeline branch. More...
 
void ingest (READINGSET *readingSet)
 Ingest a set of readings and pass on in the pipeline. More...
 
std::string getName ()
 
bool setupConfiguration (ManagementClient *mgtClient, std::vector< std::string > &children)
 Setup the configuration for a branch in a pipeline. More...
 
bool setup (ManagementClient *mgmt, void *ingest, std::map< std::string, PipelineElement *> &categories)
 Setup the configuration categories for the branch element of a pipeline. More...
 
bool init (OUTPUT_HANDLE *outHandle, OUTPUT_STREAM output)
 Initialise the pipeline branch. More...
 
void shutdown (ServiceHandler *serviceHandler, ConfigHandler *configHandler)
 Setup the configuration categories for the branch element of a pipeline. More...
 
bool isReady ()
 Return if the branch is ready to be executed.
 
bool isBranch ()
 
std::vector< PipelineElement * > & getBranchElements ()
 
void setFunctions (void *onward, void *use, void *ingest)
 
- Public Member Functions inherited from PipelineElement
void setNext (PipelineElement *next)
 
PipelineElementgetNext ()
 
void setService (const std::string &serviceName)
 
void setStorage (StorageClient *storage)
 
virtual bool isFilter ()
 
virtual void reconfigure (const std::string &)
 

Additional Inherited Members

- Static Public Member Functions inherited from PipelineElement
static void ingest (void *handle, READINGSET *readings)
 
- Protected Attributes inherited from PipelineElement
std::string m_serviceName
 
PipelineElementm_next
 
StorageClientm_storage
 

Detailed Description

A pipeline element that represents a branch in the pipeline.

Constructor & Destructor Documentation

◆ ~PipelineBranch()

PipelineBranch::~PipelineBranch ( )

Destructor for the pipeline branch.

If the pipeline is not already shutdown then shut it down Delete the thread if it exists.

Member Function Documentation

◆ ingest()

void PipelineBranch::ingest ( READINGSET readingSet)
virtual

Ingest a set of readings and pass on in the pipeline.

Create a deep copy and queue the copy into the branched pipeline.

Parameters
readingSetThe set of readings to ingest

Implements PipelineElement.

◆ init()

bool PipelineBranch::init ( OUTPUT_HANDLE *  outHandle,
OUTPUT_STREAM  output 
)
virtual

Initialise the pipeline branch.

Initialise the elements of the child pipeline Spawn a thread to excute the child pipeline.

Parameters
configThe filter configuration
outHandleThe pipeline element on the "main branch"
output

Implements PipelineElement.

◆ setup()

bool PipelineBranch::setup ( ManagementClient mgmt,
void *  ingest,
std::map< std::string, PipelineElement *> &  categories 
)
virtual

Setup the configuration categories for the branch element of a pipeline.

The branch itself has no category, but it must call the setup method on all items in the child branch of the piepline.

Parameters
mgmtThe management client
ingestThe configuration handler for our service
filterCategoriesA map of the category names to pipeline elements

Implements PipelineElement.

◆ setupConfiguration()

bool PipelineBranch::setupConfiguration ( ManagementClient mgtClient,
std::vector< std::string > &  children 
)
virtual

Setup the configuration for a branch in a pipeline.

Parameters
mgtClientThe management client
childrenA vector to fill with child configuration categories

Reimplemented from PipelineElement.

◆ shutdown()

void PipelineBranch::shutdown ( ServiceHandler serviceHandler,
ConfigHandler configHandler 
)
virtual

Setup the configuration categories for the branch element of a pipeline.

The branch itself has no category, but it must call the setup method on all items in the child branch of the piepline.

Parameters
mgmtThe management client
ingestThe configuration handler for our service
filterCategoriesA map of the category names to pipeline elements

Implements PipelineElement.


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