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

acsexmplAsyncCallbacks.h

Go to the documentation of this file.
00001 #ifndef ACSEXMPLASYNCCALLBACKS_H
00002 #define ACSEXMPLASYNCCALLBACKS_H
00003 /*******************************************************************************
00004 * ALMA - Atacama Large Millimiter Array
00005 * (c) European Southern Observatory, 2004 
00006 *
00007 *This library is free software; you can redistribute it and/or
00008 *modify it under the terms of the GNU Lesser General Public
00009 *License as published by the Free Software Foundation; either
00010 *version 2.1 of the License, or (at your option) any later version.
00011 *
00012 *This library is distributed in the hope that it will be useful,
00013 *but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 *Lesser General Public License for more details.
00016 *
00017 *You should have received a copy of the GNU Lesser General Public
00018 *License along with this library; if not, write to the Free Software
00019 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 *
00021 * "@(#) $Id: acsexmplAsyncCallbacks.h,v 1.2 2008/10/01 04:30:47 cparedes Exp $"
00022 *
00023 * who       when      what
00024 * --------  --------  ----------------------------------------------
00025 * acaproni  2004-08-10  created
00026 */
00027 
00028 // We need CORBA stuffs for baci classes
00029 #include <baciS.h>
00030 
00031 #include <ace/SString.h>
00032 
00038 class AsyncCBdouble: public virtual POA_ACS::CBdouble  {
00039         private:
00040                 // The name of the property
00041                 ACE_CString propertyName;
00042                 
00043                 // The variable to update when the asynchronous call terminates
00044                 // It is a pointer to a variable of the main program to show 
00045                 // how to pass information between the callback and the rest
00046                 // of the world
00047                 double* varToUpdate;
00048 
00049         public:
00055                  AsyncCBdouble(ACE_CString property, double* var) {
00056                         propertyName=property;
00057                         varToUpdate=var;
00058                  }
00059                  
00063                   ~AsyncCBdouble() { }
00064                   
00065                 void working (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc);
00066                 
00067                 void done (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc);
00068                         
00069                 CORBA::Boolean negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc); 
00070 };
00071 
00072 #endif

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