Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

connection Class Reference

#include <connection.h>

Inheritance diagram for connection::

nport device List of all members.

Public Methods

 connection (nport &, int, int)
 Intraconnection constructor. More...

 connection (nport &, int, nport &, int)
 Interconnection constructor. More...

 connection (nport &, nport &)
 Constructor to join two devices without connecting any ports. More...

int size ()
 The number of ports this device has. More...

const nport::data_infoget_data_info ()
port get_port (int index)
 Return label for a given port index, or the default port (0,0) if index out of range. More...

int get_port (port)

Private Types

enum  { INTER, INTRA, BLOCK }
 Type of connection to make. More...


Private Methods

void calc_inter ()
 The actual calculations for an interconnection. More...

void calc_intra ()
 The actual calculations for an intraconnection. More...

void calc_block ()
 The actual calculations for a block connection. More...

void recalc ()
 The function for calculating sdata. More...

void recalc_S ()
 If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale. More...


Private Attributes

portArray portmap
 We need an array of port labels to keep track of what we connected. More...

nportdev1
 The device(s) to be connected. More...

nportdev2
 The device(s) to be connected. More...

int port1
 The ports to be connected. More...

int port2
enum connection:: { ... }  connection_type
 Type of connection to make. More...

bool calc_noise
 Should calc functions calculate noise? This flag is managed by recalc() and recalc_S(). More...


Member Enumeration Documentation

anonymous enum [private]
 

Type of connection to make.

Enumeration values:
INTER  
INTRA  
BLOCK  

Definition at line 90 of file connection.h.


Constructor & Destructor Documentation

connection::connection ( nport & d,
int p1,
int p2 )
 

Intraconnection constructor.

Definition at line 49 of file connection.cc.

connection::connection ( nport & d1,
int p1,
nport & d2,
int p2 )
 

Interconnection constructor.

Definition at line 200 of file connection.cc.

connection::connection ( nport & d1,
nport & d2 )
 

Constructor to join two devices without connecting any ports.

Definition at line 614 of file connection.cc.


Member Function Documentation

void connection::calc_block ( ) [private]
 

The actual calculations for a block connection.

This combines two devices without connecting any ports.

Definition at line 640 of file connection.cc.

Referenced by recalc(), and recalc_S().

void connection::calc_inter ( ) [private]
 

The actual calculations for an interconnection.

Definition at line 237 of file connection.cc.

Referenced by recalc(), and recalc_S().

void connection::calc_intra ( ) [private]
 

The actual calculations for an intraconnection.

Definition at line 78 of file connection.cc.

Referenced by recalc(), and recalc_S().

const nport::data_info & connection::get_data_info ( ) [virtual]
 

Returns:
noise and source status info about the sdata of the device

Reimplemented from nport.

Definition at line 713 of file connection.cc.

int connection::get_port ( port p ) [virtual]
 

Returns:
the index for a given port label, or 0 if not found

Reimplemented from nport.

Definition at line 735 of file connection.cc.

port connection::get_port ( int index ) [virtual]
 

Return label for a given port index, or the default port (0,0) if index out of range.

Parameters:
index   the index of the port
Returns:
the port corresponding to index, or (0,0) if index is not in proper range.

Reimplemented from nport.

Definition at line 725 of file connection.cc.

void connection::recalc ( ) [private, virtual]
 

The function for calculating sdata.

recalc() should do the following:

  • (1) Read device::f, device::Z0, and, by default, device::T to get the operating conditions for the response calculation.
  • (2) Calculate the S, C, and B matrix values and store them to nport::data, with all values normalized using device::Z0.
  • (3) Store the normalizing impedance to nport::data by calling data.set_znorm().

Reimplemented from nport.

Definition at line 747 of file connection.cc.

void connection::recalc_S ( ) [private, virtual]
 

If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale.

Reimplemented from nport.

Definition at line 766 of file connection.cc.

int connection::size ( ) [inline, virtual]
 

The number of ports this device has.

Returns:
the number of ports

Reimplemented from nport.

Definition at line 129 of file connection.h.

Referenced by get_port().


Member Data Documentation

bool connection::calc_noise [private]
 

Should calc functions calculate noise? This flag is managed by recalc() and recalc_S().

Definition at line 96 of file connection.h.

enum { ... } connection::connection_type [private]
 

Type of connection to make.

nport & connection::dev1 [private]
 

The device(s) to be connected.

Definition at line 80 of file connection.h.

nport & connection::dev2 [private]
 

The device(s) to be connected.

Definition at line 83 of file connection.h.

int connection::port1 [private]
 

The ports to be connected.

Definition at line 86 of file connection.h.

int connection::port2 [private]
 

Definition at line 87 of file connection.h.

portArray connection::portmap [private]
 

We need an array of port labels to keep track of what we connected.

Definition at line 77 of file connection.h.


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

Please direct comments and corrections to supermix@submm.caltech.edu
Go to the supermix home page
Generated by doxygen1.2.7