Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.SerialHandler
Source: src/com/multiversesocial/hyperview/SerialHandler.java
System.out.println("Write: "+str); System.out.println("SerialHandler(Object tNotifier,String tPort,int tBPSRate)");
public class SerialHandler implements Runnable, SerialPortEventListener, SerialHandlerConstants
| Declaration | Value / initializer | Description | Source |
|---|---|---|---|
Color bottomColor | No comment in source; assigned in SerialHandler(); used in showBuffer(). | ||
int BPSRate | = 19200 | No comment in source; assigned in SerialHandler(). | |
static final int[] bpsRates | = {115200, 57600, 38400, 19200, 14400, 9600, 4800, 2400, 1200, 300} | No comment in source; used in getBPSRate1(). | |
public static int bufferSize | = 1024 | No comment in source; used in SerialHandler(), run(), showBuffer(); name appears in 3 other source file(s): Externalizer, StateMachine, TextPane. | |
String errorString | = version + " - no errors" | No comment in source; assigned in getChar(). | |
Color faceColor | No comment in source; assigned in SerialHandler(); used in showBuffer(). | ||
int flags | = 0 | No comment in source; assigned in SerialHandler(). | |
Gob gobNotifier | No comment in source; assigned in SerialHandler(), setGobNotifier(); used in run(), getBPSRate1(), showBuffer(). | ||
InputStream inputStream1 | = null | No comment in source; assigned in SerialHandler(); used in run(). | |
Font itemFont | No comment in source; assigned in showBuffer(). | ||
int iteration | No comment in source; assigned in SerialHandler(). | ||
Object objectNotifier | No comment in source; assigned in SerialHandler(), setObjectNotifier(); used in run(). | ||
static OutputStream outputStream1 | No comment in source; assigned in SerialHandler(); used in out(), ser1Out(). | ||
static CommPortIdentifier portID | No comment in source; assigned in SerialHandler(). | ||
static Enumeration portList | No comment in source; assigned in SerialHandler(); name appears in 3 other source file(s): HyperConnectionHandler, PortControlPane, PortInfo. | ||
static String portName | No comment in source; assigned in SerialHandler(). | ||
int recvCount | = 0 | No comment in source; assigned in run(). | |
volatile int ser1IntPtr | No comment in source; assigned in SerialHandler(), run(); used in getString(), ser1Flush(). | ||
volatile int ser1MainPtr | No comment in source; assigned in SerialHandler(), getString(), ser1Flush(). | ||
volatile byte[] serial1Buffer | = new byte[bufferSize] | No comment in source; assigned in run(); used in getString(), showBuffer(). | |
static SerialPort serialPort1 | Todo duplicate to handle 2 or more ports | ||
StringBuilder stringBuilder | No comment in source; assigned in SerialHandler(); used in getString(). | ||
Thread task | = null | No comment in source; assigned in start(), stop(); used in run(). | |
Color textColor | No comment in source; assigned in SerialHandler(). | ||
volatile long timeout | No comment in source; assigned in SerialHandler(), setTimeout(); used in getString(). | ||
int tint | = 0 | temporary int | |
Font titleFont | No comment in source; assigned in showBuffer(). | ||
Color topColor | No comment in source; assigned in SerialHandler(); used in showBuffer(). | ||
final int TOTAL_BPS_RATES | = bpsRates.length | No comment in source; used in getBPSRate1(). | |
static final String version | = "SerialHandler V1.1" | No comment in source; not referenced by name in this type’s methods. | |
int viewHeight | No comment in source; assigned in SerialHandler(), showBuffer(). | ||
int viewWidth | No comment in source; assigned in SerialHandler(), showBuffer(). |
| Signature | Description | Source |
|---|---|---|
SerialHandler() | 1 statement(s); calls this(). | |
SerialHandler(Object tNotifier, String tPort, int tBPSRate) | 26 statement(s); calls super(), faceColor.brighter(), faceColor.darker(), Class.forName(drivername).newInstance(), Class.forName() …; creates StringBuilder. |
| Signature | Description | Source |
|---|---|---|
static { … } | Implicit default constructor generated by the compiler (not written in the source). | |
String flush() | 2 statement(s). | |
int getBPSRate1() | 4 statement(s); calls serialPort1.setSerialPortParams(), showBuffer(), ser1Out(), getString(), str.equals() …. | |
char getC() | Returns '\u0000'. | |
char getChar(Object tNotifier) | todo ... do it :) | |
public String getString() | 9 statement(s); calls stringBuilder.setLength(), notifyAll(), wait(), stringBuilder.toString(), stringBuilder.append(). | |
public void out(String str) | 1 statement(s); calls outputStream1.write(), str.getBytes(), e.printStackTrace(). | |
public void run() | 6 statement(s); calls Thread.currentThread(), notifyAll(), wait(), inputStream1.available(), inputStream1.read() …. | |
public void ser1Flush() | 1 statement(s). | |
public void ser1Out(String str) | 1 statement(s); calls outputStream1.write(), str.getBytes(), e.printStackTrace(). | |
public void serialEvent(SerialPortEvent event) | synchronize ensures atomic access to BUFFER_FULL bit. | |
int setBPSRate1(int tVal) | 3 statement(s); calls serialPort1.setSerialPortParams(), e.printStackTrace(). | |
public void setGobNotifier(Gob tNotifier) | Sets gobNotifier = (Gob)tNotifier. | |
public void setObjectNotifier(Object tNotifier) | Sets objectNotifier = tNotifier. | |
public void setTimeout(int tTime) | Sets timeout = tTime. | |
public void showBuffer() | 1 statement(s); calls showBuffer(). | |
public void showBuffer(BasicPane tPane) | 33 statement(s); calls g.setColor(), g.fillRect(), g.drawLine(), g.setFont(), g.drawString() …; creates Font, StringBuilder. | |
public synchronized void start() | 2 statement(s); calls task.start(); creates Thread. | |
public synchronized void stop() | Sets task = null. |
instantiation — SerialPane.java, line 110
110 curView.serialPortHandler = new SerialHandler((Object) this, portString, 115200);
declaration — HyperView.java, line 367
367 SerialHandler serialPortHandler;