|
CIRCT 23.0.0git
|
Instantiated when a backend does not know how to create a read channel. More...
#include <Ports.h>


Public Member Functions | |
| UnknownReadChannelPort (const Type *type, std::string errmsg) | |
| void | connect (ReadCallback callback, const ConnectOptions &options=ConnectOptions()) override |
| void | connect (FlatReadCallback callback, const ConnectOptions &options=ConnectOptions()) override |
Connect a compatibility callback which receives flattened MessageData objects. | |
| void | connect (const ConnectOptions &options=ConnectOptions()) override |
| Connect to the channel in polling mode. | |
| std::future< MessageData > | readAsync () override |
| Asynchronous polling read. | |
Public Member Functions inherited from esi::ReadChannelPort | |
| ReadChannelPort (const Type *type) | |
| virtual void | disconnect () override |
| Disconnect the channel. | |
| virtual bool | isConnected () const override |
| virtual void | read (MessageData &outData) |
| Specify a buffer to read into. | |
| void | setMaxDataQueueMsgs (uint64_t maxMsgs) |
| Set maximum number of messages to store in the dataQueue. | |
Public Member Functions inherited from esi::ChannelPort | |
| ChannelPort (const Type *type) | |
| virtual | ~ChannelPort () |
| bool | poll () |
| Poll for incoming data. | |
| size_t | getFrameSizeBytes () const |
| Get the size of each frame in bytes. | |
| const Type * | getType () const |
| const WindowType * | getWindowType () const |
If this port carries a windowed type, return the original WindowType (whose intoType is what getType() returns). | |
Protected Attributes | |
| std::string | errmsg |
Protected Attributes inherited from esi::ReadChannelPort | |
| volatile Mode | mode |
| std::unique_ptr< SegmentedMessageData > | translatedMessage |
| If a translated message has been assembled but not yet consumed, retain ownership here so retries present the same message object. | |
| std::vector< uint8_t > | translationBuffer |
| Window translation support. | |
| size_t | nextFrameIndex = 0 |
| Index of the next expected frame (for multi-frame windows). | |
| std::vector< uint8_t > | listDataBuffer |
| For list fields: accumulated list data across frames. | |
| bool | accumulatingListData = false |
| Flag to track whether we're in the middle of accumulating list data. | |
| uint64_t | maxDataQueueMsgs = DefaultMaxDataQueueMsgs |
| std::optional< detail::PollingBuffer< MessageData > > | pollingState |
| std::mutex | callbackMutex |
| Synchronizes callback revocation during disconnect. | |
| std::condition_variable | callbackCv |
| size_t | activeCallbacks = 0 |
Protected Attributes inherited from esi::ChannelPort | |
| const Type * | type |
| std::unique_ptr< TranslationInfo > | translationInfo |
Additional Inherited Members | |
Public Types inherited from esi::ReadChannelPort | |
| using | ReadCallback = std::function< bool(std::unique_ptr< SegmentedMessageData > &)> |
| Primary callback API for raw reads. | |
| using | FlatReadCallback = std::function< bool(MessageData)> |
| Compatibility callback API for callers which want flattened message bytes instead of the owning segmented message object. | |
Static Public Attributes inherited from esi::ReadChannelPort | |
| static constexpr uint64_t | DefaultMaxDataQueueMsgs = 32 |
| Default max data queue size set at connect time. | |
Protected Types inherited from esi::ReadChannelPort | |
| enum | Mode { Disconnected , Callback , Polling } |
| Indicates the current mode of the channel. More... | |
Protected Member Functions inherited from esi::ReadChannelPort | |
| bool | invokeCallback (std::unique_ptr< SegmentedMessageData > &msg) |
| Invoke the currently registered callback. | |
| void | resetTranslationState () |
| Reset translation state buffers and indices. | |
| bool | translateIncoming (MessageData &data) |
| Translate incoming data if the port type is a window type. | |
Protected Member Functions inherited from esi::ChannelPort | |
| virtual bool | pollImpl () |
| Method called by poll() to actually poll the channel if the channel is connected. | |
| virtual void | connectImpl (const ConnectOptions &options) |
| Called by all connect methods to let backends initiate the underlying connections. | |
Instantiated when a backend does not know how to create a read channel.
|
inline |
|
inlineoverridevirtual |
Connect to the channel in polling mode.
Reimplemented from esi::ReadChannelPort.
Definition at line 597 of file Ports.h.
References errmsg.
|
inlineoverridevirtual |
Connect a compatibility callback which receives flattened MessageData objects.
This adapts the primary segmented callback path.
Reimplemented from esi::ReadChannelPort.
Definition at line 593 of file Ports.h.
References errmsg.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Asynchronous polling read.
Throws if the port is disconnected or currently connected in callback mode.
Reimplemented from esi::ReadChannelPort.
Definition at line 600 of file Ports.h.
References errmsg.
|
protected |