pjmsg_mcap_wrapper
Loading...
Searching...
No Matches
all.h
Go to the documentation of this file.
1/**
2 @file
3 @author Alexander Sherikov
4 @copyright 2024 Alexander Sherikov. Licensed under the Apache License,
5 Version 2.0. (see LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
6
7 @brief Sink class.
8*/
9
10#pragma once
11
12#include <filesystem>
13#include <vector>
14
15#define PJMSG_MCAP_WRAPPER_PUBLIC __attribute__((visibility("default")))
16
17
19{
21 {
22 public:
23 class Implementation;
24
25 public:
27
28 public:
29 Message();
31
33 std::vector<double> &values();
34 std::string &name(const std::size_t index);
35 double &value(const std::size_t index);
36
37 void bumpVersion();
38 void setVersion(const uint32_t version);
39
40 void setStamp(const uint64_t timestamp);
41
42 void reserve(const std::size_t size);
43 void resize(const std::size_t size);
44 [[nodiscard]] std::size_t size() const;
45 };
46
47
49 {
50 protected:
51 class Implementation;
52
53 protected:
55
56 public:
57 Writer();
59 void initialize(const std::filesystem::path &filename, const std::string &topic_prefix);
60 void flush();
61 void write(const Message &message);
62 };
63} // namespace pjmsg_mcap_wrapper
#define PJMSG_MCAP_WRAPPER_PUBLIC
Definition all.h:15
const std::unique_ptr< Implementation > pimpl_
Definition all.h:26
const std::unique_ptr< Implementation > pimpl_
Definition all.h:54