2020-12-26 14:12:05 -08:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
2018-05-11 12:38:23 -07:00
|
|
|
|
|
|
|
|
#include <jni.h>
|
|
|
|
|
|
|
|
|
|
#include "CallbackStore.h"
|
2025-11-07 19:55:43 -05:00
|
|
|
#include "org_wpilib_hardware_hal_simulation_RoboRioDataJNI.h"
|
2025-11-07 19:56:21 -05:00
|
|
|
#include "wpi/hal/simulation/RoboRioData.h"
|
2025-11-07 19:57:55 -05:00
|
|
|
#include "wpi/util/jni_util.hpp"
|
2018-05-11 12:38:23 -07:00
|
|
|
|
2020-06-26 17:12:55 -07:00
|
|
|
using namespace hal;
|
2022-12-09 00:58:55 -05:00
|
|
|
using namespace wpi::java;
|
2020-06-26 17:12:55 -07:00
|
|
|
|
2018-05-11 12:38:23 -07:00
|
|
|
extern "C" {
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: registerVInVoltageCallback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerVInVoltageCallback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::AllocateCallbackNoIndex(
|
|
|
|
|
env, callback, initialNotify, &HALSIM_RegisterRoboRioVInVoltageCallback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: cancelVInVoltageCallback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (I)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelVInVoltageCallback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioVInVoltageCallback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: getVInVoltage
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: ()D
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jdouble JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getVInVoltage
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return HALSIM_GetRoboRioVInVoltage();
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: setVInVoltage
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (D)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setVInVoltage
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass, jdouble value)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
HALSIM_SetRoboRioVInVoltage(value);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: registerUserVoltage3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerUserVoltage3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::AllocateCallbackNoIndex(
|
|
|
|
|
env, callback, initialNotify,
|
|
|
|
|
&HALSIM_RegisterRoboRioUserVoltage3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: cancelUserVoltage3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (I)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelUserVoltage3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioUserVoltage3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: getUserVoltage3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: ()D
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jdouble JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getUserVoltage3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return HALSIM_GetRoboRioUserVoltage3V3();
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: setUserVoltage3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (D)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setUserVoltage3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass, jdouble value)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
HALSIM_SetRoboRioUserVoltage3V3(value);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: registerUserCurrent3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerUserCurrent3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::AllocateCallbackNoIndex(
|
|
|
|
|
env, callback, initialNotify,
|
|
|
|
|
&HALSIM_RegisterRoboRioUserCurrent3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: cancelUserCurrent3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (I)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelUserCurrent3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioUserCurrent3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: getUserCurrent3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: ()D
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jdouble JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getUserCurrent3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return HALSIM_GetRoboRioUserCurrent3V3();
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: setUserCurrent3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (D)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setUserCurrent3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass, jdouble value)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
HALSIM_SetRoboRioUserCurrent3V3(value);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: registerUserActive3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerUserActive3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::AllocateCallbackNoIndex(
|
|
|
|
|
env, callback, initialNotify,
|
|
|
|
|
&HALSIM_RegisterRoboRioUserActive3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: cancelUserActive3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (I)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelUserActive3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioUserActive3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: getUserActive3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: ()Z
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jboolean JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getUserActive3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return HALSIM_GetRoboRioUserActive3V3();
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: setUserActive3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (Z)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setUserActive3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass, jboolean value)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
HALSIM_SetRoboRioUserActive3V3(value);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: registerUserFaults3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerUserFaults3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::AllocateCallbackNoIndex(
|
|
|
|
|
env, callback, initialNotify,
|
|
|
|
|
&HALSIM_RegisterRoboRioUserFaults3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: cancelUserFaults3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (I)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelUserFaults3V3Callback
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioUserFaults3V3Callback);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: getUserFaults3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: ()I
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getUserFaults3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
return HALSIM_GetRoboRioUserFaults3V3();
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: setUserFaults3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: (I)V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setUserFaults3V3
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass, jint value)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
HALSIM_SetRoboRioUserFaults3V3(value);
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
2021-10-13 19:14:27 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2021-10-13 19:14:27 -07:00
|
|
|
* Method: registerBrownoutVoltageCallback
|
|
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerBrownoutVoltageCallback
|
2021-10-13 19:14:27 -07:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
|
|
|
|
{
|
|
|
|
|
return sim::AllocateCallbackNoIndex(
|
|
|
|
|
env, callback, initialNotify,
|
|
|
|
|
&HALSIM_RegisterRoboRioBrownoutVoltageCallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2021-10-13 19:14:27 -07:00
|
|
|
* Method: cancelBrownoutVoltageCallback
|
|
|
|
|
* Signature: (I)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelBrownoutVoltageCallback
|
2021-10-13 19:14:27 -07:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
|
|
|
|
{
|
|
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioBrownoutVoltageCallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2021-10-13 19:14:27 -07:00
|
|
|
* Method: getBrownoutVoltage
|
|
|
|
|
* Signature: ()D
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jdouble JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getBrownoutVoltage
|
2021-10-13 19:14:27 -07:00
|
|
|
(JNIEnv*, jclass)
|
|
|
|
|
{
|
|
|
|
|
return HALSIM_GetRoboRioBrownoutVoltage();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2021-10-13 19:14:27 -07:00
|
|
|
* Method: setBrownoutVoltage
|
|
|
|
|
* Signature: (D)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setBrownoutVoltage
|
2021-10-13 19:14:27 -07:00
|
|
|
(JNIEnv*, jclass, jdouble value)
|
|
|
|
|
{
|
|
|
|
|
HALSIM_SetRoboRioBrownoutVoltage(value);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-31 14:51:57 -04:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-08-31 14:51:57 -04:00
|
|
|
* Method: registerCPUTempCallback
|
|
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerCPUTempCallback
|
2023-08-31 14:51:57 -04:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
|
|
|
|
{
|
|
|
|
|
return sim::AllocateCallbackNoIndex(env, callback, initialNotify,
|
|
|
|
|
&HALSIM_RegisterRoboRioCPUTempCallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-08-31 14:51:57 -04:00
|
|
|
* Method: cancelCPUTempCallback
|
|
|
|
|
* Signature: (I)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelCPUTempCallback
|
2023-08-31 14:51:57 -04:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
|
|
|
|
{
|
|
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioCPUTempCallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-08-31 14:51:57 -04:00
|
|
|
* Method: getCPUTemp
|
|
|
|
|
* Signature: ()D
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jdouble JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getCPUTemp
|
2023-08-31 14:51:57 -04:00
|
|
|
(JNIEnv*, jclass)
|
|
|
|
|
{
|
|
|
|
|
return HALSIM_GetRoboRioCPUTemp();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-08-31 14:51:57 -04:00
|
|
|
* Method: setCPUTemp
|
|
|
|
|
* Signature: (D)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setCPUTemp
|
2023-08-31 14:51:57 -04:00
|
|
|
(JNIEnv*, jclass, jdouble cpuTemp)
|
|
|
|
|
{
|
|
|
|
|
HALSIM_SetRoboRioCPUTemp(cpuTemp);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-02 02:34:18 -04:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-09-02 02:34:18 -04:00
|
|
|
* Method: registerTeamNumberCallback
|
|
|
|
|
* Signature: (Ljava/lang/Object;Z)I
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_registerTeamNumberCallback
|
2023-09-02 02:34:18 -04:00
|
|
|
(JNIEnv* env, jclass, jobject callback, jboolean initialNotify)
|
|
|
|
|
{
|
|
|
|
|
return sim::AllocateCallbackNoIndex(
|
|
|
|
|
env, callback, initialNotify, &HALSIM_RegisterRoboRioTeamNumberCallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-09-02 02:34:18 -04:00
|
|
|
* Method: cancelTeamNumberCallback
|
|
|
|
|
* Signature: (I)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_cancelTeamNumberCallback
|
2023-09-02 02:34:18 -04:00
|
|
|
(JNIEnv* env, jclass, jint handle)
|
|
|
|
|
{
|
|
|
|
|
return sim::FreeCallbackNoIndex(env, handle,
|
|
|
|
|
&HALSIM_CancelRoboRioTeamNumberCallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-09-02 02:34:18 -04:00
|
|
|
* Method: getTeamNumber
|
|
|
|
|
* Signature: ()I
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getTeamNumber
|
2023-09-02 02:34:18 -04:00
|
|
|
(JNIEnv*, jclass)
|
|
|
|
|
{
|
|
|
|
|
return HALSIM_GetRoboRioTeamNumber();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2023-09-02 02:34:18 -04:00
|
|
|
* Method: setTeamNumber
|
|
|
|
|
* Signature: (I)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setTeamNumber
|
2023-09-02 02:34:18 -04:00
|
|
|
(JNIEnv*, jclass, jint value)
|
|
|
|
|
{
|
|
|
|
|
HALSIM_SetRoboRioTeamNumber(value);
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-09 00:58:55 -05:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2022-12-09 00:58:55 -05:00
|
|
|
* Method: getSerialNumber
|
|
|
|
|
* Signature: ()Ljava/lang/String;
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jstring JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getSerialNumber
|
2022-12-09 00:58:55 -05:00
|
|
|
(JNIEnv* env, jclass)
|
|
|
|
|
{
|
Change C APIs to a unified string implementation (#6299)
Currently in the entire C API of WPILib we have ~8 different ways of handling strings. The C API actually isn't built for pure C callers (We don't actually have any of those). Instead, they're built for interop between languages like LabVIEW and C# which can talk to C API's directly.
For output parameters, the choice was fairly obvious. An output struct containing a const string pointer and a length makes the most sense. Its easy to use these from most other languages, and doesn't require special null termination handling. Freeing these is also easy, as if you ever receive one of these string structures, theres just a single function call to free it.
Input parameters are a bit more complex. To be used from pure C, and from LabVIEW, a null terminated string is the best in most cases. However, null terminated strings in general have a lot of downsides. Additionally, from LabVIEW there are other considerations around encoding that having a wrapper struct helps make a bit easier. From a language like C#, a wrapper struct is by far the easiest, as custom marshalling can make it trivial to marshal both UTF8 and UTF16 strings down.
The final consideration is its nice to have an identical concept for both input and output. It makes the rules fairly easy to understand.
WPILib will not have any APIs that manipulate a string allocated externally. This means WPI_String can be const, as across the boundary it is always const.
If a WPILib API takes a const WPI_String*, WPILib will not manipulate or attempt to free that string, and that string is treated as an input. It is up to the caller to handle that memory, WPILib will never hold onto that memory longer than the call.
If a WPILib API takes a WPI_String*, that string is an output. WPILib will allocate that API with WPI_AllocateString(), fill in the string, and return to the caller. When the caller is done with the string, they must free it with WPI_FreeString().
If an output struct contains a WPI_String member, that member is considered read only, and should not be explicitly freed. The caller should call the free function for that struct.
If an array of WPI_Strings are returned, each individual string is considered read only, and should not be explicitly freed. The free function for that array should be called by the caller.
If an input struct containing a WPI_String, or an input array of WPI_Strings is passed to WPILib, the individual strings will not be manipulated or freed by WPILib, and the caller owns and should free that memory.
Callbacks also follow these rules. The most common is a callback either getting passed a const WPI_String* or a struct containing a WPI_String. In both of these cases, the callback target should consider these strings read only, and not attempt to free them or manipulate them.
2024-05-13 05:35:14 -07:00
|
|
|
WPI_String str;
|
|
|
|
|
HALSIM_GetRoboRioSerialNumber(&str);
|
|
|
|
|
auto jstr = MakeJString(env, wpi::to_string_view(&str));
|
|
|
|
|
WPI_FreeString(&str);
|
|
|
|
|
return jstr;
|
2022-12-09 00:58:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2022-12-09 00:58:55 -05:00
|
|
|
* Method: setSerialNumber
|
|
|
|
|
* Signature: (Ljava/lang/String;)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setSerialNumber
|
2022-12-09 00:58:55 -05:00
|
|
|
(JNIEnv* env, jclass, jstring serialNumber)
|
|
|
|
|
{
|
|
|
|
|
JStringRef serialNumberJString{env, serialNumber};
|
Change C APIs to a unified string implementation (#6299)
Currently in the entire C API of WPILib we have ~8 different ways of handling strings. The C API actually isn't built for pure C callers (We don't actually have any of those). Instead, they're built for interop between languages like LabVIEW and C# which can talk to C API's directly.
For output parameters, the choice was fairly obvious. An output struct containing a const string pointer and a length makes the most sense. Its easy to use these from most other languages, and doesn't require special null termination handling. Freeing these is also easy, as if you ever receive one of these string structures, theres just a single function call to free it.
Input parameters are a bit more complex. To be used from pure C, and from LabVIEW, a null terminated string is the best in most cases. However, null terminated strings in general have a lot of downsides. Additionally, from LabVIEW there are other considerations around encoding that having a wrapper struct helps make a bit easier. From a language like C#, a wrapper struct is by far the easiest, as custom marshalling can make it trivial to marshal both UTF8 and UTF16 strings down.
The final consideration is its nice to have an identical concept for both input and output. It makes the rules fairly easy to understand.
WPILib will not have any APIs that manipulate a string allocated externally. This means WPI_String can be const, as across the boundary it is always const.
If a WPILib API takes a const WPI_String*, WPILib will not manipulate or attempt to free that string, and that string is treated as an input. It is up to the caller to handle that memory, WPILib will never hold onto that memory longer than the call.
If a WPILib API takes a WPI_String*, that string is an output. WPILib will allocate that API with WPI_AllocateString(), fill in the string, and return to the caller. When the caller is done with the string, they must free it with WPI_FreeString().
If an output struct contains a WPI_String member, that member is considered read only, and should not be explicitly freed. The caller should call the free function for that struct.
If an array of WPI_Strings are returned, each individual string is considered read only, and should not be explicitly freed. The free function for that array should be called by the caller.
If an input struct containing a WPI_String, or an input array of WPI_Strings is passed to WPILib, the individual strings will not be manipulated or freed by WPILib, and the caller owns and should free that memory.
Callbacks also follow these rules. The most common is a callback either getting passed a const WPI_String* or a struct containing a WPI_String. In both of these cases, the callback target should consider these strings read only, and not attempt to free them or manipulate them.
2024-05-13 05:35:14 -07:00
|
|
|
auto str = wpi::make_string(serialNumberJString);
|
|
|
|
|
HALSIM_SetRoboRioSerialNumber(&str);
|
2022-12-09 00:58:55 -05:00
|
|
|
}
|
|
|
|
|
|
2022-12-26 14:39:51 -05:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2022-12-26 14:39:51 -05:00
|
|
|
* Method: getComments
|
|
|
|
|
* Signature: ()Ljava/lang/String;
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jstring JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_getComments
|
2022-12-26 14:39:51 -05:00
|
|
|
(JNIEnv* env, jclass)
|
|
|
|
|
{
|
Change C APIs to a unified string implementation (#6299)
Currently in the entire C API of WPILib we have ~8 different ways of handling strings. The C API actually isn't built for pure C callers (We don't actually have any of those). Instead, they're built for interop between languages like LabVIEW and C# which can talk to C API's directly.
For output parameters, the choice was fairly obvious. An output struct containing a const string pointer and a length makes the most sense. Its easy to use these from most other languages, and doesn't require special null termination handling. Freeing these is also easy, as if you ever receive one of these string structures, theres just a single function call to free it.
Input parameters are a bit more complex. To be used from pure C, and from LabVIEW, a null terminated string is the best in most cases. However, null terminated strings in general have a lot of downsides. Additionally, from LabVIEW there are other considerations around encoding that having a wrapper struct helps make a bit easier. From a language like C#, a wrapper struct is by far the easiest, as custom marshalling can make it trivial to marshal both UTF8 and UTF16 strings down.
The final consideration is its nice to have an identical concept for both input and output. It makes the rules fairly easy to understand.
WPILib will not have any APIs that manipulate a string allocated externally. This means WPI_String can be const, as across the boundary it is always const.
If a WPILib API takes a const WPI_String*, WPILib will not manipulate or attempt to free that string, and that string is treated as an input. It is up to the caller to handle that memory, WPILib will never hold onto that memory longer than the call.
If a WPILib API takes a WPI_String*, that string is an output. WPILib will allocate that API with WPI_AllocateString(), fill in the string, and return to the caller. When the caller is done with the string, they must free it with WPI_FreeString().
If an output struct contains a WPI_String member, that member is considered read only, and should not be explicitly freed. The caller should call the free function for that struct.
If an array of WPI_Strings are returned, each individual string is considered read only, and should not be explicitly freed. The free function for that array should be called by the caller.
If an input struct containing a WPI_String, or an input array of WPI_Strings is passed to WPILib, the individual strings will not be manipulated or freed by WPILib, and the caller owns and should free that memory.
Callbacks also follow these rules. The most common is a callback either getting passed a const WPI_String* or a struct containing a WPI_String. In both of these cases, the callback target should consider these strings read only, and not attempt to free them or manipulate them.
2024-05-13 05:35:14 -07:00
|
|
|
WPI_String str;
|
|
|
|
|
HALSIM_GetRoboRioComments(&str);
|
|
|
|
|
auto jstr = MakeJString(env, wpi::to_string_view(&str));
|
|
|
|
|
WPI_FreeString(&str);
|
|
|
|
|
return jstr;
|
2022-12-26 14:39:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2022-12-26 14:39:51 -05:00
|
|
|
* Method: setComments
|
|
|
|
|
* Signature: (Ljava/lang/String;)V
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_setComments
|
2022-12-26 14:39:51 -05:00
|
|
|
(JNIEnv* env, jclass, jstring comments)
|
|
|
|
|
{
|
|
|
|
|
JStringRef commentsJString{env, comments};
|
Change C APIs to a unified string implementation (#6299)
Currently in the entire C API of WPILib we have ~8 different ways of handling strings. The C API actually isn't built for pure C callers (We don't actually have any of those). Instead, they're built for interop between languages like LabVIEW and C# which can talk to C API's directly.
For output parameters, the choice was fairly obvious. An output struct containing a const string pointer and a length makes the most sense. Its easy to use these from most other languages, and doesn't require special null termination handling. Freeing these is also easy, as if you ever receive one of these string structures, theres just a single function call to free it.
Input parameters are a bit more complex. To be used from pure C, and from LabVIEW, a null terminated string is the best in most cases. However, null terminated strings in general have a lot of downsides. Additionally, from LabVIEW there are other considerations around encoding that having a wrapper struct helps make a bit easier. From a language like C#, a wrapper struct is by far the easiest, as custom marshalling can make it trivial to marshal both UTF8 and UTF16 strings down.
The final consideration is its nice to have an identical concept for both input and output. It makes the rules fairly easy to understand.
WPILib will not have any APIs that manipulate a string allocated externally. This means WPI_String can be const, as across the boundary it is always const.
If a WPILib API takes a const WPI_String*, WPILib will not manipulate or attempt to free that string, and that string is treated as an input. It is up to the caller to handle that memory, WPILib will never hold onto that memory longer than the call.
If a WPILib API takes a WPI_String*, that string is an output. WPILib will allocate that API with WPI_AllocateString(), fill in the string, and return to the caller. When the caller is done with the string, they must free it with WPI_FreeString().
If an output struct contains a WPI_String member, that member is considered read only, and should not be explicitly freed. The caller should call the free function for that struct.
If an array of WPI_Strings are returned, each individual string is considered read only, and should not be explicitly freed. The free function for that array should be called by the caller.
If an input struct containing a WPI_String, or an input array of WPI_Strings is passed to WPILib, the individual strings will not be manipulated or freed by WPILib, and the caller owns and should free that memory.
Callbacks also follow these rules. The most common is a callback either getting passed a const WPI_String* or a struct containing a WPI_String. In both of these cases, the callback target should consider these strings read only, and not attempt to free them or manipulate them.
2024-05-13 05:35:14 -07:00
|
|
|
auto str = wpi::make_string(commentsJString);
|
|
|
|
|
HALSIM_SetRoboRioComments(&str);
|
2022-12-26 14:39:51 -05:00
|
|
|
}
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_simulation_RoboRioDataJNI
|
2018-05-13 17:09:56 -07:00
|
|
|
* Method: resetData
|
2020-07-04 00:44:56 -07:00
|
|
|
* Signature: ()V
|
2018-05-13 17:09:56 -07:00
|
|
|
*/
|
2018-05-11 12:38:23 -07:00
|
|
|
JNIEXPORT void JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_hal_simulation_RoboRioDataJNI_resetData
|
2020-07-04 00:44:56 -07:00
|
|
|
(JNIEnv*, jclass)
|
2018-05-13 17:09:56 -07:00
|
|
|
{
|
2020-07-04 00:44:56 -07:00
|
|
|
HALSIM_ResetRoboRioData();
|
2018-05-11 12:38:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // extern "C"
|