/* * Class: edu_wpi_first_wpilibj_hal_SolenoidJNI * Method: getPortWithModule * Signature: (BB)J */ JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getPortWithModule (JNIEnv *env, jclass, jbyte module, jbyte channel) { void* port_pointer = getPortWithModule(module, channel); return (jlong)port_pointer; }
/* * Class: edu_wpi_first_wpilibj_hal_SolenoidJNI * Method: getPortWithModule * Signature: (BB)Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getPortWithModule (JNIEnv *env, jclass, jbyte module, jbyte channel) { VoidPointer *port_pointer = new VoidPointer; *port_pointer = getPortWithModule(module, channel); return env->NewDirectByteBuffer(port_pointer, 4); }