Class PipelineManager

java.lang.Object
org.photonvision.vision.processes.PipelineManager

public class PipelineManager extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getPipelineSettings

      public CVPipelineSettings getPipelineSettings(int index)
      Get the settings for a pipeline by index.
      Parameters:
      index - Index of pipeline whose settings need getting.
      Returns:
      The gotten settings of the pipeline whose index was provided.
    • getPipelineNickname

      public String getPipelineNickname(int index)
      Get the settings for a pipeline by index.
      Parameters:
      index - Index of pipeline whose nickname needs getting.
      Returns:
      the nickname of the pipeline whose index was provided.
    • getPipelineNicknames

      public List<String> getPipelineNicknames()
      Gets a list of nicknames for all user pipelines
      Returns:
      The list of nicknames for all user pipelines
    • getCurrentPipelineIndex

      public int getCurrentPipelineIndex()
      Gets the index of the currently active pipeline
      Returns:
      The index of the currently active pipeline
    • getCurrentPipeline

      public CVPipeline getCurrentPipeline()
      Get the currently active pipeline.
      Returns:
      The currently active pipeline.
    • getCurrentPipelineSettings

      public CVPipelineSettings getCurrentPipelineSettings()
      Get the currently active pipelines settings
      Returns:
      The currently active pipelines settings
    • getRequestedIndex

      public int getRequestedIndex()
      Grab the currently requested pipeline index. The VisionRunner may not have changed over to this pipeline yet.
    • setCalibrationMode

      public void setCalibrationMode(boolean wantsCalibration)
      Enters or exits calibration mode based on the parameter.

      Exiting returns to the last used user pipeline.
      Parameters:
      wantsCalibration - True to enter calibration mode, false to exit calibration mode.
    • setDriverMode

      public void setDriverMode(boolean state)
      Enters or exits driver mode based on the parameter.

      Exiting returns to the last used user pipeline.
      Parameters:
      state - True to enter driver mode, false to exit driver mode.
    • getDriverMode

      public boolean getDriverMode()
      Returns whether driver mode is active.
      Returns:
      Whether driver mode is active.
    • addPipeline

      public CVPipelineSettings addPipeline(PipelineType type)
    • addPipeline

      public CVPipelineSettings addPipeline(PipelineType type, String nickname)
    • setIndex

      public void setIndex(int index)
    • removePipeline

      public int removePipeline(int index)
    • renameCurrentPipeline

      public void renameCurrentPipeline(String newName)
    • duplicatePipeline

      public int duplicatePipeline(int index)
      Duplicate a pipeline at a given index
      Parameters:
      index - the index of the target pipeline
      Returns:
      The new index
    • changePipelineType

      public void changePipelineType(int newType)