13template <
size_t NumModules>
17 static constexpr std::string_view
GetTypeName() {
return kTypeName; }
24 static constexpr std::string_view
GetSchema() {
return kSchema; }
27 std::span<const uint8_t> data) {
28 constexpr size_t kModulesOff = 0;
34 static void Pack(std::span<uint8_t> data,
36 constexpr size_t kModulesOff = 0;
41 std::invocable<std::string_view, std::string_view>
auto fn) {
Helper class that converts a chassis velocity (dx, dy, and dtheta components) into individual module ...
Definition SwerveDriveKinematics.h:54
Specifies that a struct type has nested struct declarations.
Definition Struct.h:120
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.h:69
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
void ForEachStructSchema(std::invocable< std::string_view, std::string_view > auto fn, const I &... info)
Definition Struct.h:424
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 constexpr std::string_view GetSchema()
Definition SwerveDriveKinematicsStruct.h:24
static void ForEachNested(std::invocable< std::string_view, std::string_view > auto fn)
Definition SwerveDriveKinematicsStruct.h:40
static frc::SwerveDriveKinematics< NumModules > Unpack(std::span< const uint8_t > data)
Definition SwerveDriveKinematicsStruct.h:26
static constexpr std::string_view GetTypeName()
Definition SwerveDriveKinematicsStruct.h:17
static void Pack(std::span< uint8_t > data, const frc::SwerveDriveKinematics< NumModules > &value)
Definition SwerveDriveKinematicsStruct.h:34
static constexpr size_t GetSize()
Definition SwerveDriveKinematicsStruct.h:18
Struct serialization template.
Definition Struct.h:39
Fixed length string (array of character) for compile time use.
Definition ct_string.h:29