#include <rt-wdf.h>
§ wdfUnterminatedCap()
wdfUnterminatedCap::wdfUnterminatedCap |
( |
double |
C, |
|
|
double |
T |
|
) |
| |
Unadapted capacitor model class.
Creates an unadapted capacitor with capacitance C.
- Parameters
-
C | physical capacitance of the component in Farads |
T | sample period T = 1/fs in seconds |
§ calculateDownB()
void wdfUnterminatedCap::calculateDownB |
( |
vec * |
ascendingWaves, |
|
|
vec * |
descendingWaves, |
|
|
size_t * |
portIndex |
|
) |
| |
|
virtual |
Calculates the reflection of the incoming, ascending wave.
This is composed of the recent ascending wave component and former components on this port.
- Parameters
-
*ascendingWaves | Pointer to a vector of ascending waves |
*descendingWaves | Pointer to a vector to store descending waves |
*portIndex | Pointer to a counter with the port index to use in the vectors of ascending and descending waves. Needs to be incremented by numPorts in the node's implementation. |
Implements wdfRootNode.
§ getNumPorts()
int wdfRootNode::getNumPorts |
( |
| ) |
|
|
inherited |
Return the number of ports of that root node.
- Returns
- the value of the numPorts member.
§ getType()
std::string wdfUnterminatedCap::getType |
( |
| ) |
const |
|
virtual |
Returns a String describing the type of this root node.
- Returns
- a String describing the type of this leaf as "C (unadapted)"
Implements wdfRootNode.
§ setPortResistance()
void wdfUnterminatedCap::setPortResistance |
( |
double |
Rp | ) |
|
|
virtual |
Sets the nodes port resistance according to the port it is connected to.
TODO: In the case of the unadapted capacitor, it also pre-calculates the reflection coefficient reflectionCoeff, which depends on the port resistance too.
- Parameters
-
Reimplemented from wdfRootNode.
double wdfUnterminatedCap::C |
§ numPorts
size_t wdfRootNode::numPorts |
|
protectedinherited |
The number of ports on a root node element.
§ prevA
double wdfUnterminatedCap::prevA |
|
protected |
Place to store the previous incident wave component.
§ prevB
double wdfUnterminatedCap::prevB |
|
protected |
Place to store the previous reflected wave component.
§ reflectionCoeff
double wdfUnterminatedCap::reflectionCoeff |
|
protected |
Reflection coefficient, depending on the inherited port resistance, component value and sample rate.
This coefficient is pre-calculated in the setPortResistance function.
§ Rp
The WDF port resistance in Ohm.
double wdfUnterminatedCap::T |
|
protected |
The documentation for this class was generated from the following files: