|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface InterProcessComm
This interface is the applicable interface to realize a communication between processes at the same processor board or between processes via network using UDP/IP. In generally, realization of this class is hardware-depended. An implementation with socket communications (using java.net.Socket*) exists. But the user can realize its own solutions based on this interface, at example with using dual port RAM-communication at system level.
| Field Summary | |
|---|---|
static int |
receiverShouldbeBlocking
Mode of receiving, determined on open(). |
static int |
receiverShouldbePolling
Mode of receiving, determined on open(). |
| Method Summary | |
|---|---|
int |
abortReceive()
Abort receiving function |
int |
capacityToSendWithoutBlocking(int nrofBytesToSend)
Tests wether a next send is done without blocking. |
int |
checkConnection()
Checks the connection. |
int |
close()
Closes the mailbox, only to be called on shutdown of the application. |
Address_InterProcessComm |
createAddress()
Creates an empty instance for a address information, especially for the sender. |
Address_InterProcessComm |
createAddress(int p1,
int p2)
|
Address_InterProcessComm |
createAddress(java.lang.String address)
|
Address_InterProcessComm |
createAddress(java.lang.String p1,
int p2)
|
int |
dataAvailable()
Tests wether data are available to receive. |
boolean |
equals(Address_InterProcessComm address1P,
Address_InterProcessComm address2P)
Compare the address to another address, returns true if it is the same address. |
int |
flush()
Flushs send data to destination. |
void |
freeData(byte[] data)
Relinguishes the data buffer, after it is evaluated. |
java.lang.String |
getName()
|
Address_InterProcessComm |
getOwnAddress()
Gets the own address of this interProcessComm, it are the receive parameters. |
byte[] |
getSendBuffer(int len)
Gets a buffer for send. |
int |
open(Address_InterProcessComm dstAddress,
boolean shouldBlock)
Opens the Communication. |
byte[] |
receive(int[] result,
Address_InterProcessComm sender)
Receives a Datagram. |
byte[] |
receiveData(int[] nrofBytes,
byte[] buffer,
Address_InterProcessComm sender)
|
int |
send(byte[] data,
int nBytes,
Address_InterProcessComm addressee)
Sends Data. |
java.lang.String |
translateErrorMsg(int nError)
|
| Field Detail |
|---|
static final int receiverShouldbeBlocking
static final int receiverShouldbePolling
| Method Detail |
|---|
int open(Address_InterProcessComm dstAddress,
boolean shouldBlock)
dstAddress - The own address to which this interprocess-port is assigned.
This address is also used
when calling send() as information about the sender of the data.mode - Ones of the value 'receiverIsBlocking' or 'receiverIsBlocking'.
int close()
int send(byte[] data,
int nBytes,
Address_InterProcessComm addressee)
data - The data to be sent. The user should not touch the buffer after calling here.nBytes - The number of bytes to be send.addressee - The addressee, the receiver of the message. If it is a fix connection (TCP),
then this parameter should be null. It isn't used. The addressee is given
on #open(Address_InterProcessComm, int)-request.
byte[] receive(int[] result,
Address_InterProcessComm sender)
data - out:sender - Buffer for the sender of the message.result - result[0] = Nr of Bytes sendet, if >=0. If <0 its an error code.
byte[] receiveData(int[] nrofBytes,
byte[] buffer,
Address_InterProcessComm sender)
nrofBytes - buffer - sender -
void freeData(byte[] data)
data - The buffer delivered from receive!int checkConnection()
int capacityToSendWithoutBlocking(int nrofBytesToSend)
int dataAvailable()
int abortReceive()
java.lang.String getName()
Address_InterProcessComm getOwnAddress()
Address_InterProcessComm createAddress()
Address_InterProcessComm createAddress(int p1,
int p2)
Address_InterProcessComm createAddress(java.lang.String p1,
int p2)
Address_InterProcessComm createAddress(java.lang.String address)
boolean equals(Address_InterProcessComm address1P,
Address_InterProcessComm address2P)
address1 - The address to compare.address2 - The address to compare.
return true if the addresses describes the same communication slot. On Pc that is the same IP-Address and the same port.java.lang.String translateErrorMsg(int nError)
int flush()
byte[] getSendBuffer(int len)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||