|
CIRCT 23.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) |
Additional Inherited Members |
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:
header_frame / data_frame types of identical size,count_type,static count_type T::_headerCount(const header_frame &),static std::unique_ptr<T> T::_fromFrames(const header_frame &, std::vector<data_frame> &&).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 340 of file TypedPorts.h.
| using esi::SerialListTypeDeserializer< T >::Base = QueuedDecodeTypeDeserializer<T> |
Definition at line 342 of file TypedPorts.h.
|
private |
Definition at line 352 of file TypedPorts.h.
|
private |
Definition at line 351 of file TypedPorts.h.
| using esi::SerialListTypeDeserializer< T >::DecodedOutputs = typename Base::DecodedOutputs |
Definition at line 344 of file TypedPorts.h.
|
private |
Definition at line 350 of file TypedPorts.h.
| using esi::SerialListTypeDeserializer< T >::OutputCallback = typename Base::OutputCallback |
Definition at line 343 of file TypedPorts.h.
|
inlineexplicit |
Definition at line 346 of file TypedPorts.h.
|
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 358 of file TypedPorts.h.
References esi::MessageData::getBytes(), esi::MessageData::getSize(), esi::SerialListTypeDeserializer< T >::kFrameSize, esi::SerialListTypeDeserializer< T >::partial_, esi::SerialListTypeDeserializer< T >::pending_frames_, esi::SerialListTypeDeserializer< T >::pending_header_, and esi::SerialListTypeDeserializer< T >::remaining_.
|
staticconstexprprivate |
Definition at line 356 of file TypedPorts.h.
Referenced by esi::SerialListTypeDeserializer< T >::decode().
|
private |
Definition at line 414 of file TypedPorts.h.
Referenced by esi::SerialListTypeDeserializer< T >::decode().
|
private |
Definition at line 416 of file TypedPorts.h.
Referenced by esi::SerialListTypeDeserializer< T >::decode().
|
private |
Definition at line 415 of file TypedPorts.h.
Referenced by esi::SerialListTypeDeserializer< T >::decode().
|
private |
Definition at line 417 of file TypedPorts.h.
Referenced by esi::SerialListTypeDeserializer< T >::decode().