package mde.jini.service;
/**
* The TankCommands interface represents the low-level command codes that are sent and the
* status messages that are received from the Lego Mindstorms tanks.
*/
public interface TankCommands{
/** Base for all tank command requests */
public static final byte REQUEST = (byte)0x20;
/** Command code to move the tank forward */
public static final byte FORWARD = (byte)0x0;
/** Command code to move the tank backward */
public static final byte BACKWARD = (byte)0x01;
/** Command code to turn the tank to the left */
public static final byte LEFT = (byte)0x02;
/** Command code to turn the tank to the right */
public static final byte RIGHT = (byte)0x03;
/** Command code to stop the tank from moving/turning */
public static final byte STOP = (byte)0x04;
/** Command code to fire the tank's laser */
public static final byte FIRE = (byte)0x05;
/** Command code requesting the tank's status */
public static final byte STATUS = (byte)0x06;
public static final byte HELLO = (byte)0x07;
/** Response indicating tank is OK */
public static final byte OK = (byte)0x0;
/** Response indicating tank has hit an obstruction */
public static final byte OBSTRUCTED = (byte)0x01;
/** Response indicating tank has been hit by a laser */
public static final byte HIT = (byte)0x02;
public static final byte ECHO_BIT = (byte)0x80;
public static final byte HIT_BIT = (byte)0x10;
public static final byte OBSTRUCTED_BIT = (byte)0x08;
public static final byte STATUS_MASK = (byte)0x18;
public static final byte CMD_MASK = (byte)0x78;
public static final byte ID_MASK = (byte)0x07;
}