CIRCT
20.0.0git
|
Public Member Functions | |
Impl (int port) | |
Start a server on the given port. -1 means to let the OS pick a port. More... | |
~Impl () | |
void | setManifest (int esiVersion, const std::vector< uint8_t > &compressedManifest) |
ReadChannelPort & | registerReadPort (const std::string &name, const std::string &type) |
WriteChannelPort & | registerWritePort (const std::string &name, const std::string &type) |
void | stop () |
ServerUnaryReactor * | GetManifest (CallbackServerContext *context, const VoidMessage *, Manifest *response) override |
ServerUnaryReactor * | ListChannels (CallbackServerContext *, const VoidMessage *, ListOfChannels *channelsOut) override |
Load the list of channels into the response and fire it off. More... | |
ServerWriteReactor< esi::cosim::Message > * | ConnectToClientChannel (CallbackServerContext *context, const ChannelDesc *request) override |
When a client sends a message to a read port (write port on this end), start streaming messages until the client calls uncle and requests a cancellation. More... | |
ServerUnaryReactor * | SendToServer (CallbackServerContext *context, const esi::cosim::AddressedMessage *request, esi::cosim::VoidMessage *response) override |
When a client sends a message to a write port (a read port on this end), simply locate the associated port, and write that message into its queue. More... | |
Private Attributes | |
int | esiVersion |
std::vector< uint8_t > | compressedManifest |
std::map< std::string, std::unique_ptr< RpcServerReadPort > > | readPorts |
std::map< std::string, std::unique_ptr< RpcServerWritePort > > | writePorts |
std::unique_ptr< Server > | server |
Definition at line 49 of file RpcServer.cpp.
Impl::Impl | ( | int | port | ) |
Start a server on the given port. -1 means to let the OS pick a port.
Definition at line 141 of file RpcServer.cpp.
References server, and writePort().
Impl::~Impl | ( | ) |
Definition at line 169 of file RpcServer.cpp.
|
override |
When a client sends a message to a read port (write port on this end), start streaming messages until the client calls uncle and requests a cancellation.
Definition at line 318 of file RpcServer.cpp.
References writePorts.
|
override |
Definition at line 189 of file RpcServer.cpp.
References compressedManifest, and esiVersion.
|
override |
Load the list of channels into the response and fire it off.
Definition at line 200 of file RpcServer.cpp.
References readPorts, and writePorts.
ReadChannelPort & Impl::registerReadPort | ( | const std::string & | name, |
const std::string & | type | ||
) |
Definition at line 174 of file RpcServer.cpp.
References readPorts.
Referenced by esi::cosim::RpcServer::registerReadPort().
WriteChannelPort & Impl::registerWritePort | ( | const std::string & | name, |
const std::string & | type | ||
) |
Definition at line 181 of file RpcServer.cpp.
References writePorts.
Referenced by esi::cosim::RpcServer::registerWritePort().
|
override |
When a client sends a message to a write port (a read port on this end), simply locate the associated port, and write that message into its queue.
Definition at line 333 of file RpcServer.cpp.
References readPorts.
|
inline |
Definition at line 59 of file RpcServer.cpp.
References compressedManifest, and esiVersion.
Referenced by esi::cosim::RpcServer::setManifest().
void Impl::stop | ( | ) |
Definition at line 156 of file RpcServer.cpp.
References readPorts, server, and writePorts.
Referenced by esi::cosim::RpcServer::stop(), and ~Impl().
|
private |
Definition at line 90 of file RpcServer.cpp.
Referenced by GetManifest(), and setManifest().
|
private |
Definition at line 89 of file RpcServer.cpp.
Referenced by GetManifest(), and setManifest().
|
private |
Definition at line 91 of file RpcServer.cpp.
Referenced by ListChannels(), registerReadPort(), SendToServer(), and stop().
|
private |
Definition at line 94 of file RpcServer.cpp.
|
private |
Definition at line 92 of file RpcServer.cpp.
Referenced by ConnectToClientChannel(), ListChannels(), registerWritePort(), and stop().