Class VisionModuleChangeSubscriber
java.lang.Object
org.photonvision.common.dataflow.DataChangeSubscriber
org.photonvision.vision.processes.VisionModuleChangeSubscriber
-
Field Summary
Fields inherited from class org.photonvision.common.dataflow.DataChangeSubscriber
wantedDestinations, wantedSources
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onDataChangeEvent
(DataChangeEvent<?> event) void
protected static void
setProperty
(Object currentSettings, String propName, Object newPropValue) Sets the value of a property in the given object using reflection.Methods inherited from class org.photonvision.common.dataflow.DataChangeSubscriber
hashCode
-
Constructor Details
-
VisionModuleChangeSubscriber
-
-
Method Details
-
onDataChangeEvent
- Specified by:
onDataChangeEvent
in classDataChangeSubscriber
-
getSettingChanges
-
processSettingChanges
public void processSettingChanges() -
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.
-