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

acsexmplPowerSupplyImpl.h

Go to the documentation of this file.
00001 #ifndef acsexmplPowerSupplyImpl_h
00002 #define acsexmplPowerSupplyImpl_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: acsexmplPowerSupplyImpl.h,v 1.102 2006/04/20 08:47:59 bjeram Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * acaproni 2004-04-06 Replaced the macros for the properties with the smart pointers
00029 * david 2002-08-30 removed ActionFunction because its not used in this example
00030 * david 2002-07-02 added GNU license info
00031 * blopez   2002-04-05 Modified for ACSDO usage
00032 * gchiozzi 2002-01-28 cleaned up remaining "mount" strings and replaced with "acsexmpl"
00033 * almamgr 2002-01-22 Replaced old include files with new axsexmpl... files
00034 * gchiozzi 2001-02-15 Added declaration of get_interface() method for Object Explorer
00035 * gchiozzi 2001-02-15 created created standard header
00036 * msekoran 2001-03-10 integrated with new BACI; ALMA coding convention used; doc.
00037 */
00038 
00039 #ifndef __cplusplus
00040 #error This is a C++ include file and cannot be used from plain C
00041 #endif
00042 
00044 #include <baciCharacteristicComponentImpl.h>
00045 #include <acsexmplExport.h>
00046 
00048 #include <acsexmplPowerSupplyS.h>
00049 
00051 #include <baciROdouble.h>
00052 #include <baciRWdouble.h>
00053 #include <baciROpattern.h>
00054 
00056 #include <baciSmartPropertyPointer.h>
00057 
00058 #include "acsexmplPowerSupplyCurrentImpl.h"
00059 
00060 using namespace baci; 
00061 
00068 #define ON_ACTION 0
00069 #define OFF_ACTION 1
00070 #define RESET_ACTION 2
00071 
00130 class acsexmpl_EXPORT PowerSupply: public CharacteristicComponentImpl,     //Standard component superclass
00131                                    public virtual POA_PS::PowerSupply,    //CORBA servant stub
00132                                    public ActionImplementator    //Asynchronous method helper class
00133 {
00134   public:
00141     PowerSupply(
00142                 const ACE_CString &name,
00143                 maci::ContainerServices * containerServices);
00144   
00148     virtual ~PowerSupply();  
00149     
00150     /* --------------- [ Action implementator interface ] -------------- */
00171     virtual ActionRequest 
00172     invokeAction (int function,
00173                   BACIComponent *component_p, 
00174                   const int &callbackID, 
00175                   const CBDescIn &descIn, 
00176                   BACIValue *value_p, 
00177                   Completion &completion, 
00178                   CBDescOut &descOut);
00179     
00202     virtual ActionRequest 
00203     onAction (BACIComponent *component_p, 
00204               const int &callbackID,
00205               const CBDescIn &descIn, 
00206               BACIValue *value_p,
00207               Completion &completion, 
00208               CBDescOut &descOut);
00209     
00232     virtual ActionRequest 
00233     offAction (BACIComponent *component_p,
00234                const int &callbackID,
00235                const CBDescIn &descIn, 
00236                BACIValue *value_p,
00237                Completion &completion, 
00238                CBDescOut &descOut);
00239     
00262     virtual ActionRequest 
00263     resetAction (BACIComponent *component_p, 
00264                  const int &callbackID,
00265                  const CBDescIn &descIn,
00266                  BACIValue *value_p,
00267                  Completion &completion, 
00268                  CBDescOut &descOut);
00269     
00270     /* --------------------- [ CORBA interface ] ----------------------*/
00284     virtual void 
00285     on (ACS::CBvoid_ptr cb,
00286         const ACS::CBDescIn &desc)
00287         throw (CORBA::SystemException);
00288     
00302     virtual void 
00303     off (ACS::CBvoid_ptr cb,
00304          const ACS::CBDescIn &desc)
00305         throw (CORBA::SystemException);
00306     
00320     virtual void 
00321     reset (ACS::CBvoid_ptr cb,
00322            const ACS::CBDescIn &desc)
00323         throw (CORBA::SystemException);
00324     
00333     virtual ACS::RWdouble_ptr 
00334     current ()
00335         throw (CORBA::SystemException);
00336     
00345     virtual ACS::ROdouble_ptr
00346     readback ()
00347         throw (CORBA::SystemException);
00348     
00357     virtual ACS::ROpattern_ptr 
00358     status ()
00359         throw (CORBA::SystemException);
00360 
00361     /*Overriding component lifecycle methods*/
00374     virtual void execute()
00375         throw (ACSErr::ACSbaseExImpl);
00376     
00377   protected:
00381      SmartPropertyPointer<ROpattern> m_status_sp;
00382   
00383     
00384   private:
00388     SmartPropertyPointer<ROdouble> m_readback_sp;
00389     
00393      SmartPropertyPointer<PowerSupplyCurrent> m_current_sp;
00394 
00398     void operator=(const PowerSupply&);
00399 };
00400 
00401 #endif   /* acsexmplPowerSupplyImpl_h */
00402 
00403 
00404 

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