Package com.playingwithfusion.jni
Class BattFuelGaugeJNI
java.lang.Object
com.playingwithfusion.jni.BattFuelGaugeJNI
JNI interface for accessing battery fuel gauge data.
All methods are native and forward calls to the C/C++ implementation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcreate(int motorID) static voiddestroy(long handle) static voidForce load the library.static longgetBatteryAgeDays(long handle) static intgetBatteryState(long handle) static floatgetCapacityAh(long handle) static floatgetCurrent(long handle) static floatgetCycleChargeTime(long handle) static floatgetCycleDischargeTime(long handle) static floatgetCycleMaxCurrent(long handle) static floatgetCycleMaxDodAh(long handle) static floatgetCycleMaxDodWh(long handle) static floatgetCycleMaxVoltage(long handle) static floatgetCycleMinCurrent(long handle) static floatgetCycleMinDodAh(long handle) static floatgetCycleMinDodWh(long handle) static floatgetCycleMinVoltage(long handle) static floatgetCycleRmsDischargeCurrent(long handle) static floatgetCycleStartingVoltage(long handle) static floatgetDodAh(long handle) static floatgetDodWh(long handle) static floatgetEffectiveCapacityAh(long handle) static longgetFirmwareVersion(long handle) static intgetManufacturer(long handle) static floatgetMatchChargeTime(long handle) static floatgetMatchDischargeTime(long handle) static floatgetMatchDuration(long handle) static floatgetMatchEndingCharge(long handle) static floatgetMatchEndingEnergy(long handle) static floatgetMatchMaxCurrent(long handle) static floatgetMatchMaxDodAh(long handle) static floatgetMatchMaxVoltage(long handle) static floatgetMatchMinCurrent(long handle) static floatgetMatchMinDodAh(long handle) static floatgetMatchMinVoltage(long handle) static floatgetMatchRmsDischargeCurrent(long handle) static floatgetMatchStartingCharge(long handle) static floatgetMatchStartingEnergy(long handle) static floatgetMatchStartingVoltage(long handle) static StringgetNickname(long handle) static intgetNumCycles(long handle) static floatgetRatedCapacityAh(long handle) static floatgetRemainingChargePct(long handle) static longgetSerialNumber(long handle) static floatgetVoltage(long handle) static voididentify(long handle) static voidsetManufacturer(long handle, int newMfg) static voidsetNickname(long handle, String newNickname)
-
Constructor Details
-
BattFuelGaugeJNI
public BattFuelGaugeJNI()
-
-
Method Details
-
forceLoad
Force load the library.- Throws:
IOException- Unable to load libPlayingWithFusionDriver.so
-
create
public static long create(int motorID) -
destroy
public static void destroy(long handle) -
identify
public static void identify(long handle) -
getFirmwareVersion
public static long getFirmwareVersion(long handle) -
getSerialNumber
public static long getSerialNumber(long handle) -
getBatteryState
public static int getBatteryState(long handle) -
getCurrent
public static float getCurrent(long handle) -
getVoltage
public static float getVoltage(long handle) -
getDodAh
public static float getDodAh(long handle) -
getDodWh
public static float getDodWh(long handle) -
getRemainingChargePct
public static float getRemainingChargePct(long handle) -
getEffectiveCapacityAh
public static float getEffectiveCapacityAh(long handle) -
getBatteryAgeDays
public static long getBatteryAgeDays(long handle) -
getCapacityAh
public static float getCapacityAh(long handle) -
getRatedCapacityAh
public static float getRatedCapacityAh(long handle) -
getNumCycles
public static int getNumCycles(long handle) -
getNickname
-
getManufacturer
public static int getManufacturer(long handle) -
setNickname
-
setManufacturer
public static void setManufacturer(long handle, int newMfg) -
getCycleRmsDischargeCurrent
public static float getCycleRmsDischargeCurrent(long handle) -
getCycleMaxCurrent
public static float getCycleMaxCurrent(long handle) -
getCycleMinCurrent
public static float getCycleMinCurrent(long handle) -
getCycleMinVoltage
public static float getCycleMinVoltage(long handle) -
getCycleMaxVoltage
public static float getCycleMaxVoltage(long handle) -
getCycleMinDodAh
public static float getCycleMinDodAh(long handle) -
getCycleMaxDodAh
public static float getCycleMaxDodAh(long handle) -
getCycleMinDodWh
public static float getCycleMinDodWh(long handle) -
getCycleMaxDodWh
public static float getCycleMaxDodWh(long handle) -
getCycleChargeTime
public static float getCycleChargeTime(long handle) -
getCycleDischargeTime
public static float getCycleDischargeTime(long handle) -
getCycleStartingVoltage
public static float getCycleStartingVoltage(long handle) -
getMatchRmsDischargeCurrent
public static float getMatchRmsDischargeCurrent(long handle) -
getMatchMaxCurrent
public static float getMatchMaxCurrent(long handle) -
getMatchMinCurrent
public static float getMatchMinCurrent(long handle) -
getMatchMinVoltage
public static float getMatchMinVoltage(long handle) -
getMatchMaxVoltage
public static float getMatchMaxVoltage(long handle) -
getMatchMinDodAh
public static float getMatchMinDodAh(long handle) -
getMatchMaxDodAh
public static float getMatchMaxDodAh(long handle) -
getMatchChargeTime
public static float getMatchChargeTime(long handle) -
getMatchDischargeTime
public static float getMatchDischargeTime(long handle) -
getMatchStartingVoltage
public static float getMatchStartingVoltage(long handle) -
getMatchStartingEnergy
public static float getMatchStartingEnergy(long handle) -
getMatchEndingEnergy
public static float getMatchEndingEnergy(long handle) -
getMatchStartingCharge
public static float getMatchStartingCharge(long handle) -
getMatchEndingCharge
public static float getMatchEndingCharge(long handle) -
getMatchDuration
public static float getMatchDuration(long handle)
-