Rulbus Interface
[Implementation]


Detailed Description

The Rulbus Device Class Library supports two Rulbus Interface cards:

The Rulbus interface class provides the means to read and write to the Rulbus that is connected to the specific Rulbus Interface card.

The proper interface class to use is created by the RulbusInterfaceFactory, based on the presence and contents of the Rulbus environment variable.

The responsibility to create the interface class is with class RulbusDevice. You can either request class RulbusDevice to create the Rulbus interface class, or let it create the Rulbus interface class automatically the first time a Rulbus device accesses the Rulbus.

Access to I/O-Ports

The Rulbus Interfaces are accessed via the computer's input/output ports. Windows NT type operating systems require that you have the privilege to access these ports. To give you that right, we use function AddMultiPort() of CanIO [CANIO] to open the address range required for the Rulbus Interface used.

See [DRIVERLINX] and [UNIIO] for other products that can provide access to input/output ports.


Modules

CanIO I/O-port access
 provide access to computer's i/o-ports.


Classes

class  EppRulbusInterface
 EPP Rulbus Interface. More...

class  IsaRulbusInterface
 ISA Rulbus Interface. More...

class  RulbusInterfaceFactory
 the Rulbus Interface Abstract Factory(87) Singleton(127). More...

class  TheRulbusInterface
 Rulbus Interface abstract base class. More...


Defines

#define SPORTIO   "CanIO"
 string representation for PORTIO used.


Functions

short Rulbus::inp (unsigned short port)
 read a byte from an input-output port

short Rulbus::outp (unsigned short port, unsigned char value)
 write a byte to an input-output port.

bool Rulbus::openIO (long base, int len)
 open port input-output address range on Windows NT type operating systems using CanIO. CanIO consists of canio.dll and canio.sys. openIO() first dynamically loads canio.dll and then calls AddMultiPort() to provide access to the requested input-output range.


Function Documentation

short inp unsigned short  port  ) 
 

read a byte from an input-output port

 short inp(unsigned short port)
 {
    asm  mov  dx, port
    asm  in   al, dx
    asm  xor  ah, ah
    return _AX;
 } 

Parameters:
port portnumber
Returns:
byte read

short outp unsigned short  port,
unsigned char  value
 

write a byte to an input-output port.

 short outp(unsigned short port, unsigned char value)
 {
    asm  mov  dx, port
    asm  mov  al, value
    asm  out  dx, al
    asm  xor  ah, ah
    return (_AX);
 } 

Parameters:
port portnumber
value byte to write
Returns:
value


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