|
rogue
|
Manages one TCP client connection speaking the XVC protocol. More...
#include <XvcConnection.h>
Public Member Functions | |
| XvcConnection (int sd, JtagDriver *drv, uint64_t maxVecLen_=32768) | |
| Accepts and initializes a new XVC TCP sub-connection. | |
| virtual void | fill (uint64_t n) |
Ensures at least n bytes are available in RX buffer. | |
| virtual void | flush () |
| Flushes pending TX buffer bytes to socket. | |
| virtual void | bump (uint64_t n) |
Marks n RX bytes as consumed. | |
| virtual void | allocBufs () |
| Allocates/reinitializes internal RX/TX buffers. | |
| virtual void | run () |
| Runs command processing loop for this connection. | |
| ssize_t | readTo (void *buf, size_t count) |
Reads up to count bytes with timeout. | |
| virtual | ~XvcConnection () |
| Closes this XVC TCP sub-connection. | |
Manages one TCP client connection speaking the XVC protocol.
XvcConnection parses XVC commands (getinfo, settck, shift) from a connected socket, dispatches JTAG operations through JtagDriver, and sends protocol responses back to the TCP client.
Definition at line 41 of file XvcConnection.h.
| rogue::protocols::xilinx::XvcConnection::XvcConnection | ( | int | sd, |
| JtagDriver * | drv, | ||
| uint64_t | maxVecLen = 32768 |
||
| ) |
Accepts and initializes a new XVC TCP sub-connection.
| sd | Listening socket descriptor. |
| drv | Driver used to execute JTAG operations. |
| maxVecLen | Maximum vector length in bytes accepted from client. |
Description:
This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms
Definition at line 29 of file XvcConnection.cpp.
|
virtual |
Closes this XVC TCP sub-connection.
Definition at line 48 of file XvcConnection.cpp.
|
virtual |
Allocates/reinitializes internal RX/TX buffers.
Definition at line 102 of file XvcConnection.cpp.
|
virtual |
Marks n RX bytes as consumed.
| n | Number of bytes to consume. |
Definition at line 94 of file XvcConnection.cpp.
|
virtual |
Ensures at least n bytes are available in RX buffer.
| n | Required number of bytes. |
Definition at line 74 of file XvcConnection.cpp.
|
virtual |
Flushes pending TX buffer bytes to socket.
Definition at line 134 of file XvcConnection.cpp.
| ssize_t rogue::protocols::xilinx::XvcConnection::readTo | ( | void * | buf, |
| size_t | count | ||
| ) |
Reads up to count bytes with timeout.
| buf | Destination buffer. |
| count | Maximum bytes to read. |
0 on timeout/no data. Definition at line 52 of file XvcConnection.cpp.
|
virtual |
Runs command processing loop for this connection.
Definition at line 148 of file XvcConnection.cpp.