rb8506_pport.h

00001 /*
00002  * rb8506_par.h - dual parallel interface (PIA/VIA) (RB8506).
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: rb8506_pport.h 2 2004-10-12 11:54:15Z moene $
00023  */
00024 
00025 #ifndef __RB8506_PAR_H
00026 #define __RB8506_PAR_H
00027 
00028 #ifndef __PIAVIA_H
00029 #include "PiaVia.h"
00030 #endif
00031 
00032 namespace Rulbus
00033 {
00034    DECLARE_CLASS( RB8506_Pia    );              // the Pia Parallel Interface class type
00035    DECLARE_CLASS( RB8506_Via    );              // the Via Parallel Interface class type
00036 
00037    DECLARE_TYPE ( PiaVia, RB8506_PiaVia );      // the PiaVia Parallel Interface class type
00038 
00126    class RB8506_Pia : public Pia
00127    {
00128    public:
00129       RB8506_Pia( NameCref name, Addr addr = Pia::DEF_ADDR, Rack rack = Pia::DEF_RACK ):
00130          Pia( name, addr, rack ) { ; }          
00131    };
00132 
00141    class RB8506_Via : public Via
00142    {
00143    public:
00144       RB8506_Via( NameCref name, Addr addr = Via::DEF_ADDR, Rack rack = Via::DEF_RACK ):
00145          Via( name, addr, rack ) { ; }          
00146    };
00147 
00151 
00156    inline PiaViaRef to_rb8506( RulbusDevicePtr p )
00157    {
00158       return PROXY_CAST<PiaViaRef>( *p );
00159    }
00160 
00165    inline PiaViaPtr to_rb8506_ptr( RulbusDevicePtr p )
00166    {
00167       return PROXY_CAST<PiaViaPtr>( p );
00168    }
00169 
00174    inline RB8506_PiaRef to_rb8506_pia( RulbusDevicePtr p )
00175    {
00176       return PROXY_CAST<RB8506_PiaRef>( *p );
00177    }
00178 
00183    RB8506_PiaPtr to_rb8506_pia_ptr( RulbusDevicePtr p )
00184    {
00185       return PROXY_CAST<RB8506_PiaPtr>( p );
00186    }
00187 
00192    inline RB8506_ViaRef to_rb8506_via( RulbusDevicePtr p )
00193    {
00194       return PROXY_CAST<RB8506_ViaRef>( *p );
00195    }
00196 
00201    inline RB8506_ViaPtr to_rb8506_via_ptr( RulbusDevicePtr p )
00202    {
00203       return PROXY_CAST<RB8506_ViaPtr>( p );
00204    }
00205 
00206 }       // namespace Rulbus
00207 
00208 #endif // __RB8506_PAR_H
00209 
00210 /*
00211  * end of file
00212  */
00213 

Generated on Tue Oct 12 14:11:57 2004 for Rulbus Device Class Library for Microsoft Windows by doxygen 1.3.4