CIRCT 23.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
esi::services::ChannelService::ToHost Class Reference

A port which reads data from the accelerator (to_host). More...

#include <Services.h>

Inheritance diagram for esi::services::ChannelService::ToHost:
Inheritance graph
[legend]
Collaboration diagram for esi::services::ChannelService::ToHost:
Collaboration graph
[legend]

Public Member Functions

void connect ()
 
std::future< MessageDataread ()
 
virtual std::optional< std::string > toString (bool oneLine=false) const override
 
- Public Member Functions inherited from esi::services::ServicePort
virtual ~ServicePort ()=default
 
 BundlePort (AppID id, const BundleType *type, PortMap channels)
 Construct a port.
 
- Public Member Functions inherited from esi::BundlePort
 BundlePort (AppID id, const BundleType *type, PortMap channels)
 Construct a port.
 
virtual ~BundlePort ()=default
 
AppID getID () const
 Get the ID of the port.
 
WriteChannelPortgetRawWrite (const std::string &name) const
 Get access to the raw byte streams of a channel.
 
ReadChannelPortgetRawRead (const std::string &name) const
 
const PortMapgetChannels () const
 
template<typename T >
T * getAs () const
 Cast this Bundle port to a subclass which is actually useful.
 
bool poll ()
 Calls poll on all channels in the bundle and returns true if any of them returned true.
 

Static Public Member Functions

static ToHostget (AppID id, const BundleType *type, ReadChannelPort &dataPort)
 
- Static Public Member Functions inherited from esi::BundlePort
static bool isWrite (BundleType::Direction bundleDir)
 Compute the direction of a channel given the bundle direction and the bundle port's direction.
 

Private Attributes

ReadChannelPortdataPort = nullptr
 
bool connected = false
 

Friends

class ChannelService
 

Additional Inherited Members

- Protected Attributes inherited from esi::BundlePort
AppID id
 
const BundleTypetype
 
PortMap channels
 

Detailed Description

A port which reads data from the accelerator (to_host).

Definition at line 291 of file Services.h.

Member Function Documentation

◆ connect()

void ChannelService::ToHost::connect ( )

Definition at line 228 of file Services.cpp.

Referenced by NB_MODULE().

◆ get()

ChannelService::ToHost * ChannelService::ToHost::get ( AppID  id,
const BundleType type,
ReadChannelPort dataPort 
)
static

Definition at line 222 of file Services.cpp.

References esi::BundlePort::type.

◆ read()

std::future< MessageData > ChannelService::ToHost::read ( )

Definition at line 239 of file Services.cpp.

Referenced by NB_MODULE().

◆ toString()

virtual std::optional< std::string > esi::services::ChannelService::ToHost::toString ( bool  oneLine = false) const
inlineoverridevirtual

Friends And Related Symbol Documentation

◆ ChannelService

friend class ChannelService
friend

Definition at line 292 of file Services.h.

Member Data Documentation

◆ connected

bool esi::services::ChannelService::ToHost::connected = false
private

◆ dataPort

ReadChannelPort* esi::services::ChannelService::ToHost::dataPort = nullptr
private

Definition at line 310 of file Services.h.


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