Class IO
java.lang.Object
public class IO
- extends Object
|
Method Summary |
static void |
delay(long lMilliSeconds)
Wait a specified time. |
static boolean |
init()
Initialize. |
static boolean |
init(int newPort)
|
static boolean |
init(String newHost)
|
static boolean |
init(String newHost,
int newPort)
|
static short |
readShort(int address)
|
static short |
readShort(short address)
Read a short value (16-bits) from an I/O port. |
static void |
writeShort(int address,
int value)
|
static void |
writeShort(short address,
short value)
Write a short value (16-bits) to an I/O port. |
| Methods inherited from class |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
public static String host
port
public static int port
IO
public IO()
delay
public static void delay(long lMilliSeconds)
- Wait a specified time. The routine uses Thread.sleep so below 20 ms
timing becomes very erraneous, but works fine for longer times
- Parameters:
lMilliSeconds - number of milliseconds to wait
init
public static boolean init()
- Initialize.
Before calling the emulated IO routines, use one of the init routines
to set the host name and port number of the server emulating the HW.
init
public static boolean init(int newPort)
init
public static boolean init(String newHost)
init
public static boolean init(String newHost,
int newPort)
readShort
public static short readShort(int address)
readShort
public static short readShort(short address)
- Read a short value (16-bits) from an I/O port.
- Parameters:
address - port address (16-bits)
- Returns:
- short value (16-bits)
writeShort
public static void writeShort(int address,
int value)
writeShort
public static void writeShort(short address,
short value)
- Write a short value (16-bits) to an I/O port.
- Parameters:
address - port address (16-bits)value - short value (16-bits)