com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib
Class AfLocalNativeMethods

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.AfLocalNativeMethods

public final class AfLocalNativeMethods
extends Object

Contains native methods used by the connection lib to access local sockets.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Method Summary
static int acceptClient(int serverSocket)
          Accepts a client on a server socket.
static int closeSocket(int socket)
          Closes the given socket.
static int connectSocket(int clientSocket, String address)
          Connects a socket to a given address.
static String getSocketAddress(int socket)
          Gets the socket address of the given socket.
static int openClientSocket()
          Opens a client socket.
static int openServerSocket()
          Opens a server socket.
static int receiveMessageFromSocket(int clientSocket, byte[] messageBuffer)
          Receives a message from a socket.
static int sendMessageOverSocket(int clientSocket, byte[] messageBuffer, int length)
          Sets some bytes (a message) over the given socket.
static int setSocketTimeout(int socket, int timeoutMillis)
          Sets a socket timeout for a socket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sendMessageOverSocket

public static int sendMessageOverSocket(int clientSocket,
                                        byte[] messageBuffer,
                                        int length)
Sets some bytes (a message) over the given socket.

Parameters:
clientSocket - The socket id over which the message will be sent (obtained by openClientSocket).
messageBuffer - The bytearray containing the message. Sending will start at index 0.
length - The amount of bytes which should be sent.
Returns:
The send return code.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

receiveMessageFromSocket

public static int receiveMessageFromSocket(int clientSocket,
                                           byte[] messageBuffer)
Receives a message from a socket.

Parameters:
clientSocket - The socket over which the message will be received (obtained by openClientSocket).
messageBuffer - The message buffer into which the message will be received.
Returns:
The return code of receive.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

openServerSocket

public static int openServerSocket()
Opens a server socket.

Returns:
The server socket id.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

closeSocket

public static int closeSocket(int socket)
Closes the given socket.

Parameters:
socket - The socket to close.
Returns:
The return code of the close operation.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

acceptClient

public static int acceptClient(int serverSocket)
Accepts a client on a server socket. Blocks until a timout occurs or a client connected.

Parameters:
serverSocket - The server socket on which we will accept the client.
Returns:
The accepted client id.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getSocketAddress

public static String getSocketAddress(int socket)
Gets the socket address of the given socket.

Parameters:
socket - The socket for which we want the address.
Returns:
The address string of the socket.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

openClientSocket

public static int openClientSocket()
Opens a client socket.

Returns:
The client socket id.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

connectSocket

public static int connectSocket(int clientSocket,
                                String address)
Connects a socket to a given address.

Parameters:
clientSocket - The socket which we want to connect.
address - The address to which we want to connect.
Returns:
The return code of the connect operation.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

setSocketTimeout

public static int setSocketTimeout(int socket,
                                   int timeoutMillis)
Sets a socket timeout for a socket.

Parameters:
socket - The socket for which we will set the timeout.
timeoutMillis - The timeout millis.
Returns:
The return code of the setTimeout operation.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.