Class PPort

java.lang.Object
  extended byPPort

public class PPort
extends Object

This class provides access to the parallel port via JNI. This class is primarly used by the LittleDrinkMachine, since the little drink machine is based on a parallel port interface to the machine electronics.

Version:
$Revision: #3 $
Author:
Bill Kuker [kukester@csh.rit.edu]

Field Summary
(package private)  int address
          The machine address of the parallel port.
 
Constructor Summary
PPort(int _address)
          Constructs the class by simply saving the passed-in-parameters.
 
Method Summary
private static int inb(int port)
           
static void main(String[] args)
          A simple main method to test the class.
 void outb(int b)
          Sends a single byte out on the port.
private static void outb(int b, int port)
          These are function prototypes declaring that the real outb/inb are actually impleted in JNI code.
 int read()
          Reads a single byte from the port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

address

int address
The machine address of the parallel port. This is usually the actual memory address of the parallel port interface chipset registers.

Constructor Detail

PPort

public PPort(int _address)
Constructs the class by simply saving the passed-in-parameters.

Method Detail

outb

public void outb(int b)
Sends a single byte out on the port.


read

public int read()
Reads a single byte from the port.


outb

private static void outb(int b,
                         int port)
These are function prototypes declaring that the real outb/inb are actually impleted in JNI code.


inb

private static int inb(int port)

main

public static void main(String[] args)
A simple main method to test the class.