javaclient
Class PowerInterface

java.lang.Object
  extended by javaclient.PlayerDevice
      extended by javaclient.PowerInterface

public class PowerInterface
extends PlayerDevice

The power interface provides access to a robot's power subsystem. This interface seems to be deprecated.

Version:
Author:
Maxim A. Batalin & Radu Bogdan Rusu

Field Summary
protected  short PLAYER_MAIN_POWER_REQ
           
 
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
PowerInterface(PlayerClient pc, short indexOfDevice)
          Constructor for PowerInterface.
 
Method Summary
 int getCharge()
          Get the battery charge value.
 void readData()
          Read the battery voltage value.
 void requestCharge()
          Request a battery voltage charge value from the Player server.
 
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
 

Field Detail

PLAYER_MAIN_POWER_REQ

protected final short PLAYER_MAIN_POWER_REQ
See Also:
Constant Field Values
Constructor Detail

PowerInterface

public PowerInterface(PlayerClient pc,
                      short indexOfDevice)
Constructor for PowerInterface.

Parameters:
pc - a reference to the PlayerClient object
indexOfDevice - the index of the device
Method Detail

readData

public void readData()
Read the battery voltage value.

Overrides:
readData in class PlayerDevice

getCharge

public int getCharge()
Get the battery charge value.

Returns:
battery voltage as an integer

requestCharge

public void requestCharge()
Request a battery voltage charge value from the Player server.