CIRCT
19.0.0git
|
#include <CapnpThreads.h>
Public Member Functions | |
void | run (uint16_t port) |
Start and stop the server thread. More... | |
void | setManifest (unsigned int esiVersion, const std::vector< uint8_t > &manifest) |
bool | registerEndpoint (std::string epId, std::string fromHostTypeId, std::string toHostTypeId) |
Public Member Functions inherited from esi::cosim::CapnpCosimThread | |
CapnpCosimThread () | |
~CapnpCosimThread () | |
void | stop () |
Stop the thread. More... | |
Endpoint * | getEndpoint (std::string epId) |
LowLevel * | getLowLevel () |
bool | getCompressedManifest (unsigned int &esiVersion, std::vector< uint8_t > &manifest) |
Private Member Functions | |
void | mainLoop (uint16_t port) |
The thread's main loop function. Exits on shutdown. More... | |
Additional Inherited Members | |
Protected Types inherited from esi::cosim::CapnpCosimThread | |
using | Lock = std::lock_guard< std::mutex > |
Protected Member Functions inherited from esi::cosim::CapnpCosimThread | |
void | loop (kj::WaitScope &waitScope, std::function< void()> poll) |
Start capnp polling loop. More... | |
Protected Attributes inherited from esi::cosim::CapnpCosimThread | |
EndpointRegistry | endpoints |
LowLevel | lowLevelBridge |
std::thread * | myThread |
volatile bool | stopSig |
std::mutex | m |
unsigned int | esiVersion = -1 |
std::vector< uint8_t > | compressedManifest |
The main RpcServer.
Does not implement any capnp RPC interfaces but contains the capnp main RPC server. We run the capnp server in its own thread to be more responsive to network traffic and so as to not slow down the simulation.
Definition at line 80 of file CapnpThreads.h.
|
private |
The thread's main loop function. Exits on shutdown.
Definition at line 255 of file Server.cpp.
References esi::cosim::CapnpCosimThread::compressedManifest, esi::cosim::CapnpCosimThread::endpoints, esi::cosim::CapnpCosimThread::esiVersion, esi::cosim::CapnpCosimThread::loop(), esi::cosim::CapnpCosimThread::lowLevelBridge, and writePort().
Referenced by run().
|
inline |
Definition at line 91 of file CapnpThreads.h.
References esi::cosim::CapnpCosimThread::endpoints, and esi::cosim::EndpointRegistry::registerEndpoint().
Referenced by sv2cCosimserverEpRegister().
void RpcServer::run | ( | uint16_t | port | ) |
Start and stop the server thread.
Start the server if not already started.
Definition at line 272 of file Server.cpp.
References esi::cosim::CapnpCosimThread::m, mainLoop(), and esi::cosim::CapnpCosimThread::myThread.
Referenced by sv2cCosimserverInit().
|
inline |
Definition at line 85 of file CapnpThreads.h.
References esi::cosim::CapnpCosimThread::compressedManifest, and esi::cosim::CapnpCosimThread::esiVersion.
Referenced by sv2cCosimserverSetManifest().