public class Comm
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private boolean |
bEnablePrintfOnComm |
private CmdExecuter |
cmdExecuter |
private int |
ctErrorTelg |
private byte[] |
data_rxBuffer
Use a static receive buffer.
|
private InterProcessComm |
ipc |
private Address_InterProcessComm |
myAnswerAddress |
private int[] |
nrofBytesReceived |
private byte[] |
rxBuffer
For C: store the reference and length of the SimpleArray in the next structure.
|
private char |
state
State of function.
|
private java.lang.Thread |
thread |
static int |
version
Version and history
2011-11-17 Hartmut new
shutdown() to end communication thread. |
Constructor and Description |
---|
Comm(java.lang.String ownAddrIpc,
CmdExecuter cmdExecuter)
Creates the communication for the inspector.
|
Modifier and Type | Method and Description |
---|---|
boolean |
openComm(boolean blocking) |
private void |
receiveAndExecute() |
void |
run() |
int |
sendAnswer(byte[] bufferAnswerData,
int nrofBytesAnswer)
Sends the answer telg to the sender of the received telegram.
|
void |
shutdown()
Shutdown the communication, close the thread.
|
void |
start() |
public static final int version
shutdown()
to end communication thread.
private final CmdExecuter cmdExecuter
private char state
private boolean bEnablePrintfOnComm
private final InterProcessComm ipc
private int ctErrorTelg
private final java.lang.Thread thread
private final int[] nrofBytesReceived
private final byte[] data_rxBuffer
private final byte[] rxBuffer
private final Address_InterProcessComm myAnswerAddress
public Comm(java.lang.String ownAddrIpc, CmdExecuter cmdExecuter)
ownAddrIpc
- The address StringcmdExecuter
- aggregation of executer of all commands.public final boolean openComm(boolean blocking)
public final void start()
public void run()
run
in interface java.lang.Runnable
private final void receiveAndExecute()
public final int sendAnswer(byte[] bufferAnswerData, int nrofBytesAnswer)
bufferAnswerData
- The bytes to send.nrofBytesAnswer
- number of bytes to send.public void shutdown()
#start(Object)
.