41 #include <sys/types.h> 42 #include <sys/socket.h> 43 #include <netinet/in.h> 44 #include <arpa/inet.h> 53 #endif //WIN32 else LINUX 79 SOCKADDR_IN _socketAddr;
88 struct sockaddr_in _socketAddr;
90 #endif //WIN32 else LINUX 97 static char digit(
const int _val) {
98 return (
char)((int)
'0' + _val);
117 virtual int send(
const void* _buf,
int _size);
121 virtual int recv(
void* _buf,
int _size);
125 virtual int disconnect();
129 #endif //_CDLSOCKET_H_ virtual int recv(void *_buf, int _sz)=0
Pure function to receive data.
virtual int send(const void *_buf, int _sz)=0
Pure function to send data.
int _port
Port number of the KNI communication socket.
int _len
Length of the message.
Encapsulates the socket communication device.
char * _ipAddr
IP Address of the Robot or simulation environment.
static char digit(const int _val)
Converts an integer to a char.
Abstract base class for devices.
int _socketfd
File handler for the socket.