CIRCT 24.0.0git
Loading...
Searching...
No Matches
esi::UnknownWriteChannelPort Class Reference

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

#include <Ports.h>

Inheritance diagram for esi::UnknownWriteChannelPort:
Collaboration diagram for esi::UnknownWriteChannelPort:

Public Member Functions

 UnknownWriteChannelPort (const Type *type, std::string errmsg)
void connect (const ConnectOptions &options={}) override
 Set up a connection to the accelerator.
Public Member Functions inherited from esi::WriteChannelPort
virtual void disconnect () override
virtual bool isConnected () const override
void write (const MessageData &data)
 A very basic blocking write API.
virtual void write (std::unique_ptr< SegmentedMessageData > msg)
 Write a multi-segment message.
bool tryWrite (const MessageData &data)
 A basic non-blocking write API.
virtual bool tryWrite (std::unique_ptr< SegmentedMessageData > &msg)
 Non-blocking write of a multi-segment message.
bool flush ()
 Flush any buffered data.
 ChannelPort (const Type *type)
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 Member Functions

void writeImpl (const MessageData &) override
 Implementation for write(). Subclasses must implement this.
bool tryWriteImpl (const MessageData &) override
 Implementation for tryWrite(). Subclasses must implement this.
Protected Member Functions inherited from esi::WriteChannelPort
const MessageData & maybePadEmptyMessage (const MessageData &data)
 Pad an empty payload with a single zero byte if the port type has a zero-width logical width (e.g.
std::vector< MessageData > getMessageFrames (const MessageData &data)
 Break a message into its frames.
void translateOutgoing (const MessageData &data)
 Translate outgoing 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.

Protected Attributes

std::string errmsg
Protected Attributes inherited from esi::WriteChannelPort
bool translateMessages = false
 Whether to translate outgoing data if the port type is a window type.
std::vector< MessageData > translationBuffer
 If tryWrite cannot write all the messages of a windowed type at once, it stores them here and writes them out one by one on subsequent calls.
size_t translationBufferIdx = 0
 Index of the next message to write in translationBuffer.
Protected Attributes inherited from esi::ChannelPort
const Type * type
std::unique_ptr< TranslationInfo > translationInfo

Additional Inherited Members

Static Protected Attributes inherited from esi::WriteChannelPort
static const MessageData transportPad0Bytes = MessageData({0})
 Backing storage for maybePadEmptyMessage return so that the returned reference outlives the call.

Detailed Description

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

Definition at line 455 of file Ports.h.

Constructor & Destructor Documentation

◆ UnknownWriteChannelPort()

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

Definition at line 457 of file Ports.h.

References errmsg, and esi::ChannelPort::type.

Member Function Documentation

◆ connect()

void esi::UnknownWriteChannelPort::connect ( const ConnectOptions & options = {})
inlineoverridevirtual

Set up a connection to the accelerator.

Reimplemented from esi::WriteChannelPort.

Definition at line 460 of file Ports.h.

◆ tryWriteImpl()

bool esi::UnknownWriteChannelPort::tryWriteImpl ( const MessageData & data)
inlineoverrideprotectedvirtual

Implementation for tryWrite(). Subclasses must implement this.

Implements esi::WriteChannelPort.

Definition at line 468 of file Ports.h.

References errmsg.

◆ writeImpl()

void esi::UnknownWriteChannelPort::writeImpl ( const MessageData & )
inlineoverrideprotectedvirtual

Implementation for write(). Subclasses must implement this.

Implements esi::WriteChannelPort.

Definition at line 465 of file Ports.h.

References errmsg.

Member Data Documentation

◆ errmsg

std::string esi::UnknownWriteChannelPort::errmsg
protected

Definition at line 472 of file Ports.h.

Referenced by tryWriteImpl(), UnknownWriteChannelPort(), and writeImpl().


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