Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::embedded::IsrEventSink< EventSinkType > Class Template Reference

Lightweight, zero-overhead wrapper around EventSink explicitly tailored for Hardware ISR handlers. Guarantees zero heap allocation, lock-free execution, and noexcept exception safety. More...

#include <IsrSink.hpp>

+ Collaboration diagram for corium::embedded::IsrEventSink< EventSinkType >:

Public Member Functions

constexpr IsrEventSink () noexcept=default
 
constexpr IsrEventSink (EventSinkType sink) noexcept
 
template<typename Event >
void postFromIsr (Event &&event, EventPriority priority=EventPriority::Normal) noexcept
 Post an event safely from hardware ISR context.
 
template<typename Event >
void postHighPriorityFromIsr (Event &&event) noexcept
 Post a high-priority emergency or hardware interrupt event from ISR context.
 
constexpr const EventSinkType & sink () const noexcept
 
constexpr EventSinkType & sink () noexcept
 Access underlying EventSink handle.
 
template<typename Event >
void tryPostFromIsr (Event &&event, EventPriority priority=EventPriority::Normal) noexcept
 Post an event from ISR context.
 

Detailed Description

template<typename EventSinkType>
class corium::embedded::IsrEventSink< EventSinkType >

Lightweight, zero-overhead wrapper around EventSink explicitly tailored for Hardware ISR handlers. Guarantees zero heap allocation, lock-free execution, and noexcept exception safety.

Template Parameters
EventSinkTypeTarget underlying event sink type.

Constructor & Destructor Documentation

◆ IsrEventSink() [1/2]

template<typename EventSinkType >
constexpr corium::embedded::IsrEventSink< EventSinkType >::IsrEventSink ( )
constexprdefaultnoexcept

◆ IsrEventSink() [2/2]

template<typename EventSinkType >
constexpr corium::embedded::IsrEventSink< EventSinkType >::IsrEventSink ( EventSinkType  sink)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ postFromIsr()

template<typename EventSinkType >
template<typename Event >
void corium::embedded::IsrEventSink< EventSinkType >::postFromIsr ( Event &&  event,
EventPriority  priority = EventPriority::Normal 
)
inlinenoexcept

Post an event safely from hardware ISR context.

Template Parameters
EventConcrete event type.
Parameters
eventEvent instance to post.
priorityPriority level (High, Normal, Low).

◆ postHighPriorityFromIsr()

template<typename EventSinkType >
template<typename Event >
void corium::embedded::IsrEventSink< EventSinkType >::postHighPriorityFromIsr ( Event &&  event)
inlinenoexcept

Post a high-priority emergency or hardware interrupt event from ISR context.

Template Parameters
EventConcrete event type.
Parameters
eventEvent instance to post.

◆ sink() [1/2]

template<typename EventSinkType >
constexpr const EventSinkType & corium::embedded::IsrEventSink< EventSinkType >::sink ( ) const
inlineconstexprnoexcept

◆ sink() [2/2]

template<typename EventSinkType >
constexpr EventSinkType & corium::embedded::IsrEventSink< EventSinkType >::sink ( )
inlineconstexprnoexcept

Access underlying EventSink handle.

◆ tryPostFromIsr()

template<typename EventSinkType >
template<typename Event >
void corium::embedded::IsrEventSink< EventSinkType >::tryPostFromIsr ( Event &&  event,
EventPriority  priority = EventPriority::Normal 
)
inlinenoexcept

Post an event from ISR context.


The documentation for this class was generated from the following file: