![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
C++ Adaptor for a Source Transport implemented in a C plugin. More...
#include <dfx-plugins/bridges/transport/CSourceTransport.hpp>
Public Member Functions | |
| CSourceTransport (Core::Endpoint endpoint, nlohmann::json config, Plugin const &plugin, dfx_transport_interface_t interface) | |
| Constructs the adaptor and initializes the plugin-side transport. | |
| DFX_DISABLE_COPY_AND_MOVE (CSourceTransport) | |
| ~CSourceTransport () | |
| Destructor. Calls dfx_transport_interface_t::destroy on the plugin API. | |
| void | start (FdWatch::Poller &poller) override |
| Activates the transport and provides the poller vtable to the plugin. | |
| void | stop () noexcept override |
| Deactivates the transport. | |
| Public Member Functions inherited from dfx::Core::SourceTransport | |
| SourceTransport (Endpoint endpoint, nlohmann::json config) | |
| Constructs a SourceTransport with the Role::Source role. | |
| Public Member Functions inherited from dfx::Core::Transport | |
| Transport (Role role, Endpoint endpoint, nlohmann::json config) | |
| Constructs a transport instance. | |
| DFX_DISABLE_COPY_AND_MOVE (Transport) | |
| Transport is not copiable nor movable. | |
| virtual | ~Transport ()=default |
| Virtual destructor ensuring proper cleanup of derived transports. | |
| template<DerivedFromTransport T> | |
| bool | is () const noexcept |
| Check whether this transport is of a given derived type. | |
| template<DerivedFromTransport T> | |
| T & | as () noexcept |
| Cast this transport to a derived type (unchecked). | |
| template<DerivedFromTransport T> | |
| T const & | as () const noexcept |
| Cast this transport to a derived type (unchecked). | |
| Role | role () const noexcept |
| Returns the Role (Source or Destination) of this transport. | |
| bool | isSource () const noexcept |
| Returns true if this transport is a source. | |
| bool | isDestination () const noexcept |
| Returns true if this transport is a destination. | |
| Endpoint const & | endpoint () const noexcept |
| Gets the endpoint descriptor associated with this transport. | |
| Channel * | channel () const noexcept |
| Gets the channel which this transport is attached to if any. | |
| Port * | port () const noexcept |
| Gets the port associated with this transport. | |
| NodePtr | node () const noexcept |
| Gets the node associated with this transport. | |
| nlohmann::json const & | config () const noexcept |
| Gets the JSON configuration used to initialize this transport. | |
Additional Inherited Members | |
| Public Types inherited from dfx::Core::Transport | |
| enum class | Role { Source , Destination } |
| Defines the operational role of a transport relative to a channel. More... | |
| Protected Member Functions inherited from dfx::Core::SourceTransport | |
| bool | transmitMessage (MessagePtr message) |
| Forwards a message to the attached Channel for orchestration. | |
| Protected Attributes inherited from dfx::Core::Transport | |
| Role const | _role |
| Endpoint | _endpoint |
| nlohmann::json | _config |
C++ Adaptor for a Source Transport implemented in a C plugin.
This class wraps a dfx_transport_interface_t and a plugin-specific handle. It translates internal C++ start/stop calls into C-ABI calls and provides a callback to the plugin for message reception.
| dfx::Plugins::CSourceTransport::CSourceTransport | ( | Core::Endpoint | endpoint, |
| nlohmann::json | config, | ||
| Plugin const & | plugin, | ||
| dfx_transport_interface_t | interface ) |
Constructs the adaptor and initializes the plugin-side transport.
Calls dfx_transport_interface_t::build_source on the plugin's API to create the back-end handle.
| dfx::Plugins::CSourceTransport::~CSourceTransport | ( | ) |
Destructor. Calls dfx_transport_interface_t::destroy on the plugin API.
|
overridevirtual |
Activates the transport and provides the poller vtable to the plugin.
Implements dfx::Core::Transport.
|
overridevirtualnoexcept |
Deactivates the transport.
Implements dfx::Core::Transport.