00001 /* 00002 * IsaRulbusInterface.h - class IsaRulbusInterface. 00003 * 00004 * This file is part of the Rulbus Device Class Library (RDCL). 00005 * 00006 * Copyright (C) 2003-2004, Leiden University. 00007 * 00008 * This library is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * The library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with mngdriver; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * $Id: IsaRulbusInterface.h 2 2004-10-12 11:54:15Z moene $ 00023 */ 00024 00025 #ifndef __ISARULBUSINTERFACE_H 00026 #define __ISARULBUSINTERFACE_H 00027 00028 #ifndef __RULBUSINTERFACE_H 00029 #include "rulbusinterface.h" 00030 #endif 00031 00032 namespace Rulbus 00033 { 00034 DECLARE_CLASS( IsaRulbusInterface ); 00035 00046 class IsaRulbusInterface: public TheRulbusInterface 00047 { 00048 public: // P U B L I C 00050 00051 IsaRulbusInterface( long aBase = DEF_ISA_BASE ); 00052 00055 00056 long base() const; 00057 bool invariant() const; 00058 00061 00062 bool printOn( std::ostream& stream ) const; 00063 00064 protected: // P R O T E C T E D 00067 00068 IsaRulbusInterface( IsaRulbusInterfaceRef ); 00069 IsaRulbusInterfaceRef operator=( IsaRulbusInterfaceRef ); 00070 00074 00075 bool validBase( long base ) const; 00076 00080 00081 int getReg( int offset ) const; 00082 int putReg( int offset, int byte ) const; 00083 00085 00086 public: // P U B L I C 00087 static const long DEF_ISA_BASE = 0x0200; 00088 00089 private: // P R I V A T E 00090 long theBase; 00091 static const long baseMin = 0x0200; 00092 static const long baseMax = 0xFF00; 00093 static const long baseStp = 0x0100; 00094 static CharCptr msgtitle; 00095 }; 00096 00101 inline long IsaRulbusInterface::base() const 00102 { 00103 return theBase; 00104 } 00105 00110 inline bool IsaRulbusInterface::invariant() const 00111 { 00112 return BASE_INVARIANT( TheRulbusInterface ); 00113 } 00114 00115 } // namespace Rulbus 00116 00117 #endif // __ISARULBUSINTERFACE_H 00118 00119 /* 00120 * end of file 00121 */