|
CIRCT 23.0.0git
|
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 Storage , std::size_t BitOffset, std::size_t Width> | |
| constexpr Storage | readUnsignedBits (const uint8_t *bytes) |
Read Width bits starting at BitOffset (LSB-first within bytes) and return them zero-extended in Storage. | |
| template<typename Signed , std::size_t BitOffset, std::size_t Width> | |
| constexpr Signed | readSignedBits (const uint8_t *bytes) |
Read Width bits starting at BitOffset (LSB-first) and sign-extend into the signed integer type Signed. | |
| template<typename Storage , std::size_t BitOffset, std::size_t Width> | |
| constexpr void | writeUnsignedBits (uint8_t *bytes, Storage value) |
Write the low Width bits of value into bytes starting at BitOffset (LSB-first). | |
| template<typename Signed , std::size_t BitOffset, std::size_t Width> | |
| constexpr void | writeSignedBits (uint8_t *bytes, Signed value) |
| Convenience overload for signed values. | |
| template<std::size_t BitOffset, std::size_t Width> | |
| constexpr void | copyBitsIn (const uint8_t *src, uint8_t *dst) |
Copy Width bits out of src starting at BitOffset into dst packed LSB-first from bit 0. | |
| template<std::size_t BitOffset, std::size_t Width> | |
| constexpr void | copyBitsOut (uint8_t *dst, const uint8_t *src) |
Inverse of copyBitsIn: take Width bits packed LSB-first from bit 0 of src and write them into dst starting at BitOffset. | |
| template<typename T > | |
| const MessageData & | getMessageDataRef (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 |
| using esi::detail::DeserializerFor = typedef typename DeserializerSelector<T>::type |
Definition at line 232 of file TypedPorts.h.
| using esi::detail::DeserializerOutputCallback = typedef typename DeserializerFor<T>::OutputCallback |
Definition at line 235 of file TypedPorts.h.
| 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.
|
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.
|
inlineconstexpr |
Copy Width bits out of src starting at BitOffset into dst packed LSB-first from bit 0.
Used to embed an aggregate (struct, union, or array) at an arbitrary bit position inside a parent wire buffer: the inner type already stores its bits LSB-first in dst, so the destination bits land at the same positions they'd occupy if the inner was read out at byte alignment. dst must be zero-initialised on entry (the helper only sets 1 bits) and must hold at least ceil(Width / 8) bytes.
Definition at line 124 of file BitAccess.h.
|
inlineconstexpr |
Inverse of copyBitsIn: take Width bits packed LSB-first from bit 0 of src and write them into dst starting at BitOffset.
Other bits in the affected bytes of dst are preserved.
Definition at line 137 of file BitAccess.h.
| const MessageData & esi::detail::getMessageDataRef | ( | const SegmentedMessageData & | msg, |
| MessageData & | scratch | ||
| ) |
Definition at line 159 of file TypedPorts.h.
References esi::SegmentedMessageData::toMessageData().
|
inlineconstexpr |
Read Width bits starting at BitOffset (LSB-first) and sign-extend into the signed integer type Signed.
Signed must be at least Width bits wide.
Definition at line 62 of file BitAccess.h.
|
inlineconstexpr |
Read Width bits starting at BitOffset (LSB-first within bytes) and return them zero-extended in Storage.
Storage must be an unsigned integer type wide enough to hold Width bits.
Definition at line 43 of file BitAccess.h.
|
inlineprivate |
Throw a clear "already connected" error from connect() paths.
Definition at line 1009 of file TypedPorts.h.
Referenced by esi::TypedFunction< ArgT, ResultT, SkipTypeCheck >::connect(), esi::TypedFunction< void, ResultT, SkipTypeCheck >::connect(), esi::TypedFunction< ArgT, void, SkipTypeCheck >::connect(), and esi::TypedFunction< void, void, SkipTypeCheck >::connect().
|
inlineprivate |
Throw a clear "already connected" error from TypedCallback connect() paths.
Definition at line 1263 of file TypedPorts.h.
Referenced by esi::TypedCallback< void, ResultT, SkipTypeCheck >::connect(), esi::TypedCallback< ArgT, ResultT, SkipTypeCheck >::connect(), esi::TypedCallback< void, void, SkipTypeCheck >::connect(), and esi::TypedCallback< ArgT, void, SkipTypeCheck >::connect().
|
inlineprivate |
Throw a clear "not connected" error from call() paths.
Definition at line 1003 of file TypedPorts.h.
Referenced by esi::TypedFunction< void, ResultT, SkipTypeCheck >::call(), esi::TypedFunction< void, void, SkipTypeCheck >::call(), esi::TypedFunction< ArgT, ResultT, SkipTypeCheck >::call(), and esi::TypedFunction< ArgT, void, SkipTypeCheck >::call().
|
inlineprivate |
Throw the standard "null Callback pointer" error used by every TypedCallback specialization.
Definition at line 1256 of file TypedPorts.h.
Referenced by esi::TypedCallback< void, ResultT, SkipTypeCheck >::connect(), esi::TypedCallback< ArgT, ResultT, SkipTypeCheck >::connect(), esi::TypedCallback< void, void, SkipTypeCheck >::connect(), and esi::TypedCallback< ArgT, void, SkipTypeCheck >::connect().
|
inlineprivate |
Throw the standard "null Function pointer" error used by every TypedFunction specialization.
Definition at line 997 of file TypedPorts.h.
Referenced by esi::TypedFunction< ArgT, ResultT, SkipTypeCheck >::connect(), esi::TypedFunction< void, ResultT, SkipTypeCheck >::connect(), esi::TypedFunction< ArgT, void, SkipTypeCheck >::connect(), and esi::TypedFunction< void, void, SkipTypeCheck >::connect().
|
inlineprivate |
Standard ConnectOptions for typed function ports: untranslated frames so the deserializer can see raw frame boundaries.
Definition at line 971 of file TypedPorts.h.
Referenced by esi::TypedFunction< ArgT, ResultT, SkipTypeCheck >::connect(), esi::TypedFunction< void, ResultT, SkipTypeCheck >::connect(), esi::TypedFunction< ArgT, void, SkipTypeCheck >::connect(), esi::TypedFunction< void, void, SkipTypeCheck >::connect(), esi::TypedCallback< void, ResultT, SkipTypeCheck >::connect(), esi::TypedCallback< ArgT, ResultT, SkipTypeCheck >::connect(), esi::TypedCallback< void, void, SkipTypeCheck >::connect(), and esi::TypedCallback< ArgT, void, SkipTypeCheck >::connect().
|
inlineconstexpr |
Convenience overload for signed values.
Reinterprets the value as unsigned (two's complement) and writes the low Width bits.
Definition at line 104 of file BitAccess.h.
|
inlineconstexpr |
Write the low Width bits of value into bytes starting at BitOffset (LSB-first).
Other bits in the affected bytes are preserved.
Definition at line 84 of file BitAccess.h.
|
inlineconstexpr |
Definition at line 156 of file TypedPorts.h.