org.mars_sim.msp.simulation
Interface LifeSupport

All Known Implementing Classes:
EVASuit, MockSettlement, Rover, Settlement

public interface LifeSupport

This interface represents a Life Support system that provides Oxygen, Water Temperature and Air Pressure to a Person. Implementations of this interface are used by the PhysicalCondition entity.

See Also:
PhysicalCondition

Method Summary
 double getAirPressure()
          Gets the air pressure of the life support system.
 int getLifeSupportCapacity()
          Gets the number of people the life support system can provide for.
 double getTemperature()
          Gets the temperature of the life support system.
 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 system.
 

Method Detail

lifeSupportCheck

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

Returns:
true if life support is OK
Throws:
java.lang.Exception - if error checking life support.

getLifeSupportCapacity

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

Returns:
the capacity of the life support system

provideOxygen

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

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

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

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

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

Returns:
air pressure (atm)

getTemperature

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

Returns:
temperature (degrees C)