Voyant API 0.2.1
Loading...
Searching...
No Matches
voyant_frame_wrapper.hpp
Go to the documentation of this file.
1// Copyright (c) 2024-2025 Voyant Photonics, Inc.
2// All rights reserved.
3
4#pragma once
5#include "../capnp_wrapper.h"
10#include <vector>
11
18class VoyantFrameWrapper : public CapnpWrapper<VoyantFrame>
19{
20private:
23 std::vector<PointDataWrapper> points_;
24
25public:
30
35 void fromProto(VoyantFrame::Reader reader) override;
36
41 void toProto(VoyantFrame::Builder &builder) const override;
42
47 void debugString(std::ostream &os) const override;
48
49 // Getters and setters
54 const VoyantHeaderWrapper &header() const { return header_; }
55
61
68 const VoyantSdlConfigWrapper &config() const { return config_; }
69
77
82 const std::vector<PointDataWrapper> &points() const { return points_; }
83
88 std::vector<PointDataWrapper> &pointsMut() { return points_; }
89};
Base template class for Cap'n Proto wrappers.
Definition capnp_wrapper.h:23
Wrapper for VoyantFrame messages.
Definition voyant_frame_wrapper.hpp:19
const std::vector< PointDataWrapper > & points() const
Get the vector of points.
Definition voyant_frame_wrapper.hpp:82
const VoyantHeaderWrapper & header() const
Get the common header.
Definition voyant_frame_wrapper.hpp:54
std::vector< PointDataWrapper > points_
Vector of point data.
Definition voyant_frame_wrapper.hpp:23
void fromProto(VoyantFrame::Reader reader) override
Update wrapper fields from a reader.
std::vector< PointDataWrapper > & pointsMut()
Get mutable access to the vector of points.
Definition voyant_frame_wrapper.hpp:88
const VoyantSdlConfigWrapper & config() const
Get the configuration.
Definition voyant_frame_wrapper.hpp:68
void toProto(VoyantFrame::Builder &builder) const override
Write wrapper fields to a builder.
void debugString(std::ostream &os) const override
Generate a debug string representation.
~VoyantFrameWrapper() override
Destructor.
VoyantSdlConfigWrapper config_
Configuration (may be empty in current implementation)
Definition voyant_frame_wrapper.hpp:22
VoyantSdlConfigWrapper & configMut()
Get mutable access to the configuration.
Definition voyant_frame_wrapper.hpp:76
VoyantHeaderWrapper & headerMut()
Get mutable access to the common header.
Definition voyant_frame_wrapper.hpp:60
VoyantHeaderWrapper header_
Common Voyant message header.
Definition voyant_frame_wrapper.hpp:21
Definition voyant_frame.capnp.h:85
Definition voyant_frame.capnp.h:47
Wrapper for VoyantHeader messages.
Definition voyant_header_wrapper.hpp:43
Wrapper for VoyantSdlConfig messages.
Definition voyant_sdl_config_wrapper.hpp:17