Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GrArbFunc< iType, oType > Class Template Reference

Arbitrary Function Block. More...

#include <GrArbFunc.h>

Inheritance diagram for GrArbFunc< iType, oType >:

VrSigProc List of all members.

Public Member Functions

 GrArbFunc (oType(*f)(const iType &))
virtual const char * name ()
 default name for a module (override with actual name)
virtual int work (VrSampleRange output, void *o[], VrSampleRange inputs[], void *i[])
 Generate up to output.size output points at o[output#][sample#] using data at the inputptrs[input#][sample#].

Protected Attributes

oType(* func )(const iType &)

Detailed Description

template<class iType, class oType>
class GrArbFunc< iType, oType >

Arbitrary Function Block.

Pass this block a pointer to a function. The function should return type oType, and take a single argument of type "const iType &" For example, to make a bock which returns the angle of a VrComplex input, invoke: GrArbFunc<VrComplex,float>(&arg)


Constructor & Destructor Documentation

template<class iType, class oType>
GrArbFunc< iType, oType >::GrArbFunc oType(*)(const iType &)  f  )  [inline]
 


Member Function Documentation

template<class iType, class oType>
virtual const char* GrArbFunc< iType, oType >::name  )  [inline, virtual]
 

default name for a module (override with actual name)

Reimplemented from VrSigProc.

template<class iType, class oType>
int GrArbFunc< iType, oType >::work VrSampleRange  output,
void *  o[],
VrSampleRange  inputs[],
void *  i[]
[virtual]
 

Generate up to output.size output points at o[output#][sample#] using data at the inputptrs[input#][sample#].

Pointers start at corresponding VrSampleIndex in the range params. output.size is a multiple of outputSize. Returns the number of outputs (<= output.size) that it was able to compute with the given input ranges. If this value is < output.size, forecast() will need to be called again.

Implements VrSigProc.


Member Data Documentation

template<class iType, class oType>
oType(* GrArbFunc< iType, oType >::func)(const iType &) [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Mar 15 23:46:37 2005 for GNU Radio by  doxygen 1.4.0