|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object devs.motorpackage.asc16.ASC16
public class ASC16
Class implementing the interface to the ASC16 controller. Only basic functions are implemented becuse the controll is on higher level
Nested Class Summary | |
---|---|
(package private) class |
ASC16.InputReader
|
Field Summary | |
---|---|
protected boolean |
busy
|
static java.io.InputStream |
is
Comment for is |
static javax.comm.SerialPort |
mPort
Comment for mPort |
static javax.comm.CommPortIdentifier |
mPortId
Comment for mPortId |
static java.io.OutputStream |
os
Comment for os |
(package private) static java.util.Enumeration |
portList
|
static java.util.Vector |
servos
Comment for servos |
protected int |
triggerLevel
|
Constructor Summary | |
---|---|
ASC16(java.lang.String portName)
|
Method Summary | |
---|---|
void |
closePort()
Close the currently open serial port |
(package private) java.io.InputStream |
getInputStream()
|
(package private) java.io.OutputStream |
getOutputStream()
|
void |
initPort(int baud)
|
static void |
main(java.lang.String[] args)
|
void |
openPort(java.lang.String portName)
|
void |
register(Servo s)
Register a Servo with ASC16 controller to obtain direct feedback |
void |
sendInt(int i)
Sends a command to the ASC16 micro-controller |
void |
sendInt(int[] i)
Sends a array of integer representing a single command to the ASC16 This limits the problem of command mixing - easy |
void |
setTriggerLevel(int triggerLevel)
Sets the trigger level of the ASC16 controller |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static javax.comm.CommPortIdentifier mPortId
mPortId
public static javax.comm.SerialPort mPort
mPort
public static java.io.OutputStream os
os
public static java.io.InputStream is
is
static java.util.Enumeration portList
public static java.util.Vector servos
servos
protected int triggerLevel
protected boolean busy
Constructor Detail |
---|
public ASC16(java.lang.String portName)
portName
- Method Detail |
---|
public void register(Servo s)
s
- - Servopublic void sendInt(int i)
i
- - integerpublic void sendInt(int[] i)
i
- public void openPort(java.lang.String portName) throws javax.comm.NoSuchPortException, javax.comm.PortInUseException
portName
-
javax.comm.NoSuchPortException
javax.comm.PortInUseException
public void closePort()
public void initPort(int baud) throws javax.comm.UnsupportedCommOperationException
baud
-
javax.comm.UnsupportedCommOperationException
java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public void setTriggerLevel(int triggerLevel)
triggerLevel
- - integer [0-3]public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |