Class LinearSystemStruct<States extends Num,Inputs extends Num,Outputs extends Num>

java.lang.Object
edu.wpi.first.math.system.struct.LinearSystemStruct<States,Inputs,Outputs>
All Implemented Interfaces:
Struct<LinearSystem<States,Inputs,Outputs>>

public final class LinearSystemStruct<States extends Num,Inputs extends Num,Outputs extends Num> extends Object implements Struct<LinearSystem<States,Inputs,Outputs>>
  • Constructor Details

    • LinearSystemStruct

      public LinearSystemStruct(Nat<States> states, Nat<Inputs> inputs, Nat<Outputs> outputs)
      Constructs the Struct implementation.
      Parameters:
      states - The number of states of the linear systems this serializer processes.
      inputs - The number of inputs of the linear systems this serializer processes.
      outputs - The number of outputs of the linear systems this serializer processes.
  • Method Details

    • getTypeClass

      Description copied from interface: Struct
      Gets the Class object for the stored value.
      Specified by:
      getTypeClass in interface Struct<States extends Num>
      Returns:
      Class
    • getTypeName

      public String 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 interface Struct<States extends Num>
      Returns:
      type name
    • getSize

      public int getSize()
      Description copied from interface: Struct
      Gets the serialized size (in bytes). This should always be a constant.
      Specified by:
      getSize in interface Struct<States extends Num>
      Returns:
      serialized size
    • getSchema

      public String getSchema()
      Description copied from interface: Struct
      Gets the schema.
      Specified by:
      getSchema in interface Struct<States extends Num>
      Returns:
      schema
    • getNested

      public Struct<?>[] getNested()
      Description copied from interface: Struct
      Gets the list of struct types referenced by this struct.
      Specified by:
      getNested in interface Struct<States extends Num>
      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 interface Struct<States extends Num>
      Parameters:
      bb - ByteBuffer
      Returns:
      New object
    • pack

      public void pack(ByteBuffer bb, LinearSystem<States,Inputs,Outputs> value)
      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 interface Struct<States extends Num>
      Parameters:
      bb - ByteBuffer
      value - object to serialize