DRCL J-Sim API

drcl.inet.sensorsim
Class BatteryTable

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.inet.sensorsim.BatteryTable
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable

public class BatteryTable
extends DrclObj

This class implements the table that specifies the capacity of a battery as a function of its current.

Version:
1.0, 12/19/2003
Author:
Ahmed Sobeih
See Also:
Serialized Form

Field Summary
static int CAPACITY
           
static int CURRENT
           
static int MAX_CAPACITY
           
static int MAX_TABLE_SIZE
           
static int SEC_IN_HOUR
           
 
Constructor Summary
BatteryTable()
           
 
Method Summary
 double computeNewCapacity(double current, double duration)
          Computes the new value of the capacity based on a given value for current and after a certain given time duration
 double getCapacity(double current)
          Gets the interpolated capacity at a given value of current
 double getCurCapacity()
          Gets the current capacity
 int inputData(int i, double current, double capacity)
          Inputs an entry in the table
 void setMaxCapacity(double a)
          Sets the maximum capacity
 
Methods inherited from class drcl.DrclObj
clone, duplicate, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_TABLE_SIZE

public static final int MAX_TABLE_SIZE
See Also:
Constant Field Values

CURRENT

public static final int CURRENT
See Also:
Constant Field Values

CAPACITY

public static final int CAPACITY
See Also:
Constant Field Values

SEC_IN_HOUR

public static final int SEC_IN_HOUR
See Also:
Constant Field Values

MAX_CAPACITY

public static final int MAX_CAPACITY
See Also:
Constant Field Values
Constructor Detail

BatteryTable

public BatteryTable()
Method Detail

setMaxCapacity

public void setMaxCapacity(double a)
Sets the maximum capacity


getCurCapacity

public double getCurCapacity()
Gets the current capacity


computeNewCapacity

public double computeNewCapacity(double current,
                                 double duration)
Computes the new value of the capacity based on a given value for current and after a certain given time duration


getCapacity

public double getCapacity(double current)
Gets the interpolated capacity at a given value of current


inputData

public int inputData(int i,
                     double current,
                     double capacity)
Inputs an entry in the table


DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~