AdapterDesc#
Fully qualified name: carb::events::AdapterDesc
Defined in carb/events/IEventsAdapter.h
-
struct AdapterDesc#
Describes the adapter type desired by IEventsAdapter::createAdapter().
Public Functions
- inline constexpr AdapterDesc(
- AdapterType type,
- const char *name,
- cpp::span<MappingEntry> mappings,
- eventdispatcher::IMessageQueue *messageQueue = nullptr,
Typical Constructor.
- Parameters:
type – The AdapterType.
name – The name of the adapter.
mappings – A span of MappingEntry objects for the adapter.
messageQueue – The eventdispatcher::IMessageQueue instance, if required.
Public Members
-
uint32_t sizeOf = {uint32_t(sizeof(AdapterDesc))}#
Used as a version number to ensure the struct is compatible with the interface.
-
AdapterType type#
The type of the adapter requested.
-
const char *name#
The name of the adapter. This is used for debugging and logging purposes.
-
cpp::span<MappingEntry> mappings#
The mappings of EventType to/from dispatch-name and push-name.
The mappings here are used two-way, so the EventType is used to look up the dispatch-name or the push-name, and vice versa. All EventType, MappingEntry::dispatchName and MappingEntry::pushName should be unique across
mappings
. If they are not, the adapter creation will fail.MappingEntry::pushName is not required and is used only for AdapterType::eFull.
-
eventdispatcher::IMessageQueue *messageQueue#
The message queue used for the adapter.
Only used for AdapterType::eFull and AdapterType::eFullAlias. Ignored for AdapterType::ePushPump and AdapterType::eDispatch.