• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

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.106 2008/10/09 08:41:11 cparedes 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::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 
00066 #define ON_ACTION 0
00067 #define OFF_ACTION 1
00068 #define RESET_ACTION 2
00069 
00071 
00076 
00138 class acsexmpl_EXPORT PowerSupply: public baci::CharacteristicComponentImpl,     //Standard component superclass
00139                                    public virtual POA_PS::PowerSupply,    //CORBA servant stub
00140                                    public baci::ActionImplementator    //Asynchronous method helper class
00141 {
00142   public:
00149     PowerSupply(
00150                 const ACE_CString &name,
00151                 maci::ContainerServices * containerServices);
00152   
00156     virtual ~PowerSupply();  
00157     
00158     /* --------------- [ Action implementator interface ] -------------- */
00179     virtual baci::ActionRequest 
00180     invokeAction (int function,
00181                   baci::BACIComponent *component_p, 
00182                   const int &callbackID, 
00183                   const CBDescIn &descIn, 
00184                   baci::BACIValue *value_p, 
00185                   Completion &completion, 
00186                   CBDescOut &descOut);
00187     
00210     virtual baci::ActionRequest 
00211     onAction (baci::BACIComponent *component_p, 
00212               const int &callbackID,
00213               const CBDescIn &descIn, 
00214               baci::BACIValue *value_p,
00215               Completion &completion, 
00216               CBDescOut &descOut);
00217     
00240     virtual baci::ActionRequest 
00241     offAction (baci::BACIComponent *component_p,
00242                const int &callbackID,
00243                const CBDescIn &descIn, 
00244                baci::BACIValue *value_p,
00245                Completion &completion, 
00246                CBDescOut &descOut);
00247     
00270     virtual baci::ActionRequest 
00271     resetAction (baci::BACIComponent *component_p, 
00272                  const int &callbackID,
00273                  const CBDescIn &descIn,
00274                  baci::BACIValue *value_p,
00275                  Completion &completion, 
00276                  CBDescOut &descOut);
00277     
00278     /* --------------------- [ CORBA interface ] ----------------------*/
00292     virtual void 
00293     on (ACS::CBvoid_ptr cb,
00294         const ACS::CBDescIn &desc);
00295     
00309     virtual void 
00310     off (ACS::CBvoid_ptr cb,
00311          const ACS::CBDescIn &desc);
00312     
00326     virtual void 
00327     reset (ACS::CBvoid_ptr cb,
00328            const ACS::CBDescIn &desc);
00329     
00338     virtual ACS::RWdouble_ptr 
00339     current ();
00340     
00349     virtual ACS::ROdouble_ptr
00350     readback ();
00351     
00360     virtual ACS::ROpattern_ptr 
00361     status ();
00362 
00363     /*Overriding component lifecycle methods*/
00377     virtual void execute();
00378     
00379   protected:
00383      baci::SmartPropertyPointer<baci::ROpattern> m_status_sp;
00384   
00385     
00386   private:
00390     baci::SmartPropertyPointer<baci::ROdouble> m_readback_sp;
00391     
00395      baci::SmartPropertyPointer<PowerSupplyCurrent> m_current_sp;
00396 
00400     void operator=(const PowerSupply&);
00401 };
00402 /*\@}*/
00403 /*\@}*/
00404 
00405 #endif   /* acsexmplPowerSupplyImpl_h */
00406 
00407 
00408 

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0