/* * Class: edu_wpi_first_wpilibj_hal_PDPJNI * Method: getPDPTotalCurrent * Signature: (BLjava/nio/IntBuffer;)D */ JNIEXPORT jdouble JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_getPDPTotalCurrent (JNIEnv *env, jclass, jobject status, jint module) { jint *status_ptr = (jint *)env->GetDirectBufferAddress(status); return getPDPTotalCurrent(status_ptr, module); }
/* * Class: edu_wpi_first_wpilibj_hal_PDPJNI * Method: getPDPTotalCurrent * Signature: (I)D */ JNIEXPORT jdouble JNICALL Java_edu_wpi_first_wpilibj_hal_PDPJNI_getPDPTotalCurrent (JNIEnv *env, jclass, jint module) { int32_t status = 0; double current = getPDPTotalCurrent(module, &status); CheckStatus(env, status, false); return current; }
/** * Query the total current of all monitored PDP channels (0-15) * @return The the total current drawn from the PDP channels in Amperes */ double PowerDistributionPanel::GetTotalCurrent() { int32_t status = 0; double current = getPDPTotalCurrent(&status); if(status) { wpi_setWPIErrorWithContext(Timeout, ""); } return current; }