Add Notifier HALSIM access

This commit is contained in:
Peter Johnson
2019-11-09 11:41:58 -08:00
parent 3e049e02f0
commit f5446c7409
5 changed files with 157 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.hal.sim;
import edu.wpi.first.hal.sim.mockdata.NotifierDataJNI;
public final class NotifierSim {
private NotifierSim() {
}
public static long getNextTimeout() {
return NotifierDataJNI.getNextTimeout();
}
public static int getNumNotifiers() {
return NotifierDataJNI.getNumNotifiers();
}
}

View File

@@ -0,0 +1,15 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.hal.sim.mockdata;
import edu.wpi.first.hal.JNIWrapper;
public class NotifierDataJNI extends JNIWrapper {
public static native long getNextTimeout();
public static native int getNumNotifiers();
}