Class VisionModule.Builder

  • Enclosing class:
    VisionModule

    public static class VisionModule.Builder
    extends java.lang.Object
    Builder class for a VisionModule. Configure options here, and then call build() to construct a module with the given parameters.
    • Constructor Detail

      • Builder

        public Builder​(edu.wpi.cscore.VideoSource source)
        Create a new module builder with the specified video source.
        Parameters:
        source - The VideoSource to use as input to the pipelines. Usually this is a USB or Axis camera created using the CameraServer class.
    • Method Detail

      • setName

        public VisionModule.Builder setName​(java.lang.String name)
        Set the name of the module. This determines the name of the output server and the worker thread. By default, the name of the stream is the same as the name of the video source.
        Parameters:
        name - The new name.
        Returns:
        This builder object.
      • addPipeline

        public VisionModule.Builder addPipeline​(VisionGUIPipeline pipeline)
        Add a pipeline to this module. Pipelines are run in the order that they are added. This will determine which UI elements appear on top of which others.
        Parameters:
        pipeline - The pipeline to add.
        Returns:
        This builder object.
      • build

        public VisionModule build()
        Construct a VisionModule object with the parameters specified.
        Returns:
        A new stream object.