Class TcpIpComponent
java.lang.Object
|
+--DigitalComponent_std
|
+--TcpIpComponent
- public class TcpIpComponent
- extends DigitalComponent_std
- implements DigitalComponent
This DigitalComponent is a very funny one. You can connect any DigitalComponent to its pins and states
changes will be notified to an other DigitalComponent which is connected to an other TcpIpComponent
with which the first one is connected through a TCP/IP socket.
You can this way use PICDebugger over several (virtual)computers or with several JVM on the same
computer. And you can even interface it with a program not written in Java.
You can read the source of this class here.
Constructor Summary |
TcpIpComponent(int n,
int Port,
java.lang.String Host,
boolean IsServer)
Build a TcpIpComponent with n pins setting it as either a server or a client. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
TcpIpComponent
public TcpIpComponent(int n,
int Port,
java.lang.String Host,
boolean IsServer)
- Build a TcpIpComponent with n pins setting it as either a server or a client. The different thing
is that the server must run when the client is started.
- Parameters:
n
- The number of pins of the TcpIpComponent (both TcpIpComponent which are connected to
each other must have the same pin number).Port
- The port the TcpIpComponent should (wait on)/(connect to).Host
- The host it should connect to (if set to be a client).IsServer
- If true then the instance will be a server waiting for a client on port Port.
setStreamsAndStartThread
public void setStreamsAndStartThread(java.net.Socket sock)
setPinStateDontNotify
public void setPinStateDontNotify(int p,
boolean state)
- Description copied from interface: DigitalComponent
- Sets pin p of the component to the requested state without notifying the caller,
this is used by the notifying routine of the Pin, so you should add here the code handling
the response of the DigitalComponent to a change on its pins.
- Specified by:
- setPinStateDontNotify in interface DigitalComponent
- Overrides:
- setPinStateDontNotify in class DigitalComponent_std
stopWaiting
public void stopWaiting()
notifyOneCycle
public void notifyOneCycle()
- Description copied from interface: DigitalComponent
- This method is called by a PIC at each instruction execution if the component asked so.
- Specified by:
- notifyOneCycle in interface DigitalComponent
- Overrides:
- notifyOneCycle in class DigitalComponent_std
addComponentToNotify
public void addComponentToNotify(DigitalComponent c)