Zero-heap type-safe serializer and deserializer for Corium event variants over binary wire streams.
More...
#include <Serializer.hpp>
Zero-heap type-safe serializer and deserializer for Corium event variants over binary wire streams.
◆ deserializeAndPush()
template<typename EventVariant , size_t MaxPayload = 64, typename Sink >
Deserialize a validated binary WirePacket directly into an event sink.
- Template Parameters
-
| EventVariant | Variant list of all supported events. |
| MaxPayload | Payload size limit. |
| Sink | Target EventSink or EventBus. |
- Parameters
-
| packet | Incoming packet to validate and deserialize. |
| sink | Event sink to receive the deserialized event. |
| priority | Priority to assign to the deserialized event. |
- Returns
- true if packet was valid and successfully dispatched into sink; false on validation/type error.
◆ serialize()
template<typename
Event , typename EventVariant , size_t MaxPayload = 64>
| static WirePacket< MaxPayload > corium::wire::WireSerializer::serialize |
( |
const Event & |
event | ) |
|
|
inlinestaticnoexcept |
Serialize a trivially-copyable concrete event into a fixed-size binary WirePacket.
- Template Parameters
-
| Event | Concrete event type to serialize. |
| EventVariant | Target variant list to determine type index. |
| MaxPayload | Payload size limit. |
- Parameters
-
| event | Event instance to serialize. |
- Returns
- Serialized and CRC-validated WirePacket.
The documentation for this class was generated from the following file: