Class VisionModuleChangeSubscriber

java.lang.Object
org.photonvision.common.dataflow.DataChangeSubscriber
org.photonvision.vision.processes.VisionModuleChangeSubscriber

public class VisionModuleChangeSubscriber extends DataChangeSubscriber
  • Constructor Details

    • VisionModuleChangeSubscriber

      public VisionModuleChangeSubscriber(VisionModule parentModule)
  • Method Details

    • onDataChangeEvent

      public void onDataChangeEvent(DataChangeEvent<?> event)
      Specified by:
      onDataChangeEvent in class DataChangeSubscriber
    • getSettingChanges

      public List<VisionModuleChange<?>> getSettingChanges()
    • processSettingChanges

      public void processSettingChanges()
    • newPipelineNickname

      public void newPipelineNickname(String newNickname)
    • newPipelineInfo

      public void newPipelineInfo(org.apache.commons.lang3.tuple.Pair<String,PipelineType> typeName)
    • deleteCurrPipeline

      public void deleteCurrPipeline()
    • changePipeline

      public void changePipeline(int index)
    • startCalibration

      public void startCalibration(Map<String,Object> data)
    • duplicatePipeline

      public void duplicatePipeline(int index)
    • robotOffsetPoint

      public void robotOffsetPoint(AdvancedPipelineSettings curAdvSettings, int offsetIndex)
    • setProperty

      protected static void setProperty(Object currentSettings, String propName, Object newPropValue) throws IllegalAccessException, NoSuchFieldException, Exception
      Sets the value of a property in the given object using reflection. This method should not be used generally and is only known to be correct in the context of `onDataChangeEvent`.
      Parameters:
      currentSettings - The object whose property needs to be set.
      propName - The name of the property to be set.
      newPropValue - The new value to be assigned to the property.
      Throws:
      IllegalAccessException - If the field cannot be accessed.
      NoSuchFieldException - If the field does not exist.
      Exception - If an some other unknown exception occurs while setting the property.