CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
esi::UnknownReadChannelPort Class Reference

Instantiated when a backend does not know how to create a read channel. More...

#include <Ports.h>

Inheritance diagram for esi::UnknownReadChannelPort:
Inheritance graph
[legend]
Collaboration diagram for esi::UnknownReadChannelPort:
Collaboration graph
[legend]

Public Member Functions

 UnknownReadChannelPort (const Type *type, std::string errmsg)
 
void connect (std::function< bool(MessageData)> callback, const ConnectOptions &options=ConnectOptions()) override
 
void connect (const ConnectOptions &options=ConnectOptions()) override
 Connect to the channel in polling mode.
 
std::future< MessageDatareadAsync () 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 TypegetType () 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::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.
 
std::mutex pollingM
 Mutex to protect the two queues used for polling.
 
std::queue< MessageDatadataQueue
 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 Typetype
 
std::unique_ptr< TranslationInfotranslationInfo
 

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::ReadChannelPort
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.
 

Detailed Description

Instantiated when a backend does not know how to create a read channel.

Definition at line 410 of file Ports.h.

Constructor & Destructor Documentation

◆ UnknownReadChannelPort()

esi::UnknownReadChannelPort::UnknownReadChannelPort ( const Type type,
std::string  errmsg 
)
inline

Definition at line 412 of file Ports.h.

Member Function Documentation

◆ connect() [1/2]

void esi::UnknownReadChannelPort::connect ( const ConnectOptions options = ConnectOptions())
inlineoverridevirtual

Connect to the channel in polling mode.

Reimplemented from esi::ReadChannelPort.

Definition at line 419 of file Ports.h.

References errmsg.

◆ connect() [2/2]

void esi::UnknownReadChannelPort::connect ( std::function< bool(MessageData)>  callback,
const ConnectOptions options = ConnectOptions() 
)
inlineoverridevirtual

Reimplemented from esi::ReadChannelPort.

Definition at line 415 of file Ports.h.

References errmsg.

◆ readAsync()

std::future< MessageData > esi::UnknownReadChannelPort::readAsync ( )
inlineoverridevirtual

Asynchronous read.

Reimplemented from esi::ReadChannelPort.

Definition at line 422 of file Ports.h.

References errmsg.

Member Data Documentation

◆ errmsg

std::string esi::UnknownReadChannelPort::errmsg
protected

Definition at line 427 of file Ports.h.

Referenced by connect(), connect(), and readAsync().


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