|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.Unit
org.mars_sim.msp.simulation.vehicle.Vehicle
org.mars_sim.msp.simulation.vehicle.GroundVehicle
org.mars_sim.msp.simulation.vehicle.Rover
public class Rover
The Rover class represents the rover type of ground vehicle. It contains information about the rover.
| Field Summary | |
|---|---|
static double |
LIFE_SUPPORT_RANGE_ERROR_MARGIN
|
| Fields inherited from class org.mars_sim.msp.simulation.vehicle.GroundVehicle |
|---|
STUCK |
| Fields inherited from class org.mars_sim.msp.simulation.vehicle.Vehicle |
|---|
EMERGENCY_BEACON_EVENT, MAINTENANCE, MALFUNCTION, malfunctionManager, MOVING, OPERATOR_EVENT, PARKED, RANGE_ERROR_MARGIN, RESERVED_EVENT, SPEED_EVENT, STATUS_EVENT, TOWED |
| Fields inherited from class org.mars_sim.msp.simulation.Unit |
|---|
CONTAINER_UNIT_EVENT, DESCRIPTION_EVENT, LOCATION_EVENT, MASS_EVENT, NAME_EVENT |
| Fields inherited from interface org.mars_sim.msp.simulation.vehicle.Crewable |
|---|
CREW_CAPACITY_EVENT |
| Constructor Summary | |
|---|---|
Rover(java.lang.String name,
java.lang.String description,
Settlement settlement)
Constructs a Rover object at a given settlement |
|
| Method Summary | |
|---|---|
java.util.Collection<Person> |
getAffectedPeople()
Gets a collection of people affected by this entity. |
Airlock |
getAirlock()
Gets the rover's airlock. |
double |
getAirPressure()
Gets the air pressure of the life support system. |
java.util.Collection<Person> |
getCrew()
Gets a collection of the crewmembers. |
int |
getCrewCapacity()
Gets the number of crewmembers the vehicle can carry. |
int |
getCrewNum()
Gets the current number of crewmembers. |
AmountResource |
getFuelType()
Gets the resource type that this vehicle uses for fuel. |
Lab |
getLab()
Gets the rover's laboratory |
int |
getLifeSupportCapacity()
Gets the number of people the life support can provide for. |
double |
getRange()
Gets the range of the vehicle |
SickBay |
getSickBay()
Gets the rover's sickbay. |
double |
getTemperature()
Gets the temperature of the life support system. |
Vehicle |
getTowedVehicle()
Gets the vehicle this rover is currently towing. |
boolean |
hasLab()
Checks if the rover has a laboratory. |
boolean |
hasSickBay()
Checks if the rover has a sickbay. |
boolean |
isAppropriateOperator(VehicleOperator operator)
Checks if a particular operator is appropriate for a vehicle. |
boolean |
isCrewmember(Person person)
Checks if person is a crewmember. |
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. |
void |
setCoordinates(Coordinates newLocation)
Sets unit's location coordinates |
void |
setTowedVehicle(Vehicle towedVehicle)
Sets the vehicle this rover is currently towing. |
void |
timePassing(double time)
Perform time-related processes |
| Methods inherited from class org.mars_sim.msp.simulation.vehicle.GroundVehicle |
|---|
getDriver, getElevation, getStatus, getTerrainGrade, getTerrainHandlingCapability, isStuck, setDriver, setElevation, setStuck, setTerrainHandlingCapability |
| 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, 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 |
|---|
public static final double LIFE_SUPPORT_RANGE_ERROR_MARGIN
| Constructor Detail |
|---|
public Rover(java.lang.String name,
java.lang.String description,
Settlement settlement)
throws java.lang.Exception
name - the name of the roverdescription - the configuration description of the vehicle.settlement - the settlement the rover is parked at
java.lang.Exception - if rover could not be constructed.| Method Detail |
|---|
public void setTowedVehicle(Vehicle towedVehicle)
setTowedVehicle in interface TowingtowedVehicle - the vehicle being towed.public Vehicle getTowedVehicle()
getTowedVehicle in interface Towingpublic int getCrewCapacity()
getCrewCapacity in interface Crewablepublic int getCrewNum()
getCrewNum in interface Crewablepublic java.util.Collection<Person> getCrew()
getCrew in interface Crewablepublic boolean isCrewmember(Person person)
isCrewmember in interface Crewableperson - the person to check
public boolean lifeSupportCheck()
throws java.lang.Exception
lifeSupportCheck in interface LifeSupportjava.lang.Exception - if error checking life support.public int getLifeSupportCapacity()
getLifeSupportCapacity in interface LifeSupport
public double provideOxygen(double amountRequested)
throws java.lang.Exception
provideOxygen in interface LifeSupportamountRequested - the amount of oxygen requested from system (kg)
java.lang.Exception - if error providing oxygen.
public double provideWater(double amountRequested)
throws java.lang.Exception
provideWater in interface LifeSupportamountRequested - the amount of water requested from system (kg)
java.lang.Exception - if error providing water.public double getAirPressure()
getAirPressure in interface LifeSupportpublic double getTemperature()
getTemperature in interface LifeSupportpublic Airlock getAirlock()
getAirlock in interface Airlockable
public void timePassing(double time)
throws java.lang.Exception
timePassing in class Vehicletime - the amount of time passing (in millisols)
exception - if error during time.
java.lang.Exception - if error during time.public java.util.Collection<Person> getAffectedPeople()
getAffectedPeople in interface MalfunctionablegetAffectedPeople in class Vehiclepublic boolean hasLab()
public Lab getLab()
public boolean hasSickBay()
public SickBay getSickBay()
getSickBay in interface Medicalpublic boolean isAppropriateOperator(VehicleOperator operator)
isAppropriateOperator in class Vehicleoperator - the operator to check
public AmountResource getFuelType()
getFuelType in class Vehiclepublic void setCoordinates(Coordinates newLocation)
setCoordinates in class UnitnewLocation - the new location of the unit
public double getRange()
throws java.lang.Exception
getRange in class Vehiclejava.lang.Exception - if error getting range.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||