CIRCT 21.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for esi::UnknownWriteChannelPort:
Collaboration graph
[legend]

Public Member Functions

 UnknownWriteChannelPort (const Type *type, std::string errmsg)
 
void connect (std::optional< unsigned > bufferSize=std::nullopt) override
 Set up a connection to the accelerator.
 
void write (const MessageData &) override
 A very basic blocking write API.
 
bool tryWrite (const MessageData &) override
 A basic non-blocking write API.
 
- Public Member Functions inherited from esi::WriteChannelPort
virtual void disconnect () override
 
virtual bool isConnected () const override
 
 ChannelPort (const Type *type)
 
- 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::ChannelPort
const Typetype
 

Additional Inherited Members

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

Detailed Description

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

Definition at line 103 of file Ports.h.

Constructor & Destructor Documentation

◆ UnknownWriteChannelPort()

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

Definition at line 105 of file Ports.h.

Member Function Documentation

◆ connect()

void esi::UnknownWriteChannelPort::connect ( std::optional< unsigned >  bufferSize = std::nullopt)
inlineoverridevirtual

Set up a connection to the accelerator.

The buffer size is optional and should be considered merely a hint. Individual implementations use it however they like. The unit is number of messages of the port type.

Reimplemented from esi::WriteChannelPort.

Definition at line 108 of file Ports.h.

References errmsg.

◆ tryWrite()

bool esi::UnknownWriteChannelPort::tryWrite ( const MessageData data)
inlineoverridevirtual

A basic non-blocking write API.

Returns true if the data was written. It is invalid for backends to always return false (i.e. backends must eventually ensure that writes may succeed).

Implements esi::WriteChannelPort.

Definition at line 112 of file Ports.h.

References errmsg.

◆ write()

void esi::UnknownWriteChannelPort::write ( const MessageData )
inlineoverridevirtual

A very basic blocking write API.

Will likely change for performance reasons.

Implements esi::WriteChannelPort.

Definition at line 111 of file Ports.h.

References errmsg.

Member Data Documentation

◆ errmsg

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

Definition at line 117 of file Ports.h.

Referenced by connect(), tryWrite(), and write().


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