|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--serial.Serial | +--serial.SerialDA232
The Serial class is designed to control serial devices. This is the base class for all serial devices we use.
Fields inherited from class serial.Serial |
answerTimeout, cancelEcho, debug, device, listener, semaphore, serial, serial_in, serial_out, timeout_wait, waitingForResponse |
Constructor Summary | |
SerialDA232()
|
Method Summary | |
static boolean[] |
byteToBoolean(byte input)
This method is used to power the 232SDA12 via the serial port by setting RTS and DTR high. |
static void |
main(String[] args)
Used for standalone debugging and hardware tests. |
int[] |
readAnalogInput()
This method reads all anlaog channels (0 through 10) and outputs them in the form of an array of integers. |
int[] |
readAnalogInput(int index)
This method reads all anlaog channels(0 through index) and outputs them in the form of an array of integers. |
boolean[] |
readDigitalInput()
This method returns all Digital Inputs as a boolean array with digitalInputs[0,1,2] as the values of Digital Inputs 0,1,2 and digitalOutputs[3,4,5] as the values of the Digital Outputs 0, 1, 2, respectively. |
boolean |
readDigitalInput(int index)
This method returns the value of a specific Digital Input |
int |
readSpecificAnalogInput(int index)
This method reads the specific analog channel specified by index (0 through 10) |
void |
setDigitalOutput(boolean DO1,
boolean DO2,
boolean DO3)
This method is used to set all the Digital Outputs |
void |
setDigitalOutput(int index,
boolean value)
This method is used to set just one Digital output, given by index (1, 2, or 3), without affecting the other Digital Outputs. |
Methods inherited from class serial.Serial |
addEventListener, close, getNewInstance, open, open, open, openNoParams, processSerialEvent, read, readBytes, readString, ready, send, send, sendSynch, sendSynch, sendSynch, sendSynch, serialEvent, setDebug, setFlowControlMode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerialDA232()
Method Detail |
public static boolean[] byteToBoolean(byte input)
public void setDigitalOutput(boolean DO1, boolean DO2, boolean DO3)
public void setDigitalOutput(int index, boolean value)
public boolean[] readDigitalInput()
public boolean readDigitalInput(int index)
public int[] readAnalogInput()
public int[] readAnalogInput(int index)
public int readSpecificAnalogInput(int index)
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |