001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package org.wpilib.math.kinematics.proto;
006
007import org.wpilib.math.kinematics.DifferentialDriveWheelAccelerations;
008import org.wpilib.math.proto.ProtobufDifferentialDriveWheelAccelerations;
009import org.wpilib.util.protobuf.Protobuf;
010import us.hebi.quickbuf.Descriptors.Descriptor;
011
012public class DifferentialDriveWheelAccelerationsProto
013    implements Protobuf<
014        DifferentialDriveWheelAccelerations, ProtobufDifferentialDriveWheelAccelerations> {
015  @Override
016  public Class<DifferentialDriveWheelAccelerations> getTypeClass() {
017    return DifferentialDriveWheelAccelerations.class;
018  }
019
020  @Override
021  public Descriptor getDescriptor() {
022    return ProtobufDifferentialDriveWheelAccelerations.getDescriptor();
023  }
024
025  @Override
026  public ProtobufDifferentialDriveWheelAccelerations createMessage() {
027    return ProtobufDifferentialDriveWheelAccelerations.newInstance();
028  }
029
030  @Override
031  public DifferentialDriveWheelAccelerations unpack(
032      ProtobufDifferentialDriveWheelAccelerations msg) {
033    return new DifferentialDriveWheelAccelerations(msg.getLeft(), msg.getRight());
034  }
035
036  @Override
037  public void pack(
038      ProtobufDifferentialDriveWheelAccelerations msg, DifferentialDriveWheelAccelerations value) {
039    msg.setLeft(value.left);
040    msg.setRight(value.right);
041  }
042}