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

connection.h

Go to the documentation of this file.
00001 // SuperMix version 1.0  C++ source file
00002 //
00003 // Copyright (c) 1999 California Institute of Technology.
00004 // All rights reserved.
00005 //
00006 // Redistribution and use in source and binary forms for noncommercial
00007 // purposes are permitted provided that the above copyright notice and
00008 // this paragraph are duplicated in all such forms and that any
00009 // documentation and other materials related to such distribution and
00010 // use acknowledge that the software was developed by California
00011 // Institute of Technology. Redistribution and/or use in source or
00012 // binary forms is not permitted for any commercial purpose. Use of
00013 // this software does not include a permitted use of the Institute's
00014 // name or trademark for any purpose.
00015 //
00016 // DISCLAIMER:
00017 // THIS SOFTWARE AND/OR RELATED MATERIALS ARE PROVIDED "AS-IS" WITHOUT
00018 // WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR
00019 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET
00020 // FORTH IN UCC 23212-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
00021 // LICENSED PRODUCT, HOWEVER USED.  IN NO EVENT SHALL CALTECH/JPL BE
00022 // LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING BUT NOT LIMITED TO
00023 // INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING ECONOMIC
00024 // DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF
00025 // WHETHER CALTECH/JPL SHALL BE ADVISED, HAVE REASON TO KNOW, OR IN
00026 // FACT SHALL KNOW OF THE POSSIBILITY.  THE USER BEARS ALL RISK
00027 // RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND/OR RELATED
00028 // MATERIALS.
00029 //
00030 // **************************************************************************
00031 
00055 // **************************************************************************
00056 //
00057 // 5/13/01:  Converted comments to javadoc format.
00058 // 9/22/98:  Removed constructor for single nport, no connection.
00059 // 9/16/98:  Moved calculations out of constructor.  Devices
00060 //           need no longer be treated as temporary.  They can
00061 //           recalc themselves.
00062 // 7/3/98:   added a new constructor:
00063 //           a single nport, no connections
00064 // 6/26/98:  modified by FR for sdata::size()
00065 //
00066 // **************************************************************************
00067 
00068 #ifndef CONNECTION_H
00069 #define CONNECTION_H 1
00070 
00071 #include "nport.h"
00072 
00073 class connection : public nport
00074 {
00075 private:
00077   portArray portmap;
00078 
00080   nport& dev1;
00081 
00083   nport& dev2;
00084 
00086   int port1;
00087   int port2;
00088 
00090   enum {INTER, INTRA, BLOCK} connection_type;
00091 
00096   bool calc_noise;
00097 
00099   void calc_inter();
00100 
00102   void calc_intra();
00103 
00108   void calc_block();
00109 
00110   // These call one of the above calc routines.
00111   void recalc();
00112   void recalc_S();
00113 
00114 public:
00116   connection(nport &, int, int);
00117 
00119   connection(nport &, int, nport &, int);
00120 
00122   connection(nport &, nport &);
00123 
00129   int size() { return data.size(); }
00130 
00132   const nport::data_info & get_data_info();
00133 
00142   port get_port(int index);
00143 
00145   int get_port(port);
00146 };
00147 
00148 #endif /* CONNECTION_H */

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