|
| | Impl (Logger &logger, const std::string &hostname, uint16_t port) |
| | ~Impl () |
| Logger & | getLogger () |
| uint32_t | getEsiVersion () const |
| std::vector< uint8_t > | getCompressedManifest () const |
| bool | getChannelDesc (const std::string &name, RpcClient::ChannelDesc &desc) const |
| std::vector< RpcClient::ChannelDesc > | listChannels () const |
| void | writeToServer (const std::string &channelName, const MessageData &data) |
| bool | tryWriteToServer (const std::string &channelName, const std::vector< MessageData > &frames, bool force) |
| void | setToServerMaxInFlight (const std::string &channelName, unsigned maxInFlight) |
| std::unique_ptr< RpcClient::WriteChannelConnection > | connectServerSender (const std::string &channelName, RpcClient::SendFetchCallback fetch, RpcClient::SendErrorCallback onError) |
| std::unique_ptr< RpcClient::ReadChannelConnection > | connectClientReceiver (const std::string &channelName, RpcClient::ReadCallback callback, unsigned maxInFlight) |
| void | unsubscribe (uint64_t channelId) |
| void | unregisterCallback (uint64_t channelId) |
| void | notifySender (uint64_t channelId, WriteSenderEntry &entry) |
| void | unregisterSender (uint64_t channelId, const std::shared_ptr< WriteSenderEntry > &entry) |
|
| bool | runSender (uint64_t channelId, WriteSenderEntry &entry) |
| | Fetch and send messages for a sender while its channel has room and it has data, for up to MaxSendsPerTurn messages.
|
| void | onMessage (const ix::WebSocketMessagePtr &msg) |
| void | handleControlFrame (const std::string &text) |
| void | handleEvent (const json &frame) |
| void | handleBinaryFrame (const std::string &data) |
| void | failAllPending (const std::string &reason) |
| void | markConnectionLost () |
| | Wake every writer blocked on credits so it can observe the lost connection and throw.
|
| json | call (const std::string &method, json params) |
| | Issue a JSON-RPC style request and synchronously await the response.
|
| const ChannelMeta & | getToServerChannel (const std::string &channelName) const |
| | Look up a to-server channel by name, throwing if it isn't one.
|
| void | sendFrame (const ChannelMeta &meta, const MessageData &data) |
| | Send one data frame. Throws on a transport failure.
|
| void | markSenderReady (uint64_t channelId) |
| | Schedule a call to channel channelId's sender, if it has one.
|
| void | transportLoop () |
| void | sendConsumedEvent (const std::unordered_map< std::shared_ptr< ReadCallbackEntry >, uint64_t > &acks) |
| | Report acks (subscription -> count) of client-bound frames as consumed, leaving out canceled subscriptions.
|
Definition at line 54 of file RpcClient.cpp.
◆ OpenState
| enum class RpcClient::Impl::OpenState |
|
strongprivate |
◆ Impl()
◆ ~Impl()
◆ call()
| json esi::backends::cosim::RpcClient::Impl::call |
( |
const std::string & | method, |
|
|
json | params ) |
|
private |
◆ connectClientReceiver()
◆ connectServerSender()
◆ failAllPending()
| void esi::backends::cosim::RpcClient::Impl::failAllPending |
( |
const std::string & | reason | ) |
|
|
private |
◆ getChannelDesc()
| bool esi::backends::cosim::RpcClient::Impl::getChannelDesc |
( |
const std::string & | name, |
|
|
RpcClient::ChannelDesc & | desc ) const |
◆ getCompressedManifest()
| std::vector< uint8_t > esi::backends::cosim::RpcClient::Impl::getCompressedManifest |
( |
| ) |
const |
|
inline |
◆ getEsiVersion()
| uint32_t esi::backends::cosim::RpcClient::Impl::getEsiVersion |
( |
| ) |
const |
|
inline |
◆ getLogger()
| Logger & esi::backends::cosim::RpcClient::Impl::getLogger |
( |
| ) |
|
|
inline |
◆ getToServerChannel()
| const ChannelMeta & esi::backends::cosim::RpcClient::Impl::getToServerChannel |
( |
const std::string & | channelName | ) |
const |
|
private |
Look up a to-server channel by name, throwing if it isn't one.
◆ handleBinaryFrame()
◆ handleControlFrame()
◆ handleEvent()
◆ listChannels()
◆ markConnectionLost()
| void esi::backends::cosim::RpcClient::Impl::markConnectionLost |
( |
| ) |
|
|
private |
Wake every writer blocked on credits so it can observe the lost connection and throw.
◆ markSenderReady()
| void esi::backends::cosim::RpcClient::Impl::markSenderReady |
( |
uint64_t | channelId | ) |
|
|
private |
Schedule a call to channel channelId's sender, if it has one.
◆ notifySender()
| void esi::backends::cosim::RpcClient::Impl::notifySender |
( |
uint64_t | channelId, |
|
|
WriteSenderEntry & | entry ) |
|
inline |
◆ onMessage()
| void esi::backends::cosim::RpcClient::Impl::onMessage |
( |
const ix::WebSocketMessagePtr & | msg | ) |
|
|
private |
◆ runSender()
| bool esi::backends::cosim::RpcClient::Impl::runSender |
( |
uint64_t | channelId, |
|
|
WriteSenderEntry & | entry ) |
|
private |
Fetch and send messages for a sender while its channel has room and it has data, for up to MaxSendsPerTurn messages.
Returns true if it should be called again. Called on the transport thread, holding entry.mutex.
◆ sendConsumedEvent()
Report acks (subscription -> count) of client-bound frames as consumed, leaving out canceled subscriptions.
◆ sendFrame()
| void esi::backends::cosim::RpcClient::Impl::sendFrame |
( |
const ChannelMeta & | meta, |
|
|
const MessageData & | data ) |
|
private |
Send one data frame. Throws on a transport failure.
◆ setToServerMaxInFlight()
| void esi::backends::cosim::RpcClient::Impl::setToServerMaxInFlight |
( |
const std::string & | channelName, |
|
|
unsigned | maxInFlight ) |
◆ transportLoop()
◆ tryWriteToServer()
| bool esi::backends::cosim::RpcClient::Impl::tryWriteToServer |
( |
const std::string & | channelName, |
|
|
const std::vector< MessageData > & | frames, |
|
|
bool | force ) |
◆ unregisterCallback()
| void esi::backends::cosim::RpcClient::Impl::unregisterCallback |
( |
uint64_t | channelId | ) |
|
◆ unregisterSender()
| void esi::backends::cosim::RpcClient::Impl::unregisterSender |
( |
uint64_t | channelId, |
|
|
const std::shared_ptr< WriteSenderEntry > & | entry ) |
◆ unsubscribe()
| void esi::backends::cosim::RpcClient::Impl::unsubscribe |
( |
uint64_t | channelId | ) |
|
◆ writeToServer()
| void esi::backends::cosim::RpcClient::Impl::writeToServer |
( |
const std::string & | channelName, |
|
|
const MessageData & | data ) |
◆ ackMutex
| std::mutex esi::backends::cosim::RpcClient::Impl::ackMutex |
|
private |
◆ channelsById
| std::unordered_map<uint64_t, ChannelMeta> esi::backends::cosim::RpcClient::Impl::channelsById |
|
private |
◆ channelsByName
| std::unordered_map<std::string, ChannelMeta> esi::backends::cosim::RpcClient::Impl::channelsByName |
|
private |
◆ channelTablesReady
| std::atomic<bool> esi::backends::cosim::RpcClient::Impl::channelTablesReady {false} |
|
private |
◆ connectionLost
| std::atomic<bool> esi::backends::cosim::RpcClient::Impl::connectionLost {false} |
|
private |
◆ disconnecting
| std::atomic<bool> esi::backends::cosim::RpcClient::Impl::disconnecting {false} |
|
private |
◆ esiVersion
◆ faultStash
◆ host
| std::string esi::backends::cosim::RpcClient::Impl::host |
|
private |
◆ lastServerError
| std::string esi::backends::cosim::RpcClient::Impl::lastServerError |
|
private |
◆ lastServerErrorMutex
| std::mutex esi::backends::cosim::RpcClient::Impl::lastServerErrorMutex |
|
private |
◆ logger
| Logger& esi::backends::cosim::RpcClient::Impl::logger |
|
private |
◆ manifest
| std::vector<uint8_t> esi::backends::cosim::RpcClient::Impl::manifest |
|
private |
◆ nextRequestId
| std::atomic<uint64_t> esi::backends::cosim::RpcClient::Impl::nextRequestId {1} |
|
private |
◆ openCV
| std::condition_variable esi::backends::cosim::RpcClient::Impl::openCV |
|
private |
◆ openError
| std::string esi::backends::cosim::RpcClient::Impl::openError |
|
private |
◆ openMutex
| std::mutex esi::backends::cosim::RpcClient::Impl::openMutex |
|
private |
◆ Pending
| enum RpcClient::Impl::OpenState esi::backends::cosim::RpcClient::Impl::Pending |
|
private |
◆ pending
| std::unordered_map<uint64_t, std::shared_ptr<std::promise<json> > > esi::backends::cosim::RpcClient::Impl::pending |
|
private |
◆ pendingMutex
| std::mutex esi::backends::cosim::RpcClient::Impl::pendingMutex |
|
private |
◆ readCallbacks
| std::unordered_map<uint64_t, std::shared_ptr<ReadCallbackEntry> > esi::backends::cosim::RpcClient::Impl::readCallbacks |
|
private |
◆ readCallbacksMutex
| std::mutex esi::backends::cosim::RpcClient::Impl::readCallbacksMutex |
|
private |
◆ readyIds
◆ transportThread
◆ writeCredits
| std::unordered_map<uint64_t, std::unique_ptr<WriteCredit> > esi::backends::cosim::RpcClient::Impl::writeCredits |
|
private |
◆ writeSenders
| std::unordered_map<uint64_t, std::shared_ptr<WriteSenderEntry> > esi::backends::cosim::RpcClient::Impl::writeSenders |
|
private |
◆ writeSendersMutex
| std::mutex esi::backends::cosim::RpcClient::Impl::writeSendersMutex |
|
private |
◆ ws
| ix::WebSocket esi::backends::cosim::RpcClient::Impl::ws |
|
private |
The documentation for this class was generated from the following file:
- /home/runner/work/circt-www/circt-www/circt_src/lib/Dialect/ESI/runtime/cpp/lib/backends/RpcClient.cpp