|
MXL : Media eXchange Layer
MXL
|
A wrapper around Target implementations. More...
#include <Target.hpp>
Public Member Functions | |
| std::optional< Target::ReadResult > | read () |
| std::optional< Target::ReadResult > | readBlocking (std::chrono::steady_clock::duration timeout) |
| std::unique_ptr< TargetInfo > | setup (mxlFabricsTargetConfig const &config, TargetSetupOptions const &options={}) |
| Set up the target with the specified configuration. | |
| mxlFabricsTarget | toAPI () noexcept |
| Convert this TargetWrapper to its API representation. | |
| ~TargetWrapper () | |
| Shut down the underlying target before it is destroyed. | |
Static Public Member Functions | |
| static TargetWrapper * | fromAPI (mxlFabricsTarget api) noexcept |
| Convert an mxlFabricsTarget API object to its underlying TargetWrapper. | |
Private Member Functions | |
| void | destroyInner () noexcept |
| Shut down and destroy the underlying target. Errors are logged, because this runs in the destructor. | |
| template<typename TargetT> | |
| std::unique_ptr< TargetInfo > | setup (mxlFabricsTargetConfig const &config, FabricInfoView info, TargetSetupOptions const &options={}) |
| Set up the correct concrete target type internally and returns the target info. | |
Private Attributes | |
| std::unique_ptr< Target > | _inner |
A wrapper around Target implementations.
This wrapper creates an unspecified target that can be configured for a specific type by calling the setup() method.
Definition at line 98 of file Target.hpp.
| mxl::lib::fabrics::ofi::TargetWrapper::~TargetWrapper | ( | ) |
Shut down the underlying target before it is destroyed.
Definition at line 31 of file Target.cpp.
|
privatenoexcept |
Shut down and destroy the underlying target. Errors are logged, because this runs in the destructor.
Definition at line 36 of file Target.cpp.
|
staticnodiscardnoexcept |
Convert an mxlFabricsTarget API object to its underlying TargetWrapper.
| api | The mxlFabricsTarget to convert. |
Definition at line 55 of file Target.cpp.
| std::optional< Target::ReadResult > mxl::lib::fabrics::ofi::TargetWrapper::read | ( | ) |
Definition at line 65 of file Target.cpp.
| std::optional< Target::ReadResult > mxl::lib::fabrics::ofi::TargetWrapper::readBlocking | ( | std::chrono::steady_clock::duration | timeout | ) |
Definition at line 75 of file Target.cpp.
|
nodiscardprivate |
Set up the correct concrete target type internally and returns the target info.
| config | Target configuration passed by the user. |
| info | Fabric info already resolved from the interface config. |
Definition at line 86 of file Target.cpp.
|
nodiscard |
Set up the target with the specified configuration.
This method initializes the underlying target implementation based on the provided configuration.
| config | The configuration to use for setting up the target. |
| options | Optional tuning parameters (e.g. completion queue depth). |
Definition at line 93 of file Target.cpp.
|
nodiscardnoexcept |
Convert this TargetWrapper to its API representation.
Definition at line 60 of file Target.cpp.
|
private |
The underlying target implementation.
Definition at line 152 of file Target.hpp.