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: 2006-12-09 13:42:12 -0600 (Sat, 09 Dec 2006) $ 00028 * Version: $Revision: 19596 $ 00029 * ----------------------------------------------------------------- 00030 * 00031 *************** <auto-copyright.pl END do not edit this line> ***************/ 00032 00033 #include <gadget/gadgetConfig.h> 00034 00035 #include <stdlib.h> 00036 #include <jccl/Config/ConfigElement.h> 00037 #include <gadget/Type/Input.h> 00038 00039 00040 namespace gadget 00041 { 00042 00043 Input::Input() 00044 : mInstName("") 00045 , mThread(NULL) 00046 , mActive(false) 00047 , mNeedUpdate(true) 00048 { 00049 } 00050 00051 bool Input::config(jccl::ConfigElementPtr e) 00052 { 00053 //if((!mPort.empty()) && (!mInstName.empty())) 00054 //{ 00055 // ASSERT: We have already been configured 00056 // this prevents config from being called multiple times (once for each derived class) 00057 // ie. Digital, Analog, etc 00058 // return true; 00059 //} 00060 00061 mInstName = e->getFullName(); 00062 00063 return true; 00064 } 00065 00066 void Input::updateDataIfNeeded() 00067 { 00068 if ( mNeedUpdate ) 00069 { 00070 mNeedUpdate = false; 00071 updateData(); 00072 } 00073 } 00074 00075 } // End of gadget namespace
1.5.1