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

HCStress.h

Go to the documentation of this file.
00001 /*
00002  * Time-stamp: <00/08/03 23:03:34 pagey>
00003  *
00004  * $Format: " * $Id: HCStress.h,v 0.1 2000/08/04 07:03:17 pagey Exp $"$
00005  * HCStress.h 1.1 Tue, 07 Mar 2000 04:55:48 -0800 pagey
00006  *
00007  */
00008 #ifndef HCStress_h
00009 #define HCStress_h
00010 
00011 #include <vector>
00012 #include <HP4156A.h>
00013 #include <Characterization.h>
00014 #include <MOSConnection.h>
00015 #include "LibGPIB.h"
00016 
00017 extern "C++" {
00018   namespace LibGPIB {
00019     class HCStress {
00020     public:
00023       HCStress(HP4156A& hp4156a, MOSConnection& connection) ;
00024 
00029       void Stress(float duration) ;
00030 
00034       void Characterize() ;
00035 
00042       void AddCharacterization(Characterization *char_test) ;
00043 
00044     
00053       void RemoveCharacterization(Characterization *char_test) ;
00054 
00058       void StressBias(int terminal, float bias) ;
00059 
00062       virtual ~HCStress() ;
00063     protected:
00064     private:
00069       MOSConnection &mConnection ;
00070 
00074       HP4156A& mHP4156A ;
00075     
00078       float mStressBias[MOSConnection::TERMINALS] ;
00079 
00080     
00084       typedef vector<Characterization *> CharVec ;
00085       CharVec mCharacterization ;
00086     
00087     } ; /* class HCStress */
00088 
00089     inline
00090     HCStress::HCStress(HP4156A& hp4156a, MOSConnection& connection) :
00091       mHP4156A(hp4156a), mConnection(connection) {
00092       /*
00093        * Set all stress biases to zero. 
00094        */
00095       for(int i=0; i<MOSConnection::TERMINALS; i++) {
00096         mStressBias[i] = 0.0 ;
00097       }
00098 
00099       /*
00100        * Initialize the HP4156A.
00101        */
00102       mHP4156A.SendCommand("*RST") ;
00103       mHP4156A.SendCommand("*CLS") ;
00104       mHP4156A.SendCommand(":STAT:PRES") ;
00105       mHP4156A.SendCommand(":DISP:WIND:STAT ON") ;
00106       mHP4156A.SendCommand(":CAL:AUTO OFF") ;
00107       mHP4156A.SendCommand("*ESE 60") ;
00108       mHP4156A.SendCommand("*SRE 32") ;
00109     } 
00110 
00111     inline 
00112     void
00113     HCStress::Characterize() {
00114       for(int i=0; i<mCharacterization.size(); i++) {
00115         (*mCharacterization[i])() ;
00116       }
00117     }
00118 
00119     inline 
00120     void 
00121     HCStress::AddCharacterization(Characterization *char_test) {
00122       mCharacterization.push_back(char_test) ;
00123     }
00124 
00125     inline 
00126     void 
00127     HCStress::RemoveCharacterization(Characterization *char_test) {
00128       for(int i=0; i<mCharacterization.size(); i++) {
00129         if( mCharacterization[i] == char_test ) {
00130           mCharacterization.erase( mCharacterization.begin() + i ) ;
00131         }
00132       }
00133     }
00134   
00135 
00136     inline
00137     void
00138     HCStress::StressBias(int terminal, float bias) {
00139       mStressBias[terminal] = bias ;
00140     }
00141 
00142     inline HCStress::~HCStress() {
00143     
00144     } 
00145 
00146   } // namespace LibGPIB  
00147 } ; // extern "C++" 
00148 
00149 #endif /* HCStress_h */

Generated at Tue Aug 8 01:37:55 2000 for libgpib by doxygen1.1.4 written by Dimitri van Heesch, © 1997-2000