13template <
size_t NumModules>
28 std::span<const uint8_t> data) {
29 constexpr size_t kModulesOff = 0;
35 static void Pack(std::span<uint8_t> data,
37 constexpr size_t kModulesOff = 0;
43 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.hpp:59
const wpi::util::array< Translation2d, NumModules > & GetModules() const
Definition SwerveDriveKinematics.hpp:463
Represents a translation in 2D space.
Definition Translation2d.hpp:30
Specifies that a struct type has nested struct declarations.
Definition Struct.hpp:120
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.hpp:69
void ForEachStructSchema(std::invocable< std::string_view, std::string_view > auto fn, const I &... info)
Definition Struct.hpp:424
void PackStructArray(std::span< uint8_t > data, const wpi::util::array< T, N > &arr)
Pack a serialized struct array starting at a given offset within the data.
Definition Struct.hpp:234
constexpr auto NumToCtString()
Converts any integral to a ct_string at compile-time.
Definition ct_string.hpp: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.hpp:168
wpi::util::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.hpp:172
Definition CvSource.hpp:15
static void ForEachNested(std::invocable< std::string_view, std::string_view > auto fn)
Definition SwerveDriveKinematicsStruct.hpp:42
static constexpr std::string_view GetTypeName()
Definition SwerveDriveKinematicsStruct.hpp:18
static constexpr ct_string kTypeName
Definition SwerveDriveKinematicsStruct.hpp:15
static wpi::math::SwerveDriveKinematics< NumModules > Unpack(std::span< const uint8_t > data)
Definition SwerveDriveKinematicsStruct.hpp:27
static constexpr std::string_view GetSchema()
Definition SwerveDriveKinematicsStruct.hpp:25
static constexpr size_t GetSize()
Definition SwerveDriveKinematicsStruct.hpp:19
static void Pack(std::span< uint8_t > data, const wpi::math::SwerveDriveKinematics< NumModules > &value)
Definition SwerveDriveKinematicsStruct.hpp:35
static constexpr ct_string kSchema
Definition SwerveDriveKinematicsStruct.hpp:22
Struct serialization template.
Definition Struct.hpp:39
Fixed length string (array of character) for compile time use.
Definition ct_string.hpp:29