[wpilib] Fix sim javadocs to not say GC will cancel callbacks (#6665)

That behavior has not been present since PR #4158 was merged more than 2 years ago and imo should not be added back because it was surprising and not consistent with the most common use case of registering a callback permanently.
This commit is contained in:
Dean Brettle
2024-07-28 14:30:19 -07:00
committed by GitHub
parent ea7c935bcb
commit 7aa100589d
23 changed files with 113 additions and 226 deletions

View File

@@ -65,8 +65,7 @@ public class AddressableLEDSim {
*
* @param callback the callback that will be called whenever the Initialized property is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AddressableLEDDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -96,8 +95,7 @@ public class AddressableLEDSim {
*
* @param callback the callback that will be called whenever the output port is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerOutputPortCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AddressableLEDDataJNI.registerOutputPortCallback(m_index, callback, initialNotify);
@@ -127,8 +125,7 @@ public class AddressableLEDSim {
*
* @param callback the callback that will be called whenever the length is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerLengthCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AddressableLEDDataJNI.registerLengthCallback(m_index, callback, initialNotify);
@@ -158,8 +155,7 @@ public class AddressableLEDSim {
*
* @param callback the callback that will be called whenever the LED state is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerRunningCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AddressableLEDDataJNI.registerRunningCallback(m_index, callback, initialNotify);
@@ -188,8 +184,7 @@ public class AddressableLEDSim {
* Register a callback on the LED data.
*
* @param callback the callback that will be called whenever the LED data is changed
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerDataCallback(ConstBufferCallback callback) {
int uid = AddressableLEDDataJNI.registerDataCallback(m_index, callback);

View File

@@ -35,8 +35,7 @@ public class AnalogGyroSim {
*
* @param callback the callback that will be called whenever the angle changes
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerAngleCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogGyroDataJNI.registerAngleCallback(m_index, callback, initialNotify);
@@ -66,8 +65,7 @@ public class AnalogGyroSim {
*
* @param callback the callback that will be called whenever the rate changes
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerRateCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogGyroDataJNI.registerRateCallback(m_index, callback, initialNotify);
@@ -97,8 +95,7 @@ public class AnalogGyroSim {
*
* @param callback the callback that will be called whenever the gyro is initialized
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogGyroDataJNI.registerInitializedCallback(m_index, callback, initialNotify);

View File

@@ -35,8 +35,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the analog input is initialized
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogInDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -66,8 +65,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the number of average bits is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerAverageBitsCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogInDataJNI.registerAverageBitsCallback(m_index, callback, initialNotify);
@@ -97,8 +95,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the oversampling bits are changed.
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerOversampleBitsCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -129,8 +126,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the voltage is changed.
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerVoltageCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogInDataJNI.registerVoltageCallback(m_index, callback, initialNotify);
@@ -160,8 +156,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the accumulator is initialized
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerAccumulatorInitializedCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -193,8 +188,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the accumulator value is changed.
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerAccumulatorValueCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -225,8 +219,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the accumulator count is changed.
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerAccumulatorCountCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -257,8 +250,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the accumulator center is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerAccumulatorCenterCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -289,8 +281,7 @@ public class AnalogInputSim {
*
* @param callback the callback that will be called whenever the accumulator deadband is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerAccumulatorDeadbandCallback(
NotifyCallback callback, boolean initialNotify) {

View File

@@ -35,8 +35,7 @@ public class AnalogOutputSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerVoltageCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogOutDataJNI.registerVoltageCallback(m_index, callback, initialNotify);
@@ -66,8 +65,7 @@ public class AnalogOutputSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogOutDataJNI.registerInitializedCallback(m_index, callback, initialNotify);

View File

@@ -57,8 +57,7 @@ public class AnalogTriggerSim {
*
* @param callback the callback that will be called whenever the analog trigger is initialized
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AnalogTriggerDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -88,8 +87,7 @@ public class AnalogTriggerSim {
*
* @param callback the callback that will be called whenever the lower bound is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerTriggerLowerBoundCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -121,8 +119,7 @@ public class AnalogTriggerSim {
*
* @param callback the callback that will be called whenever the upper bound is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerTriggerUpperBoundCallback(
NotifyCallback callback, boolean initialNotify) {

View File

@@ -32,8 +32,7 @@ public class BuiltInAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerActiveCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AccelerometerDataJNI.registerActiveCallback(m_index, callback, initialNotify);
@@ -63,8 +62,7 @@ public class BuiltInAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerRangeCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AccelerometerDataJNI.registerRangeCallback(m_index, callback, initialNotify);
@@ -94,8 +92,7 @@ public class BuiltInAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerXCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AccelerometerDataJNI.registerXCallback(m_index, callback, initialNotify);
@@ -125,8 +122,7 @@ public class BuiltInAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerYCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AccelerometerDataJNI.registerYCallback(m_index, callback, initialNotify);
@@ -156,8 +152,7 @@ public class BuiltInAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerZCallback(NotifyCallback callback, boolean initialNotify) {
int uid = AccelerometerDataJNI.registerZCallback(m_index, callback, initialNotify);

View File

@@ -57,8 +57,7 @@ public class CTREPCMSim extends PneumaticsBaseSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerClosedLoopEnabledCallback(
NotifyCallback callback, boolean initialNotify) {

View File

@@ -45,8 +45,7 @@ public class DIOSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DIODataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -76,8 +75,7 @@ public class DIOSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerValueCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DIODataJNI.registerValueCallback(m_index, callback, initialNotify);
@@ -107,8 +105,7 @@ public class DIOSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerPulseLengthCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DIODataJNI.registerPulseLengthCallback(m_index, callback, initialNotify);
@@ -138,8 +135,7 @@ public class DIOSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerIsInputCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DIODataJNI.registerIsInputCallback(m_index, callback, initialNotify);
@@ -169,8 +165,7 @@ public class DIOSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerFilterIndexCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DIODataJNI.registerFilterIndexCallback(m_index, callback, initialNotify);

View File

@@ -62,8 +62,7 @@ public class DigitalPWMSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DigitalPWMDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -93,8 +92,7 @@ public class DigitalPWMSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerDutyCycleCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DigitalPWMDataJNI.registerDutyCycleCallback(m_index, callback, initialNotify);
@@ -124,8 +122,7 @@ public class DigitalPWMSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerPinCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DigitalPWMDataJNI.registerPinCallback(m_index, callback, initialNotify);

View File

@@ -22,8 +22,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called whenever the enabled state is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerEnabledCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -54,8 +53,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called on autonomous mode entrance/exit
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerAutonomousCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -86,8 +84,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called whenever the test mode is entered or left
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerTestCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DriverStationDataJNI.registerTestCallback(callback, initialNotify);
@@ -117,8 +114,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called whenever the eStop state changes
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerEStopCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -149,8 +145,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called whenever the FMS connection changes
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerFmsAttachedCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -181,8 +176,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called whenever the DS connection changes
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerDsAttachedCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -213,8 +207,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called whenever the alliance station changes
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerAllianceStationIdCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -264,8 +257,7 @@ public final class DriverStationSim {
*
* @param callback the callback that will be called whenever match time changes
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerMatchTimeCallback(
NotifyCallback callback, boolean initialNotify) {

View File

@@ -57,8 +57,7 @@ public class DutyCycleSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DutyCycleDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -88,8 +87,7 @@ public class DutyCycleSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerFrequencyCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DutyCycleDataJNI.registerFrequencyCallback(m_index, callback, initialNotify);
@@ -119,8 +117,7 @@ public class DutyCycleSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerOutputCallback(NotifyCallback callback, boolean initialNotify) {
int uid = DutyCycleDataJNI.registerOutputCallback(m_index, callback, initialNotify);

View File

@@ -58,8 +58,7 @@ public class EncoderSim {
*
* @param callback the callback that will be called whenever the Initialized property is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = EncoderDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -89,8 +88,7 @@ public class EncoderSim {
*
* @param callback the callback that will be called whenever the count property is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerCountCallback(NotifyCallback callback, boolean initialNotify) {
int uid = EncoderDataJNI.registerCountCallback(m_index, callback, initialNotify);
@@ -120,8 +118,7 @@ public class EncoderSim {
*
* @param callback the callback that will be called whenever the period is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerPeriodCallback(NotifyCallback callback, boolean initialNotify) {
int uid = EncoderDataJNI.registerPeriodCallback(m_index, callback, initialNotify);
@@ -151,8 +148,7 @@ public class EncoderSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerResetCallback(NotifyCallback callback, boolean initialNotify) {
int uid = EncoderDataJNI.registerResetCallback(m_index, callback, initialNotify);
@@ -182,8 +178,7 @@ public class EncoderSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerMaxPeriodCallback(NotifyCallback callback, boolean initialNotify) {
int uid = EncoderDataJNI.registerMaxPeriodCallback(m_index, callback, initialNotify);
@@ -213,8 +208,7 @@ public class EncoderSim {
*
* @param callback the callback that will be called whenever the direction is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerDirectionCallback(NotifyCallback callback, boolean initialNotify) {
int uid = EncoderDataJNI.registerDirectionCallback(m_index, callback, initialNotify);
@@ -244,8 +238,7 @@ public class EncoderSim {
*
* @param callback the callback that will be called whenever the reverse direction is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerReverseDirectionCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -276,8 +269,7 @@ public class EncoderSim {
*
* @param callback the callback that will be called whenever the samples-to-average is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerSamplesToAverageCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -308,8 +300,7 @@ public class EncoderSim {
*
* @param callback the callback that will be called whenever the distance per pulse is changed
* @param initialNotify if true, the callback will be run on the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerDistancePerPulseCallback(
NotifyCallback callback, boolean initialNotify) {

View File

@@ -27,8 +27,7 @@ public class I2CSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = I2CDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -57,8 +56,7 @@ public class I2CSim {
* Register a callback to be run whenever a `read` operation is done.
*
* @param callback the callback that is run on `read` operations
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerReadCallback(BufferCallback callback) {
int uid = I2CDataJNI.registerReadCallback(m_index, callback);
@@ -69,8 +67,7 @@ public class I2CSim {
* Register a callback to be run whenever a `write` operation is done.
*
* @param callback the callback that is run on `write` operations
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerWriteCallback(ConstBufferCallback callback) {
int uid = I2CDataJNI.registerWriteCallback(m_index, callback);

View File

@@ -40,8 +40,7 @@ public class PDPSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid =
@@ -72,8 +71,7 @@ public class PDPSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerTemperatureCallback(NotifyCallback callback, boolean initialNotify) {
int uid =
@@ -104,8 +102,7 @@ public class PDPSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerVoltageCallback(NotifyCallback callback, boolean initialNotify) {
int uid = PowerDistributionDataJNI.registerVoltageCallback(m_index, callback, initialNotify);
@@ -136,8 +133,7 @@ public class PDPSim {
* @param channel the channel
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerCurrentCallback(
int channel, NotifyCallback callback, boolean initialNotify) {

View File

@@ -45,8 +45,7 @@ public class PWMSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = PWMDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -76,8 +75,7 @@ public class PWMSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerPulseMicrosecondCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -108,8 +106,7 @@ public class PWMSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerSpeedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = PWMDataJNI.registerSpeedCallback(m_index, callback, initialNotify);
@@ -139,8 +136,7 @@ public class PWMSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerPositionCallback(NotifyCallback callback, boolean initialNotify) {
int uid = PWMDataJNI.registerPositionCallback(m_index, callback, initialNotify);
@@ -170,8 +166,7 @@ public class PWMSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerPeriodScaleCallback(NotifyCallback callback, boolean initialNotify) {
int uid = PWMDataJNI.registerPeriodScaleCallback(m_index, callback, initialNotify);
@@ -201,8 +196,7 @@ public class PWMSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerZeroLatchCallback(NotifyCallback callback, boolean initialNotify) {
int uid = PWMDataJNI.registerZeroLatchCallback(m_index, callback, initialNotify);

View File

@@ -64,8 +64,7 @@ public abstract class PneumaticsBaseSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public abstract CallbackStore registerInitializedCallback(
NotifyCallback callback, boolean initialNotify);
@@ -89,8 +88,7 @@ public abstract class PneumaticsBaseSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public abstract CallbackStore registerCompressorOnCallback(
NotifyCallback callback, boolean initialNotify);
@@ -117,8 +115,7 @@ public abstract class PneumaticsBaseSim {
* @param channel the channel to monitor
* @param callback the callback
* @param initialNotify should the callback be run with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public abstract CallbackStore registerSolenoidOutputCallback(
int channel, NotifyCallback callback, boolean initialNotify);
@@ -142,8 +139,7 @@ public abstract class PneumaticsBaseSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public abstract CallbackStore registerPressureSwitchCallback(
NotifyCallback callback, boolean initialNotify);
@@ -167,8 +163,7 @@ public abstract class PneumaticsBaseSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public abstract CallbackStore registerCompressorCurrentCallback(
NotifyCallback callback, boolean initialNotify);

View File

@@ -57,8 +57,7 @@ public class REVPHSim extends PneumaticsBaseSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerCompressorConfigTypeCallback(
NotifyCallback callback, boolean initialNotify) {

View File

@@ -35,8 +35,7 @@ public class RelaySim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedForwardCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -67,8 +66,7 @@ public class RelaySim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedReverseCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -99,8 +97,7 @@ public class RelaySim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerForwardCallback(NotifyCallback callback, boolean initialNotify) {
int uid = RelayDataJNI.registerForwardCallback(m_index, callback, initialNotify);
@@ -130,8 +127,7 @@ public class RelaySim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerReverseCallback(NotifyCallback callback, boolean initialNotify) {
int uid = RelayDataJNI.registerReverseCallback(m_index, callback, initialNotify);

View File

@@ -20,8 +20,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerFPGAButtonCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -52,8 +51,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerVInVoltageCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -84,8 +82,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerVInCurrentCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -116,8 +113,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserVoltage6VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -148,8 +144,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserCurrent6VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -180,8 +175,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserActive6VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -212,8 +206,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserVoltage5VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -244,8 +237,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserCurrent5VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -276,8 +268,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserActive5VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -308,8 +299,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserVoltage3V3Callback(
NotifyCallback callback, boolean initialNotify) {
@@ -340,8 +330,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserCurrent3V3Callback(
NotifyCallback callback, boolean initialNotify) {
@@ -372,8 +361,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserActive3V3Callback(
NotifyCallback callback, boolean initialNotify) {
@@ -404,8 +392,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserFaults6VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -436,8 +423,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserFaults5VCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -468,8 +454,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerUserFaults3V3Callback(
NotifyCallback callback, boolean initialNotify) {
@@ -500,8 +485,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerBrownoutVoltageCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -532,8 +516,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerCPUTempCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -564,8 +547,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerTeamNumberCallback(
NotifyCallback callback, boolean initialNotify) {
@@ -632,8 +614,7 @@ public final class RoboRioSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerRadioLEDStateCallback(
NotifyCallback callback, boolean initialNotify) {

View File

@@ -25,8 +25,7 @@ public class SPIAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerActiveCallback(NotifyCallback callback, boolean initialNotify) {
int uid = SPIAccelerometerDataJNI.registerActiveCallback(m_index, callback, initialNotify);
@@ -56,8 +55,7 @@ public class SPIAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerRangeCallback(NotifyCallback callback, boolean initialNotify) {
int uid = SPIAccelerometerDataJNI.registerRangeCallback(m_index, callback, initialNotify);
@@ -87,8 +85,7 @@ public class SPIAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerXCallback(NotifyCallback callback, boolean initialNotify) {
int uid = SPIAccelerometerDataJNI.registerXCallback(m_index, callback, initialNotify);
@@ -118,8 +115,7 @@ public class SPIAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerYCallback(NotifyCallback callback, boolean initialNotify) {
int uid = SPIAccelerometerDataJNI.registerYCallback(m_index, callback, initialNotify);
@@ -149,8 +145,7 @@ public class SPIAccelerometerSim {
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerZCallback(NotifyCallback callback, boolean initialNotify) {
int uid = SPIAccelerometerDataJNI.registerZCallback(m_index, callback, initialNotify);

View File

@@ -24,8 +24,7 @@ public class SPISim {
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) {
int uid = SPIDataJNI.registerInitializedCallback(m_index, callback, initialNotify);
@@ -54,8 +53,7 @@ public class SPISim {
* Register a callback to be run whenever a `read` operation is executed.
*
* @param callback the callback
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerReadCallback(BufferCallback callback) {
int uid = SPIDataJNI.registerReadCallback(m_index, callback);
@@ -66,8 +64,7 @@ public class SPISim {
* Register a callback to be run whenever a `write` operation is executed.
*
* @param callback the callback
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerWriteCallback(ConstBufferCallback callback) {
int uid = SPIDataJNI.registerWriteCallback(m_index, callback);
@@ -78,8 +75,7 @@ public class SPISim {
* Register a callback to be run whenever an auto receive buffer is received.
*
* @param callback the callback
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerReadAutoReceiveBufferCallback(
SpiReadAutoReceiveBufferCallback callback) {

View File

@@ -183,8 +183,7 @@ public class SimDeviceSim {
*
* @param callback the callback
* @param initialNotify should the callback be run with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerValueCreatedCallback(
SimValueCallback callback, boolean initialNotify) {
@@ -198,8 +197,7 @@ public class SimDeviceSim {
* @param value simulated value
* @param callback the callback
* @param initialNotify should the callback be run with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerValueChangedCallback(
SimValue value, SimValueCallback callback, boolean initialNotify) {
@@ -216,8 +214,7 @@ public class SimDeviceSim {
* @param value simulated value
* @param callback callback
* @param initialNotify ignored (present for consistency)
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerValueResetCallback(
SimValue value, SimValueCallback callback, boolean initialNotify) {
@@ -243,8 +240,7 @@ public class SimDeviceSim {
* @param prefix the prefix to filter sim devices
* @param callback the callback
* @param initialNotify should the callback be run with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerDeviceCreatedCallback(
String prefix, SimDeviceCallback callback, boolean initialNotify) {
@@ -259,8 +255,7 @@ public class SimDeviceSim {
* @param prefix the prefix to filter sim devices
* @param callback the callback
* @param initialNotify should the callback be run with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public static CallbackStore registerDeviceFreedCallback(
String prefix, SimDeviceCallback callback, boolean initialNotify) {

View File

@@ -68,8 +68,7 @@ public class SolenoidSim {
*
* @param callback the callback
* @param initialNotify should the callback be run with the initial value
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
* @return the {@link CallbackStore} object associated with this callback.
*/
public CallbackStore registerOutputCallback(NotifyCallback callback, boolean initialNotify) {
return m_module.registerSolenoidOutputCallback(m_channel, callback, initialNotify);