/* * ALMA - Atacama Large Millimiter Array * (c) European Southern Observatory, 2003 * *This library is free software; you can redistribute it and/or *modify it under the terms of the GNU Lesser General Public *License as published by the Free Software Foundation; either *version 2.1 of the License, or (at your option) any later version. * *This library is distributed in the hope that it will be useful, *but WITHOUT ANY WARRANTY; without even the implied warranty of *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *Lesser General Public License for more details. * *You should have received a copy of the GNU Lesser General Public *License along with this library; if not, write to the Free Software *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "baciPcontImpl_T.h" #include "baciPcommonImpl_T.i" template baci::PcontImpl::PcontImpl(const ACE_CString& name, BACIProperty *property_p, BACIComponent* component_p, DevIO* devIO, bool flagdeldevIO) { ACS_TRACE("baci::PcontImpl<>::PcontImpl"); ACE_UNUSED_ARG(component_p); ACE_UNUSED_ARG(devIO); ACE_UNUSED_ARG(flagdeldevIO); // read static data if (readCharacteristics(property_p->getCharacteristicModel())==false) { ACS_LOG(LM_RUNTIME_CONTEXT, "baci::PcontImpl<>::PcontImpl", (LM_ERROR, "Failed to read static data for '%s'", name.c_str())); return; } } template baci::PcontImpl::~PcontImpl() { ACS_TRACE("baci::PcontImpl<>::~PcontImpl"); } template bool baci::PcontImpl::readCharacteristics(CharacteristicModelImpl *model) { cdb::DAONode* dao = model->getDAONode(); if (!dao) return false; try { min_step_m = dao->getValue("min_step"); min_delta_trig_m = dao->getValue("min_delta_trig"); graph_min_m = dao->getValue("graph_min"); graph_max_m = dao->getValue("graph_max"); return true; } catch (ACSErr::ACSbaseExImpl& ex) { ex.log(); return false; } catch (...) { return false; } } /* ---------------------- [ CORBA interface ] ---------------------- */ template TS baci::PcontImpl::min_delta_trigger () { return CORBAMem::retn(min_delta_trig_m); } template TS baci::PcontImpl::graph_min () { return CORBAMem::retn(graph_min_m); } template TS baci::PcontImpl::graph_max () { return CORBAMem::retn(graph_max_m); } template TS baci::PcontImpl::min_step () { return CORBAMem::retn(min_step_m); } /*___oOo___*/