17#ifndef __ROGUE_INTERFACES_MEMORY_TCP_CLIENT_H__
18#define __ROGUE_INTERFACES_MEMORY_TCP_CLIENT_H__
27#include <condition_variable>
59 std::string respAddr_;
61 void* zmqCtx_ =
nullptr;
62 void* zmqReq_ =
nullptr;
63 void* zmqResp_ =
nullptr;
69 std::shared_ptr<rogue::Logging> bridgeLog_;
73 std::unique_ptr<std::thread> thread_;
74 std::atomic<bool> threadEn_{
false};
79 std::mutex bridgeMtx_;
83 std::condition_variable probeCond_;
87 std::string probeResult_;
88 bool waitReadyOnStart_;
108 static std::shared_ptr<rogue::interfaces::memory::TcpClient>
create(std::string addr, uint16_t port,
bool waitReady =
false);
146 [[deprecated(
"Use stop() instead")]]
void close();
166 bool waitReady(
double timeout,
double period);
183 void doTransaction(std::shared_ptr<rogue::interfaces::memory::Transaction> tran);
189typedef std::shared_ptr<rogue::interfaces::memory::TcpClient>
TcpClientPtr;
Memory TCP bridge client.
void close()
Closes bridge connections.
static std::shared_ptr< rogue::interfaces::memory::TcpClient > create(std::string addr, uint16_t port, bool waitReady=false)
Creates a TCP memory bridge client.
~TcpClient()
Destroys the TCP client and releases transport resources.
bool waitReady(double timeout, double period)
Wait for the remote TcpServer path to respond to a bridge probe.
void stop()
Stops the bridge interface and worker thread.
void start()
Managed-lifecycle startup hook.
static void setup_python()
Registers this type with Python bindings.
void doTransaction(std::shared_ptr< rogue::interfaces::memory::Transaction > tran)
Processes a transaction received from the upstream master.
std::shared_ptr< rogue::interfaces::memory::TcpClient > TcpClientPtr
Shared pointer alias for TcpClient.