KatanaNativeInterface
$VERSION$
|
Go to the documentation of this file.
41 #include <sys/types.h>
42 #include <sys/socket.h>
43 #include <netinet/in.h>
44 #include <arpa/inet.h>
49 #endif //WIN32 else LINUX
75 SOCKADDR_IN _socketAddr;
84 struct sockaddr_in _socketAddr;
86 #endif //WIN32 else LINUX
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);
125 #endif //_CDLSOCKET_H_
static char digit(const int _val)
Converts an integer to a char.
virtual int send(const void *_buf, int _size)
Sends data to the socket.
int _socketfd
File handler for the socket.
char * _ipAddr
IP Address of the Robot or simulation environment.
Abstract base class for devices.
virtual int recv(void *_buf, int _size)
Receives data from the socket.
CCdlSocket(char *adress, int port)
Constructs a CCdlSocket object.
int _port
Port number of the KNI communication socket.
int _len
Length of the message.
Encapsulates the socket communication device.
virtual int disconnect()
Terminates the socket connection.
virtual ~CCdlSocket()
Destructs the object.