|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
dlife.robot.Device
dlife.robot.ArraySensor<Double>
dlife.robot.khepera3.Khepera3BatterySensor
public class Khepera3BatterySensor
A class for reading information about the Khepera 3's battery. Methods are provided for reading the voltage, current, average current, and temperature.
| Field Summary | |
|---|---|
static int |
AVERAGE_CURRENT
The average current sensor number. |
static int |
CURRENT
The current sensor number. |
static int |
TEMPERATURE
The temperature sensor number. |
static int |
VOLTAGE
The voltage sensor number. |
| Fields inherited from class dlife.robot.ArraySensor |
|---|
length, values |
| Fields inherited from class dlife.robot.Device |
|---|
DEFAULT_GUI_UPDATE_DELAY, DEFAULT_READ_DELAY, myRobot, readCount |
| Constructor Summary | |
|---|---|
Khepera3BatterySensor()
Creates a new Khepera3BatterySensor. |
|
| Method Summary | |
|---|---|
protected DeviceDisplay[] |
createGUIObjects()
Get the object that is the GUI for this Khepera3BatterySensor. |
void |
freeze()
Does nothing. |
double |
getAverageCurrent()
Get the average battery current (in amps) at the time of the last call to readStateFromRobot. |
double |
getCurrent()
Get the battery current (in amps) at the time of the last call to readStateFromRobot. |
double |
getTemperature()
Get the battery temperature (in celsius) at the time of the last call to readStateFromRobot. |
double |
getVoltage()
Get the battery voltage (in volts) at the time of the last call to read. |
void |
readStateFromRobot()
Get the current battery voltage from the Khepera 3. |
| Methods inherited from class dlife.robot.ArraySensor |
|---|
getAverage, getAverage, getMaximum, getMaximum, getMaximumIndex, getMaximumIndex, getMinimum, getMinimum, getMinimumIndex, getMinimumIndex, getNumValues, getSubset, getValue, getValues |
| Methods inherited from class dlife.robot.Device |
|---|
getAutoRead, getGUI, getGUIUpdateDelay, getReadDelay, getRobot, getSensorReadCount, getSensorReadRate, setAutoRead, setGUIUpdateDelay, setReadDelay, setRobot, shutDown, startAutoReadTimer, startUp, stopAutoReadTimer |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int VOLTAGE
public static final int CURRENT
public static final int AVERAGE_CURRENT
public static final int TEMPERATURE
| Constructor Detail |
|---|
public Khepera3BatterySensor()
| Method Detail |
|---|
public double getVoltage()
public double getCurrent()
public double getAverageCurrent()
public double getTemperature()
public void freeze()
freeze in class Devicepublic void readStateFromRobot()
readStateFromRobot in class DeviceRobotCommunicationException - if unable to communicate with the
Khepera 3.protected DeviceDisplay[] createGUIObjects()
createGUIObjects in class Device
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||