WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
SwerveDriveKinematicsProto.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
7#include <stdexcept>
8
9#include <fmt/format.h>
10
15
16template <size_t NumModules>
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
void SetLimits(DecodeLimits limit) noexcept
Set the limits on what happens if more elements exist in the buffer then expected.
Definition ProtobufCallbacks.hpp:134
pb_callback_t Callback() const
Gets the nanopb callback pointing to this object.
Definition ProtobufCallbacks.hpp:141
A callback method that will pack elements when called.
Definition ProtobufCallbacks.hpp:487
pb_callback_t Callback() const
Gets the nanopb callback pointing to this object.
Definition ProtobufCallbacks.hpp:519
Class for wrapping a nanopb istream.
Definition Protobuf.hpp:55
bool Decode(typename Protobuf< std::remove_cvref_t< T > >::MessageStruct &msg, unsigned int flags=0)
Decodes a protobuf.
Definition Protobuf.hpp:104
Class for wrapping a nanopb ostream.
Definition Protobuf.hpp:119
bool Encode(const typename Protobuf< std::remove_cvref_t< T > >::MessageStruct &msg)
Decodes a protobuf.
Definition Protobuf.hpp:211
struct _wpi_proto_ProtobufSwerveDriveKinematics wpi_proto_ProtobufSwerveDriveKinematics
@ Fail
Definition ProtobufCallbacks.hpp:30
Definition CvSource.hpp:15
wpi::util::ProtoInputStream< wpi::math::SwerveDriveKinematics< NumModules > > InputStream
Definition SwerveDriveKinematicsProto.hpp:19
static std::optional< wpi::math::SwerveDriveKinematics< NumModules > > Unpack(InputStream &stream)
Definition SwerveDriveKinematicsProto.hpp:24
wpi_proto_ProtobufSwerveDriveKinematics MessageStruct
Definition SwerveDriveKinematicsProto.hpp:18
static bool Pack(OutputStream &stream, const wpi::math::SwerveDriveKinematics< NumModules > &value)
Definition SwerveDriveKinematicsProto.hpp:39
wpi::util::ProtoOutputStream< wpi::math::SwerveDriveKinematics< NumModules > > OutputStream
Definition SwerveDriveKinematicsProto.hpp:21
Protobuf serialization template.
Definition Protobuf.hpp:36
A DirectUnpackCallback backed by a wpi::util::array<T, N>.
Definition ProtobufCallbacks.hpp:447
wpi::util::array< T, N > & Array() noexcept
Returns a reference to the backing array.
Definition ProtobufCallbacks.hpp:475