AUBO SDK  0.26.0
arcs::common_interface::Socket Class Reference

#include <socket.h>

Public Member Functions

 Socket ()
virtual ~Socket ()
int socketOpen (const std::string &address, int port, const std::string &socket_name="socket_0")
 Open TCP/IP ethernet communication socket
int socketClose (const std::string &socket_name="socket_0")
 Closes TCP/IP socket communication Closes down the socket connection to the server.
int socketReadAsciiFloat (int number, const std::string &variable, const std::string &socket_name="socket_0")
 Reads a number of ascii formatted floats from the socket.
int socketReadBinaryInteger (int number, const std::string &variable, const std::string &socket_name="socket_0")
 Reads a number of 32 bit integers from the socket.
int socketReadByteList (int number, const std::string &variable, const std::string &socket_name="socket_0")
 Reads a number of bytes from the socket.
int socketReadString (const std::string &variable, const std::string &socket_name="socket_0", const std::string &prefix="", const std::string &suffix="", bool interpret_escape=false)
 Reads all data from the socket and returns the data as a string.
int socketReadAllString (const std::string &variable, const std::string &socket_name="socket_0")
 Reads all data from the socket and returns the data as a vector of chars.
int socketSendByte (char value, const std::string &socket_name="socket_0")
 Sends a byte to the server Sends the byte through the socket.
int socketSendInt (int value, const std::string &socket_name="socket_0")
 Sends an int (int32_t) to the server Sends the int through the socket.
int socketSendLine (const std::string &str, const std::string &socket_name="socket_0")
 Sends a string with a newline character to the server Sends the string <str> through the socket in ASCII coding.
int socketSendString (const std::string &str, const std::string &socket_name="socket_0")
 Sends a string to the server Sends the string <str> through the socket in ASCII coding.
int socketSendAllString (bool is_check, const std::vector< char > &str, const std::string &socket_name="socket_0")
 Sends all data in the given vector of chars to the server.
bool socketHasConnected (const std::string &socket_name="socket_0")
 Check if the socket is connected.

Protected Attributes

void * d_

Detailed Description

Definition at line 22 of file socket.h.

Constructor & Destructor Documentation

◆ Socket()

arcs::common_interface::Socket::Socket ( )

◆ ~Socket()

virtual arcs::common_interface::Socket::~Socket ( )
virtual

Member Data Documentation

◆ d_

void* arcs::common_interface::Socket::d_
protected

Definition at line 640 of file socket.h.


The documentation for this class was generated from the following file: