All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.part.BallReturn

java.lang.Object
   |
   +----pinball.part.BallReturn

public class BallReturn
extends Object
Used to detect that the ball has gone out of play.


Variable Index

 o awaitingResult
Is the ball return waiting for a read to have taken place.
 o ballInDrain
Value for when the ball is in the drain.
 o BALLINDRAIN
Code to detect ball's in the drain.
 o ballIsInDrain
Is the ball in the drain.
 o data
Data from the port.
 o drain
Used to control the ballReturn.
 o lastTimePoll
The last time the ball return polled the machine.
 o pollTime
Number of milliseconds between polls.
 o returnBall
Value to eject the ball from the drain.
 o RETURNBALL
Code used to return the ball.

Constructor Index

 o BallReturn(DataIO)
Controls the ball return of the pinball machine.

Method Index

 o ballInDrain()
Checks if the ball is in the drain.
 o reset()
Make the ball return plunger go back down.
 o returnBall()
Return the ball to the system.

Variables

 o drain
 private static transient DataIO drain
Used to control the ballReturn.

 o ballInDrain
 private BitSet ballInDrain
Value for when the ball is in the drain.

 o returnBall
 private BitSet returnBall
Value to eject the ball from the drain.

 o ballIsInDrain
 private boolean ballIsInDrain
Is the ball in the drain.

 o data
 private byte data[]
Data from the port.

 o BALLINDRAIN
 private final int BALLINDRAIN
Code to detect ball's in the drain.

 o RETURNBALL
 private final int RETURNBALL
Code used to return the ball.

 o awaitingResult
 private boolean awaitingResult
Is the ball return waiting for a read to have taken place.

 o lastTimePoll
 private long lastTimePoll
The last time the ball return polled the machine.

 o pollTime
 private long pollTime
Number of milliseconds between polls.

Constructors

 o BallReturn
 public BallReturn(DataIO dataIO)
Controls the ball return of the pinball machine.

Parameters:
dataIO - the device to talk to for controlling the drain.

Methods

 o returnBall
 public void returnBall()
Return the ball to the system. Flushes the input and output of the port.

 o reset
 public void reset()
Make the ball return plunger go back down.

 o ballInDrain
 public boolean ballInDrain()
Checks if the ball is in the drain.

Parameters:
return - ball in drain status.

All Packages  Class Hierarchy  This Package  Previous  Next  Index