CARMA C++
|
Manages correlator control DO connections. More...
#include <carma/control/CorrelatorHandle.h>
Public Member Functions | |
unsigned int | astroBandNo () const |
void | calibrateSpectra (const bool noiseEnabled, const float intTime, const bool cache, const bool enable, const int preferredSeqNo) |
Calibrate spectra (bandpass) on the band. More... | |
unsigned int | correlatorBandNo () const |
CorrelatorHandle (unsigned int astroBandNo, carma::util::CorrelatorType corrType, monitor::MonitorSystem &monitorSys, monitor::ControlSubsystemBase::Reachable &reachable, bool defaultLogIfNotReach) | |
Constructor. More... | |
void | enableCorrelation (const bool enable) |
Enable or disable correlations (COBRA boards only). More... | |
void | flattenPhases (const int preferredSeqNo) |
Flatten phases on the band. More... | |
util::CorrelatorFpgaModeType | getFpgaMode () const |
Get the FPGA mode of this band. More... | |
carma::util::hardwareType | hardwareType () const |
@ return the underlying hardware type of correlator that this handle controls More... | |
bool | isActionComplete (const monitor::MonitorSystem &monsys, int monDataErrorLimit) |
Compare next sequence number with one returned from monitor system. More... | |
bool | isC3g () const |
bool | isOffline () const |
bool | isSpectral () const |
bool | isWideband () const |
void | optimizeThresholds (const int preferredSeqNo) |
Optimize thresholds on the band. More... | |
void | setAstroBandMode (util::CorrelatorFpgaModeType astroBandMode) |
Set the Astroband (FPGA) mode of this band. More... | |
void | setBandwidth (carma::correlator::obsRecord2::BandWidthType bw, const int preferredSeqNo, const unsigned int astroBandNo=0) |
Set bandwidth with a preferred sequence number. More... | |
void | setBandwidth (::std::vector< carma::correlator::obsRecord2::BandWidthType > bw,::std::vector< carma::correlator::obsRecord2::FpgaModeType > fm, const int preferredSeqNo,::std::vector< unsigned int > astroBandNo) |
Vectorized version of setBandwidth, for support of C3G Correlator. More... | |
void | setDownconverterSettings (::std::vector< float > dcFreqGHz) |
Vectorized version of call to set the downconverter settings. More... | |
void | setInputDelayTriplets (::std::vector< correlator::obsRecord2::DelayTriplet > triplets) |
set input delay triplets for a single polarization. More... | |
void | setOnline (const bool online) |
Mark a band offline or online. More... | |
void | setWalshColumns (::std::vector< int > cols90,::std::vector< int > cols180, const int nStates90, const int nStates180, const bool noiseEnabled) |
Sets correlator input Walsh column indices. More... | |
![]() | |
template<typename S > | |
S::_var_type | narrowedRemoteObj () const |
Returns remote object handle as var. More... | |
T::_var_type | remoteObj () const |
Returns remote object handle as var. More... | |
RemoteObjHandleT (const ::std::string &doName, monitor::MonitorPointBool *mpReachable, const monitor::MonitorSubsystem *subsystem, monitor::MonitorSystem *system, bool defaultLogIfNotReachable, bool defaultLogSentCommands) | |
Constructor. More... | |
virtual | ~RemoteObjHandleT () |
Destructor. More... | |
![]() | |
bool | attemptToReconnectIfNeeded () |
Try reconnect to the DO if needed. More... | |
::std::string | doName () const |
get the DO name More... | |
void | forceFullReconnect () |
Force a full re-lookup of the DO by name. More... | |
bool | isObjReachable () |
If state is 'not reachable' and monitor system is current, tries to reconnect. More... | |
bool | isObjReachable (bool logIfNotReachable) |
RemoteObjHandleBase (const ::std::string &doName, monitor::MonitorPointBool *mpReachable, const monitor::MonitorSubsystem *subsystem, monitor::MonitorSystem *system, bool defaultLogIfNotReachable, bool defaultLogSentCommands) | |
Constructor. More... | |
virtual | ~RemoteObjHandleBase () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
virtual bool | resolveObjRef () |
![]() | |
bool | getDefaultLogIfNotReachable () const |
bool | getDefaultLogSentCommands () const |
void | invalidateObjRef () |
void | invalidateObjRefIfNeededForCaught () |
void | logException (const ::std::string &callString, const ::std::string &exString) const |
void | logSentCommand (const ::std::string &callString, const double mjd) const |
void | logSentCommand (const ::std::string &callString, const double mjd, const ::std::string &subDoName) const |
void | logSentCommandIfNeeded (const ::std::string &callString, const double mjd) const |
void | logSentCommandIfNeeded (const ::std::string &callString, const double mjd, const ::std::string &subDoName) const |
void | markObjRefValid () |
void | processException (const ::std::string &callString, const ::CORBA::Exception &corbaException) |
void | throwBadRemoteObjAccess () const |
void | throwIfObjRefIsNotValid () const |
Manages correlator control DO connections.
Definition at line 37 of file CorrelatorHandle.h.
carma::control::CorrelatorHandle::CorrelatorHandle | ( | unsigned int | astroBandNo, |
carma::util::CorrelatorType | corrType, | ||
monitor::MonitorSystem & | monitorSys, | ||
monitor::ControlSubsystemBase::Reachable & | reachable, | ||
bool | defaultLogIfNotReach | ||
) |
Constructor.
monitorSystem | monitor system reference which allows this handle to get a reference to its own monitor stream. This constructor will throw ErrorException if the Band hardware type comes back as HARDWARE_TYPE_UNKNOWN. |
void carma::control::CorrelatorHandle::calibrateSpectra | ( | const bool | noiseEnabled, |
const float | intTime, | ||
const bool | cache, | ||
const bool | enable, | ||
const int | preferredSeqNo | ||
) |
Calibrate spectra (bandpass) on the band.
The process on the remote object takes ~30(?) seconds Noise source must be in requested state
enable | Whether or not to enable bandpass (spectral) calibration (can be used to toggle it on and off) |
noiseEnabled | Whether or not to enable the noise source. For instance, you would set this to false if doing bandpass calibration on an astronomical source. |
cache | Whether or not to cache the result for subsequent division. |
intTime | Integration time in seconds for the calibration. |
preferredSeqNo | - The preferred sequence number for this command. If the preferred sequence number has already been used, the actual sequence number is set to preferred + 10. |
void carma::control::CorrelatorHandle::enableCorrelation | ( | const bool | enable | ) |
Enable or disable correlations (COBRA boards only).
This is to be used when the correlator room is overheating.
enable | Enable correlation or not. |
void carma::control::CorrelatorHandle::flattenPhases | ( | const int | preferredSeqNo | ) |
Flatten phases on the band.
The process on the remote object takes ~30 seconds Noise source must be ON
preferredSeqNo | - The preferred sequence number for this command. If the preferred sequence number has already been used, the actual sequence number is set to preferred + 10. |
util::CorrelatorFpgaModeType carma::control::CorrelatorHandle::getFpgaMode | ( | ) | const |
Get the FPGA mode of this band.
Definition at line 174 of file CorrelatorHandle.h.
carma::util::hardwareType carma::control::CorrelatorHandle::hardwareType | ( | ) | const |
@ return the underlying hardware type of correlator that this handle controls
Definition at line 200 of file CorrelatorHandle.h.
bool carma::control::CorrelatorHandle::isActionComplete | ( | const monitor::MonitorSystem & | monsys, |
int | monDataErrorLimit | ||
) |
Compare next sequence number with one returned from monitor system.
If they are the same then the last drive action is complete.
monsys | monitor system from which to retrieve completion |
monitorDataErrorLimit | number of consecutive monitor data invalid limit before thowing an exception |
if | number of consecutive monitor data errors is exceeed |
bool carma::control::CorrelatorHandle::isC3g | ( | ) | const |
Definition at line 215 of file CorrelatorHandle.h.
bool carma::control::CorrelatorHandle::isOffline | ( | ) | const |
Definition at line 68 of file CorrelatorHandle.h.
bool carma::control::CorrelatorHandle::isSpectral | ( | ) | const |
Definition at line 205 of file CorrelatorHandle.h.
bool carma::control::CorrelatorHandle::isWideband | ( | ) | const |
Definition at line 210 of file CorrelatorHandle.h.
void carma::control::CorrelatorHandle::optimizeThresholds | ( | const int | preferredSeqNo | ) |
Optimize thresholds on the band.
The process on the remote object takes ~10 seconds Noise source must be OFF.
preferredSeqNo | - The preferred sequence number for this command. If the preferred sequence number has already been used, the actual sequence number is set to preferred + 10. |
void carma::control::CorrelatorHandle::setAstroBandMode | ( | util::CorrelatorFpgaModeType | astroBandMode | ) |
Set the Astroband (FPGA) mode of this band.
This will typically happen from within configband().
astroBandMode | The FPGA configuration mode: SINGLEPOL, DUALPOL, FULLPOL, or CARMA23 |
Definition at line 170 of file CorrelatorHandle.h.
void carma::control::CorrelatorHandle::setBandwidth | ( | carma::correlator::obsRecord2::BandWidthType | bw, |
const int | preferredSeqNo, | ||
const unsigned int | astroBandNo = 0 |
||
) |
Set bandwidth with a preferred sequence number.
Sets spectral bandwidth mode for the band. The process takes several seconds and is spawned off in a thread.
bw | bandwidth indicator (500MHZ, 250MHZ_3BIT, etc) |
preferredSeqNo | - The preferred sequence number for this command. If the preferred sequence number has already been used, the actual sequence number is set to preferred + 10. |
The | astroBand number to set. Default of -1 means the cobra library will set it to the Correlator Band number. |
void carma::control::CorrelatorHandle::setBandwidth | ( | ::std::vector< carma::correlator::obsRecord2::BandWidthType > | bw, |
::std::vector< carma::correlator::obsRecord2::FpgaModeType > | fm, | ||
const int | preferredSeqNo, | ||
::std::vector< unsigned int > | astroBandNo | ||
) |
Vectorized version of setBandwidth, for support of C3G Correlator.
bw | vector of bandwidth indicators (500MHZ, 250MHZ_3BIT, etc) |
bw | vector of fpgmmode indicators (LL, FULLPOL, etc) |
preferredSeqNo | - The preferred sequence number for this command. If the preferred sequence number has already been used, the actual sequence number is set to preferred + 10. |
astrobandNo | vector of astroBand numbers for, one for each bandwidth indicator |
void carma::control::CorrelatorHandle::setDownconverterSettings | ( | ::std::vector< float > | dcFreqGHz | ) |
Vectorized version of call to set the downconverter settings.
There is no handle wrapper for the non-vector call since no sequence number needs to be set and the cobra library call returns quickly. This method must convert vector to CORBA sequence before the remote call.
dcFreq | - vector of downconverter frequencies in GHz. |
void carma::control::CorrelatorHandle::setInputDelayTriplets | ( | ::std::vector< correlator::obsRecord2::DelayTriplet > | triplets | ) |
set input delay triplets for a single polarization.
void carma::control::CorrelatorHandle::setOnline | ( | const bool | online | ) |
Mark a band offline or online.
An offline band will ignore all commands.
Definition at line 73 of file CorrelatorHandle.h.
void carma::control::CorrelatorHandle::setWalshColumns | ( | ::std::vector< int > | cols90, |
::std::vector< int > | cols180, | ||
const int | nStates90, | ||
const int | nStates180, | ||
const bool | noiseEnabled | ||
) |
Sets correlator input Walsh column indices.
cols90 | Walsh columns used for 90-deg demodulation. |
cols180 | Walsh columns used for 180-deg demodulation. |
nStates90 | Number of states for 90-deg demodulation (zero maintains existing value). |
nStates180 | Number of states for 180-deg demodulation (zero maintains existing value). |
noiseEnabled | True if the columns are for the noise source False if RF. |