00001 /*************** <auto-copyright.pl BEGIN do not edit this line> ************** 00002 * 00003 * VR Juggler is (C) Copyright 1998-2005 by Iowa State University 00004 * 00005 * Original Authors: 00006 * Allen Bierbaum, Christopher Just, 00007 * Patrick Hartling, Kevin Meinert, 00008 * Carolina Cruz-Neira, Albert Baker 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Library General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Library General Public 00021 * License along with this library; if not, write to the 00022 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00023 * Boston, MA 02111-1307, USA. 00024 * 00025 * ----------------------------------------------------------------- 00026 * File: $RCSfile$ 00027 * Date modified: $Date: 2005-01-01 14:59:16 -0600 (Sat, 01 Jan 2005) $ 00028 * Version: $Revision: 16524 $ 00029 * ----------------------------------------------------------------- 00030 * 00031 *************** <auto-copyright.pl END do not edit this line> ***************/ 00032 00033 #include <gadget/gadgetConfig.h> 00034 #include <jccl/Config/ConfigElement.h> 00035 #include <gadget/Util/Debug.h> 00036 #include <gadget/Type/AnalogProxy.h> 00037 00038 namespace gadget 00039 { 00040 00041 std::string AnalogProxy::getElementType() 00042 { 00043 return "analog_proxy"; 00044 } 00045 00046 bool AnalogProxy::config(jccl::ConfigElementPtr element) 00047 { 00048 vpr::DebugOutputGuard dbg_output(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL, 00049 std::string("----------- configuring ANALOG PROXY -----------------\n"), 00050 std::string("----------- exit: configuring analog proxy -----------\n")); 00051 vprASSERT(element->getID() == getElementType()); 00052 00053 if ( ! Proxy::config(element) ) 00054 { 00055 return false; 00056 } 00057 00058 mUnitNum = element->getProperty<int>("unit"); 00059 mDeviceName = element->getProperty<std::string>("device"); 00060 00061 refresh(); // Refresh the device now that we have something to point at 00062 00063 return true; 00064 } 00065 00066 } // End of gadget namespace
1.5.1