CIRCT  19.0.0git
Public Member Functions | List of all members
esi::ReadChannelPort Class Referenceabstract

A ChannelPort which reads data from the accelerator. More...

#include <Ports.h>

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

Public Member Functions

virtual bool read (MessageData &)=0
 Specify a buffer to read into. More...
 
virtual std::future< MessageDatareadAsync ()
 Asynchronous read. More...
 
 ChannelPort (const Type *type)
 
- Public Member Functions inherited from esi::ChannelPort
 ChannelPort (const Type *type)
 
virtual ~ChannelPort ()=default
 
virtual void connect ()
 
virtual void disconnect ()
 
const TypegetType () const
 

Detailed Description

A ChannelPort which reads data from the accelerator.

Definition at line 55 of file Ports.h.

Member Function Documentation

◆ ChannelPort()

esi::ChannelPort::ChannelPort
inline

Definition at line 33 of file Ports.h.

◆ read()

virtual bool esi::ReadChannelPort::read ( MessageData )
pure virtual

Specify a buffer to read into.

Non-blocking. Returns true if message successfully recieved. Basic API, will likely change for performance and functionality reasons.

Referenced by readAsync().

◆ readAsync()

std::future< MessageData > ReadChannelPort::readAsync ( )
virtual

Asynchronous read.

Returns a future which will be set when the message is recieved. Could this subsume the synchronous read API? The default implementation of this is really bad and should be overridden. It simply polls read in a loop.

Definition at line 46 of file Ports.cpp.

References read().

Referenced by PYBIND11_MODULE().


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