|
CIRCT 24.0.0git
|
Reusable serial-list window deserializer. More...
#include <TypedPorts.h>


Public Types | |
| using | Base = QueuedDecodeTypeDeserializer<T> |
| using | OutputCallback = typename Base::OutputCallback |
| using | DecodedOutputs = typename Base::DecodedOutputs |
| Public Types inherited from esi::QueuedDecodeTypeDeserializer< T > | |
| using | OutputCallback = detail::TypedReadOwnedCallback<T> |
| using | DecodedOutputs = std::vector<std::unique_ptr<T>> |
Public Member Functions | |
| SerialListTypeDeserializer (OutputCallback output) | |
| Public Member Functions inherited from esi::QueuedDecodeTypeDeserializer< T > | |
| QueuedDecodeTypeDeserializer (OutputCallback output) | |
| virtual | ~QueuedDecodeTypeDeserializer ()=default |
| bool | push (std::unique_ptr< SegmentedMessageData > &msg) |
| Push one raw message into the deserializer. | |
| bool | poke () |
| Retry delivery of any typed outputs which were previously blocked by the client callback. | |
Private Types | |
| using | header_frame = typename T::header_frame |
| using | data_frame = typename T::data_frame |
| using | count_type = typename T::count_type |
Private Member Functions | |
| DecodedOutputs | decode (std::unique_ptr< SegmentedMessageData > &msg) override |
| Decode one raw message into zero or more typed outputs. | |
Private Attributes | |
| std::vector< uint8_t > | partial_ |
| std::optional< header_frame > | pending_header_ |
| std::vector< data_frame > | pending_frames_ |
| count_type | remaining_ = 0 |
Static Private Attributes | |
| static constexpr size_t | kFrameSize = sizeof(data_frame) |
Reusable serial-list window deserializer.
Walks the serial-list multi-burst protocol used by codegen'd window helpers – zero or more header(N>0) + N data bursts terminated by a header(0) footer – and emits a fully-formed T instance built from the accumulated header fields and data frames.
T must be a generated window helper that exposes:
T typically declares SerialListTypeDeserializer<T> as a friend so the template can reach the (private) header_frame definition; the helpers themselves can stay private as well.
Definition at line 333 of file TypedPorts.h.
| using esi::SerialListTypeDeserializer< T >::Base = QueuedDecodeTypeDeserializer<T> |
Definition at line 335 of file TypedPorts.h.
|
private |
Definition at line 345 of file TypedPorts.h.
|
private |
Definition at line 344 of file TypedPorts.h.
| using esi::SerialListTypeDeserializer< T >::DecodedOutputs = typename Base::DecodedOutputs |
Definition at line 337 of file TypedPorts.h.
|
private |
Definition at line 343 of file TypedPorts.h.
| using esi::SerialListTypeDeserializer< T >::OutputCallback = typename Base::OutputCallback |
Definition at line 336 of file TypedPorts.h.
|
inlineexplicit |
Definition at line 339 of file TypedPorts.h.
References esi::QueuedDecodeTypeDeserializer< T >::output.
|
inlineoverrideprivatevirtual |
Decode one raw message into zero or more typed outputs.
Implementations must consume msg before returning, even when zero outputs are produced.
Implements esi::QueuedDecodeTypeDeserializer< T >.
Definition at line 351 of file TypedPorts.h.
References esi::MessageData::getBytes(), esi::detail::getMessageDataRef(), esi::MessageData::getSize(), kFrameSize, partial_, pending_frames_, pending_header_, and remaining_.
|
staticconstexprprivate |
Definition at line 349 of file TypedPorts.h.
Referenced by decode().
|
private |
Definition at line 407 of file TypedPorts.h.
Referenced by decode().
|
private |
Definition at line 409 of file TypedPorts.h.
Referenced by decode().
|
private |
Definition at line 408 of file TypedPorts.h.
Referenced by decode().
|
private |
Definition at line 410 of file TypedPorts.h.
Referenced by decode().