|
CIRCT 22.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 (std::function< bool(MessageData)> callback, std::optional< unsigned > bufferSize=std::nullopt) override |
| void | connect (std::optional< unsigned > bufferSize=std::nullopt) override |
| Connect to the channel in polling mode. | |
| std::future< MessageData > | readAsync () override |
| Asynchronous read. | |
Public Member Functions inherited from esi::ReadChannelPort | |
| ReadChannelPort (const Type *type) | |
| virtual void | disconnect () override |
| 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. | |
| const Type * | getType () const |
Protected Attributes | |
| std::string | errmsg |
Protected Attributes inherited from esi::ReadChannelPort | |
| volatile Mode | mode |
| std::function< bool(MessageData)> | callback |
| Backends call this callback when new data is available. | |
| std::mutex | pollingM |
| Mutex to protect the two queues used for polling. | |
| std::queue< MessageData > | dataQueue |
| Store incoming data here if there are no outstanding promises to be fulfilled. | |
| uint64_t | maxDataQueueMsgs |
| Maximum number of messages to store in dataQueue. 0 means no limit. | |
| std::queue< std::promise< MessageData > > | promiseQueue |
| Promises to be fulfilled when data is available. | |
Protected Attributes inherited from esi::ChannelPort | |
| const Type * | type |
Additional Inherited Members | |
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::ChannelPort | |
| virtual bool | pollImpl () |
| Method called by poll() to actually poll the channel if the channel is connected. | |
| virtual void | connectImpl (std::optional< unsigned > bufferSize) |
| 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 |
|
inlineoverridevirtual |
Connect to the channel in polling mode.
Reimplemented from esi::ReadChannelPort.
Definition at line 212 of file Ports.h.
References errmsg.
|
inlineoverridevirtual |
Asynchronous read.
Reimplemented from esi::ReadChannelPort.
Definition at line 215 of file Ports.h.
References errmsg.
|
protected |
Definition at line 220 of file Ports.h.
Referenced by connect(), connect(), and readAsync().