#include <rt-wdf.h>
§ wdfTree()
Base class for a WDF tree.
This class is always user-extended by a subclass that specifies the implementation of a WDF structure. It provides a standard interface for initialization and operation of a WDF structure towards the owner of the tree object.
§ ~wdfTree()
§ adaptTree()
int wdfTree::adaptTree |
( |
| ) |
|
High level function to adapt all ports in subtrees.
Recursively adapts all subtrees towards the root according to sample period T. Updates root matrix data afterwards if applicable to take new port resistances into account.
§ cycleWave()
void wdfTree::cycleWave |
( |
| ) |
|
High level function that is called to evaluate the WDF structure for one sample.
It pulls the waves from all connected subtrees, passes them to the root and finally pushes the roots' answer down back into the subtrees.
§ getOutputValue()
virtual double wdfTree::getOutputValue |
( |
| ) |
|
|
pure virtual |
Virtual placeholder function that is meant to get the circuit's output value.
Must be implemented in the user specific wdfTree extension.
- Returns
- a double type output value
§ getParams()
const std::vector< paramData > & wdfTree::getParams |
( |
| ) |
|
Function that returns a reference to the tree's param data vector.
- Returns
- a reference to the tree's param data vector
§ getSamplerate()
double wdfTree::getSamplerate |
( |
| ) |
|
Function to get the sample rate.
- Returns
- a double with the tree's sample rate
§ getTreeIdentifier()
virtual const char* wdfTree::getTreeIdentifier |
( |
| ) |
|
|
pure virtual |
Virtual placeholder function that is meant to return an identifier string for the tree.
Must be implemented in the user specific wdfTree extension.
- Returns
- a const char* as an identifier string for the tree
§ initTree()
void wdfTree::initTree |
( |
| ) |
|
High level function to initialize all subtrees and the root.
Sets parents in all children in subtrees and creates ports in their nodes.
§ setInputValue()
virtual void wdfTree::setInputValue |
( |
double |
signalIn | ) |
|
|
pure virtual |
Virtual placeholder function that is meant to set the circuit's input value at the correct source.
Must be implemented in the user specific wdfTree extension.
- Parameters
-
signalIn | voltage or current of the input source |
§ setParam()
virtual void wdfTree::setParam |
( |
size_t |
paramID, |
|
|
double |
paramValue |
|
) |
| |
|
pure virtual |
Virtual placeholder function that is meant to set a specific parameter to a new value.
Must be implemented in the user specific wdfTree extension.
- Parameters
-
paramID | parameter ID as specified by the user in wdfTree application class. |
paramValue | value to set the parameter to. |
§ setRootMatrData()
virtual int wdfTree::setRootMatrData |
( |
matData * |
rootMatrixData, |
|
|
double * |
Rp |
|
) |
| |
|
pure virtual |
Virtual placeholder function that is meant to update a root's matrix element according to the port resistances of the subtrees.
This function gets a roots' matData* pointer and inits/updates it's elements accordingly if applicable for this subtype of root.
Must be implemented in the user specific wdfTree extension.
- Parameters
-
rootMatrixData | is a pointer to the matData object of the root |
Rp | is a vector of port resistances of all subtrees of the root. |
- Returns
- 0 for success, -1 for error
§ setSamplerate()
void wdfTree::setSamplerate |
( |
double |
fs | ) |
|
Function to set the sample rate.
Samplerate needs to be set before adaptTree() is called!
- Parameters
-
fs | samplerate to use for adaptation of reactive elements. |
§ ascendingWaves
std::unique_ptr<vec> wdfTree::ascendingWaves |
|
protected |
Pointer to a vector of ascending waves towards the root.
§ descendingWaves
std::unique_ptr<vec> wdfTree::descendingWaves |
|
protected |
Pointer to a vector of descending waves from the root.
§ params
Vector of parameters.
Parameters must be defined in the user-specific wdfTree extension as paramData objects and added to this vector.
§ root
std::unique_ptr<wdfRoot> wdfTree::root |
|
protected |
Pointer to the root object of this tree.
§ Rp
Vector of port resistances at the root
§ subtreeCount
size_t wdfTree::subtreeCount |
|
protected |
§ subtreeEntryNodes
Array of pointers to the first nodes in the subtrees that hang off the root.
Inverse of treeSampleRate
§ treeSampleRate
double wdfTree::treeSampleRate |
|
protected |
The documentation for this class was generated from the following files: