rogue
Loading...
Searching...
No Matches
XvcServer.h
Go to the documentation of this file.
1
18#ifndef __ROGUE_PROTOCOLS_XILINX_XVC_SERVER_H__
19#define __ROGUE_PROTOCOLS_XILINX_XVC_SERVER_H__
20#include "rogue/Directives.h"
21
22#include <atomic>
23#include <cstdint>
24
25#include "rogue/GeneralError.h"
26#include "rogue/Logging.h"
28
29namespace rogue {
30namespace protocols {
31namespace xilinx {
40class XvcServer {
41 private:
42 int sd_;
43 int wakeFd_; // shutdown wake-fd (read end), owned by Xvc
44 JtagDriver* drv_;
45 unsigned maxMsgSize_;
46 uint16_t port_; // kernel-assigned if ctor param was 0
47
48 public:
57 XvcServer(uint16_t port, int wakeFd, JtagDriver* drv, unsigned maxMsgSize = 32768);
58
66 virtual void run(std::atomic<bool>& threadEn, rogue::LoggingPtr log);
67
71 uint32_t getPort() const;
72
74 virtual ~XvcServer();
75};
76} // namespace xilinx
77} // namespace protocols
78} // namespace rogue
79
80#endif
Base transport driver for the AxisToJtag firmware protocol.
Definition JtagDriver.h:60
TCP listener for XVC client connections.
Definition XvcServer.h:40
virtual ~XvcServer()
Closes the listening socket and destroys server instance.
Definition XvcServer.cpp:83
virtual void run(std::atomic< bool > &threadEn, rogue::LoggingPtr log)
Runs accept loop; blocks in select() until accept-ready or wakeFd readable. Loop continues while thre...
Definition XvcServer.cpp:91
uint32_t getPort() const
Returns the TCP port the server is bound to (resolved if port==0 was requested).
Definition XvcServer.cpp:87
std::shared_ptr< rogue::Logging > LoggingPtr
Shared pointer alias for Logging.
Definition Logging.h:205