|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.Device<java.lang.Integer>
jmce.sim.Serial
jmce.sim.serial.PolledSerial
jmce.sim.serial.TCPSocket
public abstract class TCPSocket
Base class to implement serial over TCP socket.
The sub class must implements the method connect and when the socket is connected call the method #setSocket(Socket s) after this automatically the data from the socket are sent to the connected device and the data received the device are sent to the socket.
Field Summary | |
---|---|
static int |
DEFAULT_PORT
|
Fields inherited from class jmce.sim.serial.PolledSerial |
---|
connected, is, os, rcvd, sent |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
TCPSocket()
|
Method Summary | |
---|---|
protected void |
close()
Close the socket and release all the resources. |
int |
getPort()
Return the port used by this socket. |
void |
setPort(int n)
Set the port used by this socket. |
protected void |
setSocket(java.net.Socket s)
Set the sucket. |
Methods inherited from class jmce.sim.serial.PolledSerial |
---|
connect, consume, delay, init, run |
Methods inherited from class jmce.sim.Serial |
---|
print, println, println, putchar |
Methods inherited from class jmce.sim.Device |
---|
addInputConsumer, addInputProducer, addOutputConsumer, addOutputProducer, getConnected, read, readOutput, readyRead, readyReadOutput, readyWrite, removeInputConsumer, removeOutputConsumer, setConnected, write, writeInput |
Methods inherited from class jmce.sim.AbstractPeripheral |
---|
idle, registerCPU, setIdle, setLive |
Methods inherited from class jmce.sim.AbstractHardware |
---|
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jmce.sim.Hardware |
---|
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Field Detail |
---|
public static final int DEFAULT_PORT
Constructor Detail |
---|
public TCPSocket()
Method Detail |
---|
public void setPort(int n)
public int getPort()
protected void setSocket(java.net.Socket s) throws SIMException
Used by sub class to set the socket used for input/output.
SIMException
protected void close()
close
in class PolledSerial
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |