module_standard.wSerial
Class Serial
Object
Thread
module_standard.wSerial.Serial
- All Implemented Interfaces:
- Runnable, java.util.EventListener, javax.comm.SerialPortEventListener
public class Serial
- extends Thread
- implements javax.comm.SerialPortEventListener
A_doc
Licence
.
Nested classes/interfaces inherited from class Thread |
Thread.State, Thread.UncaughtExceptionHandler |
Fields inherited from class Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary |
Serial(Gp gpAbc,
String portCom,
int ackControl,
String name)
|
Methods inherited from class Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LENGTH_TRAME
public static int LENGTH_TRAME
ACKPF
public static String ACKPF
ACKCONTROL_STRING
public static final int ACKCONTROL_STRING
- See Also:
- Constant Field Values
ACKCONTROL_STRINGCRLF
public static final int ACKCONTROL_STRINGCRLF
- See Also:
- Constant Field Values
ACKCONTROL_BYTE
public static final int ACKCONTROL_BYTE
- See Also:
- Constant Field Values
ACKCONTROL_STX_BYTES_ETX1_ETX2
public static final int ACKCONTROL_STX_BYTES_ETX1_ETX2
- See Also:
- Constant Field Values
ACKCONTROL_ACKPF
public static final int ACKCONTROL_ACKPF
- See Also:
- Constant Field Values
out
OutputStream out
in
InputStreamReader in
serialPort
javax.comm.SerialPort serialPort
portCom
String portCom
debug
boolean debug
init
boolean init
open
boolean open
trace
boolean trace
ackControl
int ackControl
ackPF
boolean ackPF
buffRet
byte[] buffRet
prefix
int prefix
suffix1
int suffix1
suffix2
int suffix2
trameLength
int trameLength
busy
boolean busy
name
String name
gpAbc
Gp gpAbc
Serial
public Serial(Gp gpAbc,
String portCom,
int ackControl,
String name)
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
open
public boolean open()
isOpenTimeOut
public boolean isOpenTimeOut()
isOpen
public boolean isOpen()
open
public boolean open(int speed,
String parity,
int nbbit,
int nbstop)
setPortParams
public void setPortParams(int speed,
String parity,
int nbbit,
int nbstop)
setTrameParams
public void setTrameParams(int prefix,
int length,
int suffix1,
int suffix2)
close
public void close()
listePortsDispo
public javax.comm.CommPortIdentifier listePortsDispo()
getAckControl
public int getAckControl()
setAckControl
public void setAckControl(int ackControl)
setDebug
public void setDebug(boolean enable)
write
public void write(String txt)
write
public void write(int i)
serialEvent
public void serialEvent(javax.comm.SerialPortEvent ev)
- Specified by:
serialEvent
in interface javax.comm.SerialPortEventListener
getSleep
public long getSleep()
isBusy
public boolean isBusy()
setBusy
public void setBusy(boolean busy)
setSleep
public void setSleep(long sleep)
setRTS
public void setRTS(boolean enable)
setDTR
public void setDTR(boolean enable)
isCTS
public boolean isCTS()
getBTrame
public byte[] getBTrame()
getSTrame
public String getSTrame()
setAckPF
public void setAckPF(boolean ackPF)
isAckPF
public boolean isAckPF()
isTrace
public boolean isTrace()
setTrace
public void setTrace(boolean trace)
getPortCom
public String getPortCom()