AnyMessageOutput Class Reference

Space-ng SDK: sol3::core::AnyMessageOutput Class Reference
Space-ng SDK
sol3::core::AnyMessageOutput Class Reference

#include <sol3/core/any_message_output.h>

Inheritance diagram for sol3::core::AnyMessageOutput:
sol3::core::MessageOutput< sol3::core::MessageSpec > sol3::core::MessageOutput< TMessageSpec >

Public Member Functions

 AnyMessageOutput (IBufferExchange &exchange, MessagePort port, MessageSchema schema, size_t slot_count, size_t slot_size)
 
 ~AnyMessageOutput ()
 Unregisters the output buffer from the exchange. More...
 
 AnyMessageOutput (AnyMessageOutput &&rhs)=delete
 
AnyMessageOutputoperator= (AnyMessageOutput &&rhs)=delete
 
 AnyMessageOutput (AnyMessageOutput const &)=delete
 
AnyMessageOutputoperator= (AnyMessageOutput const &rhs)=delete
 
MessagePort const & port () const
 Destination message port. More...
 
flatbuffers::span< uint8_t const > headerSpan () const
 
flatbuffers::span< uint8_t const > payloadSpan () const
 
uint64_t write (flatbuffers::span< uint8_t const > header_span, flatbuffers::span< uint8_t const > payload_span)
 Returns the sequence number of the slot written to. More...
 
msg::MessageHeader const * headerRoot () const
 
template<typename TTableType >
TTableType const * payloadRoot () const
 
MessageSchema schema () const
 

Detailed Description

Untyped message output, that writes flatbuffer buffers to a shmem sequence ring.

Constructs and registers a shared-memory buffer sized for the requested number of slots and slot size. On destruction, unregisters the buffer.

Constructor & Destructor Documentation

◆ AnyMessageOutput() [1/3]

sol3::core::AnyMessageOutput::AnyMessageOutput ( IBufferExchange exchange,
MessagePort  port,
MessageSchema  schema,
size_t  slot_count,
size_t  slot_size 
)

Creates and registers an output buffer for the provided port with slot_count slots of size slot_size bytes each.

The buffer becomes discoverable by readers via the exchange.

◆ ~AnyMessageOutput()

sol3::core::AnyMessageOutput::~AnyMessageOutput ( )

Unregisters the output buffer from the exchange.

◆ AnyMessageOutput() [2/3]

sol3::core::AnyMessageOutput::AnyMessageOutput ( AnyMessageOutput &&  rhs)
delete

◆ AnyMessageOutput() [3/3]

sol3::core::AnyMessageOutput::AnyMessageOutput ( AnyMessageOutput const &  )
delete

Member Function Documentation

◆ headerRoot()

msg::MessageHeader const* sol3::core::AnyMessageOutput::headerRoot ( ) const

◆ headerSpan()

flatbuffers::span<uint8_t const> sol3::core::AnyMessageOutput::headerSpan ( ) const

◆ operator=() [1/2]

AnyMessageOutput& sol3::core::AnyMessageOutput::operator= ( AnyMessageOutput &&  rhs)
delete

◆ operator=() [2/2]

AnyMessageOutput& sol3::core::AnyMessageOutput::operator= ( AnyMessageOutput const &  rhs)
delete

◆ payloadRoot()

template<typename TTableType >
TTableType const* sol3::core::AnyMessageOutput::payloadRoot ( ) const
inline

◆ payloadSpan()

flatbuffers::span<uint8_t const> sol3::core::AnyMessageOutput::payloadSpan ( ) const

◆ port()

MessagePort const& sol3::core::AnyMessageOutput::port ( ) const
inline

Destination message port.

◆ schema()

MessageSchema sol3::core::AnyMessageOutput::schema ( ) const
inline

◆ write()

uint64_t sol3::core::AnyMessageOutput::write ( flatbuffers::span< uint8_t const >  header_span,
flatbuffers::span< uint8_t const >  payload_span 
)

Returns the sequence number of the slot written to.


The documentation for this class was generated from the following file: