XvcConnection
For conceptual guidance, see Xilinx Protocols.
The class description is shown below:
-
class XvcConnection
[header] Manages one TCP client connection speaking the XVC protocol.
XvcConnectionparses XVC commands (getinfo,settck,shift) from a connected socket, dispatches JTAG operations throughJtagDriver, and sends protocol responses back to the TCP client.Public Functions
-
XvcConnection(int sd, int wakeFd, JtagDriver *drv, uint64_t maxVecLen = 32768)
[header] [impl] Accepts and initializes a new XVC TCP sub-connection.
Company : SLAC National Accelerator Laboratory
Description: JTAG support
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 contained in the LICENSE.txt file.
- Parameters:
sd – Listening socket descriptor.
wakeFd – Shutdown self-pipe read fd; when readable, readTo() returns -1 to break out of the blocking select(). Pass -1 to disable the wake path (non-production).
drv – Driver used to execute JTAG operations.
maxVecLen – Maximum vector length in bytes accepted from client.
-
virtual void fill(uint64_t n)
[header] [impl] Ensures at least
nbytes are available in RX buffer.- Parameters:
n – Required number of bytes.
-
virtual void bump(uint64_t n)
[header] [impl] Marks
nRX bytes as consumed.- Parameters:
n – Number of bytes to consume.
-
ssize_t readTo(void *buf, size_t count)
[header] [impl] Reads up to
countbytes, blocking in select() until either data is available on the peer socket OR the shutdown wakeFd becomes readable.- Parameters:
buf – Destination buffer.
count – Maximum bytes to read.
- Returns:
>0 on bytes read; 0 on peer EOF; -1 on shutdown; -2 on select/read error (errno captured in lastErrno()).
-
XvcConnection(int sd, int wakeFd, JtagDriver *drv, uint64_t maxVecLen = 32768)