CIRCT 23.0.0git
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
esi::detail Namespace Reference

Classes

struct  DeserializerSelector
 
struct  DeserializerSelector< T, std::void_t< typename T::TypeDeserializer > >
 
struct  has_type_deserializer
 
struct  has_type_deserializer< T, std::void_t< typename T::TypeDeserializer > >
 
class  PODTypeDeserializer
 Default deserializer for simple 1:1 typed reads. More...
 
class  PollingBuffer
 Shared queue/promise helper for polling-style read APIs. More...
 

Typedefs

template<typename T >
using TypedReadOwnedCallback = std::function< bool(std::unique_ptr< T > &)>
 Owning callback used by typed read deserializers.
 
template<typename T >
using DeserializerFor = typename DeserializerSelector< T >::type
 
template<typename T >
using DeserializerOutputCallback = typename DeserializerFor< T >::OutputCallback
 

Functions

template<typename T >
const MessageDatagetMessageDataRef (const SegmentedMessageData &msg, MessageData &scratch)
 
ChannelPort::ConnectOptions typedFunctionConnectOptions ()
 Standard ConnectOptions for typed function ports: untranslated frames so the deserializer can see raw frame boundaries.
 
template<typename T >
std::future< T > awaitDecoded (std::future< std::unique_ptr< T > > inner)
 Convert a std::future<std::unique_ptr<T>> (as returned by TypedReadPort::readAsync()) into a std::future<T>.
 
void throwNullFunction ()
 Throw the standard "null Function pointer" error used by every TypedFunction specialization.
 
void throwNotConnected ()
 Throw a clear "not connected" error from call() paths.
 
void throwAlreadyConnected ()
 Throw a clear "already connected" error from connect() paths.
 
void throwNullCallback ()
 Throw the standard "null Callback pointer" error used by every TypedCallback specialization.
 
void throwCallbackAlreadyConnected ()
 Throw a clear "already connected" error from TypedCallback connect() paths.
 

Variables

template<typename T >
constexpr bool has_type_deserializer_v = has_type_deserializer<T>::value
 

Typedef Documentation

◆ DeserializerFor

template<typename T >
using esi::detail::DeserializerFor = typedef typename DeserializerSelector<T>::type

Definition at line 232 of file TypedPorts.h.

◆ DeserializerOutputCallback

template<typename T >
using esi::detail::DeserializerOutputCallback = typedef typename DeserializerFor<T>::OutputCallback

Definition at line 235 of file TypedPorts.h.

◆ TypedReadOwnedCallback

template<typename T >
using esi::detail::TypedReadOwnedCallback = typedef std::function<bool(std::unique_ptr<T> &)>

Owning callback used by typed read deserializers.

Returning false means the callee did not accept the object and wants the exact same owned value retried later.

Definition at line 146 of file TypedPorts.h.

Function Documentation

◆ awaitDecoded()

template<typename T >
std::future< T > esi::detail::awaitDecoded ( std::future< std::unique_ptr< T > >  inner)
private

Convert a std::future<std::unique_ptr<T>> (as returned by TypedReadPort::readAsync()) into a std::future<T>.

Uses a deferred async so .get() blocks only when the caller actually waits for the value, preserving the per-call FIFO ordering of the underlying polling buffer. A null unique_ptr from a misbehaving deserializer is reported as a runtime error rather than dereferenced.

Definition at line 983 of file TypedPorts.h.

◆ getMessageDataRef()

template<typename T >
const MessageData & esi::detail::getMessageDataRef ( const SegmentedMessageData msg,
MessageData scratch 
)

Definition at line 159 of file TypedPorts.h.

References esi::SegmentedMessageData::toMessageData().

◆ throwAlreadyConnected()

void esi::detail::throwAlreadyConnected ( )
inlineprivate

◆ throwCallbackAlreadyConnected()

void esi::detail::throwCallbackAlreadyConnected ( )
inlineprivate

◆ throwNotConnected()

void esi::detail::throwNotConnected ( )
inlineprivate

◆ throwNullCallback()

void esi::detail::throwNullCallback ( )
inlineprivate

◆ throwNullFunction()

void esi::detail::throwNullFunction ( )
inlineprivate

◆ typedFunctionConnectOptions()

ChannelPort::ConnectOptions esi::detail::typedFunctionConnectOptions ( )
inlineprivate

Variable Documentation

◆ has_type_deserializer_v

template<typename T >
constexpr bool esi::detail::has_type_deserializer_v = has_type_deserializer<T>::value
inlineconstexpr

Definition at line 156 of file TypedPorts.h.