|
CIRCT 23.0.0git
|
A function call which gets attached to a service port. More...
#include <Services.h>


Public Member Functions | |
| void | connect (std::function< MessageData(const MessageData &)> callback, bool quick=false) |
| Connect a callback to code which will be executed when the accelerator invokes the callback. | |
| const esi::Type * | getArgType () const |
| const esi::Type * | getResultType () const |
| 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. | |
| WriteChannelPort & | getRawWrite (const std::string &name) const |
| Get access to the raw byte streams of a channel. | |
| ReadChannelPort & | getRawRead (const std::string &name) const |
| const PortMap & | getChannels () 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 Callback * | get (AcceleratorConnection &acc, AppID id, const BundleType *type, WriteChannelPort &result, ReadChannelPort &arg) |
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 Member Functions | |
| Callback (AcceleratorConnection &acc, AppID id, const BundleType *, PortMap channels) | |
Private Attributes | |
| ReadChannelPort * | arg |
| WriteChannelPort * | result |
| AcceleratorConnection & | acc |
Friends | |
| class | CallService |
Additional Inherited Members | |
Protected Attributes inherited from esi::BundlePort | |
| AppID | id |
| const BundleType * | type |
| PortMap | channels |
A function call which gets attached to a service port.
Definition at line 405 of file Services.h.
|
private |
Definition at line 330 of file Services.cpp.
| void CallService::Callback::connect | ( | std::function< MessageData(const MessageData &)> | callback, |
| bool | quick = false |
||
| ) |
Connect a callback to code which will be executed when the accelerator invokes the callback.
The 'quick' flag indicates that the callback is sufficiently fast that it could be called in the same thread as the port callback.
Definition at line 342 of file Services.cpp.
Referenced by esi::TypedCallback< void, ResultT >::connect(), esi::TypedCallback< ArgT, ResultT >::connect(), esi::TypedCallback< void, void >::connect(), and esi::TypedCallback< ArgT, void >::connect().
|
static |
Definition at line 334 of file Services.cpp.
|
inline |
Definition at line 422 of file Services.h.
References esi::BundleType::findChannel(), and esi::BundlePort::type.
Referenced by esi::TypedCallback< void, ResultT >::connect(), esi::TypedCallback< ArgT, ResultT >::connect(), esi::TypedCallback< void, void >::connect(), esi::TypedCallback< ArgT, void >::connect(), and toString().
|
inline |
Definition at line 427 of file Services.h.
References esi::BundleType::findChannel(), and esi::BundlePort::type.
Referenced by esi::TypedCallback< void, ResultT >::connect(), esi::TypedCallback< ArgT, ResultT >::connect(), esi::TypedCallback< void, void >::connect(), esi::TypedCallback< ArgT, void >::connect(), and toString().
|
inlineoverridevirtual |
Reimplemented from esi::services::ServicePort.
Definition at line 434 of file Services.h.
References getArgType(), getResultType(), and esi::Type::toString().
|
friend |
Definition at line 406 of file Services.h.
|
private |
Definition at line 444 of file Services.h.
|
private |
Definition at line 442 of file Services.h.
|
private |
Definition at line 443 of file Services.h.