10#include <rdma/fi_eq.h>
33 ::fid_t
fid()
const noexcept;
55 ::fid_t
fid()
const noexcept;
71 ::fid_t
fid()
const noexcept;
82 Error(std::shared_ptr<EventQueue> eq, ::fid_t
fid,
int err,
int providerErr, std::vector<std::uint8_t> errData);
87 int code()
const noexcept;
97 ::fid_t
fid()
const noexcept;
105 std::shared_ptr<EventQueue>
_eq;
112 using Inner = std::variant<ConnectionRequested, Connected, Shutdown, Error>;
123 static Event fromError(std::shared_ptr<EventQueue> queue, ::fi_eq_err_entry
const*
raw);
172 fid_t
fid() noexcept;
RAII Wrapper around a libfabric event queue (fi_eq).
A type that wraps a "FI_CONNECTED" event type.
::fid_t fid() const noexcept
fabric descriptor associated with the event
A type that wraps a "FI_CONNREQ" event type.
FabricInfoView info() const noexcept
libfabric info struct of the endpoint that requested connection
::fid_t fid() const noexcept
fabric descriptor associated with the event
ConnectionRequested(::fid_t fid, FabricInfo info)
A type that wraps an error received from the event queue.
int providerCode() const noexcept
return the provider-specific error code.
Error(std::shared_ptr< EventQueue > eq, ::fid_t fid, int err, int providerErr, std::vector< std::uint8_t > errData)
::fid_t fid() const noexcept
fabric descriptor associated with the event
int code() const noexcept
return the libfabric error code.
std::shared_ptr< EventQueue > _eq
std::string toString() const
Convert the error to a human-readable string.
std::vector< std::uint8_t > _errData
A type that wraps a "FI_SHUTDOWN" event type.
::fid_t fid() const noexcept
fabric descriptor associated with the event
fid_t fid() noexcept
fabric descriptor associated with the event
bool isConnected() const noexcept
Returns true if this event is a FI_CONNECTED.
std::variant< ConnectionRequested, Connected, Shutdown, Error > Inner
Connected const & connected() const
Get a connected representation of the event. Throws if the event is not a connected event....
bool isError() const noexcept
Returns true if this event is an error entry.
static Event fromRawCMEntry(::fi_eq_cm_entry const &raw, std::uint32_t eventType)
create an Event from a libfabric Connection Management event
static Event fromRawEntry(::fi_eq_entry const &raw, std::uint32_t eventType)
bool isShutdown() const noexcept
returns true if this event is a FI_SHUTDOWN
Error const & error() const
Get an error representation of the event. Throws if the event is an error. Users should previously ch...
static Event fromError(std::shared_ptr< EventQueue > queue, ::fi_eq_err_entry const *raw)
create an Event from a libfabric event error entry
ConnectionRequested const & connReq() const
Get a connection request representation of the event. Throws if the event is not a connection request...
Shutdown const & shutdown() const
Get a shutdown representation of the event. Throws if the event is not a shutdown event....
bool isConnReq() const noexcept
returns true if this event is a FI_CONNREQ
Non-owning view of a FabricInfo. Returned when iterating over a FabricInfoList.
FabricInfo(FabricInfoView) noexcept
Create an owning FabricInfo object from a non-owning view.
::fi_info * raw() noexcept
Returns the raw fi_info object managed by this FabricInfo instance.