41 #include <sys/types.h>
42 #include <sys/socket.h>
43 #include <netinet/in.h>
44 #include <arpa/inet.h>
75 SOCKADDR_IN _socketAddr;
84 struct sockaddr_in _socketAddr;
93 static char digit(
const int _val) {
94 return (
char)((int)
'0' + _val);
113 virtual int send(
const void* _buf,
int _size);
117 virtual int recv(
void* _buf,
int _size);
Abstract base class for devices.
Encapsulates the socket communication device.
virtual int recv(void *_buf, int _size)
Receives data from the socket.
int _len
Length of the message.
virtual int disconnect()
Terminates the socket connection.
CCdlSocket(char *adress, int port)
Constructs a CCdlSocket object.
int _socketfd
File handler for the socket.
virtual ~CCdlSocket()
Destructs the object.
virtual int send(const void *_buf, int _size)
Sends data to the socket.
char * _ipAddr
IP Address of the Robot or simulation environment.
int _port
Port number of the KNI communication socket.
static char digit(const int _val)
Converts an integer to a char.