Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

acscourseMount4Impl.h

Go to the documentation of this file.
00001 #ifndef acscourseMount4Impl_h
00002 #define acscourseMount4Impl_h
00003 /*******************************************************************************
00004 *    ALMA - Atacama Large Millimiter Array
00005 *    (c) European Southern Observatory, 2002
00006 *    Copyright by ESO (in the framework of the ALMA collaboration)
00007 *    and Cosylab 2002, All rights reserved
00008 *
00009 *    This library is free software; you can redistribute it and/or
00010 *    modify it under the terms of the GNU Lesser General Public
00011 *    License as published by the Free Software Foundation; either
00012 *    version 2.1 of the License, or (at your option) any later version.
00013 *
00014 *    This library is distributed in the hope that it will be useful,
00015 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 *    Lesser General Public License for more details.
00018 *
00019 *    You should have received a copy of the GNU Lesser General Public
00020 *    License along with this library; if not, write to the Free Software
00021 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00022 *
00023 *
00024 * "@(#) $Id: acscourseMount4Impl.h,v 1.4 2006/03/24 12:54:38 vwang Exp $"
00025 *
00026 */
00027 
00028 #ifndef __cplusplus
00029 #error This is a C++ include file and cannot be used from plain C
00030 #endif
00031 
00032 #include <baciCharacteristicComponentImpl.h>
00033 #include <baciROdouble.h>
00034 #include <baciRWdouble.h>
00035 
00037 #include <baciSmartPropertyPointer.h>
00038 
00044 #include <acscourseMountS.h>
00045 #include "acsThreadManager.h"
00046 
00047 using namespace baci;
00048 
00049 
00081 class Mount4Impl;
00082 
00083 class PositionControlThread :public ACS::Thread
00084 {
00085   public:
00086     PositionControlThread(const ACE_CString& name, 
00087                   Mount4Impl *mount_p, 
00088                   const ACS::TimeInterval& responseTime=ThreadBase::defaultResponseTime, 
00089                           const ACS::TimeInterval& sleepTime=ThreadBase::defaultSleepTime);
00090     ~PositionControlThread();
00091 
00092     virtual void runLoop();
00093 
00094   protected:
00095     Mount4Impl *mount_p;
00096 };
00097 
00104 class Mount4Impl: public virtual CharacteristicComponentImpl,
00105                   public virtual POA_ACSCOURSE_MOUNT::Mount4,
00106                   public ActionImplementator
00107 {
00108   public:
00115     Mount4Impl(const ACE_CString &name, maci::ContainerServices *containerServices);
00116     
00120     virtual ~Mount4Impl();
00121     
00145     virtual ActionRequest 
00146     invokeAction (int function,
00147                   BACIComponent *cob_p, 
00148                   const int &callbackID, 
00149                   const CBDescIn &descIn, 
00150                   BACIValue *value_p, 
00151                   Completion &completion, 
00152                   CBDescOut &descOut);
00153     
00176     virtual ActionRequest 
00177     objfixAction (BACIComponent *cob_p, 
00178               const int &callbackID,
00179               const CBDescIn &descIn, 
00180               BACIValue *value_p,
00181               Completion &completion, 
00182               CBDescOut &descOut);
00183     
00197     virtual void 
00198     objfix (CORBA::Double az,
00199             CORBA::Double elev)
00200         throw (CORBA::SystemException);
00201 
00202     virtual void 
00203     objfix_async (
00204         CORBA::Double az,
00205         CORBA::Double elev,
00206         ACS::CBvoid_ptr cb,
00207         const ACS::CBDescIn &desc)
00208         throw (CORBA::SystemException);
00209     
00218     virtual ACS::ROdouble_ptr 
00219     cmdAz ()
00220         throw (CORBA::SystemException);
00221     
00230     virtual ACS::ROdouble_ptr 
00231     cmdEl ()
00232         throw (CORBA::SystemException);
00233     
00242     virtual ACS::ROdouble_ptr 
00243     actAz ()
00244         throw (CORBA::SystemException);
00245     
00254     virtual ACS::ROdouble_ptr 
00255     actEl ()
00256         throw (CORBA::SystemException);
00257     
00258 
00259   protected:
00260     
00261     struct __objfix_action {
00262         double az;
00263         double elev;
00264     };
00265 
00269     SmartPropertyPointer<ROdouble> m_cmdAz_sp;
00270 
00274     SmartPropertyPointer<ROdouble> m_cmdEl_sp;
00275 
00279     SmartPropertyPointer<ROdouble> m_actAz_sp;
00280 
00284     SmartPropertyPointer<ROdouble> m_actEl_sp;
00285 
00289     void operator=(const Mount4Impl&);
00290 
00296     friend class PositionControlThread;
00297 };
00298 
00299 #endif 

Generated on Sun Oct 29 02:26:25 2006 for ACS C++ API by doxygen 1.3.6