47#include <sys/socket.h>
51#include "rmw/error_handling.h"
55#define MAX_PACKET_LENGTH 512
57#define ADDRESS "127.0.0.1"
59#define START_MARKER 0b10011001
60#define END_MARKER 0b01010101
61#define BYTE_MASK 0b11111111
98 static int _client_fd;
99 static std::queue<std::vector<uint8_t>> _rx_packets;
100 static std::queue<std::vector<uint8_t>> _tx_packets;
102 void socket_rx_communication();
103 void socket_tx_communication();
Definition TcpDaemon.h:64
static void enqueue_packet(std::vector< uint8_t > packet)
Enqueue a packet in the _tx_packets member as vector of bytes.
Definition TcpDaemon.cpp:58
bool init(int port)
Initialize the socket communication.
Definition TcpDaemon.cpp:11
static std::vector< uint8_t > read_packet()
Read a packet from the _rx_packets member as vector of bytes.
Definition TcpDaemon.cpp:47