Public Member Functions | Public Attributes | Private Member Functions
serial::utils::Filter Class Reference

#include <serial_listener.h>

List of all members.

Public Member Functions

 Filter (ComparatorType comparator, DataCallback callback)
virtual ~Filter ()

Public Attributes

DataCallback callback_
ComparatorType comparator_

Private Member Functions

 Filter (const Filter &)
void operator= (const Filter &)
const Filteroperator= (Filter)

Detailed Description

Represents a filter which new data is passed through.

The filter consists of a comparator and a callback. The comparator takes a token and returns true if it matches, false if it doesn't. If a match occurs the serial listener will dispatch a call of the callback with the matched data in a another thread. The comparator should be as short as possible, but the callback can be longer since it is executed in a thread or thread pool.

Parameters:
comparatorA ComparatorType that matches incoming data, returns true for a match, false othewise.
callbackA DataCallback that gets called when a match occurs.
See also:
serial::ComparatorType, serial::DataCallback, serial::FilterPtr

Definition at line 157 of file serial_listener.h.


Constructor & Destructor Documentation

serial::utils::Filter::Filter ( ComparatorType  comparator,
DataCallback  callback 
) [inline]

Definition at line 160 of file serial_listener.h.

virtual serial::utils::Filter::~Filter ( ) [inline, virtual]

Definition at line 162 of file serial_listener.h.

serial::utils::Filter::Filter ( const Filter ) [private]

Member Function Documentation

void serial::utils::Filter::operator= ( const Filter ) [private]
const Filter& serial::utils::Filter::operator= ( Filter  ) [private]

Member Data Documentation

Definition at line 165 of file serial_listener.h.

Definition at line 164 of file serial_listener.h.


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


serial_utils
Author(s): William Woodall , John Harrison
autogenerated on Thu Jun 6 2019 19:02:26