ALMA Computing Group

acsexmplCallbacksImpl.cpp

Go to the documentation of this file.
00001 /******************************************************************************* 00002 * ALMA - Atacama Large Millimiter Array 00003 * (c) Associated Universities Inc., 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: acsexmplCallbacksImpl.cpp,v 1.4 2008/10/01 04:30:47 cparedes Exp $" 00020 * 00021 * who when what 00022 * -------- -------- ---------------------------------------------- 00023 * dave 2004-01-14 created 00024 */ 00025 00026 #include "acsexmplCallbacks.h" 00027 #include <logging.h> 00028 00029 //------------------------------------------------------------------ 00030 void 00031 MyAlarmdouble::alarm_raised (CORBA::Double value, 00032 const ACSErr::Completion &c, 00033 const ACS::CBDescOut &desc) 00034 { 00035 ACS_SHORT_LOG ((LM_INFO, "(%s::Alarmdouble::alarm_raised) Value: %f", prop.c_str(), value)); 00036 } 00037 00038 void 00039 MyAlarmdouble::alarm_cleared (CORBA::Double value, 00040 const ACSErr::Completion &c, 00041 const ACS::CBDescOut &desc) 00042 { 00043 ACS_SHORT_LOG ((LM_INFO, "(%s::Alarmdouble::alarm_cleared) Value: %f", prop.c_str(), value)); 00044 } 00045 //------------------------------------------------------------------ 00046 void 00047 MyCBdouble::working(CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc) 00048 { 00049 //To make the modular test deterministic, we have to ensure this message is only printed 00050 //to standard out exactly once! This is accomplished by changing the priority of the 00051 //logging statement after the working method has been invoked. 00052 if (m_count == 0) 00053 { 00054 ACS_SHORT_LOG ((LM_INFO, "(%s::CBdouble::working) Value: %f, desc.id_tag: %d", prop.c_str(), value, desc.id_tag)); 00055 } 00056 else 00057 { 00058 ACS_SHORT_LOG ((LM_DEBUG, "(%s::CBdouble::working) Value: %f, desc.id_tag: %d", prop.c_str(), value, desc.id_tag)); 00059 } 00060 m_count++; 00061 } 00062 00063 void 00064 MyCBdouble::done (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc) 00065 { 00066 ACS_SHORT_LOG ((LM_INFO, "(%s::CBdouble::done) Value: %f", prop.c_str(), value)); 00067 } 00068 //------------------------------------------------------------------ 00069 void 00070 MyCBvoid::working (const ACSErr::Completion &c, const ACS::CBDescOut &desc) 00071 { 00072 ACS_SHORT_LOG ((LM_INFO, "(%s::CBvoid::working)", prop.c_str())); 00073 } 00074 00075 void 00076 MyCBvoid::done (const ACSErr::Completion &c, const ACS::CBDescOut &desc) 00077 { 00078 ACS_SHORT_LOG ((LM_INFO, "(%s::CBvoid::done)", prop.c_str())); 00079 ACS_SHORT_LOG ((LM_INFO, "Error code returned: %d", c.code)); 00080 } 00081 //------------------------------------------------------------------ 00082