ALMA Computing Group

acsexmplAsyncCallbacks.cpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * ALMA - Atacama Large Millimiter Array
00003 * (c) European Southern Observatory, 2004 
00004 *
00005 *This library is free software; you can redistribute it and/or
00006 *modify it under the terms of the GNU Lesser General Public
00007 *License as published by the Free Software Foundation; either
00008 *version 2.1 of the License, or (at your option) any later version.
00009 *
00010 *This library is distributed in the hope that it will be useful,
00011 *but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 *Lesser General Public License for more details.
00014 *
00015 *You should have received a copy of the GNU Lesser General Public
00016 *License along with this library; if not, write to the Free Software
00017 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00018 *
00019 * "@(#) $Id: acsexmplAsyncCallbacks.cpp,v 1.2 2008/10/01 04:30:47 cparedes Exp $"
00020 *
00021 * who       when      what
00022 * --------  --------  ----------------------------------------------
00023 * acaproni  2004-08-10  created 
00024 */
00025 
00026 /************************************************************************
00027 *   NAME
00028 *   
00029 * 
00030 *   SYNOPSIS
00031 *   
00032 * 
00033 *   DESCRIPTION
00034 *
00035 *   FILES
00036 *
00037 *   ENVIRONMENT
00038 *
00039 *   COMMANDS
00040 *
00041 *   RETURN VALUES
00042 *
00043 *   CAUTIONS 
00044 *
00045 *   EXAMPLES
00046 *
00047 *   SEE ALSO
00048 *
00049 *   BUGS   
00050 * 
00051 *------------------------------------------------------------------------
00052 */
00053 
00054 //#include "vltPort.h"
00055 
00056 static char *rcsId="@(#) $Id: acsexmplAsyncCallbacks.cpp,v 1.2 2008/10/01 04:30:47 cparedes Exp $"; 
00057 static void *use_rcsId = ((void)&use_rcsId,(void *) &rcsId);
00058 
00059 #include "acsexmplAsyncCallbacks.h"
00060 #include <logging.h>
00061 
00062 void AsyncCBdouble::working (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00063         {
00064                 char logStr[128];
00065                 sprintf(logStr,
00066                         "AsyncCBdouble::working property %s and val=%lf",
00067                         propertyName.c_str(),
00068                         value);
00069                 ACS_SHORT_LOG((LM_INFO,logStr));
00070 }
00071 
00072 // This is executed when the value of the variable is available
00073 // In this case it writes the value also in the thread variable
00074 void AsyncCBdouble::done (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00075         {
00076                 char logStr[128];
00077                 sprintf(logStr,
00078                         "AsyncCBdouble::done property %s and val=%lf",
00079                         propertyName.c_str(),
00080                         value);
00081                 ACS_SHORT_LOG((LM_INFO,logStr));
00082                 *varToUpdate=value;
00083 }
00084 
00085 // The time negotiation is not yet implemented  
00086 CORBA::Boolean AsyncCBdouble::negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
00087         {
00088                 char logStr[128];
00089                 sprintf(logStr,"AsyncCBdouble::negotiate property %s",propertyName.c_str());
00090                 ACS_SHORT_LOG((LM_INFO,logStr));
00091                 return true;
00092 }