1 #ifndef SZA_ANTENNA_CONTROL_ANTENNARXMSG_H
2 #define SZA_ANTENNA_CONTROL_ANTENNARXMSG_H
15 #include "carma/szaarrayutils/netobj.h"
19 #include "carma/szaarrayutils/rtcnetcoms.h"
26 #include "carma/szautil/Directives.h"
30 #include "carma/szautil/Rx.h"
31 #include "carma/szautil/Thermal.h"
65 EXECUTE_NEXT_CAN_INSTRUCTION
91 sza::array::LoMsgId msgId;
92 sza::util::LoOsc::Osc oscs;
93 sza::util::LoStage::Stage stages;
94 sza::util::Rx::Id rxId;
96 unsigned short dampGain;
97 unsigned short frequency;
98 unsigned short loopGain;
99 unsigned short voltage;
124 sza::util::Rx::Id rx;
125 sza::util::Amp::Type amp;
126 sza::util::Amp::Stage stage;
127 sza::util::Amp::Bias biasType;
135 sza::util::Rx::Id rx;
136 sza::util::Amp::Type amp;
137 sza::util::Amp::Stage stage;
145 unsigned int channel;
153 sza::array::CalTertMsg msgId;
154 sza::util::Rx::Id rxId;
156 sza::util::CalPos::Pos calPosition;
158 sza::util::CalTertTypes::OwDevice owDevice;
159 sza::util::CalTertTypes::OwCommand owCommand;
161 double tertPosDegrees;
168 sza::array::IntModMsg msgId;
178 sza::array::BiasType biasType;
179 sza::util::Rx::Id rxId;
188 sza::array::IFModMsg msgId;
189 sza::util::Rx::Id band;
191 sza::util::IFAtten::Type attenSet;
196 sza::util::CalPos::Pos pos;
203 sza::array::ThermalMsg msgId;
204 sza::util::Thermal::Target target;
206 sza::util::Thermal::BoxMode mode;
214 sza::array::TiltmeterMsg msgId;
215 sza::array::TiltmeterMode mode;
224 sza::util::CanModule::Id modules;
231 sza::util::Rx::Id rxBand;
245 inline void packFlagBoardMsg(
unsigned short board,
bool flag)
248 sza::util::GenericTaskMsg::TASK_SPECIFIC;
250 setCarmaSequenceNumber();
252 body.flagBoard.board = board;
253 body.flagBoard.flag = flag;
256 inline void packLoMsg(sza::array::LoMsgId msgId,
257 sza::util::LoOsc::Osc oscs,
258 sza::util::LoStage::Stage stages,
259 sza::util::Rx::Id rxId,
261 unsigned short dampGain,
262 unsigned short frequency,
263 unsigned short loopGain,
264 unsigned short voltage,
277 sza::util::GenericTaskMsg::TASK_SPECIFIC;
281 body.lo.msgId = msgId;
283 body.lo.stages = stages;
286 body.lo.dampGain = dampGain;
287 body.lo.frequency = frequency;
288 body.lo.loopGain = loopGain;
289 body.lo.voltage = voltage;
292 body.lo.month = month;
295 body.lo.coeff = coeff;
296 body.lo.tunerPos = tunerPos;
297 body.lo.backshortPos = backshortPos;
298 body.lo.attenPos = attenPos;
299 body.lo.position = position;
302 inline void packOffsetMsg(
double az,
double el)
305 sza::util::GenericTaskMsg::TASK_SPECIFIC;
307 setCarmaSequenceNumber();
313 inline void packSetDrainCurrentMsg(sza::util::Rx::Id rx,
314 sza::util::Amp::Type amp,
315 sza::util::Amp::Stage stage,
319 sza::util::GenericTaskMsg::TASK_SPECIFIC;
321 setCarmaSequenceNumber();
322 type = SET_DRAIN_CURRENT;
324 body.drainCurrent.rx = rx;
325 body.drainCurrent.amp = amp;
326 body.drainCurrent.stage = stage;
327 body.drainCurrent.current = current;
330 inline void packSetInputVoltageMsg(sza::util::Rx::Id rx,
331 sza::util::Amp::Type amp,
332 sza::util::Amp::Stage stage,
333 sza::util::Amp::Bias biasType,
337 sza::util::GenericTaskMsg::TASK_SPECIFIC;
339 setCarmaSequenceNumber();
340 type = SET_INPUT_VOLTAGE;
342 body.inputVoltage.rx = rx;
343 body.inputVoltage.amp = amp;
344 body.inputVoltage.stage = stage;
345 body.inputVoltage.biasType = biasType;
346 body.inputVoltage.bias = bias;
349 inline void packToggleFastSamplingMsg(
unsigned int channel,
353 sza::util::GenericTaskMsg::TASK_SPECIFIC;
355 setCarmaSequenceNumber();
356 type = TOGGLE_FAST_SAMPLING;
358 body.fastSampling.channel = channel;
359 body.fastSampling.start = start;
362 inline void packSetBiasMsg(
unsigned amp,
short bias,
363 sza::array::BiasType biasType,
364 sza::util::Rx::Id rxId,
365 unsigned seq,
bool isDefault)
368 sza::util::GenericTaskMsg::TASK_SPECIFIC;
370 setCarmaSequenceNumber();
373 body.setBias.amp = amp;
374 body.setBias.bias = bias;
375 body.setBias.biasType = biasType;
376 body.setBias.rxId = rxId;
377 body.setBias.seq = seq;
378 body.setBias.isDefault = isDefault;
381 inline void packIntModMsg(sza::array::IntModMsg msgId,
382 unsigned char atten=0)
385 sza::util::GenericTaskMsg::TASK_SPECIFIC;
387 setCarmaSequenceNumber();
390 body.intMod.msgId = msgId;
391 body.intMod.atten = atten;
394 inline void packCalTertMsg(sza::array::CalTertMsg msgId,
395 sza::util::Rx::Id rxId,
397 sza::util::CalPos::Pos calPosition,
399 sza::util::CalTertTypes::OwDevice device,
400 sza::util::CalTertTypes::OwCommand command,
404 sza::util::GenericTaskMsg::TASK_SPECIFIC;
406 DBPRINT(
true, sza::util::Debug::DEBUG5,
"Seq = " << seq);
408 setCarmaSequenceNumber();
411 body.calTert.msgId = msgId;
412 body.calTert.rxId = rxId;
413 body.calTert.tertPosition = tertPosition;
414 body.calTert.calPosition = calPosition;
415 body.calTert.enable = enable;
416 body.calTert.owDevice = device;
417 body.calTert.owCommand = command;
418 body.calTert.seq = seq;
421 inline void packNewCalTertMsg(sza::array::CalTertMsg msgId,
422 sza::util::CalPos::Pos calPosition,
423 sza::util::Rx::Id rxId,
424 double tertPosDegrees,
428 sza::util::GenericTaskMsg::TASK_SPECIFIC;
430 DBPRINT(
true, sza::util::Debug::DEBUG5,
"Seq = " << seq);
432 setCarmaSequenceNumber();
435 body.calTert.msgId = msgId;
436 body.calTert.calPosition = calPosition;
437 body.calTert.rxId = rxId;
438 body.calTert.tertPosDegrees = tertPosDegrees;
439 body.calTert.seq = seq;
444 inline void packIFModMsg(sza::array::IFModMsg msgId,
445 sza::util::Rx::Id band,
447 sza::util::IFAtten::Type attenSet,
452 sza::util::CalPos::Pos pos)
455 sza::util::GenericTaskMsg::TASK_SPECIFIC;
457 setCarmaSequenceNumber();
460 body.IFMod.msgId = msgId;
461 body.IFMod.band = band;
462 body.IFMod.level = level;
463 body.IFMod.attenSet = attenSet;
464 body.IFMod.total = total;
465 body.IFMod.input = input;
466 body.IFMod.output = output;
467 body.IFMod.seq = seq;
468 body.IFMod.pos = pos;
471 inline void packThermalMsg(sza::array::ThermalMsg msgId,
472 sza::util::Thermal::Target target,
474 sza::util::Thermal::BoxMode mode,
478 sza::util::GenericTaskMsg::TASK_SPECIFIC;
480 setCarmaSequenceNumber();
483 body.thermal.msgId = msgId;
484 body.thermal.target = target;
485 body.thermal.value = value;
486 body.thermal.mode = mode;
487 body.thermal.eqState = eqState;
490 inline void packTiltmeterMsg(sza::array::TiltmeterMsg msgId,
491 sza::array::TiltmeterMode mode,
498 sza::util::GenericTaskMsg::TASK_SPECIFIC;
500 setCarmaSequenceNumber();
503 body.tiltmeter.msgId = msgId;
504 body.tiltmeter.mode = mode;
505 body.tiltmeter.value = value;
506 body.tiltmeter.afZero = afZero;
507 body.tiltmeter.lrZero = lrZero;
512 inline void packResetMsg(sza::util::CanModule::Id modules,
bool hard)
515 sza::util::GenericTaskMsg::TASK_SPECIFIC;
517 setCarmaSequenceNumber();
520 body.reset.modules = modules;
521 body.reset.hardwareReset = hard;
526 inline void packSelectRxMsg(sza::util::Rx::Id rxBand,
unsigned seq)
529 sza::util::GenericTaskMsg::TASK_SPECIFIC;
531 setCarmaSequenceNumber();
534 body.selectRx.rxBand = rxBand;
535 body.selectRx.seq = seq;
537 COUT(
"packSelectRxMsg seq = " << seq);
541 inline void packExecuteNextCanInstructionMsg(
MsgType commandType)
544 sza::util::GenericTaskMsg::TASK_SPECIFIC;
546 setCarmaSequenceNumber();
547 type = EXECUTE_NEXT_CAN_INSTRUCTION;
549 body.canCommand.type = commandType;
555 friend std::ostream&
operator<<(std::ostream& os, AntennaRxMsg* msg);
563 #endif // End #ifndef
struct sza::antenna::control::AntennaRxMsg::@18::@26 intMod
Control the Berkeley interface module
Tagged: Tue Aug 24 08:51:16 PDT 2004.
struct sza::antenna::control::AntennaRxMsg::@18::@27 setBias
Set a bias
struct sza::antenna::control::AntennaRxMsg::@18::@30 tiltmeter
Control the Tiltmeter Module
Started: Wed Jan 14 11:00:24 PST 2004.
MsgType
Enumerate supported AntennaRx messages.
friend std::ostream & operator<<(std::ostream &os, AntennaRxMsg *msg)
Allows cout << AntennaRxMsg.
Tagged: Wed Aug 25 21:23:12 PDT 2004.
Class to encapsulate messages send to the Rx task.
struct sza::antenna::control::AntennaRxMsg::@18::@20 lo
Control the LO chain
union sza::antenna::control::AntennaRxMsg::@18 body
Define a Message container.
MsgType type
The type of this message.
struct sza::antenna::control::AntennaRxMsg::@18::@28 IFMod
Control the Antenna IF module
struct sza::antenna::control::AntennaRxMsg::@18::@19 flagBoard
Flag a board.
struct sza::antenna::control::AntennaRxMsg::@18::@22 inputVoltage
Set a input voltage
Started: Wed Dec 10 23:48:07 UTC 2003.
Tagged: Thu Jun 17 21:05:13 UTC 2004.
Tagged: Tue Mar 30 08:46:08 PST 2004.
Tagged: Fri Nov 14 12:39:34 UTC 2003.
struct sza::antenna::control::AntennaRxMsg::@18::@21 offset
Install offsets needed to bring this receiver on-axis
GenericMsgType genericMsgType_
A type for this message.
struct sza::antenna::control::AntennaRxMsg::@18::@29 thermal
Control the Thermal Module
struct sza::antenna::control::AntennaRxMsg::@18::@25 calTert
Control the Calibrator/Tertiary CAN module
Started: Tue Jan 13 18:57:18 PST 2004.
Tagged: Wed Aug 18 06:20:23 PDT 2004.
A class to encapsulate message types for a generic task.
struct sza::antenna::control::AntennaRxMsg::@18::@24 fastSampling
Toggle fast sampling
struct sza::antenna::control::AntennaRxMsg::@18::@23 drainCurrent
Set a drain current