Implements the IWritable interface used by McapWriter by wrapping a FILE* pointer created by fopen().
Definition at line 166 of file writer.hpp.
#include <writer.hpp>
|
| | ~FileWriter () override |
| |
| Status | open (std::string_view filename) |
| |
| void | handleWrite (const std::byte *data, uint64_t size) override |
| |
| void | end () override |
| | Called when the writer is finished writing data to the output MCAP file.
|
| |
| void | flush () override |
| | 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.
|
| |
| uint64_t | size () const override |
| | Returns the current size of the file in bytes. This must be equal to the sum of all size parameters passed to write().
|
| |
| void | write (const std::byte *data, uint64_t size) |
| | Called whenever the writer needs to write data to the output MCAP file.
|
| |
| uint32_t | crc () |
| | Returns the CRC32 of the uncompressed data.
|
| |
| void | resetCrc () |
| | Resets the CRC32 calculation.
|
| |
◆ ~FileWriter()
| mcap::FileWriter::~FileWriter |
( |
| ) |
|
|
override |
◆ crc()
| uint32_t mcap::IWritable::crc |
( |
| ) |
|
|
inherited |
Returns the CRC32 of the uncompressed data.
Definition at line 28 of file writer.inl.
◆ end()
| void mcap::FileWriter::end |
( |
| ) |
|
|
overridevirtual |
Called when the writer is finished writing data to the output MCAP file.
Implements mcap::IWritable.
Definition at line 70 of file writer.inl.
◆ flush()
| void mcap::FileWriter::flush |
( |
| ) |
|
|
overridevirtual |
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.
Reimplemented from mcap::IWritable.
Definition at line 64 of file writer.inl.
◆ handleWrite()
| void mcap::FileWriter::handleWrite |
( |
const std::byte * |
data, |
|
|
uint64_t |
size |
|
) |
| |
|
overridevirtual |
◆ open()
◆ resetCrc()
| void mcap::IWritable::resetCrc |
( |
| ) |
|
|
inherited |
Resets the CRC32 calculation.
Definition at line 36 of file writer.inl.
◆ size()
| uint64_t mcap::FileWriter::size |
( |
| ) |
const |
|
overridevirtual |
Returns the current size of the file in bytes. This must be equal to the sum of all size parameters passed to write().
Implements mcap::IWritable.
Definition at line 78 of file writer.inl.
◆ write()
| void mcap::IWritable::write |
( |
const std::byte * |
data, |
|
|
uint64_t |
size |
|
) |
| |
|
inherited |
Called whenever the writer needs to write data to the output MCAP file.
- Parameters
-
| data | A pointer to the data to write. |
| size | Size of the data in bytes. |
Definition at line 21 of file writer.inl.
◆ crc_
| uint32_t mcap::IWritable::crc_ |
|
privateinherited |
◆ crcEnabled
| bool mcap::IWritable::crcEnabled = false |
|
inherited |
◆ file_
◆ size_
| uint64_t mcap::FileWriter::size_ = 0 |
|
private |
The documentation for this class was generated from the following files: