|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.nau.cs.scu.Command
public class Command
This class embodies the Command packet sent over a serial line.
Field Summary | |
---|---|
static double |
ANGLE_RATE_DIVISION_FACTOR
A constant used when converting between the 24 bit two's complement number and a floating point value of angles and rates. |
static int |
CAGE_MODE
The byte representing a cage mode command. |
static int |
COMMAND_PACKET_LENGTH
A constant describing the number of bytes in a command packet as described in the servo controller unit documentation. |
static int |
DISABLE_TORQUERS
The byte representing a starboard disable torquers command. |
static int |
ENABLE_TORQUERS
The byte representing an enable torquers command. |
static double |
MAXIMUM_ANGLE_OF_ROTATION
The maximum angle of rotation, in radians, that can be sent in a command. |
static double |
MAXIMUM_RATE_OF_ROTATION
The maximum rate of rotation, in radians/second, that can be sent in a command. |
static int |
PORT_ANTENNA_SELECT
The byte representing a port antenna select command. |
static int |
POSITION_MODE
The byte representing a position mode command. |
static int |
RATE_MODE
The byte representing a rate mode command. |
static int |
REQUEST_FOR_STATUS
The byte representing a request for status command. |
static int |
RUN_BIT
The byte representing a run BIT command. |
static int |
SET_NEGATIVE_SOFT_STOPS
The byte representing a set negative soft stops command. |
static int |
SET_POSITIVE_SOFT_STOPS
The byte representing a set positive soft stops command. |
static int |
STARBOARD_ANTENNA_SELECT
The byte representing a starboard antenna select command. |
static int |
START_CHARACTER
The byte of the start character. |
Constructor Summary | |
---|---|
Command(byte[] commandArray)
The primary constructor for this class. |
Method Summary | |
---|---|
void |
execute()
Looks at the structure of this command object and decides how to process the command by making changes in the physics model. |
double |
getAzimuth()
This is a utility method that retrieves the floating point value of the azimuth rate or position (in radians) specified in this command object. |
int |
getCommandMode()
Gets the command mode of this command object. |
double |
getElevation()
This is a utility method that retrieves the floating point value of the elevation rate or position (in radians) specified in this command object. |
java.lang.String |
toString()
Produces a basic string describing this command object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int START_CHARACTER
public static final int POSITION_MODE
public static final int RATE_MODE
public static final int STARBOARD_ANTENNA_SELECT
public static final int PORT_ANTENNA_SELECT
public static final int DISABLE_TORQUERS
public static final int ENABLE_TORQUERS
public static final int CAGE_MODE
public static final int RUN_BIT
public static final int SET_POSITIVE_SOFT_STOPS
public static final int SET_NEGATIVE_SOFT_STOPS
public static final int REQUEST_FOR_STATUS
public static final int COMMAND_PACKET_LENGTH
public static final double MAXIMUM_ANGLE_OF_ROTATION
public static final double MAXIMUM_RATE_OF_ROTATION
public static final double ANGLE_RATE_DIVISION_FACTOR
Constructor Detail |
---|
public Command(byte[] commandArray)
commandArray
- The byte packet representing the commandMethod Detail |
---|
public double getAzimuth()
public double getElevation()
public int getCommandMode()
public void execute()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |