15 #ifndef CARMA_ANTENNA_BIMA_RX_H
16 #define CARMA_ANTENNA_BIMA_RX_H
30 #include "carma/util/Program.h"
43 #include "carma/antenna/common/FocusControl.h"
44 #include "carma/antenna/common/FocusControl_skel.h"
45 #include "carma/corba/Client.h"
53 class Rx :
public TelemetryClient
57 Rx( Configuration& config );
60 typedef char SISSetMode;
61 typedef enum { NOTOK, OK } OKOrNOTState;
62 typedef enum {
OFF,
ON } OnOrOffState;
68 void turnMMSweepOff();
71 OnOrOffState getMMOscState();
72 OnOrOffState getSweepState();
74 void setObsFreq(
double freq );
77 void setOscFreq(
double freq );
80 void setLO1Freq(
double freq );
83 float getLO10MHzOptPwr();
84 bool getLO10MHzStatus();
85 float getLO50MHzOptPwr();
87 void setVop(
double vop );
88 void setVopCommanded(
double vop );
89 double getVopCommanded();
94 double getDrainCurrent(
unsigned short deviceID);
95 double getGateVoltage(
unsigned short deviceID);
96 double getIFCurrent();
99 int getBimaTuneState() ;
101 void setPhaseLockBand();
102 void setPhaseLockBand(
int band );
104 int getPhaseLockBand();
108 void setDewarBand(
int band );
111 void setIFSwitch(
int band );
113 bool checkPhaseLockRef();
115 void saveSisTuneParameters();
117 OKOrNOTState getPhaseLockRefState();
119 void getTuningParameters(
double &lo_ghz,
unsigned short &mmosctarg,
120 unsigned short &mmbcktarg,
double &voptarg,
123 void lockmm(
double freq );
126 void tune(
double freq,
bool leaveAbsorber,
bool optimizeReceiver );
130 void setFocus(
int band );
131 float loadFocusTable( std::string name );
135 void setMMLockInfo(
int value );
137 void lockmmosc(
int osctarget,
double maxerrv );
139 void setBand( Rx::Band band );
140 void selectMotorsAndMod(
int iband );
142 void selectMirror(
int iband );
143 void setDewarWindow(
int iband );
144 int getDewarWindow();
146 void setModulator(
double mA );
149 Rx::SISSetMode getSISMode();
151 void setWBAGateV(
double setpoint );
152 void setWBAGateBV(
double setpoint );
153 void setWBAGateDV(
double setpoint );
154 double getWBAGateBV();
155 double getWBAGateDV();
157 void setSIS(
double setpoint, Rx::SISSetMode mode );
159 void setLOpwr(
double bias );
161 double getSISBiasOut();
163 float getIFdB(
void );
164 double getIFTotPower(
void );
165 double getIF1TotPower(
void );
166 double getIF2TotPower(
void );
167 double getIF1FastPower(
void );
168 double getIF2FastPower(
void );
169 void startIF1FastSample();
170 void stopIF1FastSample();
171 void startIF2FastSample();
172 void stopIF2FastSample();
175 void setLoopGain(
double lgain );
176 double getLoopGain();
177 double mmErrorVolts();
180 unsigned short modmAtoCounts(
double mA );
181 void optimizeLoopGain(
double defaultgain );
182 double getPhaseNoise();
183 void getSISVIBias(
double& vbias,
double& ibias );
184 double getInstantSISVBias();
185 double getInstantSISIBias();
186 std::string getSISMixerName();
187 double getSISMixerTemp();
188 void interpSISBiases(
double& lo,
double& temp,
189 double& vbias,
double& ibias,
190 double& dvMinus,
double& dvPlus,
191 double& dvgap,
double& igap,
double& ialtbias );
195 static const int MAX_SCAN_STEPS = 300;
200 float Vj[MAX_SCAN_STEPS];
201 float Ij[MAX_SCAN_STEPS];
202 float pow[MAX_SCAN_STEPS];
206 void scanSIS( Rx::Scan &Lscan, Rx::Scan &Rscan) ;
209 Dewar& getDewar() {
return *_dewar; };
210 Motor& getMMOscAD() {
return *_mmoscAD; };
211 Motor& getMMBckAD() {
return *_mmbckAD; };
212 Motor& getMMOscB() {
return *_mmoscB; };
213 Motor& getMMBckB() {
return *_mmbckB; };
214 Motor& getAttenAD() {
return *_attnD; };
215 Motor& getAttenB() {
return *_attnB; };
216 double getMMIFLevel(
void );
218 void ifPowerAtten(
unsigned short,
float value );
219 void ifPowerAtten(
unsigned short,
short value );
220 void setLOTermRFout(
float volts );
221 void setLOTermAtten(
int dB );
222 void turnLOTerm(
bool onoff );
223 int getLOTermAtten();
224 float getLOTermPower();
225 float getLOTermRFin();
226 float getLOTermRFout();
227 float getLOTermTemp();
228 void setHtr2(
float volts );
229 void setVGate(
float volts );
230 void setCMVGate(
unsigned int hStage,
float volts );
231 void setCMIDrain(
unsigned int hStage,
float mAmps );
234 double getVGateCmd();
237 double getCMIDrain(
unsigned int hStage );
238 double getCMVGate(
unsigned int hStage );
239 double getCMVGateCmd(
unsigned int hStage );
240 double getCMIDrainCmd(
unsigned int hStage );
242 void setNextTuneSequenceNo(
int seqno );
243 unsigned long getNextTuneSequenceNo();
244 void setCurTuneSequenceNo(
int seqno );
245 unsigned long getCurTuneSequenceNo();
247 void setNextOpticsSequenceNo(
int seqno );
248 unsigned long getNextOpticsSequenceNo();
249 void setCurOpticsSequenceNo(
int seqno );
250 unsigned long getCurOpticsSequenceNo();
256 bool isRelockEnabled();
258 void disableRelock();
261 int numTriesRelock();
264 Configuration &_config;
267 std::ostringstream _errMsg;
271 unsigned short _attensafe;
274 unsigned short _mmosctarg;
275 unsigned short _mmbcktarg;
278 AntennaIFClient *_if;
291 float _cmFocusOffset;
295 bool _cmOpticsInstalled;
296 float _tmmFocusPosition;
299 static const int MAX_HIST = 25;
301 static const SISSetMode SISv =
'v';
302 static const SISSetMode SISi =
'i';
303 static const SISSetMode SISo =
'o';
312 ::std::ostream&
operator<<( ::std::ostream& os,
313 ::carma::antenna::bima::Rx& rx );
315 #endif // CARMA_ANTENNA_BIMA_RX_H
std::ostream & operator<<(::std::ostream &os, const carma::dbms::Table &table)
Class definition for Stepper Motors for BIMA systems.
Exception class for errors.
Class definition for Stepper Motors for BIMA systems.
Class definition for TelemetryClient on the BIMA antennas.
Class definition for Stepper Motors for BIMA systems.
Simple ASCII Table format, fully memory based.
Class definition for SharedMemory on the BIMA antennas.
Class definition for Stepper Motors for BIMA systems.
CAN Device declaration for 10m & 6m SIS Receiver Control.
Class definition for TelemetryClient on the BIMA antennas.
Class definition for Stepper Motors for BIMA systems.
FileNotFoundException class.