#include "extcode.h" //#include "hosttype.h" #ifndef _NULLER_ #define _NULLER_ // Quick testing of ControlWord values #define CW_START 1 // Starts transmitting waveforms #define CW_BASE ( CW_START << 1 ) // Takes a base station measurement #define CW_REMOTE ( CW_BASE << 1 ) // Takes a remote station measurement #define CW_TXONLY ( CW_REMOTE<< 1 ) // Implements passed waveforms, no nulling performed #define CW_RESET ( CW_TXONLY<< 1 ) // Sets all active waveforms to zero #define CW_ON ( CW_RESET << 1 ) // Turns the sound system on #define CW_OFF ( CW_ON << 1 ) // Turns the sound system off #define ALLOW_OPS ( ((CW_OFF << 1) - 1) ^ CW_ON ) typedef struct { union { int16 ControlWord; // The control word contains is bit packed with meanings below... struct { unsigned start: 1; // Start the system up... Ramp TX and REF w active nulling unsigned base: 1; // Take a base station measurement unsigned remote: 1; // Take a remote station measurement unsigned TXonly: 1; // Transmit the given waveforms on TX, REF, & CAL, no nulling unsigned reset: 1; // Reset all waveforms to zero unsigned sndON: 1; // Turn sound system ON unsigned sndOFF: 1; // Turn sound system OFF }; }; float32 GThreshold; // Limit at which Transfer functions are no longer ID'd float32 NullThreshold; // Limit at which mult-pass nulling will stop int8 StopCount; // Iteration limit for multi-pass nulling } CONTROL; typedef struct { // Contains a list of frequencies 1 - 65536hz. int32 numFreqs; uInt16 Freqs[1]; } FREQLIST; typedef FREQLIST **hFREQLIST; typedef struct { // Contains a list of complex #'s, the component of each frequency int32 LstLen; cmplx64 cxVal[1]; } CPLXLIST; typedef CPLXLIST **hCPLXLIST; typedef struct { // A list of "tones" for each waveform to be generated hFREQLIST freqLIST; hCPLXLIST cxLIST; } TONELIST; typedef struct { // Tells us how to ramp the system at start up int32 numSteps; float32 Steps[1]; } STEPLIST; typedef STEPLIST **hSTEPLIST; typedef struct { // Contains a real time waveform int32 NumPts; float32 wave[1]; } RTWAVE; typedef RTWAVE **hRTWAVE; typedef struct { // Contains a list of FFT bins int32 LstLen; uInt16 Bins[1]; } FFTBINS; typedef FFTBINS **hFFTBINS; #endif