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

Manages antenna calibrator control DO connections. More...

#include <carma/control/CalibratorHandle.h>

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

Public Member Functions

 CalibratorHandle (unsigned short carmaAntNo, monitor::MonitorSystem &monitorSys, monitor::ControlSubsystemBase::Antenna &antenna)
 Constructor. More...
 
bool isActionComplete (const monitor::MonitorSystem &monsys, int monDataErrorLimit)
 Compare next sequence number with one returned by monitor system. More...
 
void setCalibrator (monitor::MonitorSystem *monsys, const antenna::common::CalibratorControl::Position calPos, const int preferredSequenceNo)
 Moves the calibration device and sets the sequence number that will be returned in the monitor stream on completion. 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 antenna calibrator control DO connections.

Definition at line 29 of file CalibratorHandle.h.

Constructor & Destructor Documentation

carma::control::CalibratorHandle::CalibratorHandle ( unsigned short  carmaAntNo,
monitor::MonitorSystem monitorSys,
monitor::ControlSubsystemBase::Antenna &  antenna 
)

Constructor.

Parameters
monitorSystemmonitor system reference which allows this handle to get a reference to its own monitor stream.

Member Function Documentation

bool carma::control::CalibratorHandle::isActionComplete ( const monitor::MonitorSystem monsys,
int  monDataErrorLimit 
)

Compare next sequence number with one returned by monitor system.

If they are the same then the last action is complete.

Parameters
monsysmonitor system from which to retrieve completion The monsys should already be placed in the queue, don't do a read or anything that will disturb the queue.
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
void carma::control::CalibratorHandle::setCalibrator ( monitor::MonitorSystem monsys,
const antenna::common::CalibratorControl::Position  calPos,
const int  preferredSequenceNo 
)

Moves the calibration device and sets the sequence number that will be returned in the monitor stream on completion.

The sequence number is also stored internally so that it can be compared against the one returned by the antenna in the monitor stream.

Parameters
monsysMonitor system to be used to check seq no This pointer is not saved in this object.
calPosrequested calibrator position
preferredSequenceNowill be used unless it is already the one returned by the monitor system, in which case one that is ten greater will be used.
See Also
isActionComplete

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