org.mars_sim.msp.simulation.equipment
Class EVASuit

java.lang.Object
  extended by org.mars_sim.msp.simulation.Unit
      extended by org.mars_sim.msp.simulation.equipment.Equipment
          extended by org.mars_sim.msp.simulation.equipment.EVASuit
All Implemented Interfaces:
java.io.Serializable, LifeSupport, Malfunctionable

public class EVASuit
extends Equipment
implements LifeSupport, java.io.Serializable, Malfunctionable

The EVASuit class represents an EVA suit which provides life support for a person during a EVA operation.

See Also:
Serialized Form

Field Summary
protected  MalfunctionManager malfunctionManager
           
static java.lang.String TYPE
           
 
Fields inherited from class org.mars_sim.msp.simulation.Unit
CONTAINER_UNIT_EVENT, DESCRIPTION_EVENT, LOCATION_EVENT, MASS_EVENT, NAME_EVENT
 
Constructor Summary
EVASuit(Coordinates location)
          Constructor
 
Method Summary
 java.util.Collection<Person> getAffectedPeople()
          Gets a collection of people affected by this entity.
 double getAirPressure()
          Gets the air pressure of the life support system.
 int getLifeSupportCapacity()
          Gets the number of people the life support can provide for.
 MalfunctionManager getMalfunctionManager()
          Gets the unit's malfunction manager.
 double getTemperature()
          Gets the temperature of the life support system.
 boolean isFullyLoaded()
          Checks to see if the inventory is at full capacity with oxygen and water.
 boolean lifeSupportCheck()
          Returns true if life support is working properly and is not out of oxygen or water.
 double provideOxygen(double amountRequested)
          Gets oxygen from system.
 double provideWater(double amountRequested)
          Gets water from the system.
 void timePassing(double time)
          Time passing for EVA suit.
 
Methods inherited from class org.mars_sim.msp.simulation.Unit
addUnitListener, fireUnitUpdate, fireUnitUpdate, getBaseMass, getContainerUnit, getCoordinates, getDescription, getInventory, getMass, getName, getTopContainerUnit, getUnitManager, removeUnitListener, setBaseMass, setContainerUnit, setCoordinates, setDescription, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mars_sim.msp.simulation.malfunction.Malfunctionable
getInventory, getName
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

malfunctionManager

protected MalfunctionManager malfunctionManager
Constructor Detail

EVASuit

public EVASuit(Coordinates location)
        throws java.lang.Exception
Constructor

Parameters:
location - the location of the EVA suit.
Throws:
java.lang.Exception - if error creating EVASuit.
Method Detail

getMalfunctionManager

public MalfunctionManager getMalfunctionManager()
Gets the unit's malfunction manager.

Specified by:
getMalfunctionManager in interface Malfunctionable
Returns:
malfunction manager

lifeSupportCheck

public boolean lifeSupportCheck()
                         throws java.lang.Exception
Returns true if life support is working properly and is not out of oxygen or water.

Specified by:
lifeSupportCheck in interface LifeSupport
Returns:
true if life support is OK
Throws:
java.lang.Exception - if error checking life support.

getLifeSupportCapacity

public int getLifeSupportCapacity()
Gets the number of people the life support can provide for.

Specified by:
getLifeSupportCapacity in interface LifeSupport
Returns:
the capacity of the life support system.

provideOxygen

public double provideOxygen(double amountRequested)
                     throws java.lang.Exception
Gets oxygen from system.

Specified by:
provideOxygen in interface LifeSupport
Parameters:
amountRequested - the amount of oxygen requested from system (kg)
Returns:
the amount of oxygen actually received from system (kg)
Throws:
java.lang.Exception - if error providing oxygen.

provideWater

public double provideWater(double amountRequested)
                    throws java.lang.Exception
Gets water from the system.

Specified by:
provideWater in interface LifeSupport
Parameters:
amountRequested - the amount of water requested from system (kg)
Returns:
the amount of water actually received from system (kg)
Throws:
java.lang.Exception - if error providing water.

getAirPressure

public double getAirPressure()
Gets the air pressure of the life support system.

Specified by:
getAirPressure in interface LifeSupport
Returns:
air pressure (atm)

getTemperature

public double getTemperature()
Gets the temperature of the life support system.

Specified by:
getTemperature in interface LifeSupport
Returns:
temperature (degrees C)

isFullyLoaded

public boolean isFullyLoaded()
                      throws java.lang.Exception
Checks to see if the inventory is at full capacity with oxygen and water.

Returns:
true if oxygen and water stores at full capacity
Throws:
java.lang.Exception - if error checking inventory.

timePassing

public void timePassing(double time)
                 throws java.lang.Exception
Time passing for EVA suit.

Overrides:
timePassing in class Unit
Parameters:
time - the amount of time passing (millisols)
Throws:
java.lang.Exception - if error during time.

getAffectedPeople

public java.util.Collection<Person> getAffectedPeople()
Description copied from class: Equipment
Gets a collection of people affected by this entity.

Specified by:
getAffectedPeople in interface Malfunctionable
Overrides:
getAffectedPeople in class Equipment
Returns:
person collection