CIRCT 22.0.0git
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
esi::cosim::RpcServer Class Reference

TODO: make this a proper backend (as much as possible). More...

#include <RpcServer.h>

Collaboration diagram for esi::cosim::RpcServer:
Collaboration graph
[legend]

Classes

class  Impl
 

Public Member Functions

 RpcServer (Context &ctxt)
 
 ~RpcServer ()
 
ContextgetContext ()
 Get the context.
 
void setManifest (int esiVersion, const std::vector< uint8_t > &compressedManifest)
 Set the manifest and version.
 
ReadChannelPortregisterReadPort (const std::string &name, const std::string &type)
 Register a read or write port which communicates over RPC.
 
WriteChannelPortregisterWritePort (const std::string &name, const std::string &type)
 
void stop ()
 
void run (int port=-1)
 
int getPort ()
 

Private Attributes

Contextctxt
 
std::unique_ptr< Implimpl
 

Detailed Description

TODO: make this a proper backend (as much as possible).

Definition at line 26 of file RpcServer.h.

Constructor & Destructor Documentation

◆ RpcServer()

RpcServer::RpcServer ( Context ctxt)

Definition at line 362 of file RpcServer.cpp.

◆ ~RpcServer()

RpcServer::~RpcServer ( )
default

Member Function Documentation

◆ getContext()

Context & esi::cosim::RpcServer::getContext ( )
inline

Get the context.

Definition at line 32 of file RpcServer.h.

References ctxt.

◆ getPort()

int RpcServer::getPort ( )

Definition at line 395 of file RpcServer.cpp.

References impl.

◆ registerReadPort()

ReadChannelPort & RpcServer::registerReadPort ( const std::string &  name,
const std::string &  type 
)

Register a read or write port which communicates over RPC.

Definition at line 373 of file RpcServer.cpp.

References impl.

◆ registerWritePort()

WriteChannelPort & RpcServer::registerWritePort ( const std::string &  name,
const std::string &  type 
)

Definition at line 380 of file RpcServer.cpp.

References impl.

◆ run()

void RpcServer::run ( int  port = -1)

Definition at line 384 of file RpcServer.cpp.

References ctxt, and impl.

◆ setManifest()

void RpcServer::setManifest ( int  esiVersion,
const std::vector< uint8_t > &  compressedManifest 
)

Set the manifest and version.

There is a race condition here in that the RPC server can be started and a connection from the client could happen before the manifest is set. TODO: rework the DPI API to require that the manifest gets set first.

Definition at line 365 of file RpcServer.cpp.

References impl.

◆ stop()

void RpcServer::stop ( )

Definition at line 389 of file RpcServer.cpp.

References impl.

Member Data Documentation

◆ ctxt

Context& esi::cosim::RpcServer::ctxt
private

◆ impl

std::unique_ptr<Impl> esi::cosim::RpcServer::impl
private

Definition at line 61 of file RpcServer.h.

Referenced by getPort(), registerReadPort(), registerWritePort(), run(), setManifest(), and stop().


The documentation for this class was generated from the following files: