13template <
int Size,
int Options,
int MaxRows,
int MaxCols>
17 static constexpr std::string_view
GetTypeName() {
return kTypeName; }
18 static constexpr size_t GetSize() {
return Size * 8; }
21 static constexpr std::string_view
GetSchema() {
return kSchema; }
24 std::span<const uint8_t> data) {
25 constexpr size_t kDataOff = 0;
29 for (
int i = 0; i < Size; i++) {
36 std::span<uint8_t> data,
38 constexpr size_t kDataOff = 0;
40 for (
int i = 0; i < Size; i++) {
41 vec_data[i] = value(i);
This class is a wrapper around std::array that does compile time size checking.
Definition array.h:26
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.h:69
Eigen::Matrix< double, Rows, Cols, Options, MaxRows, MaxCols > Matrixd
Definition EigenCore.h:21
constexpr auto NumToCtString()
Converts any integral to a ct_string at compile-time.
Definition ct_string.h:202
constexpr auto Concat(ct_string< Char, Traits, N1 > const &s1, ct_string< Char, Traits, N > const &... s)
Concatenates multiple fixed_strings into a larger fixed_string at compile time.
Definition ct_string.h:168
void PackStructArray(std::span< uint8_t > data, const wpi::array< T, N > &arr)
Pack a serialized struct array starting at a given offset within the data.
Definition Struct.h:234
constexpr empty_array_t empty_array
Definition array.h:16
wpi::array< T, N > UnpackStructArray(std::span< const uint8_t > data)
Unpack a serialized struct array starting at a given offset within the data.
Definition Struct.h:172
static frc::Matrixd< Size, 1, Options, MaxRows, MaxCols > Unpack(std::span< const uint8_t > data)
Definition VectorStruct.h:23
static constexpr std::string_view GetSchema()
Definition VectorStruct.h:21
static void Pack(std::span< uint8_t > data, const frc::Matrixd< Size, 1, Options, MaxRows, MaxCols > &value)
Definition VectorStruct.h:35
static constexpr size_t GetSize()
Definition VectorStruct.h:18
static constexpr std::string_view GetTypeName()
Definition VectorStruct.h:17
Struct serialization template.
Definition Struct.h:39
Fixed length string (array of character) for compile time use.
Definition ct_string.h:29