org.opengts.db
Class BatteryLevelProfile

java.lang.Object
  extended by org.opengts.db.BatteryLevelProfile

public class BatteryLevelProfile
extends java.lang.Object

BatteryLevelProfile class


Constructor Summary
BatteryLevelProfile(CurveFit cf)
          CurveFit Constructor
BatteryLevelProfile(double loV, double hiV)
          Low/High Volt Constructor
BatteryLevelProfile(java.lang.String blpStr)
          String Constructor
BatteryLevelProfile(java.lang.String blpStr, double dftLoV, double dftHiV)
          String Constructor
BatteryLevelProfile(XYPair[] xyProf)
          XYPair Constructor
 
Method Summary
 double getLevelFromVolts(double V)
          Converts the specified battery voltage to the proper battery percent
 boolean hasCurveFit()
          Returns true if this instance has a defined CurveFit
 boolean hasProfile()
          Returns true if this instance has a defined XYPair profile
 boolean hasVoltageRange()
          Returns true if this instance contains a valid voltage range
 boolean isValid()
          Returns true if this instance is valid
static boolean isValid(BatteryLevelProfile blp)
          Returns true if the specified instance is valid
 void logInvalidWarning(java.lang.String blpStr)
          Logs a warning if this instance is invalid
static void main(java.lang.String[] argv)
          Debug/Testing entry point
 java.lang.String toString()
          Returns a String representation of this instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BatteryLevelProfile

public BatteryLevelProfile(double loV,
                           double hiV)
Low/High Volt Constructor


BatteryLevelProfile

public BatteryLevelProfile(XYPair[] xyProf)
XYPair Constructor


BatteryLevelProfile

public BatteryLevelProfile(CurveFit cf)
CurveFit Constructor


BatteryLevelProfile

public BatteryLevelProfile(java.lang.String blpStr,
                           double dftLoV,
                           double dftHiV)
String Constructor


BatteryLevelProfile

public BatteryLevelProfile(java.lang.String blpStr)
String Constructor

Method Detail

isValid

public boolean isValid()
Returns true if this instance is valid


isValid

public static boolean isValid(BatteryLevelProfile blp)
Returns true if the specified instance is valid


logInvalidWarning

public void logInvalidWarning(java.lang.String blpStr)
Logs a warning if this instance is invalid


hasVoltageRange

public boolean hasVoltageRange()
Returns true if this instance contains a valid voltage range


hasProfile

public boolean hasProfile()
Returns true if this instance has a defined XYPair profile


hasCurveFit

public boolean hasCurveFit()
Returns true if this instance has a defined CurveFit


toString

public java.lang.String toString()
Returns a String representation of this instance

Overrides:
toString in class java.lang.Object

getLevelFromVolts

public double getLevelFromVolts(double V)
Converts the specified battery voltage to the proper battery percent


main

public static void main(java.lang.String[] argv)
Debug/Testing entry point