class FileWriter

Declaration

class FileWriter : public IWritable { /* full declaration omitted */ };

Description

Implements the IWritable interface used by McapWriter by wrapping a FILE* pointer created by fopen().

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

Inherits from: IWritable

Member Variables

Inherited from IWritable:

public crcEnabled = false

Method Overview

Inherited from IWritable:

Methods

void end()

Description

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

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

void flush()

Description

flushes any buffered data to the output. This is called by McapWriter after every completed chunk. Callers may also retain a reference to the writer and call flush() at their own cadence. Defaults to a no-op.

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

void handleWrite(const int* data, uint64_t size)

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

Parameters

const int* data
uint64_t size

mcap::Status open(int filename)

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

Parameters

int filename

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:175

~FileWriter()

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