Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
MovingAverageFilter Class Reference

#include <moving_average_filter.h>

Inheritance diagram for MovingAverageFilter:
Inheritance graph
[legend]

Public Member Functions

 MovingAverageFilter ()
 
const char * name () const override
 Name of the plugin type, NOT the particular instance. More...
 
QWidget * optionsWidget () override
 optionsWidget pointer to a persistent widget used to set the plugin options . More...
 
void reset () override
 
bool xmlLoadState (const QDomElement &parent_element) override
 Override this method to load the status of the plugin from XML. More...
 
bool xmlSaveState (QDomDocument &doc, QDomElement &parent_element) const override
 Override this method to save the status of the plugin to XML. More...
 
 ~MovingAverageFilter () override
 
- Public Member Functions inherited from PJ::TransformFunction_SISO
void calculate () override
 
const PlotDatadataSource () const
 
int numInputs () const override
 
int numOutputs () const override
 
void reset () override
 
 TransformFunction_SISO ()=default
 
- Public Member Functions inherited from PJ::TransformFunction
std::vector< const PlotData * > & dataSources ()
 
unsigned order () const
 
PlotDataMapRefplotData ()
 
virtual void setData (PlotDataMapRef *data, const std::vector< const PlotData * > &src_vect, std::vector< PlotData * > &dst_vect)
 
 TransformFunction ()
 
virtual ~TransformFunction ()=default
 
- Public Member Functions inherited from PJ::PlotJugglerPlugin
virtual const std::vector< QAction * > & availableActions ()
 
virtual bool isDebugPlugin ()
 
 PlotJugglerPlugin ()=default
 
QDomElement xmlSaveState (QDomDocument &doc) const
 

Static Public Member Functions

static const char * transformName ()
 

Private Member Functions

std::optional< PlotData::PointcalculateNextPoint (size_t index) override
 

Private Attributes

std::vector< PlotData::Point_buffer
 
nonstd::ring_span_lite::ring_span< PlotData::Point_ring_view
 
QWidget * _widget
 
Ui::MovingAverageFilter * ui
 

Additional Inherited Members

- Public Types inherited from PJ::TransformFunction
using Ptr = std::shared_ptr< TransformFunction >
 
- Signals inherited from PJ::TransformFunction
void parametersChanged ()
 
- Protected Attributes inherited from PJ::TransformFunction_SISO
double _last_timestamp = std::numeric_limits<double>::lowest()
 
- Protected Attributes inherited from PJ::TransformFunction
PlotDataMapRef_data
 
std::vector< PlotData * > _dst_vector
 
unsigned _order
 
std::vector< const PlotData * > _src_vector
 

Detailed Description

Definition at line 17 of file moving_average_filter.h.

Constructor & Destructor Documentation

◆ MovingAverageFilter()

MovingAverageFilter::MovingAverageFilter ( )
explicit

Definition at line 5 of file moving_average_filter.cpp.

◆ ~MovingAverageFilter()

MovingAverageFilter::~MovingAverageFilter ( )
override

Definition at line 20 of file moving_average_filter.cpp.

Member Function Documentation

◆ calculateNextPoint()

std::optional< PlotData::Point > MovingAverageFilter::calculateNextPoint ( size_t  index)
overrideprivatevirtual

Method to be implemented by the user to apply a statefull function to each point. Index will increase monotonically, unless reset() is used.

Implements PJ::TransformFunction_SISO.

Definition at line 32 of file moving_average_filter.cpp.

◆ name()

const char* MovingAverageFilter::name ( ) const
inlineoverridevirtual

Name of the plugin type, NOT the particular instance.

Implements PJ::TransformFunction.

Definition at line 31 of file moving_average_filter.h.

◆ optionsWidget()

QWidget * MovingAverageFilter::optionsWidget ( )
overridevirtual

optionsWidget pointer to a persistent widget used to set the plugin options .

Reimplemented from PJ::PlotJugglerPlugin.

Definition at line 67 of file moving_average_filter.cpp.

◆ reset()

void MovingAverageFilter::reset ( )
overridevirtual

Clear the cache, state and any stored data

Reimplemented from PJ::TransformFunction.

Definition at line 26 of file moving_average_filter.cpp.

◆ transformName()

static const char* MovingAverageFilter::transformName ( )
inlinestatic

Definition at line 26 of file moving_average_filter.h.

◆ xmlLoadState()

bool MovingAverageFilter::xmlLoadState ( const QDomElement &  parent_element)
overridevirtual

Override this method to load the status of the plugin from XML.

Reimplemented from PJ::PlotJugglerPlugin.

Definition at line 83 of file moving_average_filter.cpp.

◆ xmlSaveState()

bool MovingAverageFilter::xmlSaveState ( QDomDocument &  doc,
QDomElement &  parent_element 
) const
overridevirtual

Override this method to save the status of the plugin to XML.

Reimplemented from PJ::PlotJugglerPlugin.

Definition at line 72 of file moving_average_filter.cpp.

Member Data Documentation

◆ _buffer

std::vector<PlotData::Point> MovingAverageFilter::_buffer
private

Definition at line 45 of file moving_average_filter.h.

◆ _ring_view

nonstd::ring_span_lite::ring_span<PlotData::Point> MovingAverageFilter::_ring_view
private

Definition at line 46 of file moving_average_filter.h.

◆ _widget

QWidget* MovingAverageFilter::_widget
private

Definition at line 44 of file moving_average_filter.h.

◆ ui

Ui::MovingAverageFilter* MovingAverageFilter::ui
private

Definition at line 43 of file moving_average_filter.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:50