Class IConnection
Defined in File friConnectionIf.h
Inheritance Relationships
Derived Type
public KUKA::FRI::UdpConnection
(Class UdpConnection)
Class Documentation
-
class IConnection
FRI connection interface.
Connections to the KUKA Sunrise controller have to be implemented using this interface.
Subclassed by KUKA::FRI::UdpConnection
Public Functions
-
inline virtual ~IConnection()
Virtual destructor.
-
virtual bool open(int port, const char *remoteHost) = 0
Open a connection to the KUKA Sunrise controller.
- Parameters:
port – The port ID
remoteHost – The address of the remote host
- Returns:
True if connection was established
-
virtual void close() = 0
Close a connection to the KUKA Sunrise controller.
-
virtual bool isOpen() const = 0
Checks whether a connection to the KUKA Sunrise controller is established.
- Returns:
True if connection is established
-
virtual int receive(char *buffer, int maxSize) = 0
Receive a new FRI monitoring message from the KUKA Sunrise controller.
This method blocks until a new message arrives.
- Parameters:
buffer – Pointer to the allocated buffer that will hold the FRI message
maxSize – Size in bytes of the allocated buffer
- Returns:
Number of bytes received (0 when connection was terminated, negative in case of errors)
-
virtual bool send(const char *buffer, int size) = 0
Send a new FRI command message to the KUKA Sunrise controller.
- Parameters:
buffer – Pointer to the buffer holding the FRI message
size – Size in bytes of the message to be send
- Returns:
True if successful
-
inline virtual ~IConnection()