Class BattFuelGaugeJNI

java.lang.Object
com.playingwithfusion.jni.BattFuelGaugeJNI

public class BattFuelGaugeJNI extends Object
JNI interface for accessing battery fuel gauge data. All methods are native and forward calls to the C/C++ implementation.
  • Constructor Details

    • BattFuelGaugeJNI

      public BattFuelGaugeJNI()
  • Method Details

    • forceLoad

      public static void forceLoad() throws IOException
      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

      public static String getNickname(long handle)
    • getManufacturer

      public static int getManufacturer(long handle)
    • setNickname

      public static void setNickname(long handle, String newNickname)
    • 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)