178 void open(
const std::string& path);
180 void open_split(
const std::string& path);
182 void close_segment();
186 bool load_schema(
const std::string& ser_type,
SchemaType& schema_type,
SchemaData& schema_data);
188 bool write(
const std::string& url,
const std::string& ser_type,
SchemaType schema_type,
ActionType action_type,
189 const Bytes& data, int64_t microseconds_timestamp);
191 bool write_filex(
bool complete =
true);
194 std::unique_ptr<Impl> impl_;
Abstract VLink bag recorder with split, compression, schema embedding and a global hook.
Asynchronous VLink message recorder built on top of MessageLoop.
Definition: bag_writer.h:144
Fixed-size 128-byte buffer holder with SBO, five ownership modes and integrated codecs.
Definition: bytes.h:120
Move-only type-erased callable analogue of std::move_only_function with pool spill.
Definition: functional.h:135
Concrete MCAP-format BagWriter implementation with optional Zstd compression.
Definition: vcap_writer.h:102
void close() override
Writes the channel metadata and MCAP footer, then closes the file; idempotent.
void on_begin() override
Hook invoked once on the loop thread before the first task runs.
void register_split_callback(SplitCallback &&callback, bool before) override
Registers a callback invoked at each file-split boundary.
bool is_dumping() const override
Returns the current value of the internal dumping flag.
~VCAPWriter() override
Finalises the MCAP footer and flushes outstanding writes.
void on_end() override
Hook invoked once on the loop thread after the last task runs.
int get_split_index() const override
Returns the index of the split part currently being written.
void register_schema_callback(SchemaCallback &&callback) override
Registers a resolver that maps a serialisation-type string to SchemaData.
VCAPWriter(const std::string &path, const Config &config={})
Opens or creates an MCAP file for recording.
bool push_schema(const SchemaData &schema_data) override
Embeds schema_data in the MCAP file for offline introspection.
int64_t record(const Frame &frame, int64_t timestamp) override
bool is_split_mode() const override
Reports whether split-file recording is active.
int64_t get_record_timestamp() const override
size_t get_max_task_count() const override
Returns the maximum queue depth.
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
SchemaType
Coarse runtime schema family used by discovery, bag metadata and proxy routing.
Definition: types.h:203
ActionType
Labels for messages captured by the recording infrastructure.
Definition: types.h:181
Recording behaviour, split policy and resource budgets.
Definition: bag_writer.h:172
One recorded or replayed message as it flows through the bag pipeline.
Definition: types.h:226
Wire-format-neutral wrapper around one serialised schema blob.
Definition: types.h:297