CARMA C++
carma::control::VlbiHandle Class Reference

Manages correlator control DO connections. More...

#include <carma/control/VlbiHandle.h>

Inheritance diagram for carma::control::VlbiHandle:
carma::control::RemoteObjHandleT< T > carma::control::RemoteObjHandleBase

Public Member Functions

void flattenPhases (const int preferredSeqNo)
 Flatten phases on the band. More...
 
util::CorrelatorFpgaModeType getFpgaMode () const
 Get the FPGA mode of this band. More...
 
bool isActionComplete (const monitor::MonitorSystem &monsys, int monDataErrorLimit)
 Compare next sequence number with one returned from monitor system. More...
 
bool isOffline () 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 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...
 
 VlbiHandle (unsigned int band, monitor::MonitorSystem &monitorSys, monitor::ControlSubsystemBase::Reachable &reachable, bool defaultLogIfNotReach)
 Constructor. More...
 
- Public Member Functions inherited from carma::control::RemoteObjHandleT< T >
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...
 
- Public Member Functions inherited from carma::control::RemoteObjHandleBase
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

- Protected Member Functions inherited from carma::control::RemoteObjHandleT< T >
virtual bool resolveObjRef ()
 
- Protected Member Functions inherited from carma::control::RemoteObjHandleBase
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
 

Detailed Description

Manages correlator control DO connections.

Definition at line 43 of file VlbiHandle.h.

Constructor & Destructor Documentation

carma::control::VlbiHandle::VlbiHandle ( unsigned int  band,
monitor::MonitorSystem monitorSys,
monitor::ControlSubsystemBase::Reachable &  reachable,
bool  defaultLogIfNotReach 
)

Constructor.

Parameters
monitorSystemmonitor 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.
See Also
utils/corrUtils.h

Member Function Documentation

void carma::control::VlbiHandle::flattenPhases ( const int  preferredSeqNo)

Flatten phases on the band.

The process on the remote object takes ~30 seconds Noise source must be ON

Parameters
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::VlbiHandle::getFpgaMode ( ) const

Get the FPGA mode of this band.

Returns
The FPGA configuration mode: CORR_SINGLEPOL, CORR_FULLPOL, or CORR_CARMA23

Definition at line 134 of file VlbiHandle.h.

bool carma::control::VlbiHandle::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.

Parameters
monsysmonitor system from which to retrieve completion
monitorDataErrorLimitnumber of consecutive monitor data invalid limit before thowing an exception
Returns
true if last action is complete
Exceptions
ifnumber of consecutive monitor data errors is exceeed
bool carma::control::VlbiHandle::isOffline ( ) const
Returns
True if the band has been marked offline, false if it is marked online, REGARDLESS OF WHETHER OR NOT THE REMOTE OBJECT IS REACHABLE.

Definition at line 76 of file VlbiHandle.h.

void carma::control::VlbiHandle::optimizeThresholds ( const int  preferredSeqNo)

Optimize thresholds on the band.

The process on the remote object takes ~10 seconds Noise source must be OFF.

Parameters
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::VlbiHandle::setAstroBandMode ( util::CorrelatorFpgaModeType  astroBandMode)

Set the Astroband (FPGA) mode of this band.

This will typically happen from within configband().

Parameters
astroBandModeThe FPGA configuration mode: CORR_SINGLEPOL, CORR_DUALPOL, CORR_FULLPOL, or CORR_CARMA23

Definition at line 130 of file VlbiHandle.h.

void carma::control::VlbiHandle::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.

Parameters
bwbandwidth 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.
TheastroBand number to set. Default of -1 means the cobra library will set it to the Correlator Band number.
void carma::control::VlbiHandle::setInputDelayTriplets ( ::std::vector< correlator::obsRecord2::DelayTriplet >  triplets)

set input delay triplets for a single polarization.

Note
The vector argument is passed by value so we can safely insure that it is fully and deeply copied across the thread barrier when this method is forked out to the worker pool
void carma::control::VlbiHandle::setOnline ( const bool  online)

Mark a band offline or online.

An offline band will ignore all commands.

Definition at line 81 of file VlbiHandle.h.


The documentation for this class was generated from the following file: