4#ifndef AUBO_SDK_SOCKET_INTERFACE_H
5#define AUBO_SDK_SOCKET_INTERFACE_H
11#include <aubo/global_config.h>
14namespace common_interface {
69 const std::string &socket_name =
"socket_0");
160 const std::string &socket_name =
"socket_0");
209 const std::string &socket_name =
"socket_0");
257 const std::string &socket_name =
"socket_0");
339 const std::string &socket_name =
"socket_0",
340 const std::string &prefix =
"",
341 const std::string &suffix =
"",
342 bool interpret_escape =
false);
391 const std::string &socket_name =
"socket_0");
520 const std::string &socket_name =
"socket_0");
570 const std::string &socket_name =
"socket_0");
603 const std::string &socket_name =
"socket_0");
bool socketHasConnected(const std::string &socket_name="socket_0")
Check if the socket is connected.
int socketClose(const std::string &socket_name="socket_0")
Closes TCP/IP socket communication Closes down the socket connection to the server.
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.
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 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 socketOpen(const std::string &address, int port, const std::string &socket_name="socket_0")
Open TCP/IP ethernet communication socket
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 socketReadByteList(int number, const std::string &variable, const std::string &socket_name="socket_0")
Reads a number of bytes from 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 socketSendByte(char value, const std::string &socket_name="socket_0")
Sends a byte to the server Sends the byte 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 AS...
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 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.
std::shared_ptr< Socket > SocketPtr