class stdtest : public diagtest Object for implementing a standard test
| | stdtest (const string& name) Default constructor. |
| | begin (std::ostringstream& errmsg) Startup method. |
| | end (std::ostringstream& errmsg) Cleanup method. |
| | setup (std::ostringstream& errmsg, tainsec_t starttime, syncpointer& sync) Setup method. |
| | stimulus simulus object type
| ||||||||||||||||||||||||||||||||||||||||||||||
| | stimulustype type for selecting stimulus channels
| ||||||||||||||||||||||||||||||||||||||||||||||
| | measurementchannel measurement channel object type
| ||||||||||||||||||||||||||||||||||||||||||||||
| | interval interval class
| ||||||||||||||||||||||||||||||||||||||||||||||
| | callbackarg argument for synchronization callbacks
|
| | chnrec friend |
| | stimuluslist stimuli type |
| | waveformset allowed stimulus waveform type |
| | sinewaveOnly sine wave only |
| | periodicOnly periodic waveforms only |
| | noiseOnly noise waveforms only |
| | allWaveforms all waveforms |
| | measlist measurement channels type |
| | intervallist list of intervals |
| | stdtestsync synchronization object for standard test |
| | callbackarg friend |
| | test test access class for storage object |
| | testType test type |
| | doAnalysis true is analysis should be done; set false during pause |
| | T0 start time: t = 0 |
| | averageType average type |
| | averages number of averages |
| | avrgsize size of average buffer, i.e. number of measurement points |
| | avrgnum number of analyzed measurement periods |
| | timeGrid time grid of test; used for determining the start time |
| | stimuli exciatations |
| | meas measurement channels |
| | intervals measurement intervals |
| | syncqueue queue of synchronization points |
| | dataerrors number of data errors |
| | (stdtest::*channelAnalysis) (int resultnum, int measnum, string chnname, bool stim, const callbackarg& id) Memeber function prototype for channal analysis callback |
| | readParam (std::ostringstream& errmsg) Read parameter method. |
| | readMeasParam (std::ostringstream& errmsg, int maxIndex = 100) Read measurement parameter method. |
| | readStimuliParam (std::ostringstream& errmsg, bool needReadback = false, waveformset allowedWaveforms = allWaveforms, int maxIndex = 100) Read stimuli parameter method. |
| | subscribeChannels (std::ostringstream& errmsg) Subscribe channels method. |
| | samplingFrequencies (double fMax, double& fSampleMin, double& fSampleMax) Sampling frequency range. |
| | calcTimeGrid (double fMax, tainsec_t* t0 = 0) Calculate time grid method. |
| | calcTimes (std::ostringstream& errmsg, tainsec_t& t0) Calculate measurement time method. |
| | addMeasPartitions (const interval& ival, int pIndex, double fSample, tainsec_t pt = 0, double fZoom = 0, double fZoomSample = 0, tainsec_t tZoom = 0) Add measurement partitions method. |
| | addSyncPoint (const interval& ival, int measPeriod, int measPoint = 0) Add synchronization point method. |
| | newMeasPoint (int i, int measPoint = 0) new measurement point method. |
| | calcMeasurements (std::ostringstream& errmsg, tainsec_t t0 = 0, int measPoint = 0) Add measurements method. |
| | delMeasurements (std::ostringstream& errmsg) Delete measurements method. |
| | addMeasurements (std::ostringstream& errmsg, tainsec_t t0 = 0, int measPoint = 0) Add measurements method. |
| | startMeasurements (std::ostringstream& errmsg) Start measurements method. |
| | stopMeasurements (int firstIndex = -1) Stop measurements method. |
| | prepareNextPoint (const callbackarg& id) Prepare method. |
| | getNextSyncPoint (const callbackarg& id, syncpointer& sync) next sync method. |
| | syncAction (const callbackarg& id, syncpointer& sync, bool& notify) Sync action method. |
| | syncAbort (const callbackarg& id) Sync abort method. |
| | syncPause (const callbackarg& id, syncpointer& sync) Sync pause method. |
| | syncResume (const callbackarg& id, syncpointer& sync) Sync abort method. |
| | callChannelAnalysis (const callbackarg& id, int measnum, channelAnalysis method, int firstres = 0, stimulustype inclStim = stimReadback, bool async = true, bool skipDuplicates = true) Channel analyis method. |
| | analyze (const callbackarg& id, int measnum, bool& notify) Analysis method. |
Standard test template This object implements a abstract standard test. For a straight forward test it should be sufficient to overwrite calcTime, calcMeasurement, readParam and the sync functions.
virtual bool begin(std::ostringstream& errmsg)
virtual bool end(std::ostringstream& errmsg)
virtual bool setup(std::ostringstream& errmsg, tainsec_t starttime, syncpointer& sync)
starttime - start time of test
sync - synchronization point
friend class chnrec
class stimulus
typedef std::vector <AWG_Component> awglist
typedef std::vector <float> pointlist
string name
bool isReadback
string readback
AWG_WaveType waveform
double freq
double ampl
double offs
double phas
double ratio
double frange
double arange
pointlist points
gdsChnInfo_t excInfo
gdsChnInfo_t readbackInfo
awglist signals
bool duplicate
rtddChannel::partitionlist partitions
bool useActiveTime
stimulus()
bool calcSignal(tainsec_t t0, tainsec_t duration)
duration - duration of excitation
bool calcSineSignal(tainsec_t t0, tainsec_t duration, tainsec_t ramp)
duration - duration of excitation
ramp - duration of ramp
typedef std::vector <stimulus> stimuluslist
typedef std::set <AWG_WaveType> waveformset
const static waveformset sinewaveOnly
const static waveformset periodicOnly
const static waveformset noiseOnly
const static waveformset allWaveforms
enum stimulustype
stimNone
stimReadback
class measurementchannel
string name
gdsChnInfo_t info
bool duplicate
rtddChannel::partitionlist partitions
bool useActiveTime
measurementchannel()
typedef std::vector <measurementchannel> measlist
class interval
typedef std::pair <tainsec_t, tainsec_t> timeinterval
timeinterval ival
bool good
interval(tainsec_t t, tainsec_t dt)
tainsec_t t0() const
tainsec_t dt() const
typedef std::vector <interval> intervallist
struct callbackarg
typedef std::pair <tainsec_t, tainsec_t> timeinterval
timeinterval ival
typedef bool (stdtest::*channelAnalysis)(int resultnum, int measnum, string chnname, bool stim, const callbackarg& id)
measnum - measurement number
chnname - channel name (including array indices)
stim - true if stimulus readback channel
typedef testsync <stdtest, callbackarg> stdtestsync
friend class testsync stdtest callbackarg
const diagTest* test
string testType
bool doAnalysis
tainsec_t T0
int averageType
int averages
int avrgsize
int avrgnum
double timeGrid
stimuluslist stimuli
measlist meas
intervallist intervals
std::deque <syncpointer> syncqueue
int dataerrors
virtual bool readParam(std::ostringstream& errmsg)
virtual bool readMeasParam(std::ostringstream& errmsg, int maxIndex = 100)
maxIndex - maximum array index of parameters
virtual bool readStimuliParam(std::ostringstream& errmsg, bool needReadback = false, waveformset allowedWaveforms = allWaveforms, int maxIndex = 100)
needReadback - if true a readback channel must be set
maxIndex - maximum array index of parameters
virtual bool subscribeChannels(std::ostringstream& errmsg)
void samplingFrequencies(double fMax, double& fSampleMin, double& fSampleMax)
fSampleMin - lowest sampling frequency (return)
fSampleMax - highest sampling frequency (return)
virtual double calcTimeGrid(double fMax, tainsec_t* t0 = 0)
t0 - pointer to start time (ignored if 0)
virtual bool calcTimes(std::ostringstream& errmsg, tainsec_t& t0)
t0 - start time
virtual bool addMeasPartitions(const interval& ival, int pIndex, double fSample, tainsec_t pt = 0, double fZoom = 0, double fZoomSample = 0, tainsec_t tZoom = 0)
pIndex - partition index
fSample - requested sampling rate (before optional zoom)
pt - precursor time
fZoom - heterodyne frequency
fZoomSample - requested sampling frequency after zoom
tZoom - start time (t = 0) for modulation signal
virtual bool addSyncPoint(const interval& ival, int measPeriod, int measPoint = 0)
measPeriod - index of measurement period
measPoint - index of measurement point
virtual bool newMeasPoint(int i, int measPoint = 0)
measPoint - measurement index
virtual bool calcMeasurements(std::ostringstream& errmsg, tainsec_t t0 = 0, int measPoint = 0)
t0 - start time
measPoint - measurement point number
virtual bool delMeasurements(std::ostringstream& errmsg)
virtual bool addMeasurements(std::ostringstream& errmsg, tainsec_t t0 = 0, int measPoint = 0)
t0 - start time
measPoint - measurement point number
virtual bool startMeasurements(std::ostringstream& errmsg)
virtual bool stopMeasurements(int firstIndex = -1)
bool prepareNextPoint(const callbackarg& id)
virtual bool getNextSyncPoint(const callbackarg& id, syncpointer& sync)
sync - pointer to next synchronization point (return)
virtual bool syncAction(const callbackarg& id, syncpointer& sync, bool& notify)
sync - next synchronization point, or 0 if finished
notify - if true upon return sends a notfication message
virtual bool syncAbort(const callbackarg& id)
virtual bool syncPause(const callbackarg& id, syncpointer& sync)
sync - next synchronization point, or 0 if continue
virtual bool syncResume(const callbackarg& id, syncpointer& sync)
sync - next synchronization point, or 0 if continue
virtual bool callChannelAnalysis(const callbackarg& id, int measnum, channelAnalysis method, int firstres = 0, stimulustype inclStim = stimReadback, bool async = true, bool skipDuplicates = true)
measnum - measurement number
method - channel analysis function
firstres - number of first result record to use
inclStim - describes which stimulus are included
async - it true the channel methods are multi-threaded
skipDuplicates - skip duplicated channel channel names
virtual bool analyze(const callbackarg& id, int measnum, bool& notify)
measnum - measurement number
notify - if true upon return sends a notfication message
alphabetic index hierarchy of classes
Please send questions and comments to sigg_d@ligo-wa.caltech.edu
generated by doc++