CIRCT  20.0.0git
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 ()
 
void setManifest (int esiVersion, const std::vector< uint8_t > &compressedManifest)
 Set the manifest and version. More...
 
ReadChannelPortregisterReadPort (const std::string &name, const std::string &type)
 Register a read or write port which communicates over RPC. More...
 
WriteChannelPortregisterWritePort (const std::string &name, const std::string &type)
 
void stop ()
 
void run (int port)
 

Private Attributes

Implimpl = nullptr
 

Detailed Description

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

Definition at line 25 of file RpcServer.h.

Constructor & Destructor Documentation

◆ ~RpcServer()

RpcServer::~RpcServer ( )

Definition at line 354 of file RpcServer.cpp.

References impl.

Member Function Documentation

◆ 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 362 of file RpcServer.cpp.

References impl, and esi::cosim::RpcServer::Impl::registerReadPort().

◆ registerWritePort()

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

Definition at line 366 of file RpcServer.cpp.

References impl, and esi::cosim::RpcServer::Impl::registerWritePort().

◆ run()

void RpcServer::run ( int  port)

Definition at line 370 of file RpcServer.cpp.

References 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 358 of file RpcServer.cpp.

References impl, and esi::cosim::RpcServer::Impl::setManifest().

◆ stop()

void RpcServer::stop ( )

Definition at line 371 of file RpcServer.cpp.

References assert(), impl, and esi::cosim::RpcServer::Impl::stop().

Member Data Documentation

◆ impl

Impl* esi::cosim::RpcServer::impl = nullptr
private

Definition at line 49 of file RpcServer.h.

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


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