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

The debugger class for elements in a pipeline. More...

#include <pipeline_debugger.h>

Public Types

enum  debuggerActions { NoAction, Block }
 
typedef enum PipelineDebugger::debuggerActions DebuggerActions
 

Public Member Functions

 PipelineDebugger ()
 Constructor for the pipeline element debugger.
 
 ~PipelineDebugger ()
 Destructor for the pipeline element debugger.
 
DebuggerActions process (ReadingSet *readingSet)
 Process a reading set as it flows through the pipeline. More...
 
void setBuffer (unsigned int size)
 Set the size of the circular buffer used to buffer the data flowing in the pipeline. More...
 
void clearBuffer ()
 Remove the circular buffer of readings and stop the process of storing future readings.
 
std::vector< std::shared_ptr< Reading > > fetchBuffer ()
 Fetch the current contents of the circular buffer. More...
 

Detailed Description

The debugger class for elements in a pipeline.

Member Function Documentation

◆ fetchBuffer()

std::vector< std::shared_ptr< Reading > > PipelineDebugger::fetchBuffer ( )

Fetch the current contents of the circular buffer.

A vector of shared pointers is returned to alleviate the need to copy the readings.

Returns
vector<shared_ptr<Reading> The readings that are returned

◆ process()

PipelineDebugger::DebuggerActions PipelineDebugger::process ( ReadingSet readings)

Process a reading set as it flows through the pipeline.

The main purpose here is to buffer the readings in the circular buffer in order to allow later examination of the data.

Parameters
readingsThe reading set flowing into the pipeline element
Returns
DebuggerActions Action signal to the pipeline

◆ setBuffer()

void PipelineDebugger::setBuffer ( unsigned int  size)

Set the size of the circular buffer used to buffer the data flowing in the pipeline.

Parameters
sizeThe number of readings to buffer

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