MessageHeaderSerializer Class Reference
|
Space-ng SDK
|
sol3::core::MessageHeaderSerializer Class Reference
#include <sol3/core/message_serializer.h>
Public Member Functions | |
| MessageHeaderSerializer ()=default | |
| MessageHeaderSerializer (MessagePort port) | |
| Initialize with the destination message port. More... | |
| void | setPort (MessagePort const &port) |
| MessagePort const & | port () const |
| Destination message port. More... | |
| msg::MessageHeaderT const & | header () const |
| void | addStamp (msg::Stamp const &stamp) |
| Append a timestamp to the header. More... | |
| flatbuffers::span< uint8_t const > | headerSpan () const |
| Size-prefixed header span for the most recently finished message. More... | |
| size_t | finishHeaderFromPayloadBuffer (flatbuffers::span< uint8_t const > payload_span, msg::Stamp stamp) |
Detailed Description
Provides FlatBuffers builders and common utilities to finish a payload, retrieve header/payload spans, and add stamps.
Constructor & Destructor Documentation
◆ MessageHeaderSerializer() [1/2]
|
default |
◆ MessageHeaderSerializer() [2/2]
|
explicit |
Initialize with the destination message port.
Member Function Documentation
◆ addStamp()
| void sol3::core::MessageHeaderSerializer::addStamp | ( | msg::Stamp const & | stamp | ) |
Append a timestamp to the header.
◆ finishHeaderFromPayloadBuffer()
| size_t sol3::core::MessageHeaderSerializer::finishHeaderFromPayloadBuffer | ( | flatbuffers::span< uint8_t const > | payload_span, |
| msg::Stamp | stamp | ||
| ) |
Builds a size-prefixed header for a provided payload span without copying the payload into the serializer.
◆ header()
| msg::MessageHeaderT const& sol3::core::MessageHeaderSerializer::header | ( | ) | const |
A constant view of the message header. The message header has some invariants maintained by this class, such as the message port, the payload type, the counter, and stamps stamps. To mutate fields in the header, use the public methods available in this class.
◆ headerSpan()
| flatbuffers::span<uint8_t const> sol3::core::MessageHeaderSerializer::headerSpan | ( | ) | const |
Size-prefixed header span for the most recently finished message.
◆ port()
| MessagePort const& sol3::core::MessageHeaderSerializer::port | ( | ) | const |
Destination message port.
◆ setPort()
| void sol3::core::MessageHeaderSerializer::setPort | ( | MessagePort const & | port | ) |
The documentation for this class was generated from the following file:
- /workspaces/astro/sol3-sdk/cpp/sol3/core/message_serializer.h
Generated by