68 virtual std::future<MessageData>
readAsync();
79 return bundleDir == BundleType::Direction::To;
95 const std::map<std::string, ChannelPort &> &
getChannels()
const {
Services provide connections to 'bundles' – collections of named, unidirectional communication channe...
virtual ~BundlePort()=default
std::map< std::string, ChannelPort & > channels
ReadChannelPort & getRawRead(const std::string &name) const
WriteChannelPort & getRawWrite(const std::string &name) const
Get access to the raw byte streams of a channel.
const std::map< std::string, ChannelPort & > & getChannels() const
static bool isWrite(BundleType::Direction bundleDir)
Compute the direction of a channel given the bundle direction and the bundle port's direction.
BundlePort(AppID id, std::map< std::string, ChannelPort & > channels)
Construct a port.
AppID getID() const
Get the ID of the port.
Unidirectional channels are the basic communication primitive between the host and accelerator.
virtual void disconnect()
ChannelPort(const Type *type)
virtual ~ChannelPort()=default
const Type * getType() const
A logical chunk of data representing serialized data.
A ChannelPort which reads data from the accelerator.
virtual std::future< MessageData > readAsync()
Asynchronous read.
virtual bool read(MessageData &)=0
Specify a buffer to read into.
Root class of the ESI type system.
A ChannelPort which sends data to the accelerator.
virtual void write(const MessageData &)=0
A very basic write API. Will likely change for performance reasons.