Interface PacketSerde<T>

All Known Implementing Classes:
MultiTargetPNPResultSerde, PhotonPipelineMetadataSerde, PhotonPipelineResultSerde, PhotonTrackedTargetSerde, PnpResultSerde, TargetCornerSerde

public interface PacketSerde<T>
  • Method Details

    • getMaxByteSize

      int getMaxByteSize()
    • pack

      void pack(Packet packet, T value)
    • unpack

      T unpack(Packet packet)
    • getTypeName

      String getTypeName()
      The name of this struct (eg "PhotonTrackedTarget")
    • getTypeString

      default String getTypeString()
      Gets the type string (e.g. for NetworkTables). This should be globally unique and start with "photonstruct:".
      Returns:
      type string
    • getNestedPhotonMessages

      default PacketSerde<?>[] getNestedPhotonMessages()
      Gets the list of photonstruct types referenced by this struct.
    • getNestedWpilibMessages

      default Struct<?>[] getNestedWpilibMessages()
      Gets the list of WPILib struct types referenced by this struct.
    • getSchema

      String getSchema()
      The schema definition, as defined in photon-serde/README.md
    • getInterfaceUUID

      String getInterfaceUUID()
      The hash of the schema string