/* * Class: edu_wpi_first_wpilibj_hal_SolenoidJNI * Method: getSolenoid * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getSolenoid (JNIEnv *env, jclass, jlong solenoid_port) { int32_t status = 0; jboolean val = getSolenoid((void*)solenoid_port, &status); CheckStatus(env, status); return val; }
/* * Class: edu_wpi_first_wpilibj_hal_SolenoidJNI * Method: getSolenoid * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;)B */ JNIEXPORT jbyte JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getSolenoid (JNIEnv *env, jclass, jobject solenoid_port, jobject status) { VoidPointer *solenoid_port_pointer = (VoidPointer *)env->GetDirectBufferAddress(solenoid_port); jint *status_pointer = (jint*)env->GetDirectBufferAddress(status); return getSolenoid(*solenoid_port_pointer, status_pointer); }