18#ifndef __ROGUE_PROTOCOLS_XILINX_XVC_CONNECTION_H__
19#define __ROGUE_PROTOCOLS_XILINX_XVC_CONNECTION_H__
22#include <netinet/in.h>
23#include <sys/socket.h>
46 struct sockaddr_in peer_{};
52 uint8_t* rp_ =
nullptr;
53 std::vector<uint8_t> rxb_;
57 std::vector<uint8_t> txb_;
81 virtual void fill(uint64_t n);
93 virtual void bump(uint64_t n);
115 ssize_t
readTo(
void* buf,
size_t count);
Base transport driver for the AxisToJtag firmware protocol.
Manages one TCP client connection speaking the XVC protocol.
ssize_t readTo(void *buf, size_t count)
Reads up to count bytes, blocking in select() until either data is available on the peer socket OR th...
virtual void flush()
Flushes pending TX buffer bytes to socket.
virtual void fill(uint64_t n)
Ensures at least n bytes are available in RX buffer.
virtual void run()
Runs command processing loop for this connection.
virtual ~XvcConnection()
Closes this XVC TCP sub-connection.
virtual void bump(uint64_t n)
Marks n RX bytes as consumed.
int lastErrno() const
Returns errno from the most recent readTo() failure (-2 return).
virtual void allocBufs()
Allocates/reinitializes internal RX/TX buffers.