|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.nau.cs.scu.PMCentralInterface
public class PMCentralInterface
This class provides an interface for the physics simulation of the gimbal device. This class contains appropriate instances of all classes necessary for modeling the position of the gimbal and provides an interface of methods for interacting with these objects.
Field Summary | |
---|---|
(package private) long |
powerUpStartTime
|
Method Summary | |
---|---|
void |
beginPowerUp()
Instruct the servo controller to begin the power-up sequence. |
void |
beginPowerUpFromMEU()
Instruct the servo controller to begin the power-up sequence in response to a command from the MEU. |
void |
cageMode()
Enable "Cage Mode", which will return the gimbal to the home position. |
void |
disableTorquers()
This method will disable both servo motors and cause the device to stop in its tracks. |
void |
enableTorquers()
This method will enable both servo motors, allowing the device to move again. |
void |
failPowerUp()
Instruct the servo controller to fail the power-up sequence. |
static PMCentralInterface |
getInstance()
Provides a static instance of this class. |
Status |
getStatus(int selectedSensor)
This method gathers data about the state of the device from each component and returns a Status object describing that state. |
void |
passPowerUp()
Instruct the servo controller to pass the power-up sequence. |
void |
positionMode(double e,
double a)
Enable "Position Mode", which will move the gimbal to a specified position at the default rate for the device. |
void |
rateMode(double e,
double a)
Enable "Rate Mode", which will move the gimbal at a specified rate until it either reaches a hard or soft stop or another movement command is received. |
void |
receiveInvalidCommand()
Instruct the simulation to simulate receiving a single invalid command. |
void |
selectPortAntenna()
Set the Port Antenna as selected. |
void |
selectStarboardAntenna()
Set the Starboard Antenna as selected. |
void |
setErrors(boolean powerUpFail,
boolean invalidCommand,
boolean elevationRDError,
boolean azimuthRDError,
boolean elevationFoldBackError,
boolean azimuthFoldBackError,
boolean vendorError1,
boolean vendorError0)
Set all the custom error flags which this simulation is capable of accounting for: |
void |
setForcePowerUpFail(boolean forcePowerUpFail)
Instruct this simulation whether or not to pass any power-up test sequences. |
void |
setNegativeSoftStop(double e,
double a)
Set up the negative soft stop positions for each servo. |
void |
setPositiveSoftStop(double e,
double a)
Set up the positive soft stop positions for each servo. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
long powerUpStartTime
Method Detail |
---|
public static PMCentralInterface getInstance()
public void selectPortAntenna()
public void selectStarboardAntenna()
public void disableTorquers()
public void enableTorquers()
public void cageMode()
public void positionMode(double e, double a)
e
- The desired position for the elevation servo, in radians.a
- The desired position for the azimuth servo, in radians.public void rateMode(double e, double a)
e
- The desired rate for the elevation servo, in radians per second.a
- The desired rate for the azimuth servo, in radians per second.public void setPositiveSoftStop(double e, double a)
e
- The desired soft stop for the elevation servo, in radians.a
- The desired soft stop for the azimuth servo, in radians.public void setNegativeSoftStop(double e, double a)
e
- The desired soft stop for the elevation servo, in radians.a
- The desired soft stop for the azimuth servo, in radians.public Status getStatus(int selectedSensor)
selectedSensor
- the index of the sensor to be recorded in this status message.
public void setErrors(boolean powerUpFail, boolean invalidCommand, boolean elevationRDError, boolean azimuthRDError, boolean elevationFoldBackError, boolean azimuthFoldBackError, boolean vendorError1, boolean vendorError0)
powerUpFail
- This error will cause any power-up sequence to fail.invalidCommand
- This error will cause the simulation to treat all incoming commands as invalid.elevationRDError
- Indicate an Elevation RD Error.azimuthRDError
- Indicate an Azimuth RD Error.elevationFoldBackError
- Indicate an Elevation Current Fold-Back Error.azimuthFoldBackError
- Indicate an Azimuth Current Fold-Back Error.vendorError1
- Indicate vendor-defined error #1vendorError0
- Indicate vendor-defined error #0public void beginPowerUp()
public void beginPowerUpFromMEU()
public void passPowerUp()
public void failPowerUp()
public void setForcePowerUpFail(boolean forcePowerUpFail)
forcePowerUpFail
- If true, the simulation will fail any power-up test
sequences. If false, it will pass any power-up test sequences.public void receiveInvalidCommand()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |