WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
CubicHermiteSplineStruct.hpp
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
10
11template <>
12struct WPILIB_DLLEXPORT wpi::util::Struct<wpi::math::CubicHermiteSpline> {
13 static constexpr std::string_view GetTypeName() {
14 return "CubicHermiteSpline";
15 }
16 static constexpr size_t GetSize() { return 4 * 2 * 8; }
17 static constexpr std::string_view GetSchema() {
18 return "double xInitial[2];double xFinal[2];double yInitial[2];double "
19 "yFinal[2]";
20 }
21
22 static wpi::math::CubicHermiteSpline Unpack(std::span<const uint8_t> data);
23 static void Pack(std::span<uint8_t> data,
25};
26
#define WPILIB_DLLEXPORT
Definition SymbolExports.hpp:36
Represents a hermite spline of degree 3.
Definition CubicHermiteSpline.hpp:16
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.hpp:69
Definition CvSource.hpp:15
static void Pack(std::span< uint8_t > data, const wpi::math::CubicHermiteSpline &value)
static constexpr std::string_view GetTypeName()
Definition CubicHermiteSplineStruct.hpp:13
static constexpr size_t GetSize()
Definition CubicHermiteSplineStruct.hpp:16
static wpi::math::CubicHermiteSpline Unpack(std::span< const uint8_t > data)
static constexpr std::string_view GetSchema()
Definition CubicHermiteSplineStruct.hpp:17
Struct serialization template.
Definition Struct.hpp:39