CIRCT  19.0.0git
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
esi::BundlePort Class Reference

Services provide connections to 'bundles' – collections of named, unidirectional communication channels. More...

#include <Ports.h>

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

Public Member Functions

 BundlePort (AppID id, std::map< std::string, ChannelPort & > channels)
 Construct a port. More...
 
virtual ~BundlePort ()=default
 
AppID getID () const
 Get the ID of the port. More...
 
WriteChannelPortgetRawWrite (const std::string &name) const
 Get access to the raw byte streams of a channel. More...
 
ReadChannelPortgetRawRead (const std::string &name) const
 
const std::map< std::string, ChannelPort & > & getChannels () const
 

Static Public Member Functions

static bool isWrite (BundleType::Direction bundleDir)
 Compute the direction of a channel given the bundle direction and the bundle port's direction. More...
 

Private Attributes

AppID id
 
std::map< std::string, ChannelPort & > channels
 

Detailed Description

Services provide connections to 'bundles' – collections of named, unidirectional communication channels.

This class provides access to those ChannelPorts.

Definition at line 74 of file Ports.h.

Constructor & Destructor Documentation

◆ BundlePort()

BundlePort::BundlePort ( AppID  id,
std::map< std::string, ChannelPort & >  channels 
)

Construct a port.

Definition at line 23 of file Ports.cpp.

◆ ~BundlePort()

virtual esi::BundlePort::~BundlePort ( )
virtualdefault

Member Function Documentation

◆ getChannels()

const std::map<std::string, ChannelPort &>& esi::BundlePort::getChannels ( ) const
inline

Definition at line 95 of file Ports.h.

References channels.

Referenced by printPort(), and PYBIND11_MODULE().

◆ getID()

AppID esi::BundlePort::getID ( ) const
inline

Get the ID of the port.

Definition at line 87 of file Ports.h.

References id.

Referenced by printPort(), and PYBIND11_MODULE().

◆ getRawRead()

ReadChannelPort & BundlePort::getRawRead ( const std::string &  name) const

Definition at line 36 of file Ports.cpp.

References channels.

Referenced by PYBIND11_MODULE().

◆ getRawWrite()

WriteChannelPort & BundlePort::getRawWrite ( const std::string &  name) const

Get access to the raw byte streams of a channel.

Intended for internal usage and binding to other languages (e.g. Python) which have their own message serialization code. Exposed publicly as an escape hatch, but ordinary users should not use. You have been warned.

Definition at line 26 of file Ports.cpp.

References channels.

Referenced by PYBIND11_MODULE().

◆ isWrite()

static bool esi::BundlePort::isWrite ( BundleType::Direction  bundleDir)
inlinestatic

Compute the direction of a channel given the bundle direction and the bundle port's direction.

Definition at line 78 of file Ports.h.

Referenced by esi::backends::trace::TraceAccelerator::Impl::requestChannelsFor().

Member Data Documentation

◆ channels

std::map<std::string, ChannelPort &> esi::BundlePort::channels
private

◆ id

AppID esi::BundlePort::id
private

Definition at line 100 of file Ports.h.

Referenced by getID().


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