RT-WDF  0.0.1
Real-time Wave Digital Filter Framework
wdfUnterminatedSwitch Class Reference

#include <rt-wdf.h>

Inheritance diagram for wdfUnterminatedSwitch:

Public Member Functions

 wdfUnterminatedSwitch (int position)
 
virtual void calculateDownB (vec *ascendingWaves, vec *descendingWaves, size_t *portIndex)
 
void setSwitch (int position)
 
virtual std::string getType () const
 
virtual void setPortResistance (double Rp)
 
int getNumPorts ()
 

Protected Attributes

double Rp
 
size_t numPorts
 

Constructor & Destructor Documentation

§ wdfUnterminatedSwitch()

wdfUnterminatedSwitch::wdfUnterminatedSwitch ( int  position)

Unterminated switch (open/short) model class.

Parameters
positioncan be either 1 for a closed switch or 0 for an open one.

Member Function Documentation

§ calculateDownB()

void wdfUnterminatedSwitch::calculateDownB ( vec *  ascendingWaves,
vec *  descendingWaves,
size_t *  portIndex 
)
virtual

Calculates the reflection of the incoming, ascending wave.

This is either a complete reflection or it's inverse, depending on the switch position.

Parameters
*ascendingWavesPointer to a vector of ascending waves
*descendingWavesPointer to a vector to store descending waves
*portIndexPointer 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 wdfUnterminatedSwitch::getType ( ) const
virtual

Returns a String describing the type of this root node.

Returns
a String describing the type of this leaf as "Unadapted controllable switch"

Implements wdfRootNode.

§ setPortResistance()

void wdfRootNode::setPortResistance ( double  Rp)
virtualinherited

Sets the nodes port resistance according to the port it is connected to.

As these nodes sit at the root, their port resistance is dependant on the upfacing port of the subtree they are connected to.

Parameters
Rpport resistance in Ohm

Reimplemented in wdfIdealCSource, wdfIdealVSource, wdfUnterminatedRes, wdfUnterminatedInd, and wdfUnterminatedCap.

§ setSwitch()

void wdfUnterminatedSwitch::setSwitch ( int  position)

Sets the switch position (0/1)

Parameters
positioncan be either 1 for a closed switch or 0 for an open one.

Member Data Documentation

§ numPorts

size_t wdfRootNode::numPorts
protectedinherited

The number of ports on a root node element.

§ Rp

double wdfRootNode::Rp
protectedinherited

The WDF port resistance in Ohm.


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