class IWritable

Declaration

class IWritable { /* full declaration omitted */ };

Description

An abstract interface for writing MCAP data.

Declared at: mcap/include/mcap/writer.hpp:112

Member Variables

public bool crcEnabled = false

Method Overview

  • public IWritable() noexcept
  • public uint32_t crc()
  • public virtual void end()
  • protected virtual void handleWrite(const std::byte * data, uint64_t size)
  • public void resetCrc()
  • public virtual uint64_t size() const
  • public void write(const std::byte * data, uint64_t size)
  • public virtual ~IWritable()

Methods

IWritable() noexcept

Declared at: mcap/include/mcap/writer.hpp:116

uint32_t crc()

Description

Returns the CRC32 of the uncompressed data.

Declared at: mcap/include/mcap/writer.hpp:140

virtual void end()

Description

Called when the writer is finished writing data to the output MCAP file.

Declared at: mcap/include/mcap/writer.hpp:131

virtual void handleWrite(const std::byte* data,
                         uint64_t size)

Declared at: mcap/include/mcap/writer.hpp:147

Parameters

const std::byte* data
uint64_t size

void resetCrc()

Description

Resets the CRC32 calculation.

Declared at: mcap/include/mcap/writer.hpp:144

virtual uint64_t size() const

Description

Returns the current size of the file in bytes. This must be equal to the sum of all `size` parameters passed to `write()`.

Declared at: mcap/include/mcap/writer.hpp:136

void write(const std::byte* data, uint64_t size)

Description

Called whenever the writer needs to write data to the output MCAP file.

Declared at: mcap/include/mcap/writer.hpp:126

Parameters

const std::byte* data
A pointer to the data to write.
uint64_t size
Size of the data in bytes.

virtual ~IWritable()

Declared at: mcap/include/mcap/writer.hpp:117