IsaRulbusInterface Class Reference
[Rulbus Interface]

#include <IsaRulbusInterface.h>

Inherits TheRulbusInterface.

List of all members.


Detailed Description

Class IsaRulbusInterface implements getReg() and putReg() for the ISA Rulbus Interface. At construction time it checks for a valid PC port-I/O base address. The base address may range from 0x200 to 0xFF00 in steps of 0x0100.


Public Member Functions

Construction
 IsaRulbusInterface (long aBase=DEF_ISA_BASE)
 (default) constructor; checks for valid ISA Rulbus Interface base address.

Accessors
long base () const
 return the converters Rulbus base address.

bool invariant () const
 check class invariant.

Printer
bool printOn (std::ostream &stream) const
 report configuration.


Static Public Attributes

const long DEF_ISA_BASE = 0x0200
 default ISA Rulbus Interface base address.


Protected Member Functions

Construction
 IsaRulbusInterface (IsaRulbusInterfaceRef)
 prevent copying.

IsaRulbusInterfaceRef operator= (IsaRulbusInterfaceRef)
 prevent copying.

Predicates
bool validBase (long base) const
 check for valid base address.

Provider interface
int getReg (int offset) const
 read a byte from the Rulbus.

int putReg (int offset, int byte) const
 write a byte to the Rulbus.


Private Attributes

long theBase
 interface port-i/o base address


Static Private Attributes

const long baseMin = 0x0200
 lowest acceptable base address

const long baseMax = 0xFF00
 highest acceptable base address

const long baseStp = 0x0100
 base address delta

CharCptr msgtitle = "Initialize ISA Rulbus Interface"
 title for error message boxes concerning initialization errors.


Constructor & Destructor Documentation

IsaRulbusInterface long  aBase = DEF_ISA_BASE  ) 
 

The (default) constructor does the following:

  • check for valid ISA base address
  • if CanIO is used for port-I/O, the constructor opens the I/O port range used by the ISA Rulbus Interface (see openIO()).

The constructor throws a RulbusInterfaceError if the base address is invalid, or if the address range could not be opened.


Member Function Documentation

int getReg int  offset  )  const [protected, virtual]
 

Reading a byte from the ISA Rulbus Interface is simple:

 int getReg(int offset)
 {
    return inp( base + offset );
 }

Implements TheRulbusInterface.

int putReg int  offset,
int  byte
const [protected, virtual]
 

Writing a byte to the ISA Rulbus Interface is simple:

 int putReg(int offset, int byte)
 {
    outp( base + offset, byte );
    return byte;
 }

Implements TheRulbusInterface.


The documentation for this class was generated from the following files:
Generated on Tue Oct 12 14:12:04 2004 for Rulbus Device Class Library for Microsoft Windows by doxygen 1.3.4