Class SwerveDriveKinematicsStruct
java.lang.Object
edu.wpi.first.math.kinematics.struct.SwerveDriveKinematicsStruct
- All Implemented Interfaces:
Struct<SwerveDriveKinematics>
public final class SwerveDriveKinematicsStruct
extends Object
implements Struct<SwerveDriveKinematics>
-
Field Summary
Fields inherited from interface edu.wpi.first.util.struct.Struct
kSizeBool, kSizeDouble, kSizeFloat, kSizeInt16, kSizeInt32, kSizeInt64, kSizeInt8
-
Constructor Summary
ConstructorDescriptionSwerveDriveKinematicsStruct
(int numModules) Constructs theStruct
implementation. -
Method Summary
Modifier and TypeMethodDescriptionStruct<?>[]
Gets the list of struct types referenced by this struct.Gets the schema.int
getSize()
Gets the serialized size (in bytes).Gets the Class object for the stored value.Gets the type name (e.g.void
pack
(ByteBuffer bb, SwerveDriveKinematics value) Puts object contents to a ByteBuffer starting at the current position.unpack
(ByteBuffer bb) Deserializes an object from a raw struct serialized ByteBuffer starting at the current position.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.wpi.first.util.struct.Struct
clone, getTypeString, isCloneable, isImmutable, unpackInto
-
Constructor Details
-
SwerveDriveKinematicsStruct
Constructs theStruct
implementation.- Parameters:
numModules
- the number of modules of the kinematics objects this serializer processes.
-
-
Method Details
-
getTypeClass
Description copied from interface:Struct
Gets the Class object for the stored value.- Specified by:
getTypeClass
in interfaceStruct<SwerveDriveKinematics>
- Returns:
- Class
-
getTypeName
Description copied from interface:Struct
Gets the type name (e.g. for schemas of other structs). This should be globally unique among structs.- Specified by:
getTypeName
in interfaceStruct<SwerveDriveKinematics>
- Returns:
- type name
-
getSize
Description copied from interface:Struct
Gets the serialized size (in bytes). This should always be a constant.- Specified by:
getSize
in interfaceStruct<SwerveDriveKinematics>
- Returns:
- serialized size
-
getSchema
Description copied from interface:Struct
Gets the schema.- Specified by:
getSchema
in interfaceStruct<SwerveDriveKinematics>
- Returns:
- schema
-
getNested
Description copied from interface:Struct
Gets the list of struct types referenced by this struct.- Specified by:
getNested
in interfaceStruct<SwerveDriveKinematics>
- Returns:
- list of struct types
-
unpack
Description copied from interface:Struct
Deserializes an object from a raw struct serialized ByteBuffer starting at the current position. Will increment the ByteBuffer position by getStructSize() bytes. Will not otherwise modify the ByteBuffer (e.g. byte order will not be changed).- Specified by:
unpack
in interfaceStruct<SwerveDriveKinematics>
- Parameters:
bb
- ByteBuffer- Returns:
- New object
-
pack
Description copied from interface:Struct
Puts object contents to a ByteBuffer starting at the current position. Will increment the ByteBuffer position by getStructSize() bytes. Will not otherwise modify the ByteBuffer (e.g. byte order will not be changed).- Specified by:
pack
in interfaceStruct<SwerveDriveKinematics>
- Parameters:
bb
- ByteBuffervalue
- object to serialize
-