All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.io.RS232SDD16

java.lang.Object
   |
   +----pinball.io.RS232SDD16

public class RS232SDD16
extends Object
Controls for the RS232SDD16 data IO device. Currently the LSB is the output part of the I/O unit sending data to the pinball machine. The MSB is used to read the data from the I/O device.


Variable Index

 o ALL
A bitset with all the bits on.
 o deviceConnected
Is the device connected.
 o lsbSet
The least significant bit set.
 o msbSet
The most significant bit set.
 o serialIO
The serial port to write the data to.
 o testPort
The test port.
 o WORDSIZE
Size of word for the device.
 o ZERO
A zero bitset.

Constructor Index

 o RS232SDD16(String)
Create the IO device at the port specified.

Method Index

 o defineLines(byte, byte)
Define the IO lines in the system.
 o flushInputData()
Clear any data waiting to be read.
 o flushOutputData()
Clear any commands waiting to go out.
 o main(String[])
Used to test the device.
 o random()
Generate random characters.
 o readConfiguration()
Read the configuration of the device.
 o readOutputLines()
Read the output lines.
 o readTest()
Test the reading of the port.
 o requestRead()
Request a read from the output lines.
 o resetOutputLines(BitSet, BitSet)
Clear the output lines on the device.
 o setOutputLines(BitSet, BitSet)
Set the output lines on the device.
 o setPowerupStates(byte, byte)
Define the IO lines inital power on state.
 o test()
Test's the port.
 o turnOff()
Clean out the data, so that all the devices are turned off.

Variables

 o WORDSIZE
 public final int WORDSIZE
Size of word for the device.

 o serialIO
 private SerialIO serialIO
The serial port to write the data to.

 o ZERO
 public BitSet ZERO
A zero bitset.

 o ALL
 public BitSet ALL
A bitset with all the bits on.

 o msbSet
 private BitSet msbSet
The most significant bit set.

 o lsbSet
 private BitSet lsbSet
The least significant bit set.

 o testPort
 private static final String testPort
The test port.

 o deviceConnected
 private boolean deviceConnected
Is the device connected. Set this to false, if you don't have this device, but want to run the draw player.

Constructors

 o RS232SDD16
 public RS232SDD16(String port)
Create the IO device at the port specified. param port serial port location.

Methods

 o resetOutputLines
 public synchronized void resetOutputLines(BitSet msb,
                                           BitSet lsb) throws IOException
Clear the output lines on the device. param msb the most significant bit. param lsb the least significant bit.

 o setOutputLines
 public synchronized void setOutputLines(BitSet msb,
                                         BitSet lsb) throws IOException
Set the output lines on the device. param msb the most significant bit. param lsb the least significant bit.

 o readOutputLines
 public synchronized byte[] readOutputLines() throws IOException
Read the output lines. return the bytes reads in from the device.

 o requestRead
 public synchronized void requestRead() throws IOException
Request a read from the output lines.

 o defineLines
 public synchronized void defineLines(byte msb,
                                      byte lsb) throws IOException
Define the IO lines in the system. 1 mean output, 0 means input. param msb the most significant bit. param lsb the least significant bit.

 o setPowerupStates
 public synchronized void setPowerupStates(byte msb,
                                           byte lsb) throws IOException
Define the IO lines inital power on state. param msb the most significant bit. param lsb the least significant bit.

 o readConfiguration
 public synchronized byte[] readConfiguration() throws IOException
Read the configuration of the device. return The bytes in the configuration. IO Definitions followed by Powerup states.

 o turnOff
 public synchronized void turnOff()
Clean out the data, so that all the devices are turned off.

 o main
 public static void main(String args[])
Used to test the device.

 o flushInputData
 public synchronized void flushInputData()
Clear any data waiting to be read.

 o flushOutputData
 public synchronized void flushOutputData()
Clear any commands waiting to go out.

 o readTest
 private void readTest()
Test the reading of the port.

 o test
 private void test()
Test's the port.

 o random
 private byte random()
Generate random characters.


All Packages  Class Hierarchy  This Package  Previous  Next  Index