CCA

Timed Processing will process the component after a defined number of incoming timing signals. More...

#include <Timed.h>

Inheritance diagram for cca::Timed:
Collaboration diagram for cca::Timed:

List of all members.

Public Member Functions

virtual unsigned int getSampleRate () const
 Returns samplerate of this processing strategy.
virtual bool processOnTick () const
 Should the node be processed now, given a new tick arrived? Returns, if this processing strategy wants the node to be processed when the current tick arrives.
virtual bool processOnInputs (ProcessingStrategy::NamedInputPorts inputs) const
 Should the node be processed given the items at the input ports? Returns, if this processing strategy wants the node to be processed when the current tick arrives.
virtual std::string print () const
 Printing information about this node.

Static Public Member Functions

static StrategyPtr samplerate (unsigned int samplerate=1)
 Creates StrategyPtr to Timed strategy.

Protected Member Functions

 Timed (unsigned int SampleRate=1)

Protected Attributes

unsigned int srate
unsigned int ticks
rsc::logging::LoggerPtr logger
 Logger.

Detailed Description

Timed Processing will process the component after a defined number of incoming timing signals.

Timing is therefore depending on the timing of the incoming timing signals.

Definition at line 47 of file Timed.h.


Constructor & Destructor Documentation

cca::Timed::Timed ( unsigned int  SampleRate = 1) [protected]

Definition at line 49 of file Timed.cpp.


Member Function Documentation

unsigned int cca::Timed::getSampleRate ( ) const [virtual]

Returns samplerate of this processing strategy.

Returns:
Sample-rate

Definition at line 81 of file Timed.cpp.

References srate.

string cca::Timed::print ( ) const [virtual]

Printing information about this node.

Reimplemented from cca::ProcessingStrategy.

Definition at line 85 of file Timed.cpp.

References cca::ProcessingStrategy::name, and srate.

Should the node be processed given the items at the input ports? Returns, if this processing strategy wants the node to be processed when the current tick arrives.

This method should be called on each tick.

Returns:
Whether to process the node right now.

Implements cca::ProcessingStrategy.

Definition at line 73 of file Timed.cpp.

References logger.

bool cca::Timed::processOnTick ( ) const [virtual]

Should the node be processed now, given a new tick arrived? Returns, if this processing strategy wants the node to be processed when the current tick arrives.

This method should be called on each tick.

Returns:
Whether to process the node right now.

Implements cca::ProcessingStrategy.

Definition at line 54 of file Timed.cpp.

References logger, srate, and ticks.

StrategyPtr cca::Timed::samplerate ( unsigned int  samplerate = 1) [static]

Creates StrategyPtr to Timed strategy.

Parameters:
samplerateSamplerate - after how many incoming timing signals processing is triggered.
Returns:
Pointer to this ProcessingStrategy

Definition at line 45 of file Timed.cpp.


Member Data Documentation

rsc::logging::LoggerPtr cca::Timed::logger [protected]

Logger.

Reimplemented from cca::ProcessingStrategy.

Definition at line 100 of file Timed.h.

Referenced by processOnInputs(), and processOnTick().

unsigned int cca::Timed::srate [protected]

Definition at line 96 of file Timed.h.

Referenced by getSampleRate(), print(), and processOnTick().

unsigned int cca::Timed::ticks [mutable, protected]

Definition at line 98 of file Timed.h.

Referenced by processOnTick().


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