|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient.PlayerDevice
javaclient.EnergyInterface
public class EnergyInterface
The energy interface provides data about energy storage, consumption and charging. This interface accepts no commands.
Field Summary |
---|
Fields inherited from class javaclient.PlayerDevice |
---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
Constructor Summary | |
---|---|
EnergyInterface(PlayerClient pc,
short indexOfDevice)
Constructor for EnergyInterface. |
Method Summary | |
---|---|
byte |
getCharging()
Returns the charge exchange status: if 1, the device is currently receiving charge from another energy device. |
void |
getMapData(byte enable_input,
byte enable_output)
Configuration request: Controll recharging. |
int |
getMJoules()
Returns the energy stored, in milliJoules. |
int |
getMWatts()
Returns the estimated current energy consumption (negative values) or aquisition (positive values), in milliWatts (milliJoules/sec). |
void |
readData()
The energy interface reports the amount of energy stored, current rate of energy consumption or aquisition, and whether or not the device is connected to a charger. |
Methods inherited from class javaclient.PlayerDevice |
---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, handleResponse, readHeader, sendHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnergyInterface(PlayerClient pc, short indexOfDevice)
pc
- a reference to the PlayerClient objectindexOfDevice
- the index of the deviceMethod Detail |
---|
public void readData()
readData
in class PlayerDevice
public int getMJoules()
public int getMWatts()
public byte getCharging()
public void getMapData(byte enable_input, byte enable_output)
enable_input
- boolean controlling recharging. If FALSE, recharging is
disabled. Defaults to TRUEenable_output
- boolean controlling whether others can recharge from this
device. If FALSE, charging others is disabled. Defaults to TRUE.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |