#include <rt-wdf.h>
§ wdfTerminatedRtype()
wdfTerminatedRtype::wdfTerminatedRtype |
( |
std::vector< wdfTreeNode *> |
childrenIn | ) |
|
Adapter class for terminated n-port R-type nodes.
The adapter owns one terminated upfacing port and n downfacing ports
- Parameters
-
*childrenNodes | holds a vector of pointers to the n adapters' children |
§ ~wdfTerminatedRtype()
wdfTerminatedRtype::~wdfTerminatedRtype |
( |
| ) |
|
§ adaptPorts()
double wdfTreeNode::adaptPorts |
( |
double |
T | ) |
|
|
inherited |
Recursively adapts all ports in the tree.
This recursion should be initiated from the base of the tree. It sets port resistances of all upfacing ports according to component values and/or adaptation rules and copies it onto connected downfacing ports in the parent.
- Parameters
-
T | sample period as specified by setSamplerate() |
- Returns
- a double type up-facing port resistance of that WDF element
§ calculateDownB()
void wdfTerminatedRtype::calculateDownB |
( |
double |
descendingWave | ) |
|
|
virtual |
Sets the wave components in the downfacing ports.
This function weights the input wave and the incident waves on the downports with the coefficients in the scattering matrix S and sets the reflected waves in the downfacing port objects.
- Parameters
-
descendingWave | incoming wave component on the upfacing port |
Implements wdfTreeNode.
§ calculateScatterCoeffs()
virtual void wdfTerminatedRtype::calculateScatterCoeffs |
( |
| ) |
|
|
pure virtual |
Recursively calculates scattering coefficients of adapters.
This recursion should be initiated from the base of the tree. It calculates the scattering coefficients according to the port resistances of the adaptor.
Must be implemented in the user-defined subclass of wdfTerminatedRtype in the WDF application tree. Make sure to continue the recursion by calling downPort->connectedNode->calculateScatterCoeffs( ) on all down ports.
Implements wdfTreeNode.
§ calculateUpB()
double wdfTerminatedRtype::calculateUpB |
( |
| ) |
|
|
virtual |
Returns the upfacing wave component towards the root.
This function is called from pullWave() to calculate the wave that travels towards the base.
It collects the wave components from the downfacing ports and weights them with the coefficients from the scattering matrix S.
- Returns
- the upward traveling wave of a node
Implements wdfTreeNode.
§ calculateUpRes()
virtual double wdfTerminatedRtype::calculateUpRes |
( |
double |
T | ) |
|
|
pure virtual |
Returns the r-type adaptors upfacing port resistance.
This function is called from adaptPorts(). It returns the upfacing port resistance of the node to fulfill termination according to the respective adaptation law of this node.
Must be implemented in the user-defined subclass of wdfTerminatedRtype in the WDF application tree.
- Parameters
-
T | sample period T = 1/fs as needed to adapt capacitors/inductors |
- Returns
- a double type port resistance of that element in Ohms
Implements wdfTreeNode.
§ createPorts()
void wdfTreeNode::createPorts |
( |
| ) |
|
|
inherited |
Recursively creates WDF ports in the tree.
This recursion should be initiated from the base of the tree. It creates downfacing ports for all children and an upfacing port in each child while setting the correct pointers to the nodes that these ports are connected to.
§ getType()
std::string wdfTerminatedRtype::getType |
( |
| ) |
const |
|
virtual |
Returns a String describing the type of this adaptor.
- Returns
- a String describing the type of this adaptor as "R-type Adapter (TOP adapted)"
Implements wdfTreeNode.
§ pullWaveUp()
double wdfTreeNode::pullWaveUp |
( |
| ) |
|
|
virtualinherited |
Recursively pulls the wave from the leafs towards the root.
This recursion should be initiated from the base of the tree. As all tree nodes are adapted, it basically just pulls up correctly scattered states of reactive elements and input values from adapted sources.
- Returns
- the upward traveling wave of a node
§ pushWaveDown()
void wdfTreeNode::pushWaveDown |
( |
double |
descendingWave | ) |
|
|
virtualinherited |
Recursively pushes the wave from the root towards the leafs.
This recursion should be initiated from the base of the tree. It pushes the respective wave component of a branch from the root to the leafs by scattering them correctly along the way.
- Parameters
-
descendingWave | descending wave component that shall be scattered to the downfacing ports of the node or processed in a leaf accordingly |
§ setParentInChildren()
void wdfTreeNode::setParentInChildren |
( |
| ) |
|
|
inherited |
Recursively sets pointers to parent node in children.
This recursion should be initiated from the base of the tree. It sets a pointer to *this parent node in all connected children.
§ childrenNodes
Vector of pointers to connected children nodes of this node.
§ downPorts
std::vector<wdfPort*> wdfTreeNode::downPorts |
|
protectedinherited |
Vector of pointers to downfacing port objects of this tree.
§ parentNode
Pointer to the connected parent node of this node.
std::unique_ptr<mat> wdfTerminatedRtype::S |
|
protected |
Scattering matrix of the R-type adapter
Size: (childNodeCount+1) x (childNodeCount+1) ("+1" for upfacing port)
§ upPort
std::unique_ptr<wdfPort> wdfTreeNode::upPort |
|
inherited |
Pointer to the upfacing port object of this node.
The documentation for this class was generated from the following files: